Version: v0.67.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 1 Imported by: 83


General Information

An exporter is how data gets sent to different systems/back-ends. Generally, an exporter translates the internal format into another defined format.

Available trace exporters (sorted alphabetically):

Available metric exporters (sorted alphabetically):

Available log exporters (sorted alphabetically):

Available local exporters (sorted alphabetically):

The contrib repository has more exporters available in its builds.

Configuring Exporters

Exporters are configured via YAML under the top-level exporters tag.

The following is a sample configuration for the exampleexporter.

  # Exporter 1.
  # <exporter type>:
    # <setting one>: <value one>
    # ...
  # Exporter 2.
  # <exporter type>/<name>:
    # <setting two>: <value two>

An exporter instance is referenced by its full name in other parts of the config, such as in pipelines. A full name consists of the exporter type, '/' and the name appended to the exporter type in the configuration. All exporter full names must be unique.

For the example above:

  • Exporter 1 has full name exampleexporter.
  • Exporter 2 has full name exampleexporter/settings.

Exporters are enabled upon being added to a pipeline. For example:

    # Valid pipelines are: traces, metrics or logs
    # Trace pipeline 1.
      receivers: [examplereceiver]
      processors: []
      exporters: [exampleexporter, exampleexporter/settings]
    # Trace pipeline 2.
      receivers: [examplereceiver]
      processors: []
      exporters: [exampleexporter, exampleexporter/settings]

Data Ownership

When multiple exporters are configured to send the same data (e.g. by configuring multiple exporters for the same pipeline):

  • exporters not configured to mutate the data will have shared access to the data
  • exporters with the Capabilities to mutate the data will receive a copy of the data Exporters access export data when ConsumeTraces/ConsumeMetrics/ConsumeLogs function is called. Exporters MUST NOT modify the pdata.Traces/pdata.Metrics/pdata.Logs argument of these functions. If the exporter needs to modify the data while performing the exporting the exporter can clone the data and perform the modification on the clone or use a copy-on-write approach for individual sub-parts of pdata.Traces/pdata.Metrics/pdata.Logs. Any approach that does not mutate the original pdata.Traces/pdata.Metrics/pdata.Logs is allowed.

Proxy Support

Beyond standard YAML configuration as outlined in the individual READMEs above, exporters that leverage the net/http package (all do today) also respect the following proxy environment variables:


If set at Collector start time then exporters, regardless of protocol, will or will not proxy traffic as defined by these environment variables.




This section is empty.


View Source
var MakeFactoryMap = component.MakeExporterFactoryMap //nolint:staticcheck

MakeFactoryMap takes a list of exporter factories and returns a map with factory type as keys. It returns a non-nil error when more than one factories have the same type.

View Source
var NewFactory = component.NewExporterFactory //nolint:staticcheck

NewFactory returns a Factory.

View Source
var WithLogs = component.WithLogsExporter //nolint:staticcheck

WithLogs overrides the default "error not supported" implementation for CreateLogsExporter and the default "undefined" stability level.

View Source
var WithMetrics = component.WithMetricsExporter //nolint:staticcheck

WithMetrics overrides the default "error not supported" implementation for CreateMetricsExporter and the default "undefined" stability level.

View Source
var WithTraces = component.WithTracesExporter //nolint:staticcheck

WithTraces overrides the default "error not supported" implementation for CreateTracesExporter and the default "undefined" stability level.


This section is empty.


type CreateLogsFunc

type CreateLogsFunc = component.CreateLogsExporterFunc //nolint:staticcheck

CreateLogsFunc is the equivalent of Factory.CreateLogs.

type CreateMetricsFunc

type CreateMetricsFunc = component.CreateMetricsExporterFunc //nolint:staticcheck

CreateMetricsFunc is the equivalent of Factory.CreateMetrics.

type CreateSettings

type CreateSettings = component.ExporterCreateSettings //nolint:staticcheck

CreateSettings configures exporter creators.

type CreateTracesFunc

type CreateTracesFunc = component.CreateTracesExporterFunc //nolint:staticcheck

CreateTracesFunc is the equivalent of Factory.CreateTraces.

type Factory

type Factory = component.ExporterFactory //nolint:staticcheck

Factory is factory interface for exporters.

This interface cannot be directly implemented. Implementations must use the NewFactory to implement it.

type FactoryOption

type FactoryOption = component.ExporterFactoryOption //nolint:staticcheck

FactoryOption apply changes to Factory.

type Logs

type Logs = component.LogsExporter //nolint:staticcheck

Logs is an exporter that can consume logs.

type Metrics

type Metrics = component.MetricsExporter //nolint:staticcheck

Metrics is an exporter that can consume metrics.

type Traces

type Traces = component.TracesExporter //nolint:staticcheck

Traces is an exporter that can consume traces.

Source Files


Path Synopsis
Package exporterhelper provides helper functions for exporters.
Package exporterhelper provides helper functions for exporters.
otlpexporter module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL