-
Notifications
You must be signed in to change notification settings - Fork 241
/
Copy pathdefaults.go
150 lines (136 loc) · 6.49 KB
/
defaults.go
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
148
149
150
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package defaultcomponents // import "aws-observability.io/collector/defaultcomponents
import (
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsprometheusremotewriteexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy"
"github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension"
"github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver"
"github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension"
"github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/exporter/loggingexporter"
"go.opentelemetry.io/collector/exporter/otlpexporter"
"go.opentelemetry.io/collector/exporter/otlphttpexporter"
"go.opentelemetry.io/collector/extension/ballastextension"
"go.opentelemetry.io/collector/extension/zpagesextension"
"go.opentelemetry.io/collector/processor/batchprocessor"
"go.opentelemetry.io/collector/processor/memorylimiterprocessor"
"go.opentelemetry.io/collector/receiver/otlpreceiver"
"go.uber.org/multierr"
)
// Components register OTel components for ADOT-collector distribution
func Components() (component.Factories, error) {
var errs error
extensions, err := component.MakeExtensionFactoryMap(
awsproxy.NewFactory(),
ecsobserver.NewFactory(),
healthcheckextension.NewFactory(),
pprofextension.NewFactory(),
sigv4authextension.NewFactory(),
zpagesextension.NewFactory(),
ballastextension.NewFactory(),
)
if err != nil {
errs = multierr.Append(errs, err)
}
receivers, err := component.MakeReceiverFactoryMap(
awsecscontainermetricsreceiver.NewFactory(),
awscontainerinsightreceiver.NewFactory(),
awsxrayreceiver.NewFactory(),
statsdreceiver.NewFactory(),
prometheusreceiver.NewFactory(),
jaegerreceiver.NewFactory(),
zipkinreceiver.NewFactory(),
otlpreceiver.NewFactory(),
)
if err != nil {
errs = multierr.Append(errs, err)
}
processors, err := component.MakeProcessorFactoryMap(
attributesprocessor.NewFactory(),
resourceprocessor.NewFactory(),
probabilisticsamplerprocessor.NewFactory(),
spanprocessor.NewFactory(),
filterprocessor.NewFactory(),
metricstransformprocessor.NewFactory(),
resourcedetectionprocessor.NewFactory(),
metricsgenerationprocessor.NewFactory(),
cumulativetodeltaprocessor.NewFactory(),
deltatorateprocessor.NewFactory(),
batchprocessor.NewFactory(),
memorylimiterprocessor.NewFactory(),
)
if err != nil {
errs = multierr.Append(errs, err)
}
// enable the selected exporters
exporters, err := component.MakeExporterFactoryMap(awsxrayexporter.NewFactory(),
awsemfexporter.NewFactory(),
awsprometheusremotewriteexporter.NewFactory(),
prometheusremotewriteexporter.NewFactory(),
prometheusexporter.NewFactory(),
fileexporter.NewFactory(),
dynatraceexporter.NewFactory(),
sapmexporter.NewFactory(),
signalfxexporter.NewFactory(),
// disable it until security team reviews it
//splunkhecexporter.NewFactory(),
// New Relic offers native OTLP ingest. Sign up at https://forms.gle/fa2pWcQxgVQYMggEA
//newrelicexporter.NewFactory(),
datadogexporter.NewFactory(),
logzioexporter.NewFactory(),
loggingexporter.NewFactory(),
otlpexporter.NewFactory(),
otlphttpexporter.NewFactory(),
)
if err != nil {
errs = multierr.Append(errs, err)
}
factories := component.Factories{
Extensions: extensions,
Receivers: receivers,
Processors: processors,
Exporters: exporters,
}
return factories, errs
}