exporter

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 0 Imported by: 240

README

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.

exporters:
  # Exporter 1.
  # <exporter type>:
  exampleexporter:
    # <setting one>: <value one>
    endpoint: 1.2.3.4:8080
    # ...
  # Exporter 2.
  # <exporter type>/<name>:
  exampleexporter/settings:
    # <setting two>: <value two>
    endpoint: 0.0.0.0:9211

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:

service:
  pipelines:
    # Valid pipelines are: traces, metrics or logs
    # Trace pipeline 1.
    traces:
      receivers: [examplereceiver]
      processors: []
      exporters: [exampleexporter, exampleexporter/settings]
    # Trace pipeline 2.
    traces/another:
      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) the exporters will have a shared access to the data. Exporters get access to this shared 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:

  • HTTP_PROXY
  • HTTPS_PROXY
  • NO_PROXY

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

Documentation

Overview

Package exporter contains implementations of Exporter components.

To implement a custom exporter you will need to implement component.ExporterFactory interface and component.Exporter interface.

To make the custom exporter part of the Collector build the factory must be added to defaultcomponents.Components() function.

Directories

Path Synopsis
Package exporterhelper provides helper functions for exporters.
Package exporterhelper provides helper functions for exporters.
Package fileexporter exports data to files.
Package fileexporter exports data to files.
Package jaegerexporter sends trace data to a Jaeger Collector gRPC endpoint.
Package jaegerexporter sends trace data to a Jaeger Collector gRPC endpoint.
Package kafkaexporter exports trace data to Kafka.
Package kafkaexporter exports trace data to Kafka.
Package loggingexporter exports data to console as logs.
Package loggingexporter exports data to console as logs.
nopexporter module
Package opencensusexporter exports data to an OpenCensus agent.
Package opencensusexporter exports data to an OpenCensus agent.
Package otlpexporter exports data by using the OTLP format to a gPRC endpoint.
Package otlpexporter exports data by using the OTLP format to a gPRC endpoint.
Package otlphttpexporter exports data by using the OTLP format to an HTTP endpoint.
Package otlphttpexporter exports data by using the OTLP format to an HTTP endpoint.
Package prometheusexporter exports metrics data as a Prometheus pull handler.
Package prometheusexporter exports metrics data as a Prometheus pull handler.
Package prometheusremotewriteexporter sends metrics data to Prometheus Remote Write (PRW) endpoints.
Package prometheusremotewriteexporter sends metrics data to Prometheus Remote Write (PRW) endpoints.
Package zipkinexporter exports trace data to Zipkin.
Package zipkinexporter exports trace data to Zipkin.

Jump to

Keyboard shortcuts

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