How to convert a resource attribute of type string to type slice/string array? #11808
Unanswered
felixscheinost
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to feed traces from a Java application using the Java agent to the collector and then to some exporter which unfortunately expects a resource attribute of type slice.
I am finding no way to set a slice resource attribute using solely configuration, no code. As I am using the Java agent code on the client side should be the last resort.
Then I looked if I could convert the string to a slice using the collector but it seems that no processor is able at all to create new slices. I checked:
resource
processor can't handle slices at all, not throughconvert
neither throughNewAttributeValueRaw
which can't create slices as well.transform
processor can't create new slices I think? I dug through the source code to find some sort of array literal or something like that but couldn't find any.resourcedetection
+env
like the Java SDK this can only create strings, not slicesBeta Was this translation helpful? Give feedback.
All reactions