Skip to content

Commit

Permalink
[chore][receiver/nginx] Remove stable feature gate (open-telemetry#28659
Browse files Browse the repository at this point in the history
  • Loading branch information
djaglowski authored and jmsnll committed Nov 12, 2023
1 parent 33cd171 commit 954da60
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 148 deletions.
14 changes: 0 additions & 14 deletions receiver/nginxreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,3 @@ Total number of requests made to the server since it started
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| requests | Sum | Int | Cumulative | true |
### temp.connections_current
Temporary placeholder for old version of nginx.connections_current. See featuregate 'nginx.connections_as_sum'.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| connections | Gauge | Int |
#### Attributes
| Name | Description | Values |
| ---- | ----------- | ------ |
| state | The state of a connection | Str: ``active``, ``reading``, ``writing``, ``waiting`` |
12 changes: 0 additions & 12 deletions receiver/nginxreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,12 @@ import (
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/config/confighttp"
"go.opentelemetry.io/collector/consumer"
"go.opentelemetry.io/collector/featuregate"
"go.opentelemetry.io/collector/receiver"
"go.opentelemetry.io/collector/receiver/scraperhelper"

"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nginxreceiver/internal/metadata"
)

const (
connectionsAsSum = "receiver.nginx.emitConnectionsCurrentAsSum"
)

var _ = featuregate.GlobalRegistry().MustRegister(
connectionsAsSum,
featuregate.StageStable,
featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/4326"),
featuregate.WithRegisterToVersion("v0.87.0"),
)

// NewFactory creates a factory for nginx receiver.
func NewFactory() receiver.Factory {
return receiver.NewFactory(
Expand Down
2 changes: 1 addition & 1 deletion receiver/nginxreceiver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ require (
go.opentelemetry.io/collector/config/configtls v0.88.1-0.20231026220224-6405e152a2d9
go.opentelemetry.io/collector/confmap v0.88.1-0.20231026220224-6405e152a2d9
go.opentelemetry.io/collector/consumer v0.88.1-0.20231026220224-6405e152a2d9
go.opentelemetry.io/collector/featuregate v1.0.0-rcv0017.0.20231026220224-6405e152a2d9
go.opentelemetry.io/collector/pdata v1.0.0-rcv0017.0.20231026220224-6405e152a2d9
go.opentelemetry.io/collector/receiver v0.88.1-0.20231026220224-6405e152a2d9
go.uber.org/zap v1.26.0
Expand Down Expand Up @@ -83,6 +82,7 @@ require (
go.opentelemetry.io/collector/config/internal v0.88.1-0.20231026220224-6405e152a2d9 // indirect
go.opentelemetry.io/collector/extension v0.88.1-0.20231026220224-6405e152a2d9 // indirect
go.opentelemetry.io/collector/extension/auth v0.88.1-0.20231026220224-6405e152a2d9 // indirect
go.opentelemetry.io/collector/featuregate v1.0.0-rcv0017.0.20231026220224-6405e152a2d9 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect
go.opentelemetry.io/otel v1.19.0 // indirect
go.opentelemetry.io/otel/metric v1.19.0 // indirect
Expand Down
4 changes: 0 additions & 4 deletions receiver/nginxreceiver/internal/metadata/generated_config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 0 additions & 59 deletions receiver/nginxreceiver/internal/metadata/generated_metrics.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 0 additions & 19 deletions receiver/nginxreceiver/internal/metadata/generated_metrics_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 0 additions & 23 deletions receiver/nginxreceiver/internal/metadata/temporary_metrics.go

This file was deleted.

4 changes: 0 additions & 4 deletions receiver/nginxreceiver/internal/metadata/testdata/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ all_set:
enabled: true
nginx.requests:
enabled: true
temp.connections_current:
enabled: true
none_set:
metrics:
nginx.connections_accepted:
Expand All @@ -21,5 +19,3 @@ none_set:
enabled: false
nginx.requests:
enabled: false
temp.connections_current:
enabled: false
9 changes: 0 additions & 9 deletions receiver/nginxreceiver/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,3 @@ metrics:
monotonic: false
aggregation_temporality: cumulative
attributes: [state]

# Old version of metric, to be removed when featuregate is stable
temp.connections_current:
enabled: true # must be enabled by default in order to apply necessary MetricBuilder option
description: Temporary placeholder for old version of nginx.connections_current. See featuregate 'nginx.connections_as_sum'.
unit: connections
gauge:
value_type: int
attributes: [state]
2 changes: 1 addition & 1 deletion receiver/nginxreceiver/scraper.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func newNginxScraper(
settings receiver.CreateSettings,
cfg *Config,
) *nginxScraper {
mb := metadata.NewMetricsBuilder(cfg.MetricsBuilderConfig, settings, metadata.WithCurrentConnectionsAsGaugeDisabled())
mb := metadata.NewMetricsBuilder(cfg.MetricsBuilderConfig, settings)
return &nginxScraper{
settings: settings.TelemetrySettings,
cfg: cfg,
Expand Down

0 comments on commit 954da60

Please sign in to comment.