Symfony messenger telemetry refactor#2466
Merged
Merged
Conversation
- add optional max_batch_age (monotonic hrtime) to span/metric/log batching processors
…messages get their own trace - Context holds the active SpanContext instead of a standalone trace id; root spans generate a new TraceId (OTEL-aligned) - remove Context::withTraceId/create and the context(?TraceId) DSL seeding; withActiveSpan takes a SpanContext - symfony-telemetry-bundle: each consumed Messenger message is its own trace, linked to the producer (link mode) - symfony-telemetry-bundle: configurable worker-span link (link_to_worker, default true) + per-message flush subscriber
- remove per-tracer span stack; active span lives in shared Context - parent resolution falls through to Context::activeSpan() only - nesting popped via Scope detach instead of stack pop - add cross-tracer parenting + attached-context conformance tests
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 1.x #2466 +/- ##
============================================
- Coverage 85.14% 85.13% -0.01%
- Complexity 21259 21321 +62
============================================
Files 1605 1609 +4
Lines 65589 65763 +174
============================================
+ Hits 55846 55988 +142
- Misses 9743 9775 +32 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Log
Added
flow-php/telemetry- time-based flush for batching log, metric and span processorsflow-php/symfony-telemetry-bundle- per-message telemetry flush on Messenger worker eventsFixed
Changed
flow-php/telemetry- span parent is now derived solely from the Contextflow-php/telemetry- trace id is derived from the active span; each root span starts a new traceflow-php/symfony-telemetry-bundle- each consumed Messenger message is its own trace, linked to the producerRemoved
flow-php/telemetry- per-tracer span stackflow-php/telemetry-Context::withTraceId()and the standalone context trace idDeprecated
Security