Skip to content

Setting resource attributes in the service telemetry pipeline breaks the pods #193

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

Open
ipversiongent opened this issue Mar 28, 2025 · 1 comment

Comments

@ipversiongent
Copy link

SUMMARY:

We're trying to set resource attributes directly in the internal telemetry (service.telemetry), so that we can catch these signals and route (we route based on a custom product.line resource attribute).

This is the configuration we tried (version 0.117.0)

telemetry: resource: attributes: # - name: "product.line" #tried two different options # value: "corporate" - product.line: corporate attributes_list: "product.line=corporate"

However, the collector pods crash with any approach when using the resource attributes, with the error below

'resource[attributes]' expected type 'string', got unconvertible type '[]interface {}', value: '[map[name:product.line type:string_array value:corporate]]' 2025/03/27 15:46:35 collector server run finished with error: failed to get config: cannot unmarshal the configuration: decoding failed due to the following error(s): error decoding 'service.telemetry': decoding failed due to the following error(s): 'resource[attributes]' expected type 'string', got unconvertible type '[]interface {}', value: '[map[name:product.line type:string_array value:corporate]]

The helm chart suggests this is supported:

@jack-berg
Copy link
Member

Can you share the formatted version of your config? Its all been condensed on onto one line and hard to interpret.

With that said, I imagine that your encountering a difference in the version of schema used by the collector in 0.117.0 and the version you're referencing in kitchen-sink.yaml. The way that resource attributes are represented in the schema changed in 0.3 in #115:

# before
resource:
  attributes:
    foo: bar
---
# after
resource:
  attributes:
    - name: foo
       value: bar

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

No branches or pull requests

2 participants