-
Notifications
You must be signed in to change notification settings - Fork 160
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
[WIP - Experimental] feat: Add Span End Callback #2407
Conversation
private static function getRootSpan(SpanData $span): RootSpanData | ||
{ | ||
while (!($span instanceof RootSpanData) && $span->parent) { | ||
$span = $span->parent; | ||
} | ||
return $span; | ||
} |
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.
Note to self: May be wrong when considering intertwined start_trace_span
& OTel starts w/ setParent(false)
4d19b4f
to
78fe75b
Compare
BenchmarksBenchmark execution time: 2024-01-10 15:04:34 Comparing candidate commit 78fe75b in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 37 metrics, 52 unstable metrics. scenario:PHPRedisBench/benchRedisBaseline
|
|
Description
Experimental
Leverage span end callback to end the OTel Span (if any) when a span is closed using the DD Api. This affects both OTel-created & remapped OTel spans. The goal is to fix edge cases + properly handle trace ids (See Tests Cases).
Sample Edge Case:
At present, there are issues with the third and fifth steps where the trace states are not being updated correctly in accordance with the OTel-API. Once these changes are made, the trace states can be dynamically retrieved and distributed context changes will accurately be reflected in the OTel API.
TODO:
Reviewer checklist