Skip to content

Commit

Permalink
[exporter/sapm] Change the logging channel to 'Error' for failed resp…
Browse files Browse the repository at this point in the history
…onses. (#32430)

**Description:** Log level has been changed to Error from Debug for the
failed responses

**Link to tracking Issue:** #32429

**Testing:** Check log messages
  • Loading branch information
LukaszByczynski committed May 29, 2024
1 parent 7987c4f commit 58ab68a
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 58ab68a

Please sign in to comment.