Symfony messenger autoinstrumentation noise#2501
Merged
Merged
Conversation
- add `dbal.exclude_tables` to skip tracing queries against listed tables - add opt-in `cache.flush_deferred` that drains deferred cache writes under one `cache.flush` span - unify cache span names to dotted lowercase (`cache.commit`, `cache.save_deferred`, …) and snake_case `cache.operation`
…acing per-comman - replace worker-poll subscriber with ConsumeCommandSuppressionSubscriber that suppresses the whole messenger:consume command - enforce suppression via new SuppressingSampler; Sampler::shouldSample now receives the parent Context - drop the long-lived messenger:consume console span in the worker - remove ResettableContextStorage and MemoryContextStorage::reset(); no per-cycle context reset
…le instrumentatio - auto-inject tracing middleware into all buses via MessengerTelemetryPass - delete WorkerReceiveCycleSubscriber and collapse trace modes to a bool - drop the link config and MessengerHandlerLink - generalize worker suppression to console.exclude_commands (default messenger:consume), fully suppressing the command and its children
… http_kernel path - attach OpenTelemetry suppression key for the whole excluded request (through kernel.terminate) - stops orphan DBAL/cache/terminate-phase spans on excluded paths (e.g. /_wdt) - regression tests asserting no spans under suppression (DBAL, cache, http_client, PSR-18, postgresql)
…SON serialize - add TelemetryStamp::getContext() so ObjectNormalizer round-trips context
…tabase instrumentatio - transaction spans (grouped/per_operation/off) that nest query spans as children - DBAL query spans gain semconv names + full db.*/server.* attributes and bound parameters - DBAL emits db.client.operation.duration and db.client.response.returned_rows metrics - metrics tagged with low-cardinality attributes only (no query text, params or savepoint) - config: trace_transactions bool replaced by transaction_spans enum, drop dbal.log_sql, add collect_metrics/include_parameters - complete open transaction spans on close/destruct to avoid leaks
…ntions
- move custom attribute keys out of reserved OTel namespaces to flow.*
prefixes
- define official keys once in shared
SemConvAttributes/SemConvMetrics/CacheAttributes (flow-php/telemetry)
- HTTP spans: client name is bare {method}, server.port always set;
server span gains url.query/user_agent.original, drops url.full
- messenger: destination = transport, remove metrics_duration_unit
option and enum, duration fixed at seconds
- phpunit: official test.* registry keys, new test.suite.run.status,
durations ms→s
- UCUM units (By, {operation}, {row}, {test}, {row}/s) and
low-cardinality span names (filesystem.read/write,
cache.set/delete/clear); upgrading.md migration tables
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 1.x #2501 +/- ##
============================================
+ Coverage 85.76% 85.90% +0.14%
- Complexity 21763 21848 +85
============================================
Files 1645 1650 +5
Lines 67157 67468 +311
============================================
+ Hits 57595 57958 +363
+ Misses 9562 9510 -52 🚀 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- SharedSemConvAttributesandSemConvMetricsconstants for OTel semantic conventions.flow-php/telemetry-SuppressingSamplerto suppress spans for excluded paths and commands.flow-php/postgresql-TransactionSpanMode(grouped/per_operation/off) to control transaction spans.flow-php/symfony-telemetry-bundle- DBALtransaction_spans,collect_metricsand parameter-capture config options.flow-php/phpunit-telemetry-bridge-test.suite.run.statusattribute andtelemetry.sdk.versionresource attribute.Fixed
flow-php/symfony-telemetry-bundle- Preserve traceparent across messenger JSON serialization.flow-php/symfony-telemetry-bundle- Excluded http_kernel paths now suppress the whole request, removing orphan root spans.flow-php/symfony-telemetry-bundle- Suppress messenger worker poll/idle noise and tame orphan cache/DBAL spans.Changed
flow-php/symfony-telemetry-bundle- Simplify messenger tracing to true/false and auto-inject the middleware into all buses.flow-php/symfony-telemetry-bundle- Align cache, DBAL and HTTP span names and attributes with stable OTel semantic conventions.flow-php/symfony-telemetry-bundle- Move flow-custom attribute keys out of reserved OTel namespaces underflow.*.flow-php/telemetry-Sampler::shouldSample()now receives the parentContext.flow-php/telemetry- SwitchTimeUnitvalues to UCUM (s/us/ms).flow-php/postgresql- ReplacetraceTransactionsbool withtransactionSpansmode and low-cardinality metric dimensions.flow-php/phpunit-telemetry-bridge- Aligntest.*keys with the OTel test registry and report durations in seconds.flow-php/filesystem- Namespace flow-custom telemetry keys underflow.*and switch to UCUM units.flow-php/etl- Namespace flow-custom telemetry keys underflow.*and switch to UCUM units.flow-php/psr18-telemetry-bridge- Client span name is the HTTP method only andserver.portis always set.Removed
flow-php/telemetry- RemoveResettableContextStorageandMemoryContextStorage::reset().flow-php/symfony-telemetry-bundle- Remove messenger link config, worker-cycle span,metrics_duration_unitanddbal.log_sqlconfig.flow-php/postgresql- Remove duplicated official-key telemetry attribute constants.Deprecated
Security