Description
Hi OpenTelemetry community,
I'm seeing weird behavior when generating Int64Counter as well as Int64ValueObservers. When viewing the metrics, the value is not recorded.
Environment
- OS: Windows
- Architecture: 64 bit
- Go Version: 1.16
- otel/metric: v0.21.0
- otel/sdk/metric: v0.21.0
Steps To Reproduce
Running a local kind cluster running v0.29.0 of opentelemetry-collector. The collector is configured to write to a file to view metrics.
- Initialize a metric provider and OTLP exporter, pointing to the local collector
- Generate int counter/gauge metrics to be exported to local collector.
intcounter example:
intCounter := metric.Must(a.meter).
NewInt64Counter(
"IntSumMetric",
metric.WithDescription("Int sum metric"),
).Bind(a.commonLabels...)
intCounter.Add(a.context, rand.Int63n(10))
- Run application
- View metric in exporter
Expected behavior
The sum recorded should have a value between 0-10. No value is recorded and the metric has the object doubleSum.
{
"name": "IntSumMetric",
"description": "Int sum metric",
"doubleSum": {
"dataPoints": [
{
"labels": [
{
"key": "dropped_label_count",
"value": "0"
}
],
"startTimeUnixNano": "1625085629239312300",
"timeUnixNano": "1625086409244676700"
}
],
"aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE",
"isMonotonic": true
}
},
I've also viewed the metrics in another exporter (New Relic) where the metric values are not recorded.
Description
Hi OpenTelemetry community,
I'm seeing weird behavior when generating
Int64Counteras well asInt64ValueObservers. When viewing the metrics, the value is not recorded.Environment
Steps To Reproduce
Running a local kind cluster running
v0.29.0of opentelemetry-collector. The collector is configured to write to a file to view metrics.intcounterexample:Expected behavior
The sum recorded should have a value between 0-10. No value is recorded and the metric has the object
doubleSum.I've also viewed the metrics in another exporter (New Relic) where the metric values are not recorded.