Replies: 2 comments 2 replies
-
Prometheus does show the OTEL 'stock' metrics, but not the custom metric I was reporting. Is there some configuration I need to add? |
Beta Was this translation helpful? Give feedback.
2 replies
-
The statsd receiver emits metrics with delta temporarily, which the prometheus exporter drops (since it only support cumulative temporality): https://opentelemetry.io/docs/specs/otel/metrics/data-model/#temporality This config will use cumulative temporarily, but I didn't explore how accurate the data is in prometheus
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I followed the getting started demo.
The metrics show up in Prometheus.
I then changed the receiver to statsd and exposed port 8125 udp on docker compose. When I send custom metrics I see them logged in the console but they don't show up in Prometheus, even after waiting.
otel-collector-config.yaml
docker-compose.yml:
Test script:
Console output - this is how I know the statsd receiver works:
metrics-otel-collector-1 | 2022-12-21T17:11:58.646Z info ResourceMetrics #0
metrics-otel-collector-1 | Resource SchemaURL:
metrics-otel-collector-1 | ScopeMetrics #0
metrics-otel-collector-1 | ScopeMetrics SchemaURL:
metrics-otel-collector-1 | InstrumentationScope
metrics-otel-collector-1 | Metric #0
metrics-otel-collector-1 | Descriptor:
metrics-otel-collector-1 | -> Name: testmetric
metrics-otel-collector-1 | -> Description:
metrics-otel-collector-1 | -> Unit:
metrics-otel-collector-1 | -> DataType: Sum
metrics-otel-collector-1 | -> IsMonotonic: false
metrics-otel-collector-1 | -> AggregationTemporality: Delta
metrics-otel-collector-1 | NumberDataPoints #0
metrics-otel-collector-1 | Data point attributes:
metrics-otel-collector-1 | -> myKey: Str(myVal)
metrics-otel-collector-1 | StartTimestamp: 2022-12-21 17:10:58.533688167 +0000 UTC
metrics-otel-collector-1 | Timestamp: 2022-12-21 17:11:09.390385089 +0000 UTC
metrics-otel-collector-1 | Value: 42
metrics-otel-collector-1 | {"kind": "exporter", "data_type": "metrics", "name": "logging"}
The
metrics.log
file also gets populated, as expected.Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions