-
Notifications
You must be signed in to change notification settings - Fork 0
/
components.go
105 lines (96 loc) · 4.57 KB
/
components.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
// Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT.
package main
import (
"go.opentelemetry.io/collector/connector"
"go.opentelemetry.io/collector/exporter"
"go.opentelemetry.io/collector/extension"
"go.opentelemetry.io/collector/otelcol"
"go.opentelemetry.io/collector/processor"
"go.opentelemetry.io/collector/receiver"
spanmetricsconnector "github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector"
debugexporter "go.opentelemetry.io/collector/exporter/debugexporter"
loggingexporter "go.opentelemetry.io/collector/exporter/loggingexporter"
otlpexporter "go.opentelemetry.io/collector/exporter/otlpexporter"
otlphttpexporter "go.opentelemetry.io/collector/exporter/otlphttpexporter"
prometheusexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter"
kafkaexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter"
zpagesextension "go.opentelemetry.io/collector/extension/zpagesextension"
ballastextension "go.opentelemetry.io/collector/extension/ballastextension"
jaegerremotesampling "github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling"
healthcheckextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension"
pprofextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension"
oauth2clientauthextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension"
bearertokenauthextension "github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension"
batchprocessor "go.opentelemetry.io/collector/processor/batchprocessor"
memorylimiterprocessor "go.opentelemetry.io/collector/processor/memorylimiterprocessor"
attributesprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor"
spanprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor"
filterprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor"
routingprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor"
otlpreceiver "go.opentelemetry.io/collector/receiver/otlpreceiver"
jaegerreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver"
opencensusreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver"
prometheusreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver"
zipkinreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver"
kafkareceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver"
filelogreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver"
journaldreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver"
)
func components() (otelcol.Factories, error) {
var err error
factories := otelcol.Factories{}
factories.Extensions, err = extension.MakeFactoryMap(
zpagesextension.NewFactory(),
ballastextension.NewFactory(),
jaegerremotesampling.NewFactory(),
healthcheckextension.NewFactory(),
pprofextension.NewFactory(),
oauth2clientauthextension.NewFactory(),
bearertokenauthextension.NewFactory(),
)
if err != nil {
return otelcol.Factories{}, err
}
factories.Receivers, err = receiver.MakeFactoryMap(
otlpreceiver.NewFactory(),
jaegerreceiver.NewFactory(),
opencensusreceiver.NewFactory(),
prometheusreceiver.NewFactory(),
zipkinreceiver.NewFactory(),
kafkareceiver.NewFactory(),
filelogreceiver.NewFactory(),
journaldreceiver.NewFactory(),
)
if err != nil {
return otelcol.Factories{}, err
}
factories.Exporters, err = exporter.MakeFactoryMap(
debugexporter.NewFactory(),
loggingexporter.NewFactory(),
otlpexporter.NewFactory(),
otlphttpexporter.NewFactory(),
prometheusexporter.NewFactory(),
kafkaexporter.NewFactory(),
)
if err != nil {
return otelcol.Factories{}, err
}
factories.Processors, err = processor.MakeFactoryMap(
batchprocessor.NewFactory(),
memorylimiterprocessor.NewFactory(),
attributesprocessor.NewFactory(),
spanprocessor.NewFactory(),
filterprocessor.NewFactory(),
routingprocessor.NewFactory(),
)
if err != nil {
return otelcol.Factories{}, err
}
factories.Connectors, err = connector.MakeFactoryMap(
spanmetricsconnector.NewFactory(),
)
if err != nil {
return otelcol.Factories{}, err
}
return factories, nil
}