File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
receiver/datadogreceiver/internal/translator Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 4
4
package translator // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver/internal/translator"
5
5
6
6
import (
7
+ "time"
8
+
7
9
"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
8
10
"go.opentelemetry.io/collector/pdata/pcommon"
9
11
"go.opentelemetry.io/collector/pdata/pmetric"
@@ -32,7 +34,7 @@ func (mt *MetricsTranslator) TranslateServices(services []ServiceCheck) pmetric.
32
34
dps .EnsureCapacity (1 )
33
35
34
36
dp := dps .AppendEmpty ()
35
- dp .SetTimestamp (pcommon .Timestamp (ts * time .Second .Nanoseconds ())) // OTel uses nanoseconds, while Datadog uses seconds
37
+ dp .SetTimestamp (pcommon .Timestamp (service . Timestamp * time .Second .Nanoseconds ())) // OTel uses nanoseconds, while Datadog uses seconds
36
38
metricProperties .dpAttrs .CopyTo (dp .Attributes ())
37
39
dp .SetIntValue (int64 (service .Status ))
38
40
You can’t perform that action at this time.
0 commit comments