Skip to content

Commit 7f42dec

Browse files
Update receiver/datadogreceiver/internal/translator/service_check_translator.go
Co-authored-by: Carrie Edwards <[email protected]>
1 parent f7cd099 commit 7f42dec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

receiver/datadogreceiver/internal/translator/service_check_translator.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func (mt *MetricsTranslator) TranslateServices(services []ServiceCheck) pmetric.
3232
dps.EnsureCapacity(1)
3333

3434
dp := dps.AppendEmpty()
35-
dp.SetTimestamp(pcommon.Timestamp(service.Timestamp * 1_000_000_000)) // OTel uses nanoseconds, while Datadog uses seconds
35+
dp.SetTimestamp(pcommon.Timestamp(ts * time.Second.Nanoseconds())) // OTel uses nanoseconds, while Datadog uses seconds
3636
metricProperties.dpAttrs.CopyTo(dp.Attributes())
3737
dp.SetIntValue(int64(service.Status))
3838

0 commit comments

Comments
 (0)