Skip to content

Add recipe for traceway/opentelemetry-symfony - #1991

Merged
symfony-recipes-bot merged 3 commits into
symfony:mainfrom
jstojiljkovic:add-traceway-opentelemetry-symfony
Jun 5, 2026
Merged

Add recipe for traceway/opentelemetry-symfony#1991
symfony-recipes-bot merged 3 commits into
symfony:mainfrom
jstojiljkovic:add-traceway-opentelemetry-symfony

Conversation

@jstojiljkovic

@jstojiljkovic jstojiljkovic commented Jun 1, 2026

Copy link
Copy Markdown
Contributor
Q A
License MIT

Adds a Flex recipe for traceway/opentelemetry-symfony - a pure-PHP OpenTelemetry instrumentation bundle for Symfony 6.4 LTS / 7.x / 8.x. No C extension required.

The bundle ships automatic tracing for HTTP, Console, HttpClient, Messenger, Mailer, Scheduler, Doctrine DBAL, Cache, and Twig; Monolog log-trace correlation; opt-in OTel log export; and opt-in metrics. It is stable since v1.0 and currently at v2.1.0.

What the recipe does

  • Registers Traceway\OpenTelemetryBundle\OpenTelemetryBundle in config/bundles.php for all environments.
  • Adds an OTEL_* env-var block to .env with the minimum needed to point at a local OTel Collector at http://localhost:4318 over http/json.
  • Creates a minimal config/packages/open_telemetry.yaml that excludes profiler / WDT / health-check paths from tracing in dev and disables all signals in the test environment.
  • Post-install message points users to bin/console traceway:doctor to verify wiring.

Aliases

Proposed: otel, opentelemetry. Happy to drop either if they conflict with existing claims.

Stability

The bundle is stable since v1.0 (Aug 2024), follows SemVer, has PHPStan level 10 with no baseline, and CI runs across PHP 8.1–8.5 × Symfony 6.4 / 7.x / 8.x × DBAL 3+4. Public service tags
(traceway.doctor.check) and config schema (open_telemetry.*) are documented and stable.

@symfony-recipes-bot
symfony-recipes-bot enabled auto-merge (squash) June 1, 2026 06:44
@symfony-recipes-bot

symfony-recipes-bot commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1991/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1991/index.json
  2. Install the package(s) related to this recipe:

    composer req symfony/flex
    composer req 'traceway/opentelemetry-symfony:^2.1'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes.
I'm going keep this comment up to date with any updates of the attached patch.

auto-merge was automatically disabled June 1, 2026 06:51

Head branch was pushed to by a user without write access

@symfony-recipes-bot
symfony-recipes-bot enabled auto-merge (squash) June 1, 2026 06:51
@symfony-recipes-bot
symfony-recipes-bot merged commit b54fb97 into symfony:main Jun 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants