-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
It seems that the DataDog exporter doesn't export ValueRecorder
metrics
Topology:
service: (OTEL-SDK) --> host: (OTEL Agent) --> storage:(Datadog)
We are using the opentelelmtry-sdk to send the metrics from our services to the host otelcontrib
agent, then the otel-agent using Datadog
exporter to send the metrics to the DataDog, when we are using some of the types of ValueRecorder
the metrics are not showing in the DataDog web, when we do see the metrics via the logging
exporter.
The other meter types (IntCounter
, ValueObserve
, etc..) work as expecting.
Reproduce:
Service:
Configure OTLP exporter:
ctx := context.Background()
exporter, err := otlp.NewExporter(ctx) // Configure as needed.
if err != nil {
log.Fatalf("failed to create exporter: %v", err)
}
defer func() {
err := exporter.Shutdown(ctx)
if err != nil {
log.Fatalf("failed to stop exporter: %v", err)
}
}()
Create the ValueRecorder
ioReadBytes := metric.Must(meterInfra).NewInt64ValueRecorder("io.read.bytes", metric.WithDescription("IO read bytes"))
ioReadBytes.Record(ctx.Background, 1024)
I see this metric in the logging
exporter but is missing in the DataDog web
I am so tried to produce the metric via batch-mesurment, but it still doesn't work
db.metricGraphMeter.RecordBatch(
db.ctx,
[]attribute.KeyValue{attribute.String("units", "bytes")},
db.dbMetrics.ioWriteBytes.Measurement(int64(len(nodeBytes))),
)
The only way I succeed to produce ValueRecorder
like metric is via counter using measurement, but this solution looks broken to me.
db.metricGraphMeter.RecordBatch(
db.ctx,
[]attribute.KeyValue{attribute.String("units", "bytes")},
db.dbMetrics.ioWriteBytesTest.Measurement(nodeBytesLen),
)
This issue is very critical to us, as we don't have a way to send the value metrics for now