[processor/transform] Allow configuring "common" statements that apply to all signals #27407
Labels
Contribfest
enhancement
New feature or request
priority:p2
Medium
processor/transform
Transform processor
Component(s)
transformprocessor
Is your feature request related to a problem? Please describe.
At the moment the resourceprocessor lets you apply resource attribute transformations with minimal config:
That configuration lets you add a new attribute named
service.instance.id
from the existingk8s.pod.uid
attribute for traces, metrics, and logs.The equivalent config in the transformprocessor would be
Although the transformprocessor can achieve the same functionality, it isn't very ergonomic.
Describe the solution you'd like
It would be nice to be able to configure some "common" statements that would be run in the resource or instrumentation scope context for each signal. Something like
These statements would then be added to the signal-specific statement lists. We could allow the user to specify if they should be added to the front or end of the list.
I think to start we could restrict it to resource and scope contexts, but I think there is potential here to reproduce some attributesprocessor functionality as well. A statement like
set(attributes["my-attribute"], attributes["my-other-attribute"])
could be run forspan
,datapoint
orlog
.Describe alternatives you've considered
No response
Additional context
Related to #18643
The text was updated successfully, but these errors were encountered: