diff --git a/.chloggen/enable-snowflakereceiver.yaml b/.chloggen/enable-snowflakereceiver.yaml new file mode 100755 index 000000000000..263deba51abc --- /dev/null +++ b/.chloggen/enable-snowflakereceiver.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: 'bug_fix' + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: snowflakereceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Wiring snowflakereceiver component by adding it to components.go + +# One or more tracking issues related to the change +issues: [21381] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/cmd/configschema/go.mod b/cmd/configschema/go.mod index 9e68931038aa..809e2e15fb03 100644 --- a/cmd/configschema/go.mod +++ b/cmd/configschema/go.mod @@ -506,6 +506,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.76.3 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters v0.76.3 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/receiver/lokireceiver v0.76.3 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver v0.76.3 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc2 // indirect github.com/opencontainers/runc v1.1.5 // indirect @@ -1062,3 +1063,5 @@ replace github.com/openshift/api v3.9.0+incompatible => github.com/openshift/api // It appears that the v0.2.0 tag was modified. Replacing with v0.2.1 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 diff --git a/cmd/configschema/go.sum b/cmd/configschema/go.sum index 35dfb9cfa23e..9ccb0d0ad151 100644 --- a/cmd/configschema/go.sum +++ b/cmd/configschema/go.sum @@ -500,6 +500,7 @@ github.com/ClickHouse/ch-go v0.52.1 h1:nucdgfD1BDSHjbNaG3VNebonxJzD8fX8jbuBpfo5V github.com/ClickHouse/ch-go v0.52.1/go.mod h1:B9htMJ0hii/zrC2hljUKdnagRBuLqtRG/GrU3jqCwRk= github.com/ClickHouse/clickhouse-go/v2 v2.9.1 h1:IeE2bwVvAba7Yw5ZKu98bKI4NpDmykEy6jUaQdJJCk8= github.com/ClickHouse/clickhouse-go/v2 v2.9.1/go.mod h1:teXfZNM90iQ99Jnuht+dxQXCuhDZ8nvvMoTJOFrcmcg= +github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= github.com/DataDog/agent-payload/v5 v5.0.83 h1:QUyf/rS+B/otZFAFFG7YhdiL/kY0PxeWvJtLSoDFUhg= github.com/DataDog/agent-payload/v5 v5.0.83/go.mod h1:oQZi1VZp1e3QvlSUX4iphZCpJaFepUxWq0hNXxihKBM= github.com/DataDog/datadog-agent/pkg/obfuscate v0.45.0-rc.4 h1:DBS0sh14wM1vqov5fg4vG1KxyorT0PnH1BSLTHYCsSU= diff --git a/cmd/otelcontribcol/builder-config.yaml b/cmd/otelcontribcol/builder-config.yaml index c7091294790b..5ae82e3a10d2 100644 --- a/cmd/otelcontribcol/builder-config.yaml +++ b/cmd/otelcontribcol/builder-config.yaml @@ -163,6 +163,7 @@ receivers: - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver v0.76.3 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver v0.76.3 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/skywalkingreceiver v0.76.3 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver v0.76.3 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solacereceiver v0.76.3 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.76.3 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver v0.76.3 @@ -353,6 +354,7 @@ replaces: - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet => ../../internal/kubelet - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver => ../../receiver/sqlserverreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/skywalkingreceiver => ../../receiver/skywalkingreceiver + - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver => ../../receiver/snowflakereceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver => ../../receiver/riakreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor => ../../processor/tailsamplingprocessor - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver => ../../receiver/syslogreceiver diff --git a/cmd/otelcontribcol/components.go b/cmd/otelcontribcol/components.go index 017fed5d589c..5fa06c4a2dad 100644 --- a/cmd/otelcontribcol/components.go +++ b/cmd/otelcontribcol/components.go @@ -165,6 +165,7 @@ import ( simpleprometheusreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver" skywalkingreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/skywalkingreceiver" snmpreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snmpreceiver" + snowflakereceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver" solacereceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solacereceiver" splunkhecreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver" sqlqueryreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver" @@ -274,6 +275,7 @@ func components() (otelcol.Factories, error) { signalfxreceiver.NewFactory(), simpleprometheusreceiver.NewFactory(), skywalkingreceiver.NewFactory(), + snowflakereceiver.NewFactory(), solacereceiver.NewFactory(), splunkhecreceiver.NewFactory(), sqlqueryreceiver.NewFactory(), diff --git a/cmd/otelcontribcol/go.mod b/cmd/otelcontribcol/go.mod index 6768475f2e35..474a15c75711 100644 --- a/cmd/otelcontribcol/go.mod +++ b/cmd/otelcontribcol/go.mod @@ -154,6 +154,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver v0.76.3 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/skywalkingreceiver v0.76.3 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snmpreceiver v0.76.3 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver v0.76.3 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solacereceiver v0.76.3 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.76.3 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver v0.76.3 @@ -991,6 +992,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlse replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/skywalkingreceiver => ../../receiver/skywalkingreceiver +replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver => ../../receiver/snowflakereceiver + replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver => ../../receiver/riakreceiver replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor => ../../processor/tailsamplingprocessor diff --git a/cmd/otelcontribcol/go.sum b/cmd/otelcontribcol/go.sum index 39103604fca5..2b044c9a85b7 100644 --- a/cmd/otelcontribcol/go.sum +++ b/cmd/otelcontribcol/go.sum @@ -499,6 +499,7 @@ github.com/ClickHouse/ch-go v0.52.1 h1:nucdgfD1BDSHjbNaG3VNebonxJzD8fX8jbuBpfo5V github.com/ClickHouse/ch-go v0.52.1/go.mod h1:B9htMJ0hii/zrC2hljUKdnagRBuLqtRG/GrU3jqCwRk= github.com/ClickHouse/clickhouse-go/v2 v2.9.1 h1:IeE2bwVvAba7Yw5ZKu98bKI4NpDmykEy6jUaQdJJCk8= github.com/ClickHouse/clickhouse-go/v2 v2.9.1/go.mod h1:teXfZNM90iQ99Jnuht+dxQXCuhDZ8nvvMoTJOFrcmcg= +github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= github.com/DataDog/agent-payload/v5 v5.0.83 h1:QUyf/rS+B/otZFAFFG7YhdiL/kY0PxeWvJtLSoDFUhg= github.com/DataDog/agent-payload/v5 v5.0.83/go.mod h1:oQZi1VZp1e3QvlSUX4iphZCpJaFepUxWq0hNXxihKBM= github.com/DataDog/datadog-agent/pkg/obfuscate v0.45.0-rc.4 h1:DBS0sh14wM1vqov5fg4vG1KxyorT0PnH1BSLTHYCsSU= diff --git a/cmd/otelcontribcol/receivers_test.go b/cmd/otelcontribcol/receivers_test.go index 7950e90edbf2..fb7ff94b464a 100644 --- a/cmd/otelcontribcol/receivers_test.go +++ b/cmd/otelcontribcol/receivers_test.go @@ -375,6 +375,9 @@ func TestDefaultReceivers(t *testing.T) { return cfg }, }, + { + receiver: "snowflake", + }, { receiver: "splunk_hec", }, diff --git a/go.mod b/go.mod index 7b52f362bfe3..e3efbb2d5e30 100644 --- a/go.mod +++ b/go.mod @@ -147,6 +147,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver v0.0.0-00010101000000-000000000000 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/skywalkingreceiver v0.0.0-00010101000000-000000000000 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snmpreceiver v0.0.0-00010101000000-000000000000 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver v0.76.3 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solacereceiver v0.0.0-00010101000000-000000000000 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver v0.0.0-00010101000000-000000000000 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver v0.0.0-00010101000000-000000000000 @@ -1066,3 +1067,5 @@ replace github.com/openshift/api v3.9.0+incompatible => github.com/openshift/api // It appears that the v0.2.0 tag was modified. Replacing with v0.2.1 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 diff --git a/go.sum b/go.sum index 45b2a9ec6822..2e2c79f61ae0 100644 --- a/go.sum +++ b/go.sum @@ -503,6 +503,7 @@ github.com/ClickHouse/ch-go v0.52.1 h1:nucdgfD1BDSHjbNaG3VNebonxJzD8fX8jbuBpfo5V github.com/ClickHouse/ch-go v0.52.1/go.mod h1:B9htMJ0hii/zrC2hljUKdnagRBuLqtRG/GrU3jqCwRk= github.com/ClickHouse/clickhouse-go/v2 v2.9.1 h1:IeE2bwVvAba7Yw5ZKu98bKI4NpDmykEy6jUaQdJJCk8= github.com/ClickHouse/clickhouse-go/v2 v2.9.1/go.mod h1:teXfZNM90iQ99Jnuht+dxQXCuhDZ8nvvMoTJOFrcmcg= +github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= github.com/DataDog/agent-payload/v5 v5.0.83 h1:QUyf/rS+B/otZFAFFG7YhdiL/kY0PxeWvJtLSoDFUhg= github.com/DataDog/agent-payload/v5 v5.0.83/go.mod h1:oQZi1VZp1e3QvlSUX4iphZCpJaFepUxWq0hNXxihKBM= github.com/DataDog/datadog-agent/pkg/obfuscate v0.45.0-rc.4 h1:DBS0sh14wM1vqov5fg4vG1KxyorT0PnH1BSLTHYCsSU= diff --git a/internal/components/components.go b/internal/components/components.go index e54533f4a592..280e30558fb5 100644 --- a/internal/components/components.go +++ b/internal/components/components.go @@ -174,6 +174,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/skywalkingreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snmpreceiver" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/snowflakereceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solacereceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/splunkhecreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver" @@ -288,6 +289,7 @@ func Components() (otelcol.Factories, error) { simpleprometheusreceiver.NewFactory(), skywalkingreceiver.NewFactory(), snmpreceiver.NewFactory(), + snowflakereceiver.NewFactory(), solacereceiver.NewFactory(), splunkhecreceiver.NewFactory(), sqlqueryreceiver.NewFactory(), diff --git a/receiver/snowflakereceiver/README.md b/receiver/snowflakereceiver/README.md index 36bb4a23e607..d7cac83901c8 100644 --- a/receiver/snowflakereceiver/README.md +++ b/receiver/snowflakereceiver/README.md @@ -2,7 +2,7 @@ | Status | | |--------------------------|---------------| -| Stability | [development] | +| Stability | [alpha] | | Supported pipeline types | metrics | | Distributions | [contrib] | @@ -43,5 +43,5 @@ receivers: The full list of settings exposed for this receiver are documented [here](./config.go) with a detailed sample configuration [here](./testdata/config.yaml) -[development]: https://github.com/open-telemetry/opentelemetry-collector#development +[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha [contrib]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/receiver/snowflakereceiver/factory.go b/receiver/snowflakereceiver/factory.go index 9c56ed550415..92f1e8e1e4b0 100644 --- a/receiver/snowflakereceiver/factory.go +++ b/receiver/snowflakereceiver/factory.go @@ -46,7 +46,7 @@ func createDefaultConfig() component.Config { } } -func NewFactory() component.Factory { +func NewFactory() receiver.Factory { return receiver.NewFactory( typeStr, createDefaultConfig,