-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Document how to test that you're instrumenting traces correctly #1630
Comments
Some specific things that would be covered:
|
@cartermp and I have been discussing this on the pollinators slack - I'm happy to write up some docs for Go if someone would be kind enough to point me to where they should live :) |
Put it in a subpage of https://opentelemetry.io/docs/instrumentation/go/, we can then still decide to move it somewhere else. |
I wrote a rough draft of I think what this issue is asking for in https://temporaryhack.com/blog/opentelemetry-testing, for elixir. Happy to take some feedback on it, polish it, and submit it -- if it's what y'all are looking for. |
Can you put it as a (draft) PR here? makes the review easier for us. |
Done, submitted rough draft here |
Thanks @akasprzok - your doc is live! |
@cartermp: can we copy some of the content from elixir/erlang over to the other languages or is it too specific? |
The content can probably be copied over easily and tweaked as needed, but the code samples will be different since setting up a test harness can vary so wildly from language to language. |
Thank you all for making my first contribution such a fantastic experience! |
Something I've seen come up a few times is: "How do I unit test that I'm adding the right attributes to a span?"
You can't test this with the tracing API because it doesn't give you access to this data. But you can depend on the "SDK trace API" in a language to get access to a read/write span.
This should probably be documented with an example in all the languages with stable tracing:
The text was updated successfully, but these errors were encountered: