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

[exporter/sapm] Change the logging channel to 'Error' for failed responses. #32430

Merged
merged 2 commits into from
May 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[exporter/sapm] Change the logging channel to 'Error' for failed resp…
…onses.
  • Loading branch information
LukaszByczynski committed May 20, 2024
commit 24b91538f361e8e912cf9f93c29085a3779c55fe
2 changes: 1 addition & 1 deletion exporter/sapmexporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (se *sapmExporter) pushTraceData(ctx context.Context, td ptrace.Traces) err
ingestResponse, err := se.client.ExportWithAccessTokenAndGetResponse(ctx, batches, accessToken)
if se.config.LogDetailedResponse && ingestResponse != nil {
if ingestResponse.Err != nil {
se.logger.Debug("Failed to get response from trace ingest", zap.Error(ingestResponse.Err))
se.logger.Error("Failed to get response from trace ingest", zap.Error(ingestResponse.Err))
} else {
se.logger.Debug("Detailed response from ingest", zap.ByteString("response", ingestResponse.Body))
}
Expand Down