-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
36 lines (29 loc) · 872 Bytes
/
main.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
// Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT.
// Program otelcol-custom is an OpenTelemetry Collector binary.
package main
import (
"log"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/otelcol"
)
func main() {
factories, err := components()
if err != nil {
log.Fatalf("failed to build components: %v", err)
}
info := component.BuildInfo{
Command: "otelcol-custom",
Description: "Custom OpenTelemetry Collector distribution",
Version: "0.85.0",
}
if err := run(otelcol.CollectorSettings{BuildInfo: info, Factories: factories}); err != nil {
log.Fatal(err)
}
}
func runInteractive(params otelcol.CollectorSettings) error {
cmd := otelcol.NewCommand(params)
if err := cmd.Execute(); err != nil {
log.Fatalf("collector server run finished with error: %v", err)
}
return nil
}