docs/recipes/metrics-backends/otel-collector.mdx
Run the upstream OpenTelemetry Collector
locally with a debug exporter to see exactly what msb-metrics is
sending. Useful for development and for verifying metric names,
attributes, and protocols before pointing at a real backend.
```yaml
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
exporters:
debug:
verbosity: detailed
service:
pipelines:
metrics:
receivers: [otlp]
exporters: [debug]
```
Boot a sandbox (`msb run alpine`) and watch metrics scroll past in
the otel-collector log. You should see records like
`microsandbox.cpu.utilization` with the configured resource and
identity attributes attached.
The verbosity field controls how much detail the debug exporter
prints:
| Level | Output |
|---|---|
basic (default) | one summary line per export |
normal | summary plus high-level metric names |
detailed | full datapoint values and all attributes |
Use detailed while verifying that attributes and units are correct;
drop to basic once you're confident the pipeline works.