Skip to content

Commit

Permalink
Fix remote write exporter not pushing span metrics (#624)
Browse files Browse the repository at this point in the history
* Ts in milliseconds instead of nanoseconds

* Changelog
  • Loading branch information
mapno authored May 28, 2021
1 parent ace66fa commit 9b39197
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ guide](./docs/migration-guide.md) for details.

- [CHANGE] Intentionally order tracing processors. (@joe-elliott)

- [BUGFIX] Fixed issue where span metrics where being reported with wrong time unit (@mapno)

# v0.14.0 (2021-05-19)

BREAKING CHANGE: This release has a breaking change for SigV4 support. Please
Expand Down
3 changes: 2 additions & 1 deletion pkg/tempo/remotewriteexporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/grafana/agent/pkg/prom/instance"
"github.com/grafana/agent/pkg/tempo/contextkeys"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/pkg/timestamp"
"github.com/prometheus/prometheus/storage"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/consumer/pdata"
Expand Down Expand Up @@ -210,7 +211,7 @@ func (e *remoteWriteExporter) appendDataPointWithLabels(app storage.Appender, na
ls := e.createLabelSet(name, suffix, dp.LabelsMap(), customLabels)
// TODO(mario.rodriguez): Use timestamp from metric
// time.Now() is used to avoid out-of-order metrics
ts := time.Now().Unix()
ts := timestamp.FromTime(time.Now())
if _, err := app.Append(0, ls, ts, v); err != nil {
return err
}
Expand Down

0 comments on commit 9b39197

Please sign in to comment.