Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python agent namespace support #10317

Closed
2 tasks done
Superskyyy opened this issue Jan 30, 2023 Discussed in #10315 · 0 comments
Closed
2 tasks done

Python agent namespace support #10317

Superskyyy opened this issue Jan 30, 2023 Discussed in #10315 · 0 comments
Labels
agent Language agent related. bug Something isn't working and you are sure it's a bug! python Python agent related

Comments

@Superskyyy
Copy link
Member

Superskyyy commented Jan 30, 2023

As discussed, there are two available namespace settings that needs to be enhanced.

These are minor changes.

  • Add namespace to service name suffix

  • Add a new kakfa reporter namespace to prefix kafka-topic

Discussed in #10315

Originally posted by xiaozaiyuji January 29, 2023
What happened
I do a test by skywalking python kafka 0.8.0,but it can not find the service in skywalking ui and elasticsearch.I use the oap server with version 9.2.0,and many java agent use kafka reporter had already manage trace by it.But the python application can not find, I check the config many times,and I did many test.I had to get help by the officical ,maybe this is a config error by me,but ,I think it is a rarely mistake by me.

What you expected to happen
I want to see the python application in the skywalking ui,

How to reproduce
Dockerfile is this.

FROM python:3.9

#setting the environment
ENV SW_AGENT_NAMESPACE v92
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES http://oap-server.address/
ENV SW_AGENT_PROTOCOL kafka
ENV SW_KAFKA_REPORTER_BOOTSTRAP_SERVERS "kafka1:port"
ENV SW_AGENT_INSTANCE skywalking-python-test
ENV SW_AGENT_NAME skywalking-python-test

install telnet
RUN apt-get update &&
apt-get install -y --no-install-recommends telnet &&
apt-get clean &&
rm -rf /var/lib/apt/lists/*;

install dependency
COPY requirements.txt requirements.txt
RUN pip install -r /requirements.txt

print the infomation
RUN pip --version
RUN pip list

RUN mkdir /release
COPY / /release/
WORKDIR /release
EXPOSE 8080
CMD ["sw-python","run","python3","app.py"]`'''

app.py

from aiohttp import web

routes = web.RouteTableDef()

@routes.get('/healthCheck')
async def health_check(request):
return web.Response(text="OK")

if name == "main":
app = web.Application()
app.add_routes(routes)
web.run_app(app, host="0.0.0.0", port=8080)

requirements.txt

apache-skywalking[kafka]
aiohttp==3.7.4

Anything else
the log is as follows

skywalking [MainThread] [WARNING] plugin sw_bottle failed to install, please disregard this warning if the corresponding package was not used in your project
2023-01-29T08:57:38.080541949Z skywalking [MainThread] [WARNING] plugin sw_celery failed to install, please disregard this warning if the corresponding package was not used in your project
2023-01-29T08:57:38.081060151Z skywalking [MainThread] [WARNING] plugin sw_django failed to install, please disregard this warning if the corresponding package was not used in your project
2023-01-29T08:57:38.081177214Z skywalking [MainThread] [WARNING] plugin sw_elasticsearch failed to install, please disregard this warning if the corresponding package was not used in your project
2023-01-29T08:57:38.081522769Z skywalking [MainThread] [WARNING] plugin sw_falcon failed to install, please disregard this warning if the corresponding package was not used in your project
2023-01-29T08:57:38.081794040Z skywalking [MainThread] [WARNING] plugin sw_fastapi failed to install, please disregard this warning if the corresponding package was not used in your project
2023-01-29T08:57:38.081898196Z skywalking [MainThread] [WARNING] plugin sw_flask failed to install, please disregard this warning if the corresponding package was not used in your project
2023-01-29T08:57:38.084788975Z skywalking [MainThread] [WARNING] plugin sw_mysqlclient failed to install, please disregard this warning if the corresponding package was not used in your project
2023-01-29T08:57:38.085171451Z skywalking [MainThread] [WARNING] plugin sw_psycopg failed to install, please disregard this warning if the corresponding package was not used in your project
2023-01-29T08:57:38.085723379Z skywalking [MainThread] [WARNING] plugin sw_psycopg2 failed to install, please disregard this warning if the corresponding package was not used in your project
2023-01-29T08:57:38.085757244Z skywalking [MainThread] [WARNING] plugin sw_pymongo failed to install, please disregard this warning if the corresponding package was not used in your project
2023-01-29T08:57:38.086524734Z skywalking [MainThread] [WARNING] plugin sw_pymysql failed to install, please disregard this warning if the corresponding package was not used in your project
2023-01-29T08:57:38.086535096Z skywalking [MainThread] [WARNING] plugin sw_pyramid failed to install, please disregard this warning if the corresponding package was not used in your project
2023-01-29T08:57:38.086554099Z skywalking [MainThread] [WARNING] plugin sw_rabbitmq failed to install, please disregard this warning if the corresponding package was not used in your project
2023-01-29T08:57:38.086694331Z skywalking [MainThread] [WARNING] plugin sw_redis failed to install, please disregard this warning if the corresponding package was not used in your project
2023-01-29T08:57:38.087051310Z skywalking [MainThread] [WARNING] plugin sw_requests failed to install, please disregard this warning if the corresponding package was not used in your project
2023-01-29T08:57:38.087367258Z skywalking [MainThread] [WARNING] plugin sw_sanic failed to install, please disregard this warning if the corresponding package was not used in your project
2023-01-29T08:57:38.088014390Z skywalking [MainThread] [WARNING] plugin sw_tornado failed to install, please disregard this warning if the corresponding package was not used in your project
2023-01-29T08:57:38.088024525Z skywalking [MainThread] [WARNING] plugin sw_urllib3 failed to install, please disregard this warning if the corresponding package was not used in your project

As a result,the skywalking ui and es can not find the application, I had already confirm that the network about oap server and the kafka server is right.So ,can any body help me to find what's wront

@Superskyyy Superskyyy added bug Something isn't working and you are sure it's a bug! agent Language agent related. python Python agent related labels Jan 30, 2023
@Superskyyy Superskyyy added this to the PythonAgent 1.0.0 milestone Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent Language agent related. bug Something isn't working and you are sure it's a bug! python Python agent related
Projects
None yet
Development

No branches or pull requests

1 participant