Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Supporting Linux Perf events with Opentracing #134

Closed
hkshaw1990 opened this issue Jan 30, 2017 · 2 comments
Closed

Supporting Linux Perf events with Opentracing #134

hkshaw1990 opened this issue Jan 30, 2017 · 2 comments

Comments

@hkshaw1990
Copy link

This issue is to discuss a proposal on adding perf events support within a span. Perf events (https://perf.wiki.kernel.org/index.php/Tutorial#Events) are platform side counters which can provide valuable insights on what is happening inside a span and can help us in identifying resource bottlenecks.

We would like to hear your thoughts and suggestions on the same.

We did a small proof-of-concept implementation with opentracing-go and zipkin-go-opentracing to show how the eventual integration may look.

Opentracing-go api will have a PerfString event as an addition to the span creation function. And, the backend Zipkin collector will be responsible for starting, reading, logging and closing the required counter.

To try out the opentracing-go with perfevents, this commit can be used :
platform-tracing@9391ff1
And, to try out zipkin with perfevents, this commit can be used :
platform-tracing/zipkin-go-opentracing@1f9fb2a

A "perfevents" library has been added to zipkin-go-opentracing which assists in creating, maintaining and reading the perf events like cpu-cycles, instructions, cache-misses etc. An example usage in a sample application:
var eventName opentracing.PerfString
eventName = "cpu-cycles"
parent := tracer.StartSpan("Parent", eventName)

And, we can see the output as shared in the attachment.
zipkin_github

@bhs
Copy link
Contributor

bhs commented Jan 30, 2017

Thank you for bringing this up. Before we launch into an actual discussion, I'm curious if it would make more sense to move the issue into the github.com/opentracing/specification repo since (IIUC) there is nothing Go-specific about the concept here. If that sounds good, feel free to close this issue and open a new one in that other repository.

@hkshaw1990
Copy link
Author

Right. Thanks for pointing to the correct repo. Have raised an issue there (opentracing/specification#36) and closing this one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants