OpenTelemetry Metrics icon

OpenTelemetry Metrics

Send metrics to an OTLP endpoint via OpenTelemetry

OpenTelemetry Metrics

AI-generated

Summary

Send a custom metric to an OpenTelemetry OTLP metrics HTTP endpoint with configurable service, meter, instrument, and attributes.

Inputs

  • OTLP Metrics Endpoint (required) — The HTTP endpoint URL for sending metrics in OTLP format, e.g., http://otel-collector:4318/v1/metrics. The node appends /v1/metrics if missing.
  • Service Name (required) — The service name resource attribute to associate with the metric, defaulting to 'n8n-workflow'.
  • Resource Attributes — Optional additional resource attributes as key-value pairs to attach to the metric resource.
  • Meter Name (required) — The meter name under which the metric instrument is created; defaults to 'n8n'.
  • Instrument Type (required) — The type of OpenTelemetry instrument to create for this metric, such as Counter, UpDownCounter, Histogram, or Observable types.
  • Instrument Name (required) — The base name of the metric instrument; defaults to 'event_count'.
  • Metric Name Override — If set, overrides the instrument name and uses the specified string as the metric name.
  • Prefix Meter Name — Whether to prefix the meter name to the metric name with a dot separator.
  • Value (required) — The numeric value to record or add for the metric.
  • Attributes — Attributes as key-value pairs attached to the metric data point.
  • Headers — HTTP headers (e.g., Authorization) to send with the OTLP request.
  • Export Interval (ms) (required) — The interval in milliseconds at which metrics are exported; defaults to 1000 ms.
  • Include Delivery Logs — Whether to attach logs about the metric export delivery to the node output; sensitive headers like Authorization are redacted.

Output shape

a single JSON object in an array for each input item

The output JSON details the metric parameters sent and the export delivery status including endpoint, HTTP method, response code, errors (if any), and timing. Delivery logs are included only if enabled in the settings.

Examples

Example 1: Send a Counter metric named 'requests_total' with value 5 to a local OTLP collector endpoint, attaching a 'region' attribute and custom Authorization header.

Set OTLP Metrics Endpoint to 'http://localhost:4318/v1/metrics', Service Name to your service, Meter Name to 'n8n', Instrument Type to 'Counter', Instrument Name to 'requests_total', Value to 5, add attribute 'region=us-west', add header 'Authorization: Bearer token', and enable Include Delivery Logs.

Discussion