You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]]
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
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:
opentelemetry-configuration/examples/kitchen-sink.yaml
Line 783 in a94e70f
The text was updated successfully, but these errors were encountered: