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

feat: Improved custom tracing span API #10

Merged
merged 4 commits into from
Nov 21, 2024
Merged

Conversation

octonato
Copy link
Member

Bringing back Johan's PR (#3) that I broke.

@github-actions github-actions bot added documentation documentation related akka-sdk labels Nov 20, 2024

// test expects a w3c encoded trace parent so here are some hoops to get that
// FIXME if this turns out to be a common need we could provide the w3c encoded traceparent from Tracing
// but for now leaving otel hoops to users is fine enough
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that W3C (header) encoding of the trace context is just one way to encode it, might be the most common though, so users may want that for putting in events on message brokers etc.

The reason for us to provide convenience is mostly about the OTel API being messy and not allowing an easy way to just get the encoded string and use for whatever but some java injection design to allow many different headers etc (trace state as well as the traceparent).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think this was the main reason we added it before. But we can always do it again in the future.

Copy link
Contributor

@efgpinto efgpinto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


// test expects a w3c encoded trace parent so here are some hoops to get that
// FIXME if this turns out to be a common need we could provide the w3c encoded traceparent from Tracing
// but for now leaving otel hoops to users is fine enough
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think this was the main reason we added it before. But we can always do it again in the future.

@octonato
Copy link
Member Author

CLA check is stuck. Closing and reopening.

@octonato octonato closed this Nov 21, 2024
@octonato octonato reopened this Nov 21, 2024
@octonato
Copy link
Member Author

I can't approve my own PR, but I approve this one.

@octonato octonato merged commit f4fba08 into main Nov 21, 2024
24 checks passed
@octonato octonato deleted the wip-improved-custom-tracing branch November 21, 2024 11:35
johanandren added a commit that referenced this pull request Nov 21, 2024
* feat: Improved custom tracing span API

* Drop the tracing context, provide access to parent span if needed, update docs

* Improved javadoc

* review feedback

---------

Co-authored-by: Johan Andrén <johan@markatta.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants