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

[receiver/apache]: remove feature gates for server name and port resource attributes #17355

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
12 changes: 12 additions & 0 deletions .chloggen/apache-remove-attr-feature-gates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: apachereceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Remove feature gates that enable sending server name and port as resource attributes.

# One or more tracking issues related to the change
issues: [14791]

24 changes: 0 additions & 24 deletions receiver/apachereceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,3 @@ Details about the metrics produced by this receiver can be found in [metadata.ya

[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib

## Feature gate configurations

See the [Collector feature gates](https://github.com/open-telemetry/opentelemetry-collector/blob/main/featuregate/README.md#collector-feature-gates) for an overview of feature gates in the collector.

**BETA**: `receiver.apache.emitServerNameAsResourceAttribute`

The feature gate `receiver.apache.emitServerNameAsResourceAttribute` once enabled starts emitting the metrics with a resource attribute `apache.server.name`. When the feature gate is disabled, the metrics are emitted with a `server_name` metric-level attribute instead.

This is considered a breaking change for existing users of this receiver, and it is recommended to migrate to the new implementation when possible. Any new users planning to adopt this receiver should enable this feature gate to avoid having to migrate any visualisations or alerts.

This feature gate is enabled by default, and eventually the old implementation will be removed. It aims
to give users time to migrate to the new implementation. The target release for the old implementation to be removed
is 0.69.0.

**BETA**: `receiver.apache.emitPortAsResourceAttribute`

The feature gate `receiver.apache.emitPortAsResourceAttribute` once enabled starts emitting the metrics with a resource attribute `apache.server.port`.

This is considered a breaking change for existing users of this receiver, and it is recommended to migrate to the new implementation when possible. Any new users planning to adopt this receiver should enable this feature gate to avoid having to migrate any visualisations or alerts.

This feature gate is enabled by default, and eventually the old implementation will be removed. It aims
to give users time to migrate to the new implementation. The target release for the old implementation to be removed
is 0.69.0.
2 changes: 1 addition & 1 deletion receiver/apachereceiver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ require (
go.opentelemetry.io/collector/component v0.68.0
go.opentelemetry.io/collector/confmap v0.68.0
go.opentelemetry.io/collector/consumer v0.68.0
go.opentelemetry.io/collector/featuregate v0.68.0
go.opentelemetry.io/collector/pdata v1.0.0-rc2
go.uber.org/zap v1.24.0
)
Expand Down Expand Up @@ -59,6 +58,7 @@ require (
github.com/rs/cors v1.8.2 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/collector/featuregate v0.68.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.37.0 // indirect
go.opentelemetry.io/otel v1.11.2 // indirect
go.opentelemetry.io/otel/metric v0.34.0 // indirect
Expand Down
5 changes: 0 additions & 5 deletions receiver/apachereceiver/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import (
"github.com/testcontainers/testcontainers-go/wait"
"go.opentelemetry.io/collector/component/componenttest"
"go.opentelemetry.io/collector/consumer/consumertest"
"go.opentelemetry.io/collector/featuregate"
"go.opentelemetry.io/collector/receiver/receivertest"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/comparetest"
Expand All @@ -57,10 +56,6 @@ func TestApacheIntegration(t *testing.T) {
hostname, err := container.Host(context.Background())
require.NoError(t, err)

// Let this test check if it works with the features disabled and the unit test will test the feature enabled.
err = featuregate.GetRegistry().Apply(map[string]bool{EmitServerNameAsResourceAttribute: false, EmitPortAsResourceAttribute: false})
require.NoError(t, err)

f := NewFactory()
cfg := f.CreateDefaultConfig().(*Config)
cfg.ScraperControllerSettings.CollectionInterval = 100 * time.Millisecond
Expand Down
256 changes: 0 additions & 256 deletions receiver/apachereceiver/internal/metadata/deprecated_metrics.go

This file was deleted.

Loading