From cb7a49046697c136b3e3fce3bf2663b5cb80d400 Mon Sep 17 00:00:00 2001 From: Dominik Rosiek <58699848+sumo-drosiek@users.noreply.github.com> Date: Mon, 10 Jun 2024 10:28:33 +0200 Subject: [PATCH] feat: use Sumo Logic exporter from OpenTelemetry repository (#1601) * feat: use Sumo Logic exporter from OpenTelemetry repository Signed-off-by: Dominik Rosiek * chore: replace occurences Signed-off-by: Dominik Rosiek * chore: changelog Signed-off-by: Dominik Rosiek * Update docs/upgrading.md * fix: fix due to self-review Signed-off-by: Dominik Rosiek * chore: typo Signed-off-by: Dominik Rosiek * feat: update stability level Signed-off-by: Dominik Rosiek --------- Signed-off-by: Dominik Rosiek --- .changelog/1601.changed.txt | 1 + Makefile | 3 ++- README.md | 4 ++-- docs/configuration.md | 7 ++++--- docs/migration.md | 4 ++-- docs/performance.md | 4 ++-- docs/upgrading.md | 8 ++++---- examples/sumologic-windows.yaml | 7 +++---- examples/sumologic.yaml | 7 +++---- otelcolbuilder/.otelcol-builder.yaml | 7 +------ .../SumoLogicTests/TestData/with-extensions-block.yaml | 3 +-- .../SumoLogicTests/TestData/without-extensions-block.yaml | 3 +-- pkg/exporter/sumologicexporter/README.md | 7 ++++++- pkg/exporter/sumologicexporter/factory.go | 2 +- pkg/extension/opampextension/components.go | 2 +- pkg/extension/opampextension/go.mod | 4 +--- pkg/extension/opampextension/go.sum | 2 ++ pkg/extension/sumologicextension/factory.go | 2 +- 18 files changed, 38 insertions(+), 39 deletions(-) create mode 100644 .changelog/1601.changed.txt diff --git a/.changelog/1601.changed.txt b/.changelog/1601.changed.txt new file mode 100644 index 0000000000..e0bf3e931e --- /dev/null +++ b/.changelog/1601.changed.txt @@ -0,0 +1 @@ +feat: use Sumo Logic exporter from OpenTelemetry repository \ No newline at end of file diff --git a/Makefile b/Makefile index 060e8b63e0..440e2b848e 100644 --- a/Makefile +++ b/Makefile @@ -119,11 +119,12 @@ update-ot: install-gsed README.md \ docs/configuration.md \ docs/migration.md \ - pkg/exporter/sumologicexporter/README.md + docs/performance.md \ $(SED) -i "s/\(contrib\/\(blob\|tree\)\/v\)$(OT_CONTRIB_VERSION)/\1$(OT_CONTRIB_NEW)/" \ README.md \ docs/configuration.md \ docs/migration.md \ + docs/performance.md \ pkg/receiver/telegrafreceiver/README.md @find . -type f -name "go.mod" -exec $(SED) -i "s/\(go\.opentelemetry\.io\/collector.*\) v$(OT_CORE_VERSION)$$/\1 v$(OT_CORE_NEW)/" {} \; @find . -type f -name "go.mod" -exec $(SED) -i "s/\(github\.com\/open-telemetry\/opentelemetry-collector-contrib\/.*\) v$(OT_CONTRIB_VERSION)$$/\1 v$(OT_CONTRIB_NEW)/" {} \; diff --git a/README.md b/README.md index 15a0b13804..661c31c721 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ The ⚠️ ~~strikethrough~~ ⚠️ components are deprecated. | [awsfirehose][awsfirehosereceiver] | [groupbyattrs][groupbyattrsprocessor] | [otlp][otlpexporter] | [ecs_task_observer][ecstaskobserver] | [spanmetrics][spanmetricsconnector] | | [awsxray][awsxrayreceiver] | [groupbytrace][groupbytraceprocessor] | [otlphttp][otlphttpexporter] | [file_storage][filestorage] | | | [azureeventhub][azureeventhubreceiver] | [`k8s_tagger`][k8sprocessor] | [prometheus][prometheusexporter] | [headerssetter][headerssetterextension] | | -| [bigip][bigipreceiver] | [k8sattributes][k8sattributesprocessor] | [`sumologic`][sumologicexporter] | [health_check][healthcheckextension] | | +| [bigip][bigipreceiver] | [k8sattributes][k8sattributesprocessor] | [sumologic] [sumologicexporter] | [health_check][healthcheckextension] | | | [carbon][carbonreceiver] | [logstransform][logstransformprocessor] | [syslog][syslogexporter] | [host_observer][hostobserver] | | | [chrony][chronyreceiver] | [memory_limiter][memorylimiterprocessor] | [nop][nopexporter] | [http_forwarder][httpforwarder] | | | [cloudflare][cloudflarereceiver] | [`metric_frequency`][metricfrequencyprocessor] | | [jaegerremotesampling][jaegerremotesampling] | | @@ -282,7 +282,7 @@ The ⚠️ ~~strikethrough~~ ⚠️ components are deprecated. [otlpexporter]: https://github.com/open-telemetry/opentelemetry-collector/tree/v0.102.1/exporter/otlpexporter [otlphttpexporter]: https://github.com/open-telemetry/opentelemetry-collector/tree/v0.102.1/exporter/otlphttpexporter [prometheusexporter]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.102.0/exporter/prometheusexporter -[sumologicexporter]: ./pkg/exporter/sumologicexporter +[sumologicexporter]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.102.0/exporter/sumologicexporter [syslogexporter]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.102.0/exporter/syslogexporter [asapauthextension]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.102.0/extension/asapauthextension [awsproxy]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.102.0/extension/awsproxy diff --git a/docs/configuration.md b/docs/configuration.md index 58b4e00644..074b442478 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1,6 +1,7 @@ # Configuration - [Basic configuration](#basic-configuration) + - [Alternative: OpAmp remote-managed configuration](#alternative-opamp-remote-managed-configuration) - [Basic configuration for logs](#basic-configuration-for-logs) - [Basic configuration for metrics](#basic-configuration-for-metrics) - [Basic configuration for traces](#basic-configuration-for-traces) @@ -323,8 +324,8 @@ so keep in mind that to store credentials either the user needs a home directory More information about this feature can be found in the [extension's documentation][sumologicextension_store_credentials]. [sumologic_webpage]: https://www.sumologic.com/ -[sumologicextension]: ../pkg/extension/sumologicextension/ -[sumologicexporter]: ../pkg/exporter/sumologicexporter/ +[sumologicextension]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.102.0/extension/sumologicextension +[sumologicexporter]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.102.0/exporter/sumologicexporter [hostmetricsreceiver]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.102.0/receiver/hostmetricsreceiver [sumologicextension_configuration]: ../pkg/extension/sumologicextension#configuration [sumologicextension_store_credentials]: ../pkg/extension/sumologicextension/README.md#storing-credentials @@ -420,7 +421,7 @@ service: - hostmetrics ``` -[sumologicexporter_docs]: ../pkg/exporter/sumologicexporter/README.md +[sumologicexporter_docs]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.102.0/exporter/sumologicexporter/README.md ## Collecting logs from files diff --git a/docs/migration.md b/docs/migration.md index aaccfea215..6ee6a8b4ce 100644 --- a/docs/migration.md +++ b/docs/migration.md @@ -2507,8 +2507,8 @@ Windows Active Directory Source is not supported by the OpenTelemetry Collector. [filterprocessor]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.102.0/processor/filterprocessor [sumologicsyslog]: ../pkg/processor/sumologicsyslogprocessor/README.md [network-semantic-convention]: https://github.com/open-telemetry/semantic-conventions/blob/cee22ec91448808ebcfa53df689c800c7171c9e1/docs/general/attributes.md#other-network-attributes -[sumologicextension]: ../pkg/extension/sumologicextension/README.md -[sumologicexporter]: ../pkg/exporter/sumologicexporter/README.md +[sumologicextension]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.102.0/extension/sumologicextension/README.md +[sumologicexporter]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.102.0/exporter/sumologicexporter/README.md [syslogexporter]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.102.0/exporter/syslogexporter/README.md [user.properties]: https://help.sumologic.com/docs/send-data/installed-collectors/collector-installation-reference/user-properties [proxy]: https://opentelemetry.io/docs/collector/configuration/#proxy-support diff --git a/docs/performance.md b/docs/performance.md index 35693dea6d..70060acaaa 100644 --- a/docs/performance.md +++ b/docs/performance.md @@ -91,7 +91,7 @@ There are a couple configuration options that can help with performance in speci ### Sumo Logic Exporter -The [`sumologicexporter`](../pkg/exporter/sumologicexporter) +The [`sumologicexporter`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.102.0/exporter/sumologicexporter) sends data to Sumo Logic. It has the following features that can help with performance: @@ -100,7 +100,7 @@ It has the following features that can help with performance: - `sending_queue` with its `num_consumers`, `queue_size` settings, - `timeout`. -Read more about these features in the [Sumo Logic Exporter docs](../pkg/exporter/sumologicexporter/README.md). +Read more about these features in the [Sumo Logic Exporter docs](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.102.0/exporter/sumologicexporter/README.md). ### Batch Processor diff --git a/docs/upgrading.md b/docs/upgrading.md index 0d9cd92d11..347c9afad6 100644 --- a/docs/upgrading.md +++ b/docs/upgrading.md @@ -682,8 +682,8 @@ to make it behave like the Sumo Logic exporter. See the [Source processor documentation][sourceprocessor_docs] for more details. -[sumologicexporter_docs]: ../pkg/exporter/sumologicexporter/README.md -[sourceprocessor_docs]: ../pkg/processor/sourceprocessor/README.md +[sumologicexporter_docs]: https://github.com/sumologic/sumologic-otel-collector/tree/v0.57.2-sumo-0/pkg/exporter/sumologicexporter/README.md +[sourceprocessor_docs]: https://github.com/sumologic/sumologic-otel-collector/tree/v0.57.2-sumo-0/pkg/processor/sourceprocessor/README.md ## Upgrading to v0.56.0-sumo-0 @@ -760,8 +760,8 @@ service: **Note**: By default, the `sumologicschema` processor also performs other actions. Please see a corresponding warning in paragraph [`sumologic` exporter: drop support for translating attributes](#sumologic-exporter-drop-support-for-translating-attributes) for more information. -[sumologicschema_processor]: ../pkg/processor/sumologicschemaprocessor/ -[sumologicschema_processor_readme]: ../pkg/processor/sumologicschemaprocessor/README.md +[sumologicschema_processor]: https://github.com/sumologic/sumologic-otel-collector/tree/v0.56.0-sumo-0/pkg/processor/sumologicschemaprocessor/ +[sumologicschema_processor_readme]: https://github.com/sumologic/sumologic-otel-collector/tree/v0.56.0-sumo-0/pkg/processor/sumologicschemaprocessor/README.md ## Upgrading to v0.55.0-sumo-0 diff --git a/examples/sumologic-windows.yaml b/examples/sumologic-windows.yaml index 1784e9a2d5..c53fe2dc27 100644 --- a/examples/sumologic-windows.yaml +++ b/examples/sumologic-windows.yaml @@ -37,16 +37,15 @@ receivers: exporters: ## Configuration for Sumo Logic Exporter ## This exporter supports sending logs, metrics and traces data to Sumo Logic. - ## ref: https://github.com/SumoLogic/sumologic-otel-collector/tree/main/pkg/exporter/sumologicexporter + ## ref: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.102.0/exporter/sumologicexporter sumologic: sending_queue: enabled: true storage: file_storage retry_on_failure: - max_elapsed_time: 0 + max_elapsed_time: 0 processors: - ## Configuration for Memory Limiter Processor ## The memory_limiter processor is used to prevent out of memory situations on the collector. ## ref: https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/memorylimiterprocessor @@ -83,7 +82,7 @@ processors: resourcedetection/system: detectors: ["system"] system: - hostname_sources: ["dns","os"] + hostname_sources: ["dns", "os"] service: extensions: diff --git a/examples/sumologic.yaml b/examples/sumologic.yaml index 1acb349589..2a9aef3209 100644 --- a/examples/sumologic.yaml +++ b/examples/sumologic.yaml @@ -44,16 +44,15 @@ receivers: exporters: ## Configuration for Sumo Logic Exporter ## This exporter supports sending logs, metrics and traces data to Sumo Logic. - ## ref: https://github.com/SumoLogic/sumologic-otel-collector/tree/main/pkg/exporter/sumologicexporter + ## ref: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.102.0/exporter/sumologicexporter sumologic: sending_queue: enabled: true storage: file_storage retry_on_failure: - max_elapsed_time: 0 + max_elapsed_time: 0 processors: - ## Configuration for Memory Limiter Processor ## The memory_limiter processor is used to prevent out of memory situations on the collector. ## ref: https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/memorylimiterprocessor @@ -90,7 +89,7 @@ processors: resourcedetection/system: detectors: ["system", "ec2", "gcp", "azure"] system: - hostname_sources: ["dns","os"] + hostname_sources: ["dns", "os"] service: extensions: diff --git a/otelcolbuilder/.otelcol-builder.yaml b/otelcolbuilder/.otelcol-builder.yaml index 64ab6cef7e..8809a6aa53 100644 --- a/otelcolbuilder/.otelcol-builder.yaml +++ b/otelcolbuilder/.otelcol-builder.yaml @@ -11,12 +11,6 @@ dist: output_path: ./cmd exporters: - # Exporters with non-upstreamed changes: - - gomod: github.com/SumoLogic/sumologic-otel-collector/pkg/exporter/sumologicexporter v0.0.0-00010101000000-000000000000 - path: ./../pkg/exporter/sumologicexporter - - # Upstream exporters: - # Since include-code was removed we need to manually add all core components that we want to include: # https://github.com/open-telemetry/opentelemetry-collector/pull/4616 - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.102.1 @@ -32,6 +26,7 @@ exporters: - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.102.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.102.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.102.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter v0.102.0 processors: # Processors with non-upstreamed changes: diff --git a/packaging/msi/SumoLogic.wixext/SumoLogicTests/TestData/with-extensions-block.yaml b/packaging/msi/SumoLogic.wixext/SumoLogicTests/TestData/with-extensions-block.yaml index 85d7cc829d..3e3d022819 100644 --- a/packaging/msi/SumoLogic.wixext/SumoLogicTests/TestData/with-extensions-block.yaml +++ b/packaging/msi/SumoLogic.wixext/SumoLogicTests/TestData/with-extensions-block.yaml @@ -33,14 +33,13 @@ receivers: exporters: ## Configuration for Sumo Logic Exporter ## This exporter supports sending logs, metrics and traces data to Sumo Logic. - ## ref: https://github.com/SumoLogic/sumologic-otel-collector/tree/main/pkg/exporter/sumologicexporter + ## ref: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.102.0/exporter/sumologicexporter sumologic: sending_queue: enabled: true storage: file_storage processors: - ## Configuration for Memory Limiter Processor ## The memory_limiter processor is used to prevent out of memory situations on the collector. ## ref: https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/memorylimiterprocessor diff --git a/packaging/msi/SumoLogic.wixext/SumoLogicTests/TestData/without-extensions-block.yaml b/packaging/msi/SumoLogic.wixext/SumoLogicTests/TestData/without-extensions-block.yaml index 991fbbf5b7..79aa2f6bab 100644 --- a/packaging/msi/SumoLogic.wixext/SumoLogicTests/TestData/without-extensions-block.yaml +++ b/packaging/msi/SumoLogic.wixext/SumoLogicTests/TestData/without-extensions-block.yaml @@ -14,14 +14,13 @@ receivers: exporters: ## Configuration for Sumo Logic Exporter ## This exporter supports sending logs, metrics and traces data to Sumo Logic. - ## ref: https://github.com/SumoLogic/sumologic-otel-collector/tree/main/pkg/exporter/sumologicexporter + ## ref: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.102.0/exporter/sumologicexporter sumologic: sending_queue: enabled: true storage: file_storage processors: - ## Configuration for Memory Limiter Processor ## The memory_limiter processor is used to prevent out of memory situations on the collector. ## ref: https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/memorylimiterprocessor diff --git a/pkg/exporter/sumologicexporter/README.md b/pkg/exporter/sumologicexporter/README.md index 736985a2c1..e114f02415 100644 --- a/pkg/exporter/sumologicexporter/README.md +++ b/pkg/exporter/sumologicexporter/README.md @@ -1,6 +1,11 @@ # Sumo Logic Exporter -**Stability level**: Beta +**Stability level**: Deprecated + +This extension is deprecated in favor of the [Sumo Logic exporter][sumologic_exporter_docs] that lives in the [OpenTelemetry Collector Contrib][contrib_repo] repository. + +[sumologic_exporter_docs]: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/sumologicexporter/README.md +[contrib_repo]: https://github.com/open-telemetry/opentelemetry-collector-contrib/ This exporter supports sending logs and metrics data to [Sumo Logic](https://www.sumologic.com/). diff --git a/pkg/exporter/sumologicexporter/factory.go b/pkg/exporter/sumologicexporter/factory.go index 9334446ddc..3be2f0c193 100644 --- a/pkg/exporter/sumologicexporter/factory.go +++ b/pkg/exporter/sumologicexporter/factory.go @@ -27,7 +27,7 @@ import ( const ( // The value of "type" key in configuration. typeStr = "sumologic" - stabilityLevel = component.StabilityLevelBeta + stabilityLevel = component.StabilityLevelDeprecated ) var Type = component.MustNewType(typeStr) diff --git a/pkg/extension/opampextension/components.go b/pkg/extension/opampextension/components.go index 3cb5c1da42..2f3d4bdb4b 100644 --- a/pkg/extension/opampextension/components.go +++ b/pkg/extension/opampextension/components.go @@ -14,7 +14,7 @@ import ( "go.opentelemetry.io/collector/receiver/otlpreceiver" "go.uber.org/multierr" - "github.com/SumoLogic/sumologic-otel-collector/pkg/exporter/sumologicexporter" + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension" diff --git a/pkg/extension/opampextension/go.mod b/pkg/extension/opampextension/go.mod index 71f4b88d38..6c33741d10 100644 --- a/pkg/extension/opampextension/go.mod +++ b/pkg/extension/opampextension/go.mod @@ -5,13 +5,13 @@ go 1.21.0 toolchain go1.21.7 require ( - github.com/SumoLogic/sumologic-otel-collector/pkg/exporter/sumologicexporter v0.0.0-00010101000000-000000000000 github.com/google/uuid v1.6.0 github.com/knadh/koanf/parsers/yaml v0.1.0 github.com/knadh/koanf/providers/rawbytes v0.1.0 github.com/knadh/koanf/v2 v2.1.1 github.com/oklog/ulid/v2 v2.1.0 github.com/open-telemetry/opamp-go v0.14.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter v0.102.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.102.0 github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.102.0 github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.102.0 @@ -262,5 +262,3 @@ require ( sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) - -replace github.com/SumoLogic/sumologic-otel-collector/pkg/exporter/sumologicexporter => ./../../exporter/sumologicexporter diff --git a/pkg/extension/opampextension/go.sum b/pkg/extension/opampextension/go.sum index c6b017308e..a6302c085b 100644 --- a/pkg/extension/opampextension/go.sum +++ b/pkg/extension/opampextension/go.sum @@ -502,6 +502,8 @@ github.com/open-telemetry/opamp-go v0.14.0 h1:KoziIK+wsFojhUXNTkCSTnCPf0eCMqFAac github.com/open-telemetry/opamp-go v0.14.0/go.mod h1:XOGCigljsLSTZ8FfLwvat0M1QDj3conIIgRa77BWrKs= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.102.0 h1:R70PpK14trQfL/Vj5oAiGRqX09s2gOWuf6t1Ae5fevQ= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.102.0/go.mod h1:xmy/yFFmB1Epy+czrYMbA+4xeOKvhFqNqYWU6qINeis= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter v0.102.0 h1:hixtJA1mtYsGvptwvsZhK+jNiBRlL8EXFB75mjlaTio= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sumologicexporter v0.102.0/go.mod h1:a4ATO9tRv2awpizVLWlNe8QqVEOmI59Jl1g5Y4taU3Q= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.102.0 h1:QA8BS4Wrj4rIOX9dajqhXUlFSzDFQzE0qdiX/mmSJas= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.102.0/go.mod h1:Df8aFeWLqD8J0iLKXVkAGX4YD0h7u8pOljWNqd58jvE= github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.102.0 h1:5Z2JnKjMC885NAPUXmb04Rl4GWMLqGhfhnwLXLDFoi0= diff --git a/pkg/extension/sumologicextension/factory.go b/pkg/extension/sumologicextension/factory.go index 848a8afc78..5a5f93a1c0 100644 --- a/pkg/extension/sumologicextension/factory.go +++ b/pkg/extension/sumologicextension/factory.go @@ -38,7 +38,7 @@ func NewFactory() extension.Factory { Type, createDefaultConfig, createExtension, - component.StabilityLevelBeta, + component.StabilityLevelDeprecated, ) }