forked from git-ecosystem/sample-trace2-otel-collector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomponents.go
59 lines (50 loc) · 1.55 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
// 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"
azuremonitorexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter"
loggingexporter "go.opentelemetry.io/collector/exporter/loggingexporter"
otlpexporter "go.opentelemetry.io/collector/exporter/otlpexporter"
batchprocessor "go.opentelemetry.io/collector/processor/batchprocessor"
trace2receiver "github.com/git-ecosystem/trace2receiver"
)
func components() (otelcol.Factories, error) {
var err error
factories := otelcol.Factories{}
factories.Extensions, err = extension.MakeFactoryMap(
)
if err != nil {
return otelcol.Factories{}, err
}
factories.Receivers, err = receiver.MakeFactoryMap(
trace2receiver.NewFactory(),
)
if err != nil {
return otelcol.Factories{}, err
}
factories.Exporters, err = exporter.MakeFactoryMap(
azuremonitorexporter.NewFactory(),
loggingexporter.NewFactory(),
otlpexporter.NewFactory(),
)
if err != nil {
return otelcol.Factories{}, err
}
factories.Processors, err = processor.MakeFactoryMap(
batchprocessor.NewFactory(),
)
if err != nil {
return otelcol.Factories{}, err
}
factories.Connectors, err = connector.MakeFactoryMap(
)
if err != nil {
return otelcol.Factories{}, err
}
return factories, nil
}