Exceptions Connector
Supported Pipeline Types
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 kind
- Status code
With the provided default config, each metric and log will also have the following dimensions:
- Exception message
- Exception type
Each log will additionally have the following attributes:
- 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 a name
which is looked up in the span's collection of attributes or resource attributes.
The provided default config includes exception.type
and exception.message
as additional dimensions.
Examples
The following is a simple example usage of the exceptions
connector.
receivers:
nop:
exporters:
nop:
connectors:
exceptions:
service:
pipelines:
traces:
receivers: [nop]
exporters: [exceptions]
metrics:
receivers: [exceptions]
exporters: [nop]
logs:
receivers: [exceptions]
exporters: [nop]
The following is a more complex example usage of the exceptions
connector using Prometheus and Loki as exporters.
receivers:
otlp:
protocols:
grpc:
http:
exporters:
prometheusremotewrite:
endpoint: http://prometheus:9090/api/v1/write
loki:
endpoint: http://loki:3100/loki/api/v1/push
connectors:
exceptions:
service:
pipelines:
traces:
receivers: [otlp]
exporters: [exceptions]
metrics:
receivers: [exceptions]
exporters: [prometheusremotewrite]
logs:
receivers: [exceptions]
exporters: [loki]
The full list of settings exposed for this connector are documented here.
More Examples
For more example configuration covering various other use cases, please visit the testdata directory.