From 11e85a03e5db234bc645caa84f51ca66709e814a Mon Sep 17 00:00:00 2001 From: Alex Kats <56042997+akats7@users.noreply.github.com> Date: Mon, 22 Apr 2024 14:58:17 -0400 Subject: [PATCH] set failover connector to alpha (#32216) **Description:** This PR adds the failover connector to the contrib distro and moves the component to alpha state as all MVP functionality has been put in place. This PR also adds a bug fix that caused the pipeline selector to continue switching between the stable and stable + 1 index after a new stable index has been established. **Link to tracking Issue:** Resolves #32094 **Testing:** Additional test case added to check current index after stable check --- .chloggen/failover-alpha.yaml | 27 +++++++++++++++++++ cmd/otelcontribcol/builder-config.yaml | 2 ++ cmd/otelcontribcol/components.go | 2 ++ cmd/otelcontribcol/go.mod | 3 +++ connector/failoverconnector/README.md | 11 ++++---- .../internal/metadata/generated_status.go | 6 ++--- connector/failoverconnector/metadata.yaml | 8 +++--- reports/distributions/contrib.yaml | 1 + 8 files changed, 48 insertions(+), 12 deletions(-) create mode 100644 .chloggen/failover-alpha.yaml diff --git a/.chloggen/failover-alpha.yaml b/.chloggen/failover-alpha.yaml new file mode 100644 index 000000000000..8bda149f36b5 --- /dev/null +++ b/.chloggen/failover-alpha.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: failoverconnector + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: This change puts the failoverconnector into alpha + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [20766] + +# (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: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/cmd/otelcontribcol/builder-config.yaml b/cmd/otelcontribcol/builder-config.yaml index e7ff3625c28c..0e0fe7712177 100644 --- a/cmd/otelcontribcol/builder-config.yaml +++ b/cmd/otelcontribcol/builder-config.yaml @@ -212,6 +212,7 @@ connectors: - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector v0.98.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.98.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector v0.98.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector v0.98.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector v0.98.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector v0.98.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector v0.98.0 @@ -429,6 +430,7 @@ replaces: - github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector => ../../connector/countconnector - github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector => ../../connector/datadogconnector - github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector => ../../connector/exceptionsconnector + - github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector => ../../connector/failoverconnector - github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector => ../../connector/grafanacloudconnector - github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector => ../../connector/routingconnector - github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector => ../../connector/servicegraphconnector diff --git a/cmd/otelcontribcol/components.go b/cmd/otelcontribcol/components.go index 8b85c1bd1732..6786b5dcca9b 100644 --- a/cmd/otelcontribcol/components.go +++ b/cmd/otelcontribcol/components.go @@ -24,6 +24,7 @@ import ( countconnector "github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector" datadogconnector "github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector" exceptionsconnector "github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector" + failoverconnector "github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector" grafanacloudconnector "github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector" routingconnector "github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector" servicegraphconnector "github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector" @@ -431,6 +432,7 @@ func components() (otelcol.Factories, error) { countconnector.NewFactory(), datadogconnector.NewFactory(), exceptionsconnector.NewFactory(), + failoverconnector.NewFactory(), grafanacloudconnector.NewFactory(), routingconnector.NewFactory(), servicegraphconnector.NewFactory(), diff --git a/cmd/otelcontribcol/go.mod b/cmd/otelcontribcol/go.mod index b19fa8359147..cc56820fc64c 100644 --- a/cmd/otelcontribcol/go.mod +++ b/cmd/otelcontribcol/go.mod @@ -10,6 +10,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector v0.98.0 github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.98.0 github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector v0.98.0 + github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector v0.98.0 github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector v0.98.0 github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector v0.98.0 github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector v0.98.0 @@ -1156,6 +1157,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/connector/data replace github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector => ../../connector/exceptionsconnector +replace github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector => ../../connector/failoverconnector + replace github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector => ../../connector/grafanacloudconnector replace github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector => ../../connector/routingconnector diff --git a/connector/failoverconnector/README.md b/connector/failoverconnector/README.md index 9694a6394f3b..329c113223f5 100644 --- a/connector/failoverconnector/README.md +++ b/connector/failoverconnector/README.md @@ -3,19 +3,20 @@ | Status | | | ------------- |-----------| -| Distributions | [] | +| Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aconnector%2Ffailover%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aconnector%2Ffailover) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aconnector%2Ffailover%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aconnector%2Ffailover) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@akats7](https://www.github.com/akats7), [@djaglowski](https://www.github.com/djaglowski), [@fatsheep9146](https://www.github.com/fatsheep9146) | -[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 ## Supported Pipeline Types | [Exporter Pipeline Type] | [Receiver Pipeline Type] | [Stability Level] | | ------------------------ | ------------------------ | ----------------- | -| metrics | metrics | [development] | -| traces | traces | [development] | -| logs | logs | [development] | +| traces | traces | [alpha] | +| metrics | metrics | [alpha] | +| logs | logs | [alpha] | [Exporter Pipeline Type]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#exporter-pipeline-type [Receiver Pipeline Type]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/connector/README.md#receiver-pipeline-type diff --git a/connector/failoverconnector/internal/metadata/generated_status.go b/connector/failoverconnector/internal/metadata/generated_status.go index 10fdcbe7b9fb..1caf608cb48f 100644 --- a/connector/failoverconnector/internal/metadata/generated_status.go +++ b/connector/failoverconnector/internal/metadata/generated_status.go @@ -13,9 +13,9 @@ var ( ) const ( - MetricsToMetricsStability = component.StabilityLevelDevelopment - TracesToTracesStability = component.StabilityLevelDevelopment - LogsToLogsStability = component.StabilityLevelDevelopment + TracesToTracesStability = component.StabilityLevelAlpha + MetricsToMetricsStability = component.StabilityLevelAlpha + LogsToLogsStability = component.StabilityLevelAlpha ) func Meter(settings component.TelemetrySettings) metric.Meter { diff --git a/connector/failoverconnector/metadata.yaml b/connector/failoverconnector/metadata.yaml index 0558c7a0c2eb..91cfc3a67e72 100644 --- a/connector/failoverconnector/metadata.yaml +++ b/connector/failoverconnector/metadata.yaml @@ -4,11 +4,11 @@ scope_name: otelcol/failover status: class: connector stability: - development: [metrics_to_metrics, traces_to_traces, logs_to_logs] - distributions: [] + alpha: [traces_to_traces, metrics_to_metrics, logs_to_logs] + distributions: [contrib] codeowners: active: [akats7, djaglowski, fatsheep9146] tests: - skip_lifecycle: true - skip_shutdown: true + skip_lifecycle: true + skip_shutdown: true diff --git a/reports/distributions/contrib.yaml b/reports/distributions/contrib.yaml index f7cce5cd43bd..1a4b4b57a225 100644 --- a/reports/distributions/contrib.yaml +++ b/reports/distributions/contrib.yaml @@ -6,6 +6,7 @@ components: - count - datadog - exceptions + - failover - grafanacloud - routing - servicegraph