-
Notifications
You must be signed in to change notification settings - Fork 0
/
components.go
69 lines (59 loc) · 2.74 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
// Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT.
package main
import (
fluentforwardexporter "github.com/r0mdau/fluentforwardexporter"
"go.opentelemetry.io/collector/component"
filelogreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver"
journaldreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver"
"go.opentelemetry.io/collector/connector"
"go.opentelemetry.io/collector/exporter"
debugexporter "go.opentelemetry.io/collector/exporter/debugexporter"
"go.opentelemetry.io/collector/extension"
"go.opentelemetry.io/collector/otelcol"
"go.opentelemetry.io/collector/processor"
batchprocessor "go.opentelemetry.io/collector/processor/batchprocessor"
"go.opentelemetry.io/collector/receiver"
)
func components() (otelcol.Factories, error) {
var err error
factories := otelcol.Factories{}
factories.Extensions, err = extension.MakeFactoryMap()
if err != nil {
return otelcol.Factories{}, err
}
factories.ExtensionModules = make(map[component.Type]string, len(factories.Extensions))
factories.Receivers, err = receiver.MakeFactoryMap(
journaldreceiver.NewFactory(),
filelogreceiver.NewFactory(),
)
if err != nil {
return otelcol.Factories{}, err
}
factories.ReceiverModules = make(map[component.Type]string, len(factories.Receivers))
factories.ReceiverModules[journaldreceiver.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.105.0"
factories.ReceiverModules[filelogreceiver.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.105.0"
factories.Exporters, err = exporter.MakeFactoryMap(
debugexporter.NewFactory(),
fluentforwardexporter.NewFactory(),
)
if err != nil {
return otelcol.Factories{}, err
}
factories.ExporterModules = make(map[component.Type]string, len(factories.Exporters))
factories.ExporterModules[debugexporter.NewFactory().Type()] = "go.opentelemetry.io/collector/exporter/debugexporter v0.105.0"
factories.ExporterModules[fluentforwardexporter.NewFactory().Type()] = "github.com/r0mdau/fluentforwardexporter v0.1.2"
factories.Processors, err = processor.MakeFactoryMap(
batchprocessor.NewFactory(),
)
if err != nil {
return otelcol.Factories{}, err
}
factories.ProcessorModules = make(map[component.Type]string, len(factories.Processors))
factories.ProcessorModules[batchprocessor.NewFactory().Type()] = "go.opentelemetry.io/collector/processor/batchprocessor v0.105.0"
factories.Connectors, err = connector.MakeFactoryMap()
if err != nil {
return otelcol.Factories{}, err
}
factories.ConnectorModules = make(map[component.Type]string, len(factories.Connectors))
return factories, nil
}