How can I append (resource) attributes of spans in new attributes? #10468
Unanswered
heiko-holz
asked this question in
Q&A
Replies: 1 comment
-
transform/attributes:
metric_statements:
- context: datapoint
statements:
- set(attributes["k8s_pod_name"], resource.attributes["service.instance.id"]) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to append (resource) attributes of spans in a new attribute.
E.g., we have the attributes
and now I want to append the attributes
service
andnamespace
in a new attributeinstance
, .i.e.,instance: service-a.my-namespace
.Is there a direct way to append attributes?
I am currently using a workaround with the
span
andtransform
processor in the following way:span.name.original
using atransform
processor (alternatively, I use thespan
processor) :span
processor to append the attributes in the span's nametransform
processor:How can I achieve the desired behavior more easily?
Beta Was this translation helpful? Give feedback.
All reactions