OpenTelemetry OTLP metrics adapter: bridges the Wagoe metrics ports onto OpenTelemetry instruments and pushes them over OTLP/HTTP (protobuf) to any OTel collector (SigNoz, Grafana, Datadog-via-OTel, …). No backend-specific code — only the endpoint changes.
Metric-type mapping onto OTel instruments: counter -> LongCounter (.add) gauge -> DoubleGauge (.set) histogram -> DoubleHistogram(.record) summary -> DoubleHistogram(.record) ; OTel has no summary type
Export is push-based (a PeriodicMetricReader flushes to the collector), so the
IMetricsExporter local-render methods are not meaningful here: export-*
throw, flush! forces an OTLP flush, get-metric-values/reset-metrics! are
inert. Transport is OTLP/HTTP protobuf via okhttp (gRPC is not bundled).
OpenTelemetry OTLP metrics adapter: bridges the Wagoe metrics ports onto OpenTelemetry instruments and pushes them over OTLP/HTTP (protobuf) to any OTel collector (SigNoz, Grafana, Datadog-via-OTel, …). No backend-specific code — only the endpoint changes. Metric-type mapping onto OTel instruments: counter -> LongCounter (.add) gauge -> DoubleGauge (.set) histogram -> DoubleHistogram(.record) summary -> DoubleHistogram(.record) ; OTel has no summary type Export is push-based (a PeriodicMetricReader flushes to the collector), so the `IMetricsExporter` local-render methods are not meaningful here: `export-*` throw, `flush!` forces an OTLP flush, `get-metric-values`/`reset-metrics!` are inert. Transport is OTLP/HTTP protobuf via okhttp (gRPC is not bundled).
(->attributes m)Convert a Clojure tag map into OpenTelemetry Attributes.
Convert a Clojure tag map into OpenTelemetry `Attributes`.
(build-meter-provider {:keys [endpoint service-name interval-ms timeout-ms
headers]
:or {endpoint "http://localhost:4318"
service-name "wagoe"
interval-ms 60000
timeout-ms 10000}})Build an SdkMeterProvider with a periodic OTLP/HTTP metric exporter.
Build an `SdkMeterProvider` with a periodic OTLP/HTTP metric exporter.
(component-from-provider provider {:keys [default-tags] :or {default-tags {}}})Wrap a built SdkMeterProvider as an OtlpMetricsComponent.
Wrap a built `SdkMeterProvider` as an `OtlpMetricsComponent`.
(create-metrics-component config)Build the OTLP metrics component (wiring entry point; mirrors the datadog / prometheus adapters).
Build the OTLP metrics component (wiring entry point; mirrors the datadog / prometheus adapters).
(meter-provider-from-reader reader service-name)Build an SdkMeterProvider around an arbitrary MetricReader, tagged
service.name. Production uses a PeriodicMetricReader over OTLP; tests inject
an in-memory reader.
Build an `SdkMeterProvider` around an arbitrary `MetricReader`, tagged `service.name`. Production uses a PeriodicMetricReader over OTLP; tests inject an in-memory reader.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |