You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**This exporter is undergoing major changes right now.**
16
+
17
+
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.
18
+
19
+
The following options are deprecated and they will not exist in the new version:
20
+
21
+
-`metric_format: {carbon2, graphite}`
22
+
-`metadata_attributes: [<regex>]`
23
+
-`graphite_template: <template>`
24
+
-`source_category: <template>`
25
+
-`source_name: <template>`
26
+
-`source_host: <template>`
27
+
28
+
After the new exporter will be moved to this repository:
29
+
30
+
-`carbon2` and `graphite` are going to be no longer supported and `prometheus` or `otlp` format should be used
31
+
- all resource level attributes are going to be treated as `metadata_attributes`. 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:
32
+
33
+
```yaml
34
+
# before switch to new collector
35
+
exporters:
36
+
sumologic:
37
+
metadata_attribute:
38
+
- my_attribute
39
+
# after switch to new collector
40
+
processors:
41
+
groupbyattrs:
42
+
keys:
43
+
- my_attribute
44
+
```
45
+
46
+
- Source templates (`source_category`, `source_name` and `source_host`) are going to be removed from the exporter and sources may be set using `_sourceCategory`, `sourceName` or `_sourceHost` resource attributes. We recommend to use [Transform Processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/transformprocessor/). For example:
47
+
48
+
```yaml
49
+
# before switch to new collector
50
+
exporters:
51
+
sumologic:
52
+
source_category: "%{foo}/constant/%{bar}"
53
+
# after switch to new collector
54
+
processors:
55
+
transformprocessor:
56
+
log_statements:
57
+
context: log
58
+
statements:
59
+
# set default value to unknown
60
+
- set(attributes["foo"], "unknown") where attributes["foo"] == nil
61
+
- set(attributes["bar"], "unknown") where attributes["foo"] == nil
settings.Logger.Warn("`metric_format: graphite` nad `graphite_template` are deprecated and are going to be removed in the future. See https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/sumologicexporter#migration-to-new-architecture for more information")
35
+
}
36
+
37
+
ifcfg.MetricFormat==Carbon2Format {
38
+
settings.Logger.Warn("`metric_format: carbon` is deprecated and is going to be removed in the future. See https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/sumologicexporter#migration-to-new-architecture for more information")
39
+
}
40
+
41
+
iflen(cfg.MetadataAttributes) >0 {
42
+
settings.Logger.Warn("`metadata_attributes: []` is deprecated and is going to be removed in the future. See https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/sumologicexporter#migration-to-new-architecture for more information")
43
+
}
44
+
45
+
ifcfg.SourceCategory!="" {
46
+
settings.Logger.Warn("`source_category: <template>` is deprecated and is going to be removed in the future. See https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/sumologicexporter#migration-to-new-architecture for more information")
47
+
}
48
+
49
+
ifcfg.SourceHost!="" {
50
+
settings.Logger.Warn("`source_host: <template>` is deprecated and is going to be removed in the future. See https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/sumologicexporter#migration-to-new-architecture for more information")
51
+
}
52
+
53
+
ifcfg.SourceName!="" {
54
+
settings.Logger.Warn("`source_name: <template>` is deprecated and is going to be removed in the future. See https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/sumologicexporter#migration-to-new-architecture for more information")
0 commit comments