Custom span-derived metrics require a configured metrics pipeline. The exact component and configuration depend on the deployed Collector distribution or trace-proxy version; this is not a universal trace-UI form.

Define the metric

  1. State the question the metric should answer and choose a counter, gauge, or histogram that represents it.
  2. Identify which spans contribute and how measurements are aggregated over time.
  3. Select a small set of stable, bounded dimensions. Do not use trace IDs, span IDs, user IDs, or unbounded message destinations as metric labels.
  4. Confirm the deployed Collector supports the required span-metrics component, or ask the platform owner which trace-proxy metrics are configurable.
  5. Export the resulting metrics through the tenant’s configured metrics pipeline and verify the metric name, unit, dimensions, and values.

Available configuration paths

For a Collector-based setup, configure the span-metrics component supported by your distribution and version, along with its dimensions, aggregation settings, and metrics exporter. Use the matching component documentation and validate the output; a configured span-metrics pipeline is not a general-purpose custom metric editor.

For a trace-proxy setup, MetricsList selects metric names for reporting. That selection does not itself define an arbitrary span-to-metric aggregation. Confirm which metrics and dimensions your deployed proxy computes before configuring reporting or a dashboard.

Validate before rollout

Compare the metric against representative traces, check cardinality and export volume, and test missing or malformed attributes. Document the metric’s unit, aggregation window, dimensions, and owner so dashboards interpret it consistently.