Skip to content

feat(otel): add OTLPIntegration#1014

Merged
Litarnus merged 2 commits into
masterfrom
frameworkify-otlp-integration
Apr 1, 2026
Merged

feat(otel): add OTLPIntegration#1014
Litarnus merged 2 commits into
masterfrom
frameworkify-otlp-integration

Conversation

@Litarnus

@Litarnus Litarnus commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Add proper support for the OLTPIntegration introduced in sentry-php

@Litarnus Litarnus self-assigned this Apr 1, 2026
@Litarnus Litarnus marked this pull request as ready for review April 1, 2026 11:40
Sentry\SentryBundle\Integration\IntegrationConfigurator:
arguments: [ [], '' ]

Sentry\Integration\OTLPIntegration: ~

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The OTLPIntegration is registered in the DI container but isn't added to the active integrations list, so it remains inactive by default.
Severity: MEDIUM

Suggested Fix

Implement a method in SentryExtension.php similar to configureRequestIntegration(). This new method should add OTLPIntegration to the list of active integrations passed to the Sentry SDK, ensuring it is enabled by default as intended.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: src/Resources/config/services.yaml#L119

Potential issue: Registering `Sentry\Integration\OTLPIntegration` in `services.yaml`
makes it available in the Symfony DI container, but does not automatically activate it
within the Sentry SDK. The logic in `SentryExtension.php` builds the list of active
integrations but lacks a mechanism to include `OTLPIntegration`, unlike
`RequestIntegration` which is handled by `configureRequestIntegration()`. As a result,
the OTLP integration will be inactive by default unless users manually add it to their
configuration, which contradicts the PR's goal of providing out-of-the-box support.

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intentional so that it can be used but we don't want to add it by default

@Litarnus Litarnus merged commit 602154a into master Apr 1, 2026
43 checks passed
@Litarnus Litarnus deleted the frameworkify-otlp-integration branch April 1, 2026 13:02
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.

2 participants