Skip to content

[processor/transform] Add support for semconv 1.40.0, 1.39.0 and 1.38.0 in the set_semconv_span_name() function#45911

Merged
atoulme merged 41 commits into
open-telemetry:mainfrom
cyrille-leclerc:transform-processor_setsemconvspanname_1.39
Apr 1, 2026
Merged

[processor/transform] Add support for semconv 1.40.0, 1.39.0 and 1.38.0 in the set_semconv_span_name() function#45911
atoulme merged 41 commits into
open-telemetry:mainfrom
cyrille-leclerc:transform-processor_setsemconvspanname_1.39

Conversation

@cyrille-leclerc
Copy link
Copy Markdown
Member

@cyrille-leclerc cyrille-leclerc commented Feb 5, 2026

Description

Add support for semconv 1.40.0, 1.39.0 and 1.38.0 in the set_semconv_span_name() function of the Transform Processor.

Noteworthy functional change:

  • For semconv >=1.39.0, attribute rpc.system.name takes precedence over the deprecated rpc.system

Noteworthy technical change:

  • Introduce a semver library for better handling of changes in semconv versions. It the same lib as the one use in the schema processor

Link to tracking issue

Fixes

Testing

Tests added:

  • Tests for the set_semconv_span_name() function param semconvVersion with new supported values
  • Test new resource attribute rpc.system.name

Documentation

README.md updated

@cyrille-leclerc cyrille-leclerc marked this pull request as ready for review February 6, 2026 09:36
@github-actions github-actions Bot added the processor/transform Transform processor label Feb 6, 2026
@cyrille-leclerc
Copy link
Copy Markdown
Member Author

cyrille-leclerc commented Feb 6, 2026

@lmolkova can you please have a look? I see you were a stakeholder of the semconv changes that impact set_semconv_span_name():

Comment thread processor/transformprocessor/internal/traces/func_set_semconv_span_name_test.go Outdated
@cyrille-leclerc cyrille-leclerc changed the title [processor/transform] Add support for semconv 1.39.0 and 1.38.0 in the set_semconv_span_name() function [processor/transform] Add support for semconv 1.40.0, 1.39.0 and 1.38.0 in the set_semconv_span_name() function Feb 28, 2026
…name logic for semconv 1.39+

Introduce version-aware RPC span name derivation in the
set_semconv_span_name function. For semconv >= 1.39.0, the new
rpc.system.name attribute takes priority over the deprecated rpc.system;
for earlier versions the existing priority is preserved.

Version validation is now range-based (1.37.0–1.40.0) using the
Masterminds/semver library, replacing the previous string allowlist.
The semconv version string is parsed once at function-creation time and
propagated as a typed *semver.Version through the call chain.

Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread processor/transformprocessor/go.mod
Comment thread processor/transformprocessor/internal/traces/func_set_semconv_span_name.go Outdated
Comment thread .chloggen/transformprocessor-set_semconv_span_name-v1.40.0.yaml Outdated
Comment thread .chloggen/transformprocessor-set_semconv_span_name-v1.40.0.yaml Outdated
Comment thread processor/transformprocessor/README.md Outdated
cyrille-leclerc and others added 4 commits March 30, 2026 21:42
Co-authored-by: Edmo Vamerlatti Costa <11836452+edmocosta@users.noreply.github.com>
Co-authored-by: Edmo Vamerlatti Costa <11836452+edmocosta@users.noreply.github.com>
# Conflicts:
#	processor/transformprocessor/go.mod
# Conflicts:
#	processor/transformprocessor/go.mod
…e argument parsing

Extract common validation logic into parseSemconvSpanNameArguments helper,
reused by both createSetSemconvSpanNameFunction and createSetSemconvSpanNameFunctionLegacy.

Assisted-by: Claude Sonnet 4.6
Comment thread .chloggen/transformprocessor-set_semconv_span_name-v1.40.0.yaml Outdated
@edmocosta edmocosta added ready to merge Code review completed; ready to merge by maintainers and removed waiting-for-code-owners labels Apr 1, 2026
@atoulme atoulme merged commit 87d40ee into open-telemetry:main Apr 1, 2026
218 of 219 checks passed
@cyrille-leclerc cyrille-leclerc deleted the transform-processor_setsemconvspanname_1.39 branch April 2, 2026 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal/datadog/e2e processor/transform Transform processor ready to merge Code review completed; ready to merge by maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants