open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
3.06k stars 2.36k forks source link

Do Filelog operators process slices? #33932

Closed MJ12301 closed 2 weeks ago

MJ12301 commented 4 months ago

Component(s)

receiver/filelog

Is your feature request related to a problem? Please describe.

I have log files which contain JSON arrays, when I try using json_array_parser, OTEL says that the operator is disabled, and refuses to start. I am using version OTEL collector contrib 0.104.0.

How can I apply operations or access slice elements (e.g. attributes.my_array[0])?

Describe the solution you'd like

To be able to process elements inside slices, or a certain operator to copy a slice element (Or extract them) to a field.

Describe alternatives you've considered

No response

Additional context

No response

github-actions[bot] commented 4 months ago

Pinging code owners:

djaglowski commented 4 months ago

If you are using a recent version of the collector, you can enable the logs.jsonParserArray feature gate to enable this operator. I've opened https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/33948 to upgrade this gate to beta, which will enable it by default going forward.

crobert-1 commented 3 months ago

Removing needs triage based on code owner's feedback.

@MJ12301 Is there anything else that is needed here? If not, we can close this issue.

github-actions[bot] commented 1 month ago

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

andrzej-stencel commented 2 weeks ago

Closing as the json_array_parser operator is available now.