netra-custom-metrics

Installation
SKILL.md

Netra Custom Metrics

Use this skill to instrument business and operational KPIs alongside Netra traces.

When To Use

  • You need request, latency, token, and cost metrics.
  • You need queue depth or in-flight gauges.
  • You want periodic metrics export via OTLP/HTTP JSON.

Procedure

  1. Initialize Netra with enable_metrics=True.
  2. Get a meter via Netra.get_meter("service-name").
  3. Define instruments: counter, histogram, up-down counter, observable counter.
  4. Record values with low-cardinality attributes.
  5. Call Netra.shutdown() on process exit to flush final export.

Python Pattern

from netra import Netra
Related skills
Installs
2
First Seen
Mar 25, 2026