Logging exporter 🔗
Note
The Logging exporter will be deprecated in September 2024 in favor of the Debug exporter. For more information, see the GitHub repo and docs at Debug exporter .
The logging exporter allows the OpenTelemetry Collector to send traces, metrics, and logs directly to the console. The supported pipeline types are traces
, metrics
, and logs
. See Process your data with pipelines for more information.
Use the logging exporter to diagnose and troubleshoot issues with telemetry received and processed by the OpenTelemetry Collector, or to obtain samples for other purposes.
Get started 🔗
Note
The Logging exporter sends pipeline activity to the console as logs. To control the verbosity of the OpenTelemetry Collector itself, use the service.logger
setting.
By default, the Splunk Distribution of OpenTelemetry Collector includes the logging exporter with verbosity set to detailed
when deploying in host monitoring (agent) mode. See Collector deployment modes for more information.
exporters:
# ...
# Other exporters
# ...
logging:
# loglevel is deprecated; use verbosity instead
# Available levels are "basic", "normal", and "detailed"
verbosity: detailed
To activate the logging exporter, add it to any pipeline you want to diagnose. For example:
:emphasize-lines: 9, 13, 20
service:
pipelines:
traces:
receivers: [jaeger, otlp, zipkin]
processors:
- memory_limiter
- batch
- resourcedetection
exporters: [sapm, signalfx, logging]
metrics:
receivers: [hostmetrics, otlp, signalfx]
processors: [memory_limiter, batch, resourcedetection]
exporters: [signalfx, logging]
logs:
receivers: [fluentforward, otlp]
processors:
- memory_limiter
- batch
- resourcedetection
exporters: [splunk_hec, logging]
Available verbosity levels are basic
, normal
, and detailed
. The correspondence between verbosity levels and log levels is the following:
Verbosity level |
Log level (Deprecated) |
---|---|
|
|
|
|
|
|
Note
The detailed
verbosity level might increase resource consumption on the host. Deactivate the logging exporter after you’ve obtained sufficient samples.
Review collected logs 🔗
To review logs produced by the logging exporter, run the following command:
journalctl -u splunk-otel-collector.service -f
Sample configurations 🔗
The following example shows a logging exporter with detailed verbosity, which is equivalent to a debug
log level. Initial sampling is five messages logged each second, logging every 200 messages after the initial sample.
exporters:
logging:
verbosity: detailed
sampling_initial: 5
sampling_thereafter: 200
Settings 🔗
The following table shows the configuration options for the logging exporter:
Troubleshooting 🔗
If you are a Splunk Observability Cloud customer and are not able to see your data in Splunk Observability Cloud, you can get help in the following ways.
Available to Splunk Observability Cloud customers
Submit a case in the Splunk Support Portal .
Contact Splunk Support .
Available to prospective customers and free trial users
Ask a question and get answers through community support at Splunk Answers .
Join the Splunk #observability user group Slack channel to communicate with customers, partners, and Splunk employees worldwide. To join, see Chat groups in the Get Started with Splunk Community manual.