-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
README.md
147 lines (121 loc) · 7.21 KB
/
README.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# Sumo Logic Exporter
<!-- status autogenerated section -->
| Status | |
| ------------- |-----------|
| Stability | [beta]: metrics, logs, traces |
| Distributions | [contrib] |
| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fsumologic%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fsumologic) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fsumologic%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fsumologic) |
| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@aboguszewski-sumo](https://www.github.com/aboguszewski-sumo), [@kkujawa-sumo](https://www.github.com/kkujawa-sumo), [@mat-rumian](https://www.github.com/mat-rumian), [@rnishtala-sumo](https://www.github.com/rnishtala-sumo), [@sumo-drosiek](https://www.github.com/sumo-drosiek) |
[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
<!-- end autogenerated section -->
## Migration to new architecture
**This exporter is undergoing major changes right now.**
For some time we have been developing the [new Sumo Logic exporter](https://github.com/SumoLogic/sumologic-otel-collector/tree/main/pkg/exporter/sumologicexporter#sumo-logic-exporter) and now we are in the process of moving it into this repository.
The following options are no longer supported:
- `metric_format: {carbon2, graphite}`
- `metadata_attributes: [<regex>]`
- `graphite_template: <template>`
- `source_category: <template>`
- `source_name: <template>`
- `source_host: <template>`
After the new exporter will be moved to this repository:
- `carbon2` and `graphite` are no longer supported and `prometheus` or `otlp` format should be used
- all resource level attributes are treated as `metadata_attributes` so this option is no longer supported. You can use [Group by Attributes processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/groupbyattrsprocessor) to move attributes from record level to resource level. For example:
```yaml
# before switch to new collector
exporters:
sumologic:
metadata_attribute:
- my_attribute
# after switch to new collector
processors:
groupbyattrs:
keys:
- my_attribute
```
- Source templates (`source_category`, `source_name` and `source_host`) are no longer supported. We recommend to use [Transform Processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/transformprocessor/). For example:
```yaml
# before switch to new collector
exporters:
sumologic:
source_category: "%{foo}/constant/%{bar}"
# after switch to new collector
processors:
transformprocessor:
log_statements:
context: log
statements:
# set default value to unknown
- set(attributes["foo"], "unknown") where attributes["foo"] == nil
- set(attributes["bar"], "unknown") where attributes["foo"] == nil
# set _sourceCategory as "%{foo}/constant/%{bar}"
- set(resource.attributes["_sourceCategory"], Concat([attributes["foo"], "/constant/", attributes["bar"]], ""))
```
## Configuration
This exporter supports sending logs and metrics data to [Sumo Logic](https://www.sumologic.com/).
Traces are exported using native otlphttp exporter as described
[here](https://help.sumologic.com/Traces/Getting_Started_with_Transaction_Tracing)
Configuration is specified via the yaml in the following structure:
```yaml
exporters:
# ...
sumologic:
# unique URL generated for your HTTP Source, this is the address to send data to
endpoint: <HTTP_Source_URL>
# Compression encoding format, empty string means no compression, default = gzip
compression: {gzip, deflate, zstd, ""}
# max HTTP request body size in bytes before compression (if applied),
# default = 1_048_576 (1MB)
max_request_body_size: <max_request_body_size>
# format to use when sending logs to Sumo Logic, default = otlp,
# see Sumo Logic documentation for details regarding log formats:
# https://help.sumologic.com/docs/send-data/opentelemetry-collector/data-source-configurations/mapping-records-resources/
log_format: {otlp, json, text}
# format to use when sending metrics to Sumo Logic, default = otlp,
# NOTE: only `otlp` is supported when used with sumologicextension
metric_format: {otlp, prometheus}
# Decompose OTLP Histograms into individual metrics, similar to how they're represented in Prometheus format.
# The Sumo OTLP source currently doesn't support Histograms, and they are quietly dropped. This option produces
# metrics similar to when metric_format is set to prometheus.
# default = false
decompose_otlp_histograms: {true, false}
# timeout is the timeout for every attempt to send data to the backend,
# maximum connection timeout is 55s, default = 30s
timeout: <timeout>
# defines if sticky session support is enable.
# default=false
sticky_session_enabled: {true, false}
# for below described queueing and retry related configuration please refer to:
# https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md#configuration
retry_on_failure:
# default = true
enabled: {true, false}
# time to wait after the first failure before retrying;
# ignored if enabled is false, default = 5s
initial_interval: <initial_interval>
# is the upper bound on backoff; ignored if enabled is false, default = 30s
max_interval: <max_interval>
# is the maximum amount of time spent trying to send a batch;
# ignored if enabled is false, default = 120s
max_elapsed_time: <max_elapsed_time>
sending_queue:
# default = false
enabled: {true, false}
# number of consumers that dequeue batches; ignored if enabled is false,
# default = 10
num_consumers: <num_consumers>
# when set, enables persistence and uses the component specified as a storage extension for the persistent queue
# make sure to configure and add a `file_storage` extension in `service.extensions`.
# default = None
storage: <storage_name>
# maximum number of batches kept in memory before data;
# ignored if enabled is false, default = 1000
#
# user should calculate this as num_seconds * requests_per_second where:
# num_seconds is the number of seconds to buffer in case of a backend outage,
# requests_per_second is the average number of requests per seconds.
queue_size: <queue_size>
```
## Source Templates
Source Templates are no longer supported. Please follow [Migration to new architecture](#migration-to-new-architecture)