Open ZachTB123 opened 7 months ago
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself.
It looks like this panic is happening because a spanId
is longer than expected. From the spec, spanId
must be an 8-byte array.
Can you provide a sample log that's causing this panic to happen so we can confirm this to be the case?
Incoming data being the wrong format shouldn't cause the collector to panic. The receiver should log an error and drop data instead.
I believe this is coming from log entries where logName
is equal to projects/project-id/logs/run.googleapis.com%2Frequests
. Based on some previous logs that I've ingested by setting encoding
to raw_text
, the value for spanId
is 20 characters long. For example:
{
"spanId": "15426074336963245120"
}
I will have a look, this ticket can be assigned to me
This issue is reproducible, but I've logged an issue with Google Cloud as it's a bug on their side: https://issuetracker.google.com/issues/338634230
I will make the parsing safer so the collector doesn't crash, but I will not detect decimals; I will handle it as a too-large HEX.
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.
can we do a fix/workaround on the otel collector side for this? I bet GCP is gonna take a while to change this in cloud run.
@alexvanboxel Hi, Thank you for your PR! Would it be possible to reopen https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/33247 and have it merged? We have been trying to use googlecloudpubsub receiver with cloud_logging encoding and have frequently encountered this crashing issue, which has been troubling us. However, when we incorporated the code from your PR and tested it, the problem no longer occurred. We would be very happy if your PR could be merged and made available for use.
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.
Component(s)
receiver/googlecloudpubsub
What happened?
Description
I'm trying to use the
googlecloudpubsub
receiver to receive Cloud Logs. I have configured a log router to route all my logs to a pub/sub topic. The inclusion filter on the sink isresource.type = ("cloud_run_revision") OR log_id("dialogflow-runtime.googleapis.com/requests")
. I have no exclusion filter. After some time, the collector crashes with the log output below.Setting
encoding
toraw_text
works without issue.Steps to Reproduce
Expected Result
The collector does not crash.
Actual Result
The collector crashes.
Collector version
v0.97.0
Environment information
No response
OpenTelemetry Collector configuration
Log output
Additional context
No response