Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[exporter/observiq] Deprecate observiq exporter #10977

Merged
merged 5 commits into from
Jun 13, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
### 🚩 Deprecations 🚩

- `datadogexporter`: Deprecate `Sanitize` method of `Config` struct (#8829)
- `observiqexporter`: Deprecate the observiq exporter (#10977)
bogdandrutu marked this conversation as resolved.
Show resolved Hide resolved

### 🚀 New components 🚀

Expand Down
12 changes: 6 additions & 6 deletions exporter/observiqexporter/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# observIQ Exporter

| Status | |
| ------------------------ |--------------------|
| Stability | [in development] |
| Supported pipeline types | logs |
| Distributions | none |
| Status | |
|--------------------------|--------------|
| Stability | [deprecated] |
| Supported pipeline types | logs |
| Distributions | none |

This exporter supports sending log data to [observIQ](https://observiq.com/)

Expand Down Expand Up @@ -37,4 +37,4 @@ The full list of settings exposed for this exporter are documented [here](config
This exporter also offers proxy support as documented
[here](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter#proxy-support).

[in development]:https://github.com/open-telemetry/opentelemetry-collector#in-development
[deprecated]:https://github.com/open-telemetry/opentelemetry-collector#deprecated
11 changes: 11 additions & 0 deletions exporter/observiqexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ package observiqexporter // import "github.com/open-telemetry/opentelemetry-coll
import (
"context"
"errors"
"sync"
"time"

"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/config"
"go.opentelemetry.io/collector/exporter/exporterhelper"
"go.uber.org/zap"
)

const (
Expand All @@ -31,6 +33,8 @@ const (
defaultDialerTimeout = 10 * time.Second
)

var logOnce sync.Once

// NewFactory creates a factory for observIQ exporter
func NewFactory() component.ExporterFactory {
return component.NewExporterFactory(
Expand Down Expand Up @@ -60,9 +64,16 @@ func createLogsExporter(
params component.ExporterCreateSettings,
config config.Exporter,
) (exporter component.LogsExporter, err error) {
logDeprecation(params.Logger)
BinaryFissionGames marked this conversation as resolved.
Show resolved Hide resolved
if config == nil {
return nil, errors.New("nil config")
}
exporterConfig := config.(*Config)
return newObservIQLogExporter(exporterConfig, params)
}

func logDeprecation(logger *zap.Logger) {
logOnce.Do(func() {
logger.Warn("The observiq exporter is deprecated and will be removed in future versions.")
})
}
1 change: 1 addition & 0 deletions exporter/observiqexporter/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Deprecated: elasticexporter exporter is deprecated and will be removed in future versions.
module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/observiqexporter

go 1.17
Expand Down