Merged
Conversation
db871c8 to
edb6d82
Compare
ericdallo
requested changes
Dec 19, 2025
Owner
ericdallo
left a comment
There was a problem hiding this comment.
Thank you for the help!
I'm not sure it makes sense to add another exporter just because of a specific existing one config, I think we should keep using otlp and user can override its config to :
:config {"otel.logs.exporter" "none"
"otel.metrics.exporter" "otlp" WDYT?
Contributor
Author
|
I believe it makes sense. I initially thought it could be a bit awkward given the config structure (enabled flag and stuff) and that it might introduce coupling. But thinking it over I agree with you, the OTLP lib config structure looks flexible enough. |
edb6d82 to
9cd6b90
Compare
9cd6b90 to
be4cb06
Compare
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.
Add OpenTelemetry Metrics Support
Summary
Extends the existing
otlpexporter to support OpenTelemetry metrics in addition to logs. This enables efficient aggregation, querying, and analysis of REPL usage patterns.Motivation
While the existing
otlpexporter sends data as OpenTelemetry logs, metrics are better suited for:Implementation
Unified OTLP Exporter
The
otlpexporter now supports both logs and metrics:metrepl.events.total:metric- Event type (e.g.,:event/op-completed):operation- REPL operation name (e.g.,"eval") - only present for operation events:correlation-id- Session identifier for grouping related events:hostname,:os, etc.Users control which signals are exported via standard OpenTelemetry configuration:
"otel.logs.exporter"- logs export control"otel.metrics.exporter"- metrics export controlChanges
Backward Compatibility
:otlpconfig key preserved (no breaking changes)"otel.metrics.exporter": "otlp"Testing
To test the metrics exporter, create
.metrepl.edn:{:exporters {:otlp {:enabled? true :config {"otel.logs.exporter" "none" "otel.metrics.exporter" "otlp" "otel.exporter.otlp.metrics.protocol" "http/protobuf" "otel.exporter.otlp.metrics.endpoint" "https://your-endpoint/metrics"}}}}Tested with real project REPL sessions. Both logs and metrics successfully exported and visible in Grafana.