Skip to content

feat: Improved custom tracing span API - #10

Merged
octonato merged 4 commits into
mainfrom
wip-improved-custom-tracing
Nov 21, 2024
Merged

octonato merged 4 commits into
mainfrom
wip-improved-custom-tracing

Conversation

@octonato

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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
Copy Markdown
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.

@efgpinto efgpinto left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Contributor 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
Copy Markdown
Contributor Author

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

@octonato
octonato merged commit f4fba08 into main Nov 21, 2024
@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