Docs » Get started with the Splunk Distribution of the OpenTelemetry Collector » Collector components » Logging exporter

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)

basic

warn, error, panic, fatal

normal

info

detailed

debug

Note

The detailed verbosity level might increase resource consumption on the host. Deactivate the logging exporter after you’ve obtained sufficient samples.

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

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.

To learn about even more support options, see Splunk Customer Success .