Can't use Len() function with almost any slice #35027
Unanswered
obs-gh-enricogiorio
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'm trying to do processing of k8s events and I need to calculate the length of some slices (fields of some k8s objects).
I just don't understand why I can't calculate the length of any slice. For instance, why do I need to implement a custom processor if I have to calculate the length of this slice? My understanding is that OTTL works on the
pcommon.Logs
and that Slice hasLen()
implemented here https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/deltatocumulativeprocessor/internal/putil/pslice/pslice.go#L6.But when I use it I get:
Beta Was this translation helpful? Give feedback.
All reactions