From 6a8bfab4d7f32a3b6ac72dcdd9bb7dba32947606 Mon Sep 17 00:00:00 2001 From: Ruben Vargas Date: Thu, 7 Nov 2024 08:18:54 -0600 Subject: [PATCH] Add file exporter (#105) Signed-off-by: Ruben Vargas --- _build/build.log | 14 +++++++------- _build/components.go | 3 +++ _build/go.mod | 4 +++- _build/go.sum | 8 ++++++++ manifest.yaml | 1 + 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/_build/build.log b/_build/build.log index 1d752770..a8ca5c96 100644 --- a/_build/build.log +++ b/_build/build.log @@ -1,8 +1,8 @@ Flag --go has been deprecated, use config distribution::go -2024-10-15T10:32:23.485+0200 INFO internal/command.go:125 OpenTelemetry Collector Builder {"version": "(devel)"} -2024-10-15T10:32:23.486+0200 INFO internal/command.go:161 Using config file {"path": "manifest.yaml"} -2024-10-15T10:32:23.504+0200 INFO builder/config.go:142 Using go {"go-executable": "/home/ploffay/bin/go/bin/go"} -2024-10-15T10:32:23.508+0200 INFO builder/main.go:100 Sources created {"path": "./_build"} -2024-10-15T10:32:28.463+0200 INFO builder/main.go:191 Getting go modules -2024-10-15T10:32:29.131+0200 INFO builder/main.go:111 Compiling -2024-10-15T10:33:05.626+0200 INFO builder/main.go:130 Compiled {"binary": "./_build/otelcol"} +2024-11-01T01:21:55.019-0600 INFO internal/command.go:125 OpenTelemetry Collector Builder {"version": "(devel)"} +2024-11-01T01:21:55.020-0600 INFO internal/command.go:161 Using config file {"path": "manifest.yaml"} +2024-11-01T01:21:55.106-0600 INFO builder/config.go:142 Using go {"go-executable": "/usr/local/go/bin/go"} +2024-11-01T01:21:55.110-0600 INFO builder/main.go:100 Sources created {"path": "./_build"} +2024-11-01T01:22:08.587-0600 INFO builder/main.go:191 Getting go modules +2024-11-01T01:22:23.243-0600 INFO builder/main.go:111 Compiling +2024-11-01T01:22:52.161-0600 INFO builder/main.go:130 Compiled {"binary": "./_build/otelcol"} diff --git a/_build/components.go b/_build/components.go index c99b1d7e..8d17618a 100644 --- a/_build/components.go +++ b/_build/components.go @@ -26,6 +26,7 @@ import ( awsemfexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter" awsxrayexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter" loadbalancingexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter" + fileexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter" zpagesextension "go.opentelemetry.io/collector/extension/zpagesextension" ballastextension "go.opentelemetry.io/collector/extension/ballastextension" memorylimiterextension "go.opentelemetry.io/collector/extension/memorylimiterextension" @@ -143,6 +144,7 @@ func components() (otelcol.Factories, error) { awsemfexporter.NewFactory(), awsxrayexporter.NewFactory(), loadbalancingexporter.NewFactory(), + fileexporter.NewFactory(), ) if err != nil { return otelcol.Factories{}, err @@ -160,6 +162,7 @@ func components() (otelcol.Factories, error) { factories.ExporterModules[awsemfexporter.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.107.0" factories.ExporterModules[awsxrayexporter.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.107.0" factories.ExporterModules[loadbalancingexporter.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.107.0" + factories.ExporterModules[fileexporter.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.107.0" factories.Processors, err = processor.MakeFactoryMap( batchprocessor.NewFactory(), diff --git a/_build/go.mod b/_build/go.mod index 573f6850..c612d351 100644 --- a/_build/go.mod +++ b/_build/go.mod @@ -4,7 +4,7 @@ module github.com/os-observability/redhat-opentelemetry-collector go 1.21.0 -toolchain go1.21.8 +toolchain go1.22.5 require ( github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector v0.107.0 @@ -13,6 +13,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.107.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.107.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.107.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.107.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.107.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.107.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/lokiexporter v0.107.0 @@ -374,6 +375,7 @@ require ( google.golang.org/protobuf v1.34.2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/api v0.29.3 // indirect diff --git a/_build/go.sum b/_build/go.sum index 4bf9e378..410c702f 100644 --- a/_build/go.sum +++ b/_build/go.sum @@ -642,6 +642,8 @@ github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporte github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.107.0/go.mod h1:BXtdUeALBhju91oCsOPGvZpqrVx5tUbaPOXmuqPb0Ts= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.107.0 h1:sIwLXsjZOgNxI3dH8nfng4eS7+XT0VLG4OoQ2YSLwU4= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.107.0/go.mod h1:xHwOHRCITxgdxGbuPWIvHHYYhnEiLOsdUKaGjZEkVq0= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.107.0 h1:hP6WGa4TE/NURwgb9e9Qat/OLacfbZAl+vNvFdHlduQ= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.107.0/go.mod h1:MDf3JnImoOpTEuU8ig1S94iRou3WZQq6dTKOyZ4Y/zE= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.107.0 h1:IdxmP2WqTCa3yE+/qYPVyfAi7Xo8RIkNcVaZnMEq0xk= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.107.0/go.mod h1:gMY05z3fY6HnL/vNfyVYl3w4eihI8DftosfHuxqEeTg= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.107.0 h1:2Gw/AFpVEmKu83zXEDb6KVDdeF2mSfYnBP3o+XPoZJY= @@ -654,6 +656,10 @@ github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusrem github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.107.0/go.mod h1:GJoWZ9tTTev7+HjiXW0uV61tYDGTorNmy1Wdg7UmaQU= github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension v0.107.0 h1:Zxj6/COUCpgzsH2Dsj2qrxSlULnTS15xx/qvv6l4azM= github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension v0.107.0/go.mod h1:exc0eszqocCjDfQKELo6wCtE0kYgkIW7gdFLwSPY5Ek= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.107.0 h1:NhmdtVHM6X/KbQIS+gVs8u3z3U6R5I5UJhlpMT4tXUY= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.107.0/go.mod h1:cbLrkOH2vW8wYz66bt3YKtFPW7QGtsQlIShqly3Nocw= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension v0.107.0 h1:BEAHYNsuJd0a/AWcctKRDmeqjjx/p3MzHr+2rhDui/s= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension v0.107.0/go.mod h1:sNEvpJmkx1kCt/tSo7wgTyDI5WC7LTKy4gIEZGaU3yI= github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.107.0 h1:KuLYIgKv56ZE2FgMyWMXrLgYVO8uzkookvIETf1a48I= github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.107.0/go.mod h1:8iHdUrw9wn2C4osJazXywLaVwv1sp7JPE0qS42NpaQM= github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling v0.107.0 h1:qluNJWA83A7pk6EMoAX9holdqO2RwikxupOJ4I/bHUQ= @@ -1484,6 +1490,8 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= +gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/manifest.yaml b/manifest.yaml index 46ec6e64..f668d9c0 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -35,6 +35,7 @@ exporters: - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.107.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.107.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.107.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.107.0 extensions: - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.107.0 - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.107.0