Debian Codegraph @

exporter/README.md

raw
1 # General Information
2
3 An exporter defines how the pipeline data leaves the collector.
4
5 This repository hosts the following exporters available in
6 traces, metrics and logs pipelines (sorted alphabetically):
7
8 - [Debug](debugexporter/README.md)
9 - [OTLP gRPC](otlpexporter/README.md)
10 - [OTLP HTTP](otlphttpexporter/README.md)
11
12 The [contrib
13 repository](https://github.com/open-telemetry/opentelemetry-collector-contrib)
14 has more exporters available in its builds.
15
16 ## Configuring Exporters
17
18 Exporters are configured via YAML under the top-level `exporters` tag.
19
20 The following is a sample configuration for the `exampleexporter`.
21
22 ```yaml
23 exporters:
24 # Exporter 1.
25 # <exporter type>:
26 exampleexporter:
27 # <setting one>: <value one>
28 endpoint: 1.2.3.4:8080
29 # ...
30 # Exporter 2.
31 # <exporter type>/<name>:
32 exampleexporter/settings:
33 # <setting two>: <value two>
34 endpoint: 0.0.0.0:9211
35 ```
36
37 An exporter instance is referenced by its full name in other parts of the config,
38 such as in pipelines. A full name consists of the exporter type, '/' and the
39 name appended to the exporter type in the configuration. All exporter full names
40 must be unique.
41
42 For the example above:
43
44 - Exporter 1 has full name `exampleexporter`.
45 - Exporter 2 has full name `exampleexporter/settings`.
46
47 Exporters are enabled upon being added to a pipeline. For example:
48
49 ```yaml
50 service:
51 pipelines:
52 # Valid pipelines are: traces, metrics or logs
53 # Trace pipeline 1.
54 traces:
55 receivers: [examplereceiver]
56 processors: []
57 exporters: [exampleexporter, exampleexporter/settings]
58 # Trace pipeline 2.
59 traces/another:
60 receivers: [examplereceiver]
61 processors: []
62 exporters: [exampleexporter, exampleexporter/settings]
63 ```
64
65 ## Data Ownership
66
67 When multiple exporters are configured to send the same data (e.g. by configuring multiple
68 exporters for the same pipeline):
69 * exporters *not* configured to mutate the data will have shared access to the data
70 * exporters with the Capabilities to mutate the data will receive a copy of the data
71
72 Exporters access export data when `ConsumeTraces`/`ConsumeMetrics`/`ConsumeLogs`
73 function is called. Unless exporter's capabilities include mutation, the exporter MUST NOT modify the `pdata.Traces`/`pdata.Metrics`/`pdata.Logs` argument of
74 these functions. Any approach that does not mutate the original `pdata.Traces`/`pdata.Metrics`/`pdata.Logs` is allowed without the mutation capability.
75
76 ## Proxy Support
77
78 Beyond standard YAML configuration as outlined in the individual READMEs above,
79 exporters that leverage the net/http package (all do today) also respect the
80 following proxy environment variables:
81
82 - HTTP_PROXY
83 - HTTPS_PROXY
84 - NO_PROXY
85
86 If set at Collector start time then exporters, regardless of protocol,
87 will or will not proxy traffic as defined by these environment variables.