feat(otel-node): set metrics temporality preference to delta#670
Merged
david-luna merged 14 commits intomainfrom Mar 31, 2025
Merged
feat(otel-node): set metrics temporality preference to delta#670david-luna merged 14 commits intomainfrom
david-luna merged 14 commits intomainfrom
Conversation
Member
Author
|
Using it with local EDOT collector I'm getting some warnings Starting in otel mode
2025-03-21T15:25:53.754+0100 info service@v0.120.0/service.go:193 Setting up own telemetry...
2025-03-21T15:25:53.755+0100 info builders/builders.go:26 Development component. May change in the future. {"otelcol.component.id": "elasticsearch/otel", "otelcol.component.kind": "Exporter", "otelcol.signal": "metrics"}
2025-03-21T15:25:53.755+0100 info builders/builders.go:26 Development component. May change in the future. {"otelcol.component.id": "elasticapm", "otelcol.component.kind": "Connector", "otelcol.signal": "logs", "otelcol.signal.output": "metrics"}
2025-03-21T15:25:53.756+0100 info lsmintervalprocessor@v0.5.1/processor.go:129 no directory specified, switching to in-memory mode {"otelcol.component.id": "elasticapm", "otelcol.component.kind": "Connector", "otelcol.signal": "logs", "otelcol.signal.output": "metrics"}
2025-03-21T15:25:53.756+0100 info builders/builders.go:26 Development component. May change in the future. {"otelcol.component.id": "elasticapm", "otelcol.component.kind": "Connector", "otelcol.signal": "traces", "otelcol.signal.output": "metrics"}
2025-03-21T15:25:53.757+0100 info service@v0.120.0/service.go:258 Starting ./elastic-agent... {"Version": "9.0.0-rc1", "NumCPU": 12}
2025-03-21T15:25:53.757+0100 info extensions/extensions.go:40 Starting extensions...
2025-03-21T15:25:53.759+0100 info otlpreceiver@v0.120.0/otlp.go:116 Starting GRPC server {"otelcol.component.id": "otlp/fromsdk", "otelcol.component.kind": "Receiver", "endpoint": "localhost:4317"}
2025-03-21T15:25:53.760+0100 info otlpreceiver@v0.120.0/otlp.go:173 Starting HTTP server {"otelcol.component.id": "otlp/fromsdk", "otelcol.component.kind": "Receiver", "endpoint": "localhost:4318"}
2025-03-21T15:25:53.761+0100 info service@v0.120.0/service.go:281 Everything is ready. Begin running and processing data.
2025-03-21T15:26:56.591+0100 warn elasticsearchexporter@v0.120.1/exporter.go:384 validation errors {"otelcol.component.id": "elasticsearch/otel", "otelcol.component.kind": "Exporter", "otelcol.signal": "metrics", "error": "dropping cumulative temporality histogram \"http.server.duration\"\ndropping cumulative temporality histogram \"http.client.duration\"\ndropping cumulative temporality histogram \"v8js.gc.duration\""}
2025-03-21T15:27:56.487+0100 warn elasticsearchexporter@v0.120.1/exporter.go:384 validation errors {"otelcol.component.id": "elasticsearch/otel", "otelcol.component.kind": "Exporter", "otelcol.signal": "metrics", "error": "dropping cumulative temporality histogram \"http.server.duration\"\ndropping cumulative temporality histogram \"http.client.duration\"\ndropping cumulative temporality histogram \"v8js.gc.duration\""}
2025-03-21T15:28:56.492+0100 warn elasticsearchexporter@v0.120.1/exporter.go:384 validation errors {"otelcol.component.id": "elasticsearch/otel", "otelcol.component.kind": "Exporter", "otelcol.signal": "metrics", "error": "dropping cumulative temporality histogram \"http.server.duration\"\ndropping cumulative temporality histogram \"http.client.duration\"\ndropping cumulative temporality histogram \"v8js.gc.duration\""}
2025-03-21T15:29:56.500+0100 warn elasticsearchexporter@v0.120.1/exporter.go:384 validation errors {"otelcol.component.id": "elasticsearch/otel", "otelcol.component.kind": "Exporter", "otelcol.signal": "metrics", "error": "dropping cumulative temporality histogram \"http.server.duration\"\ndropping cumulative temporality histogram \"http.client.duration\"\ndropping cumulative temporality histogram \"v8js.gc.duration\""}
2025-03-21T15:30:56.510+0100 warn elasticsearchexporter@v0.120.1/exporter.go:384 validation errors {"otelcol.component.id": "elasticsearch/otel", "otelcol.component.kind": "Exporter", "otelcol.signal": "metrics", "error": "dropping cumulative temporality histogram \"http.server.duration\"\ndropping cumulative temporality histogram \"http.client.duration\"\ndropping cumulative temporality histogram \"v8js.gc.duration\""}
2025-03-21T15:31:56.500+0100 warn elasticsearchexporter@v0.120.1/exporter.go:384 validation errors {"otelcol.component.id": "elasticsearch/otel", "otelcol.component.kind": "Exporter", "otelcol.signal": "metrics", "error": "dropping cumulative temporality histogram \"http.server.duration\"\ndropping cumulative temporality histogram \"http.client.duration\"\ndropping cumulative temporality histogram \"v8js.gc.duration\""}
2025-03-21T15:32:56.498+0100 warn elasticsearchexporter@v0.120.1/exporter.go:384 validation errors {"otelcol.component.id": "elasticsearch/otel", "otelcol.component.kind": "Exporter", "otelcol.signal": "metrics", "error": "dropping cumulative temporality histogram \"http.server.duration\"\ndropping cumulative temporality histogram \"http.client.duration\"\ndropping cumulative temporality histogram \"v8js.gc.duration\""}
2025-03-21T15:33:56.475+0100 warn elasticsearchexporter@v0.120.1/exporter.go:384 validation errors {"otelcol.component.id": "elasticsearch/otel", "otelcol.component.kind": "Exporter", "otelcol.signal": "metrics", "error": "dropping cumulative temporality histogram \"http.server.duration\"\ndropping cumulative temporality histogram \"http.client.duration\"\ndropping cumulative temporality histogram \"v8js.gc.duration\""}
2025-03-21T15:34:56.505+0100 warn elasticsearchexporter@v0.120.1/exporter.go:384 validation errors {"otelcol.component.id": "elasticsearch/otel", "otelcol.component.kind": "Exporter", "otelcol.signal": "metrics", "error": "dropping cumulative temporality histogram \"http.server.duration\"\ndropping cumulative temporality histogram \"http.client.duration\"\ndropping cumulative temporality histogram \"v8js.gc.duration\""}
2025-03-21T15:35:56.498+0100 warn elasticsearchexporter@v0.120.1/exporter.go:384 validation errors {"otelcol.component.id": "elasticsearch/otel", "otelcol.component.kind": "Exporter", "otelcol.signal": "metrics", "error": "dropping cumulative temporality histogram \"http.server.duration\"\ndropping cumulative temporality histogram \"http.client.duration\"\ndropping cumulative temporality histogram \"v8js.gc.duration\""}
2025-03-21T15:36:56.494+0100 warn elasticsearchexporter@v0.120.1/exporter.go:384 validation errors {"otelcol.component.id": "elasticsearch/otel", "otelcol.component.kind": "Exporter", "otelcol.signal": "metrics", "error": "dropping cumulative temporality histogram \"http.server.duration\"\ndropping cumulative temporality histogram \"http.client.duration\"\ndropping cumulative temporality histogram \"v8js.gc.duration\""}
2025-03-21T15:37:56.489+0100 warn elasticsearchexporter@v0.120.1/exporter.go:384 validation errors {"otelcol.component.id": "elasticsearch/otel", "otelcol.component.kind": "Exporter", "otelcol.signal": "metrics", "error": "dropping cumulative temporality histogram \"http.server.duration\"\ndropping cumulative temporality histogram \"http.client.duration\"\ndropping cumulative temporality histogram \"v8js.gc.duration\""}
2025-03-21T15:38:56.495+0100 warn elasticsearchexporter@v0.120.1/exporter.go:384 validation errors {"otelcol.component.id": "elasticsearch/otel", "otelcol.component.kind": "Exporter", "otelcol.signal": "metrics", "error": "dropping cumulative temporality histogram \"http.server.duration\"\ndropping cumulative temporality histogram \"http.client.duration\"\ndropping cumulative temporality histogram \"v8js.gc.duration\""}
2025-03-21T15:39:56.516+0100 warn elasticsearchexporter@v0.120.1/exporter.go:384 validation errors {"otelcol.component.id": "elasticsearch/otel", "otelcol.component.kind": "Exporter", "otelcol.signal": "metrics", "error": "dropping cumulative temporality histogram \"http.server.duration\"\ndropping cumulative temporality histogram \"http.client.duration\"\ndropping cumulative temporality histogram \"v8js.gc.duration\""}
2025-03-21T15:40:56.572+0100 warn elasticsearchexporter@v0.120.1/exporter.go:384 validation errors {"otelcol.component.id": "elasticsearch/otel", "otelcol.component.kind": "Exporter", "otelcol.signal": "metrics", "error": "dropping cumulative temporality histogram \"http.server.duration\"\ndropping cumulative temporality histogram \"http.client.duration\"\ndropping cumulative temporality histogram \"v8js.gc.duration\""}
2025-03-21T15:41:56.516+0100 warn elasticsearchexporter@v0.120.1/exporter.go:384 validation errors {"otelcol.component.id": "elasticsearch/otel", "otelcol.component.kind": "Exporter", "otelcol.signal": "metrics", "error": "dropping cumulative temporality histogram \"http.server.duration\"\ndropping cumulative temporality histogram \"http.client.duration\"\ndropping cumulative temporality histogram \"v8js.gc.duration\""} |
Member
Author
|
I was setting the default value too late and did not get applied when creating the metrics exporters. Added some tests to check the temporality is correct in the metrics sent |
…elastic-otel-node into dluna-metrics-temporality-delta
trentm
approved these changes
Mar 28, 2025
| 'delta'; | ||
| } else if (temporalityPreference !== 'delta') { | ||
| log.warn( | ||
| `Metrics temporality preference is set to "${temporalityPreference}". Use "delta" for proper analysis of histogram metrics in Kibana` |
Member
There was a problem hiding this comment.
Do you happen to know if the other lang SDKs are warning on this?
Member
Author
There was a problem hiding this comment.
Haven't seen any log in the PRs for:
- java https://github.com/elastic/elastic-otel-java/pull/583/files
- dotnet https://github.com/elastic/elastic-otel-dotnet/pull/245/files
- python https://github.com/elastic/elastic-otel-python/pull/197/files
Should we remove it then and rely on the docs then?
Member
Author
There was a problem hiding this comment.
Should we remove it then and rely on the docs then?
I guess is better to have it clearly written in the docs.
packages/opentelemetry-node/test/OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.test.js
Show resolved
Hide resolved
packages/opentelemetry-node/test/fixtures/use-http-server-metrics.js
Outdated
Show resolved
Hide resolved
packages/opentelemetry-node/test/fixtures/use-http-server-metrics.js
Outdated
Show resolved
Hide resolved
…MPORALITY_PREFERENCE.test.js Co-authored-by: Trent Mick <trent.mick@elastic.co>
…ics.js Co-authored-by: Trent Mick <trent.mick@elastic.co>
…ics.js Co-authored-by: Trent Mick <trent.mick@elastic.co>
…elastic-otel-node into dluna-metrics-temporality-delta
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Done via env var if user hasn't set any other value.
Closes: #468