Skip to content

Commit

Permalink
dynatraceexporter: continue processing data points after an error (#9330
Browse files Browse the repository at this point in the history
)

* dynatraceexporter: continue processing data points after an error

* Changelog
  • Loading branch information
dyladan authored Apr 20, 2022
1 parent b18bf1a commit 6fe7912
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
- `signalfxexporter`: Fix bug to enable timeouts for correlating traces and metrics (#9101)
- `windowsperfcountersreceiver`: fix exported values being integers instead of doubles (#9138)
- `prometheusreceiver`: Fix issues with relabelling the `job` and `instance` labels. (#8780)
- `dynatraceexporter`: Continue processing data points after a serialization error. (#9330)

## v0.48.0

Expand Down
17 changes: 14 additions & 3 deletions exporter/dynatraceexporter/internal/serialization/serialization.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ func SerializeMetric(logger *zap.Logger, prefix string, metric pmetric.Metric, d
)

if err != nil {
return nil, err
logger.Sugar().Warnw("Error serializing gauge data point",
"name", metric.Name(),
"value-type", dp.ValueType().String(),
"error", err,
)
}

if line != "" {
Expand All @@ -67,7 +71,11 @@ func SerializeMetric(logger *zap.Logger, prefix string, metric pmetric.Metric, d
)

if err != nil {
return nil, err
logger.Sugar().Warnw("Error serializing sum data point",
"name", metric.Name(),
"value-type", dp.ValueType().String(),
"error", err,
)
}

if line != "" {
Expand All @@ -88,7 +96,10 @@ func SerializeMetric(logger *zap.Logger, prefix string, metric pmetric.Metric, d
)

if err != nil {
return nil, err
logger.Sugar().Warnw("Error serializing histogram data point",
"name", metric.Name(),
"error", err,
)
}

if line != "" {
Expand Down

0 comments on commit 6fe7912

Please sign in to comment.