Skip to content

Allow span suppression strategy configuration using file-based and env-based config#1920

Open
Nevay wants to merge 1 commit intoopen-telemetry:mainfrom
Nevay:feature/span-suppression-configuration
Open

Allow span suppression strategy configuration using file-based and env-based config#1920
Nevay wants to merge 1 commit intoopen-telemetry:mainfrom
Nevay:feature/span-suppression-configuration

Conversation

@Nevay
Copy link
Copy Markdown
Contributor

@Nevay Nevay commented Mar 23, 2026

Part of #1579, adds experimental support for SpanSuppressionStrategy configuration using distribution configuration.

The spankind and semconv strategies are currently equivalent as we do not provide SemanticConventionResolver yet.

Env based

OTEL_EXPERIMENTAL_SPAN_SUPPRESSION_STRATEGY=none
OTEL_EXPERIMENTAL_SPAN_SUPPRESSION_STRATEGY=spankind
OTEL_EXPERIMENTAL_SPAN_SUPPRESSION_STRATEGY=semconv

File based

distribution:
  opentelemetry_php:
    span_suppression_strategy/development:
      spankind:
distribution:
  opentelemetry_php:
    span_suppression_strategy/development:
      semconv:

@Nevay Nevay requested a review from a team as a code owner March 23, 2026 18:19
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 23, 2026

Codecov Report

❌ Patch coverage is 21.31148% with 48 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.97%. Comparing base (938c2bc) to head (29bf4c2).

Files with missing lines Patch % Lines
...ider/Distribution/DistributionConfigurationSdk.php 0.00% 11 Missing ⚠️
...gEnv/Distribution/DistributionConfigurationSdk.php 0.00% 9 Missing ⚠️
.../Config/SDK/ComponentProvider/OpenTelemetrySdk.php 0.00% 6 Missing ⚠️
...c/SDK/Common/Distribution/DistributionRegistry.php 0.00% 5 Missing ⚠️
...tProvider/Trace/SpanSuppressionStrategySemConv.php 0.00% 4 Missing ⚠️
...Provider/Trace/SpanSuppressionStrategySpanKind.php 0.00% 4 Missing ⚠️
...ConfigEnv/Trace/SpanSuppressionStrategySemConv.php 0.00% 4 Missing ⚠️
...onfigEnv/Trace/SpanSuppressionStrategySpanKind.php 0.00% 4 Missing ⚠️
src/SDK/Common/Distribution/SdkDistribution.php 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1920      +/-   ##
============================================
- Coverage     68.29%   67.97%   -0.33%     
- Complexity     3009     3030      +21     
============================================
  Files           449      457       +8     
  Lines          8798     8859      +61     
============================================
+ Hits           6009     6022      +13     
- Misses         2789     2837      +48     
Flag Coverage Δ
8.1 67.70% <21.31%> (-0.32%) ⬇️
8.2 67.88% <21.31%> (-0.38%) ⬇️
8.3 67.93% <21.31%> (-0.29%) ⬇️
8.4 67.90% <21.31%> (-0.31%) ⬇️
8.5 67.10% <21.31%> (-0.29%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/SDK/SdkAutoloader.php 92.66% <100.00%> (+0.69%) ⬆️
src/SDK/Common/Distribution/SdkDistribution.php 0.00% <0.00%> (ø)
...tProvider/Trace/SpanSuppressionStrategySemConv.php 0.00% <0.00%> (ø)
...Provider/Trace/SpanSuppressionStrategySpanKind.php 0.00% <0.00%> (ø)
...ConfigEnv/Trace/SpanSuppressionStrategySemConv.php 0.00% <0.00%> (ø)
...onfigEnv/Trace/SpanSuppressionStrategySpanKind.php 0.00% <0.00%> (ø)
...c/SDK/Common/Distribution/DistributionRegistry.php 0.00% <0.00%> (ø)
.../Config/SDK/ComponentProvider/OpenTelemetrySdk.php 0.00% <0.00%> (ø)
...gEnv/Distribution/DistributionConfigurationSdk.php 0.00% <0.00%> (ø)
...ider/Distribution/DistributionConfigurationSdk.php 0.00% <0.00%> (ø)

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 938c2bc...29bf4c2. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Nevay Nevay force-pushed the feature/span-suppression-configuration branch from 87d320f to 723794b Compare March 23, 2026 18:24
@Nevay Nevay force-pushed the feature/span-suppression-configuration branch from 723794b to 29bf4c2 Compare March 23, 2026 18:44
#[Override]
public function getConfig(ComponentProviderRegistry $registry, NodeBuilder $builder): ArrayNodeDefinition
{
$node = $builder->arrayNode('opentelemetry_php');
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.

Suggested change
$node = $builder->arrayNode('opentelemetry_php');
$node = $builder->arrayNode('opentelemetry_php/development');

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.

1 participant