Skip to content

Symfony messenger autoinstrumentation noise#2501

Merged
norberttech merged 7 commits into
1.xfrom
symfony-messenger-autoinstrumentation-noise
Jul 3, 2026
Merged

Symfony messenger autoinstrumentation noise#2501
norberttech merged 7 commits into
1.xfrom
symfony-messenger-autoinstrumentation-noise

Conversation

@norberttech

Copy link
Copy Markdown
Member

Change Log


Added

  • flow-php/telemetry - Shared SemConvAttributes and SemConvMetrics constants for OTel semantic conventions.
  • flow-php/telemetry - SuppressingSampler to suppress spans for excluded paths and commands.
  • flow-php/postgresql - TransactionSpanMode (grouped/per_operation/off) to control transaction spans.
  • flow-php/symfony-telemetry-bundle - DBAL transaction_spans, collect_metrics and parameter-capture config options.
  • flow-php/phpunit-telemetry-bridge - test.suite.run.status attribute and telemetry.sdk.version resource 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 under flow.*.
  • flow-php/telemetry - Sampler::shouldSample() now receives the parent Context.
  • flow-php/telemetry - Switch TimeUnit values to UCUM (s/us/ms).
  • flow-php/postgresql - Replace traceTransactions bool with transactionSpans mode and low-cardinality metric dimensions.
  • flow-php/phpunit-telemetry-bridge - Align test.* keys with the OTel test registry and report durations in seconds.
  • flow-php/filesystem - Namespace flow-custom telemetry keys under flow.* and switch to UCUM units.
  • flow-php/etl - Namespace flow-custom telemetry keys under flow.* and switch to UCUM units.
  • flow-php/psr18-telemetry-bridge - Client span name is the HTTP method only and server.port is always set.

Removed

  • flow-php/telemetry - Remove ResettableContextStorage and MemoryContextStorage::reset().
  • flow-php/symfony-telemetry-bundle - Remove messenger link config, worker-cycle span, metrics_duration_unit and dbal.log_sql config.
  • flow-php/postgresql - Remove duplicated official-key telemetry attribute constants.

Deprecated

Security

- 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

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.41485% with 42 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.90%. Comparing base (4498416) to head (f99df48).
✅ All tests successful. No failed tests found.

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     
Components Coverage Δ
etl 88.54% <100.00%> (+<0.01%) ⬆️
cli 89.40% <ø> (ø)
lib-array-dot 81.44% <ø> (ø)
lib-azure-sdk 64.44% <ø> (ø)
lib-doctrine-dbal-bulk 93.61% <ø> (ø)
lib-filesystem 85.03% <100.00%> (ø)
lib-types 90.06% <ø> (ø)
lib-parquet 70.10% <ø> (ø)
lib-parquet-viewer 82.26% <ø> (ø)
lib-snappy 89.38% <ø> (-0.45%) ⬇️
lib-dremel 0.00% <ø> (ø)
lib-postgresql 88.62% <93.80%> (-0.01%) ⬇️
lib-telemetry 86.59% <100.00%> (+0.35%) ⬆️
bridge-filesystem-async-aws 92.74% <ø> (ø)
bridge-filesystem-azure 90.45% <ø> (ø)
bridge-monolog-http 96.82% <ø> (ø)
bridge-monolog-telemetry 94.79% <ø> (ø)
bridge-openapi-specification 92.07% <ø> (ø)
symfony-http-foundation 78.57% <ø> (ø)
bridge-psr18-telemetry 100.00% <100.00%> (ø)
bridge-psr3-telemetry 98.95% <ø> (ø)
bridge-psr7-telemetry 100.00% <ø> (ø)
bridge-telemetry-otlp 90.41% <ø> (ø)
bridge-symfony-http-foundation-telemetry 92.85% <ø> (ø)
bridge-symfony-filesystem-bundle 90.66% <ø> (ø)
bridge-symfony-filesystem-cache 98.18% <ø> (ø)
bridge-symfony-postgresql-bundle 93.39% <100.00%> (+<0.01%) ⬆️
bridge-symfony-postgresql-cache 94.41% <ø> (ø)
bridge-symfony-postgresql-messenger 98.80% <ø> (ø)
bridge-symfony-postgresql-session 93.65% <ø> (ø)
bridge-symfony-telemetry-bundle 90.18% <96.55%> (+0.56%) ⬆️
adapter-chartjs 84.05% <ø> (ø)
adapter-csv 91.16% <ø> (ø)
adapter-doctrine 90.79% <ø> (ø)
adapter-google-sheet 99.18% <ø> (ø)
adapter-http 72.34% <ø> (ø)
adapter-json 88.63% <ø> (ø)
adapter-logger 50.00% <ø> (ø)
adapter-parquet 77.70% <ø> (ø)
adapter-text 74.13% <ø> (ø)
adapter-xml 83.40% <ø> (ø)
adapter-avro 0.00% <ø> (ø)
adapter-excel 94.21% <ø> (ø)
adapter-postgresql 91.06% <ø> (ø)
adapter-seal 85.42% <ø> (ø)
bridge-phpunit-postgresql 75.30% <ø> (ø)
bridge-phpunit-telemetry 87.32% <83.33%> (+6.91%) ⬆️
bridge-phpstan-types 0.00% <ø> (ø)
bridge-postgresql-valinor 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@norberttech norberttech merged commit 88280ba into 1.x Jul 3, 2026
39 checks passed
@norberttech norberttech deleted the symfony-messenger-autoinstrumentation-noise branch July 3, 2026 11:05
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.

1 participant