Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot access flags from span context #34739

Open
niko-renko opened this issue Aug 19, 2024 · 1 comment · May be fixed by #34736
Open

Cannot access flags from span context #34739

niko-renko opened this issue Aug 19, 2024 · 1 comment · May be fixed by #34736
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed pkg/ottl priority:p1 High

Comments

@niko-renko
Copy link

Component(s)

pkg/ottl

What happened?

Description

Cannot access flags from span context. Making a statement that uses flags will fail.

Steps to Reproduce

Make & Use a transformer:

  transform:
    error_mode: ignore
    trace_statements:
    - context: span
      statements:
      - set(attributes["flags"], flags)

Expected Result

Spans will have a flags attribute that contain the flags values from the span context.

Actual Result

2024/08/19 17:23:35 collector server run finished with error: invalid configuration: processors::transform: unable to parse OTTL statement "set(attributes[\"collector_test_2\"], flags)": error while parsing arguments for call to "set": invalid argument at position 1: segment "flags" from path "flags" is not a valid path nor a valid OTTL keyword for the Span context - review https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottlspan to see all valid paths

Collector version

v0.107.0

Environment information

Environment

OS: Ubuntu 20

OpenTelemetry Collector configuration

receivers:
...

processors:
  transform:
    error_mode: ignore
    trace_statements:
    - context: span
      statements:
      - set(attributes["flags"], flags)

exporters:
...

service:
  pipelines:
    receivers: [...]
    processors: [transform]
    exporters: [...]

Log output

2024/08/19 17:23:35 collector server run finished with error: invalid configuration: processors::transform: unable to parse OTTL statement "set(attributes[\"collector_test_2\"], flags)": error while parsing arguments for call to "set": invalid argument at position 1: segment "flags" from path "flags" is not a valid path nor a valid OTTL keyword for the Span context - review https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/contexts/ottlspan to see all valid paths

Additional context

No response

@niko-renko niko-renko added bug Something isn't working needs triage New item requiring triage labels Aug 19, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@TylerHelmuth TylerHelmuth added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers priority:p1 High and removed bug Something isn't working needs triage New item requiring triage labels Aug 19, 2024
@niko-renko niko-renko linked a pull request Aug 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed pkg/ottl priority:p1 High
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants