-
Notifications
You must be signed in to change notification settings - Fork 227
Add public API to retrieve trace parent header. #956
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
Conversation
💚 CLA has been signed |
Couldn't find which place I should add the unit test, does someone has any suggestion? I think there isn't a test case for public API. |
Hey @diegosperes. This looks like a nice addition to the public API! You're right, the testing for public APIs isn't very extensive, but there are a few here that might serve as inspiration: apm-agent-python/tests/instrumentation/transactions_store_tests.py Lines 363 to 442 in 65e8b7c
It would also be great if you could add an entry in the traceparent docs here: https://github.com/elastic/apm-agent-python/blob/master/docs/api.asciidoc#traceparent. |
@beniwohli thanks for guide me, I added a few missing test to the public API also a new entry for this function in the traceparent docs. |
💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great work, thanks a lot!
@basepi ok with merging this?
* Add public API to retrieve trace parent header. * Exposing get_trace_parent_header function * Add missing tests for public api. * Add get_trace_parent_header in the traceparent docs.
What does this pull request do?
Add a new public API to easily return the trace parent header of the current transaction, currently it's necessary to dig into the project and understand how it works.
Code necessary to get the current trace parent header without the new function.
Related issues
#954