From 98154f2104473c0614b5aa0baa5cdc716b88306e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Boudereau?= Date: Thu, 29 Feb 2024 15:06:02 +0100 Subject: [PATCH] add metrics exemplar example --- .../otlpjson/metrics-exemplars.json | 126 ++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 _DRAFT/OTEL-example/otlpjson/metrics-exemplars.json diff --git a/_DRAFT/OTEL-example/otlpjson/metrics-exemplars.json b/_DRAFT/OTEL-example/otlpjson/metrics-exemplars.json new file mode 100644 index 00000000..1d40ad66 --- /dev/null +++ b/_DRAFT/OTEL-example/otlpjson/metrics-exemplars.json @@ -0,0 +1,126 @@ +{ + "resourceMetrics": [ + { + "resource": { + "attributes": [ + { + "key": "service.name", + "value": { + "stringValue": "my.service" + } + } + ] + }, + "scopeMetrics": [ + { + "scope": { + "name": "my.library", + "version": "1.0.0", + "attributes": [ + { + "key": "my.scope.attribute", + "value": { + "stringValue": "some scope attribute" + } + } + ] + }, + "metrics": [ + { + "name": "my.counter", + "unit": "1", + "description": "I am a Counter", + "sum": { + "aggregationTemporality": 1, + "isMonotonic": true, + "dataPoints": [ + { + "asDouble": 5, + "startTimeUnixNano": "1544712660300000000", + "timeUnixNano": "1544712660300000000", + "attributes": [ + { + "key": "my.counter.attr", + "value": { + "stringValue": "some value" + } + } + ], + "exemplars": [ + { + "filteredAttributes": [ + { + "key": "my.exemplar", + "value": { + "stringValue": "hello exemplars!" + } + } + ], + "timeUnixNano": "1544712660300000000", + "asInt": 3 + } + ] + } + ] + } + }, + { + "name": "my.gauge", + "unit": "1", + "description": "I am a Gauge", + "gauge": { + "dataPoints": [ + { + "asDouble": 10, + "timeUnixNano": "1544712660300000000", + "attributes": [ + { + "key": "my.gauge.attr", + "value": { + "stringValue": "some value" + } + } + ] + } + ] + } + }, + { + "name": "my.histogram", + "unit": "1", + "description": "I am a Histogram", + "histogram": { + "aggregationTemporality": 1, + "dataPoints": [ + { + "startTimeUnixNano": "1544712660300000000", + "timeUnixNano": "1544712660300000000", + "count": 2, + "sum": 2, + "bucketCounts": [ + 1, + 1 + ], + "explicitBounds": [ + 1 + ], + "min": 0, + "max": 2, + "attributes": [ + { + "key": "my.histogram.attr", + "value": { + "stringValue": "some value" + } + } + ] + } + ] + } + } + ] + } + ] + } + ] +} \ No newline at end of file