Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Components that do not use exporterhelper.WithRetry do not get any logging of export errors. #8791

Closed
dashpole opened this issue Nov 1, 2023 · 0 comments · Fixed by #8792
Labels
bug Something isn't working

Comments

@dashpole
Copy link
Contributor

dashpole commented Nov 1, 2023

Describe the bug

After open-telemetry/opentelemetry-collector-contrib#25900, all error logging for the google cloud exporters was removed.

Steps to reproduce
See reproduction steps in GoogleCloudPlatform/opentelemetry-operations-go#760, for an example.

What did you expect to see?
I expected to see errors printed, similar to how they are printed when retry settings.Enabled = false:

if !rs.cfg.Enabled {
err := rs.nextSender.send(req)
if err != nil {
rs.logger.Error(
"Exporting failed. Try enabling retry_on_failure config option to retry on retryable errors",
zap.Error(err),
)
}

What did you see instead?

Failures without any error messages.

What version did you use?
Version: v0.88.0 (contrib)

@dashpole dashpole added the bug Something isn't working label Nov 1, 2023
@dashpole dashpole changed the title Components that do not use exporterhelper.WithRetry do not get any logging of sending errors. Components that do not use exporterhelper.WithRetry do not get any logging of export errors. Nov 1, 2023
dmitryax pushed a commit that referenced this issue Nov 1, 2023
**Description:**

Fixes
#8791.
Logging errors normally happens in the retry exporter helper if
retry_on_failure is disabled:


https://github.com/open-telemetry/opentelemetry-collector/blob/66166c4cc371fbe945d7ff19232decd3ee65f76a/exporter/exporterhelper/retry_sender.go#L108-L115

When WithRetry is not specified in the component, no logging happens at
all. This change makes the "base" retry sender log errors, so that if a
component does not specify WithRetry, it still has errors logged,
similar to the behavior with disabled retry.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant