Skip to content

Fix traces.enabled as master switch for trace instrumentation#61

Merged
jstojiljkovic merged 2 commits into
tracewayapp:masterfrom
d-mitrofanov-v:fix/traces-enabled-as-master-switch
Jul 7, 2026
Merged

Fix traces.enabled as master switch for trace instrumentation#61
jstojiljkovic merged 2 commits into
tracewayapp:masterfrom
d-mitrofanov-v:fix/traces-enabled-as-master-switch

Conversation

@d-mitrofanov-v

Copy link
Copy Markdown
Contributor

Hi, everyone! When I hit the problem described in this PR , I noticed, that when traces.enabled=false the subsystems of tracing, like traces.cache, traces.messenger and others, are not actually disabled and to disable them completely in test env, I had to have a config like this:

when@test:
    open_telemetry:
        traces:
            enabled: false
            console:
                enabled: false
            http_client:
                enabled: false
            messenger:
                enabled: false
            scheduler:
                enabled: false
            mailer:
                enabled: false
            doctrine:
                enabled: false
            cache:
                enabled: false
            twig:
                enabled: false

I propose changing this behaviour, so that traces.enabled work as a master switch for all suboptions. With this we'll be able to use config like this to disable tracing in test env:

when@test:
    open_telemetry:
        traces:
            enabled: false

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@jstojiljkovic

Copy link
Copy Markdown
Collaborator

Thanks for the contribution, merged will be released soon. 🙇

@jstojiljkovic
jstojiljkovic merged commit c380fd7 into tracewayapp:master Jul 7, 2026
9 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