Skip to content

Commit

Permalink
[exporter/sumologic] Mark exporter as mutating data (#13647)
Browse files Browse the repository at this point in the history
The exporter mutates the logs data. In order to avoid affecting other exporters configured along side, the exporter has to be marked as mutating data so all pdata is copied over.
  • Loading branch information
dmitryax authored Aug 26, 2022
1 parent 2590a50 commit 5dcf1c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions exporter/sumologicexporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"net/http"

"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/consumer"
"go.opentelemetry.io/collector/consumer/consumererror"
"go.opentelemetry.io/collector/exporter/exporterhelper"
"go.opentelemetry.io/collector/pdata/pcommon"
Expand Down Expand Up @@ -83,6 +84,7 @@ func newLogsExporter(
// Disable exporterhelper Timeout, since we are using a custom mechanism
// within exporter itself
exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}),
exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: true}),
exporterhelper.WithRetry(cfg.RetrySettings),
exporterhelper.WithQueue(cfg.QueueSettings),
exporterhelper.WithStart(se.start),
Expand All @@ -106,6 +108,7 @@ func newMetricsExporter(
// Disable exporterhelper Timeout, since we are using a custom mechanism
// within exporter itself
exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}),
exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: true}),
exporterhelper.WithRetry(cfg.RetrySettings),
exporterhelper.WithQueue(cfg.QueueSettings),
exporterhelper.WithStart(se.start),
Expand Down
4 changes: 4 additions & 0 deletions unreleased/mark-sumologic-as-mutating.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
change_type: bug_fix
component: exporter/sumologic
note: Mark the exporter as mutating.
issues: [13647]

0 comments on commit 5dcf1c9

Please sign in to comment.