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

[transformprocessor/TQL] Instrumentation scope attributes are not accessible #13639

Closed
pirgeo opened this issue Aug 26, 2022 · 0 comments · Fixed by #13640
Closed

[transformprocessor/TQL] Instrumentation scope attributes are not accessible #13639

pirgeo opened this issue Aug 26, 2022 · 0 comments · Fixed by #13640
Assignees
Labels
bug Something isn't working pkg/ottl priority:p2 Medium

Comments

@pirgeo
Copy link
Member

pirgeo commented Aug 26, 2022

Describe the bug
When using TQL in the transformprocessor, instrumentation_scope.attributes and instrumentation_scope.attributes[""] are not available, since the respective mapping functions are not implemented in the TQL contexts (https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/telemetryquerylanguage/contexts)

What did you expect to see?
Using instrumentation_scope.attributes should give access to scope attributes.

What did you see instead?
Collector did not start:

otel-collector_1  | Error: failed to get config: invalid configuration: processor "transform" has invalid configuration: invalid argument at position 0 invalid path expression [{instrumentation_scope <nil>} {attributes <nil>}]
otel-collector_1  | 2022/08/26 15:37:39 collector server run finished with error: failed to get config: invalid configuration: processor "transform" has invalid configuration: invalid argument at position 0 invalid path expression [{instrumentation_scope <nil>} {attributes <nil>}]

What version did you use?
otel/opentelemetry-collector-contrib:0.58.0

What config did you use?
Config:

processors:
  transform:
    metrics:
      queries:
        - keep_keys(instrumentation_scope.attributes, "scope-attribute-1")

Environment
Docker: otel/opentelemetry-collector-contrib:0.58.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg/ottl priority:p2 Medium
Projects
None yet
2 participants