skywalking icon indicating copy to clipboard operation
skywalking copied to clipboard

[OSPP] Collect PVM metrics and display in the WebUI dashboard

Open kezhenxu94 opened this issue 4 years ago • 10 comments

Tracing distributed systems is one of the main features of SkyWalking, with those traces, it can analyze some service metrics such as CPM, success rate, error rate, apdex, etc. SkyWalking also supports receiving metrics from the agent side directly. In this task, we expect the Python agent to report its Python Virtual Machine (PVM) metrics, including (but not limited to, whatever metrics useful are also acceptable) CPU usage (%), memory used (MB), (active) thread/coroutine counts, garbage collection count, etc.

kezhenxu94 avatar Dec 03 '20 11:12 kezhenxu94

Hi This looks like an interesting project. Can you provide some resources which would help me get started, especially the link for java-agent so that I can get a good idea about how to make the meter APIs with python-agent and send data to the backend?

so far I have gone through the skywalking docs and skywalker agent test tool ( which I suppose is used to test all the agents )

Thanks

tushar5526 avatar Jun 08 '21 13:06 tushar5526

JVM reporting through some native API, https://github.com/apache/skywalking/blob/master/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/jvm/JVMService.java. The JVM specific API is https://github.com/apache/skywalking-data-collect-protocol/blob/master/language-agent/JVMMetric.proto

Right now, it is better to use a more general meter API to report all metrics, https://github.com/apache/skywalking-data-collect-protocol/blob/master/language-agent/Meter.proto.

After you reported, you could work on MAL to do metric generation. https://skywalking.apache.org/docs/main/latest/en/setup/backend/backend-meter/

wu-sheng avatar Jun 08 '21 13:06 wu-sheng

Hi

This looks like an interesting project. Can you provide some resources which would help me get started, especially the link for java-agent so that I can get a good idea about how to make the meter APIs with python-agent and send data to the backend?

so far I have gone through the skywalking docs and skywalker agent test tool ( which I suppose is used to test all the agents )

Thanks

Hi @tushar5526 , the issue description is outdated and I just now updated it.

kezhenxu94 avatar Jun 08 '21 13:06 kezhenxu94

Thanks, @kezhenxu94 @wu-sheng. I am able to connect the dots now. This is my first exposure to monitoring tools and I am loving the idea and this project.

So currently we can trace some libraries and this issue's task is to also send the PVM metrics to be displayed on the dashboard and then use MAL for metric generation using the reported metrics. (Please correct me if I am wrong somewhere in my understanding )

Also, can you mention any project which is using skywalking-python for monitoring purposes? (Any project that shows the complete process of setting up skywalking using python agent)

It would help me get a stronger understanding. Any blog or related article would also suffice. ( I tried googling, but couldn't get any )

tushar5526 avatar Jun 08 '21 15:06 tushar5526

can you mention any project which is using skywalking-python for monitoring purposes? (Any project that shows the complete process of setting up skywalking using python agent)

I think you could write any server app(with some HTTP/RPC listening) in python, by using the libraries we documented in the supported list. Then follow the python agent log to install. After the app is up and running, send some traffic to your app, SkyWalking UI could visualize your access and traffic statistic.

wu-sheng avatar Jun 09 '21 01:06 wu-sheng

I thought #7084 was a part of this. I think I might have to wait for gloria-veg to complete it before working on this.

tushar5526 avatar Jun 09 '21 05:06 tushar5526

Please Assign this to me....

mihir1739 avatar Oct 07 '22 13:10 mihir1739

@mihir1739 I think this is on-going, https://github.com/apache/skywalking-python/pull/238

wu-sheng avatar Oct 07 '22 13:10 wu-sheng

Please Assign this to me....

Hi, this is working in process already

kezhenxu94 avatar Oct 07 '22 13:10 kezhenxu94

Please Assign this to me....

Hello there! if you would like to work on something else please take a look at good first issues, there's other Python based tasks. This one is already undertaken by a OSPP student.

Superskyyy avatar Oct 07 '22 14:10 Superskyyy

OSPP task PR merged, this issue is completed

Superskyyy avatar Oct 26 '22 20:10 Superskyyy

The UI configurations are not yet submitted to the main repo 😄

kezhenxu94 avatar Oct 27 '22 02:10 kezhenxu94

The UI configurations are not yet submitted to the main repo 😄

Ohooo I totally forgot about it :|

Superskyyy avatar Oct 27 '22 14:10 Superskyyy