Beyond auto-instrumentation, you can emit custom metrics from your application using the OpenTelemetry Metrics API. Rocketlog ingests them via OTLP and you can use them in dashboards, alerts, and SLOs. The OpenTelemetry metrics API supports Counter, UpDownCounter, Histogram, and Gauge (observable). Below are copy-paste examples for Python and Node.js. For full details, see the OpenTelemetry Metrics API and language-specific docs.

Python

Install the SDK and OTLP exporter if you haven’t already:
Configure the MeterProvider and export to your Rocketlog endpoint (same as in Python instrumentation):

Counter (monotonically increasing)

Histogram (distributions, e.g. duration)

Observable Gauge (current value, e.g. queue size)


Node.js

Install the API, SDK, and OTLP exporter:
Configure the MeterProvider (endpoint same as in Node.js instrumentation):

Counter

Histogram

Observable Gauge


Sending to Rocketlog

Use the same OTLP endpoint as for traces and logs: https://{your-ingress-endpoint}.rocketgraph.app. The metrics exporter uses the /v1/metrics path when using the HTTP exporter. Ensure your app or collector is configured with the same endpoint and that Rocketlog is set as the OTLP destination for metrics. Once custom metrics are flowing, you can use them in the Rocketlog UI for dashboards, alerts, and SLOs. For more instrument types and semantics, see the official OpenTelemetry metrics documentation.