Exceptions Connector
contrib, k8s
Maintainers: @marctc
Source: opentelemetry-collector-contrib
Overview
Overview
Generate metrics and logs from recorded application exceptions associated with spans. Each metric and log will have at least the following dimensions:- Service name
- Span name
- Span kind
- Status code
- Exception message
- Exception type
- Exception stacktrace
- Span attributes. If you want to filter out some attributes (like only copying HTTP attributes starting with
http.) use the transform processor.
Configurations
If you are not already familiar with connectors, you may find it helpful to first visit the Connectors README. The following settings can be optionally configured:-
dimensions: the list of dimensions to add together with the default dimensions defined above. Each additional dimension is defined with anamewhich is looked up in the spanβs collection of attributes or resource attributes. The provided default config includesexception.typeandexception.messageas additional dimensions. -
exemplars: Use to configure how to attach exemplars to metrics.enabled(default:false): enabling will add spans as Exemplars.
Examples
The following is a simple example usage of theexceptions connector.
exceptions connector using Prometheus and Loki as exporters.
More Examples
For more example configuration covering various other use cases, please visit the testdata directory.Configuration
Example Configuration
Last generated: 2026-04-13