Skip to content

Commit

Permalink
Add opensearchexporter to otelcontribcol, configschema, oteltestbedcol
Browse files Browse the repository at this point in the history
Signed-off-by: Max Ksyunz <max.ksyunz@improving.com>
  • Loading branch information
MaxKsyunz committed Jul 29, 2023
1 parent bdd4114 commit 3e35461
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 2 deletions.
2 changes: 2 additions & 0 deletions cmd/configschema/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -1110,3 +1110,5 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/obse
replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest => ../../internal/k8stest

replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling => ../../extension/jaegerremotesampling

replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter => ../../exporter/opensearchexporter
1 change: 1 addition & 0 deletions cmd/otelcontribcol/builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ exporters:
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/lokiexporter v0.81.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmoexporter v0.81.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.81.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter v0.81.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/parquetexporter v0.81.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.81.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.81.0
Expand Down
2 changes: 2 additions & 0 deletions cmd/otelcontribcol/components.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions cmd/otelcontribcol/exporters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/stretchr/testify/require"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/config/configgrpc"
"go.opentelemetry.io/collector/config/confighttp"
"go.opentelemetry.io/collector/exporter"
"go.opentelemetry.io/collector/exporter/exportertest"
"go.opentelemetry.io/collector/exporter/otlpexporter"
Expand Down Expand Up @@ -51,6 +52,7 @@ import (
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/lokiexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmoexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/parquetexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/pulsarexporter"
Expand Down Expand Up @@ -136,6 +138,16 @@ func TestDefaultExporters(t *testing.T) {
return cfg
},
},
{
exporter: "opensearch",
getConfigFn: func() component.Config {
cfg := expFactories["opensearch"].CreateDefaultConfig().(*opensearchexporter.Config)
cfg.HTTPClientSettings = confighttp.HTTPClientSettings{
Endpoint: "http://" + endpoint,
}
return cfg
},
},
{
exporter: "otlp",
getConfigFn: func() component.Config {
Expand Down
4 changes: 4 additions & 0 deletions cmd/otelcontribcol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/lokiexporter v0.81.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmoexporter v0.81.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.81.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter v0.81.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/parquetexporter v0.81.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.81.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.81.0
Expand Down Expand Up @@ -541,6 +542,7 @@ require (
github.com/opencontainers/runc v1.1.5 // indirect
github.com/opencontainers/runtime-spec v1.0.3-0.20220909204839-494a5a6aca78 // indirect
github.com/opencontainers/selinux v1.10.1 // indirect
github.com/opensearch-project/opensearch-go/v2 v2.3.0 // indirect
github.com/openshift/api v3.9.0+incompatible // indirect
github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
Expand Down Expand Up @@ -1000,6 +1002,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourceto

replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter => ../../exporter/opencensusexporter

replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter => ../../exporter/opensearchexporter

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders => ../../internal/metadataproviders

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy => ../../internal/aws/proxy
Expand Down
14 changes: 14 additions & 0 deletions cmd/otelcontribcol/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions cmd/oteltestbedcol/builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ exporters:
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.81.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/jaegerexporter v0.81.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.81.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter v0.81.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.81.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.81.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.81.0
Expand Down
6 changes: 5 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/lokiexporter v0.81.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmoexporter v0.81.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.81.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter v0.0.0-20230728014823-015d8dbb7e62
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/parquetexporter v0.81.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.81.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.81.0
Expand Down Expand Up @@ -522,6 +523,7 @@ require (
github.com/opencontainers/runc v1.1.5 // indirect
github.com/opencontainers/runtime-spec v1.0.3-0.20220909204839-494a5a6aca78 // indirect
github.com/opencontainers/selinux v1.10.1 // indirect
github.com/opensearch-project/opensearch-go/v2 v2.3.0 // indirect
github.com/openshift/api v3.9.0+incompatible // indirect
github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
Expand Down Expand Up @@ -660,7 +662,7 @@ require (
google.golang.org/genproto v0.0.0-20230629202037-9506855d4529 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130 // indirect
google.golang.org/grpc v1.56.2 // indirect
google.golang.org/grpc v1.57.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand Down Expand Up @@ -1114,3 +1116,5 @@ replace github.com/openshift/api v3.9.0+incompatible => github.com/openshift/api
replace github.com/outcaste-io/ristretto v0.2.0 => github.com/outcaste-io/ristretto v0.2.1

replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver => ./receiver/snowflakereceiver

replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter => ./exporter/opensearchexporter
Loading

0 comments on commit 3e35461

Please sign in to comment.