You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to work with the otelcloudwatch collector to poll logs from a cloudwatch log group. I am running into an issue where events are being skipped due to the logstransform/cloudwatch gobbling up and discarding certain messages because it thinks these are multi-line messages. To reproduce:
Reproduce
my configuration for sumo helm chart (config.yaml):
If I use this configuration and run the collector I get the following error (this happens even if I change the log to a JSON blob):
2023-12-29T13:44:52.571-0600 error recombine/recombine.go:299 entry does not contain the combine_field {"kind": "processor", "name": "logstransform/cloudwatch", "pipeline": "logs/collector/otelcloudwatch", "operator_id": "merge-cri-lines", "operator_type": "recombine"}
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/recombine.(*Transformer).addToBatch
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/[email protected]/operator/transformer/recombine/recombine.go:299
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/transformer/recombine.(*Transformer).Process
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/[email protected]/operator/transformer/recombine/recombine.go:263
github.com/open-telemetry/opentelemetry-collector-contrib/processor/logstransformprocessor.(*logsTransformProcessor).converterLoop
github.com/open-telemetry/opentelemetry-collector-contrib/processor/[email protected]/processor.go:143
When this happens it does actually grab a log event and export it, but on the next iteration it will skip events between and only pickup the most recent. Because of the nature of the error I am assuming this is an attempt to grab other events and combine them as an attempt to determine if it is a multi-line log. The confusion here is that the logs are being grabbed from cloudwatch as a JSON object so the entire log line (with newlines and all) is contained within the JSON object (from AWS, it is not newline based fetching these events). Leaving me wondering what the purpose of this multi-line logic is or if it's necessary.
If i completely remove the logstransform/cloudwatch from the pipeline everything works as expected, no events are skipped, no errors are thrown, even with logs that are multi-line. I have tried multiple other solutions such as on_error: send within the operator as well as recoding the pipeline to actually set these combine_field that it is looking for, but even in doing so it still skips events. So if I had to submit a patch it would be:
Even abstracting this as a config value of some sort that I can pass to the helm chart to tell it "do not attempt multi-line combining in the cloudwatch collector" would work as well. Thanks in advance and hopefully I can get this cleared up.
The text was updated successfully, but these errors were encountered:
I am trying to work with the
otelcloudwatch
collector to poll logs from a cloudwatch log group. I am running into an issue where events are being skipped due to thelogstransform/cloudwatch
gobbling up and discarding certain messages because it thinks these are multi-line messages. To reproduce:Reproduce
my configuration for sumo helm chart (config.yaml):
Now you can use this bash script (you'll need to authenticate in aws-cli however you prefer first) to fire events at the log group for testing:
If I use this configuration and run the collector I get the following error (this happens even if I change the log to a JSON blob):
When this happens it does actually grab a log event and export it, but on the next iteration it will skip events between and only pickup the most recent. Because of the nature of the error I am assuming this is an attempt to grab other events and combine them as an attempt to determine if it is a multi-line log. The confusion here is that the logs are being grabbed from cloudwatch as a JSON object so the entire log line (with newlines and all) is contained within the JSON object (from AWS, it is not newline based fetching these events). Leaving me wondering what the purpose of this multi-line logic is or if it's necessary.
At the moment the pipeline is hardcoded as:
Fixes
If i completely remove the
logstransform/cloudwatch
from the pipeline everything works as expected, no events are skipped, no errors are thrown, even with logs that are multi-line. I have tried multiple other solutions such ason_error: send
within the operator as well as recoding the pipeline to actually set thesecombine_field
that it is looking for, but even in doing so it still skips events. So if I had to submit a patch it would be:Even abstracting this as a config value of some sort that I can pass to the helm chart to tell it "do not attempt multi-line combining in the cloudwatch collector" would work as well. Thanks in advance and hopefully I can get this cleared up.
The text was updated successfully, but these errors were encountered: