Skip to content

Commit

Permalink
feat: use Sumo Logic exporter from OpenTelemetry repository (#1601)
Browse files Browse the repository at this point in the history
* feat: use Sumo Logic exporter from OpenTelemetry repository

Signed-off-by: Dominik Rosiek <[email protected]>

* chore: replace occurences

Signed-off-by: Dominik Rosiek <[email protected]>

* chore: changelog

Signed-off-by: Dominik Rosiek <[email protected]>

* Update docs/upgrading.md

* fix: fix due to self-review

Signed-off-by: Dominik Rosiek <[email protected]>

* chore: typo

Signed-off-by: Dominik Rosiek <[email protected]>

* feat: update stability level

Signed-off-by: Dominik Rosiek <[email protected]>

---------

Signed-off-by: Dominik Rosiek <[email protected]>
  • Loading branch information
sumo-drosiek authored Jun 10, 2024
1 parent dbb4ea6 commit cb7a490
Show file tree
Hide file tree
Showing 18 changed files with 38 additions and 39 deletions.
1 change: 1 addition & 0 deletions .changelog/1601.changed.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
feat: use Sumo Logic exporter from OpenTelemetry repository
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)/" {} \;
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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] | |
Expand Down Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions docs/configuration.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions docs/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand Down
8 changes: 4 additions & 4 deletions docs/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
7 changes: 3 additions & 4 deletions examples/sumologic-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -83,7 +82,7 @@ processors:
resourcedetection/system:
detectors: ["system"]
system:
hostname_sources: ["dns","os"]
hostname_sources: ["dns", "os"]

service:
extensions:
Expand Down
7 changes: 3 additions & 4 deletions examples/sumologic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -90,7 +89,7 @@ processors:
resourcedetection/system:
detectors: ["system", "ec2", "gcp", "azure"]
system:
hostname_sources: ["dns","os"]
hostname_sources: ["dns", "os"]

service:
extensions:
Expand Down
7 changes: 1 addition & 6 deletions otelcolbuilder/.otelcol-builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion pkg/exporter/sumologicexporter/README.md
Original file line number Diff line number Diff line change
@@ -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/).

Expand Down
2 changes: 1 addition & 1 deletion pkg/exporter/sumologicexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pkg/extension/opampextension/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 1 addition & 3 deletions pkg/extension/opampextension/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 2 additions & 0 deletions pkg/extension/opampextension/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion pkg/extension/sumologicextension/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func NewFactory() extension.Factory {
Type,
createDefaultConfig,
createExtension,
component.StabilityLevelBeta,
component.StabilityLevelDeprecated,
)
}

Expand Down

0 comments on commit cb7a490

Please sign in to comment.