Component(s)
cmd/telemetrygen
What happened?
Description
For traces, --allow-export-failures is accepted but has no effect. Traces use the SDK's SpanProcessor which handles export errors internally, so the worker never sees them. Traces always continue on failure regardless of the flag.
For logs and metrics in non-batch mode, it works as expected. When an export fails, logger.Fatal is called and the process crashes, unless --allow-export-failures is set.
For logs and metrics in batch mode, the flushBuffer() function always logs the error and continues. It never calls logger.Fatal, so the flag is effectively ignored.
Steps to Reproduce
Run telemetrygen logs in batch mode against a non-existent endpoint:
telemetrygen logs --otlp-insecure --otlp-endpoint localhost:19999 --logs 3 --batch=true --batch-size 2
The process continues running after the export fails (only logs an ERROR). Compare with non-batch mode:
telemetrygen logs --otlp-insecure --otlp-endpoint localhost:19999 --logs 3 --batch=false
This one crashes with FATAL as expected.
Expected Result
When --allow-export-failures is not set and an export fails.
Actual Result
The process should crash regardless of whether batching is enabled or not when sending to a non-existing endpoint.
Collector version
v0.148.0
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
Component(s)
cmd/telemetrygen
What happened?
Description
For traces,
--allow-export-failuresis accepted but has no effect. Traces use the SDK's SpanProcessor which handles export errors internally, so the worker never sees them. Traces always continue on failure regardless of the flag.For logs and metrics in non-batch mode, it works as expected. When an export fails,
logger.Fatalis called and the process crashes, unless--allow-export-failuresis set.For logs and metrics in batch mode, the
flushBuffer()function always logs the error and continues. It never callslogger.Fatal, so the flag is effectively ignored.Steps to Reproduce
Run telemetrygen logs in batch mode against a non-existent endpoint:
The process continues running after the export fails (only logs an ERROR). Compare with non-batch mode:
This one crashes with FATAL as expected.
Expected Result
When
--allow-export-failuresis not set and an export fails.Actual Result
The process should crash regardless of whether batching is enabled or not when sending to a non-existing endpoint.
Collector version
v0.148.0
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it. Learn more here.