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/elasticsearch] removing direction feature gate #14955

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
16 changes: 16 additions & 0 deletions .chloggen/rm-direction-elasticsearch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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: elasticsearchreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "removing direction feature gate"

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

# (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:
12 changes: 0 additions & 12 deletions receiver/elasticsearchreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,5 @@ The following metric are available with versions:

Details about the metrics produced by this receiver can be found in [metadata.yaml](./metadata.yaml)

### Feature gate configurations

#### Transition from metrics with "direction" attribute

The proposal to change metrics from being reported with a `direction` attribute has been reverted in the specification. As a result, the
following feature gates will be removed in v0.62.0:

- **receiver.elasticsearchreceiver.emitMetricsWithoutDirectionAttribute**
- **receiver.elasticsearchreceiver.emitMetricsWithDirectionAttribute**

For additional information, see https://github.com/open-telemetry/opentelemetry-specification/issues/2726.

[beta]:https://github.com/open-telemetry/opentelemetry-collector#beta
[contrib]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
2 changes: 0 additions & 2 deletions receiver/elasticsearchreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ These are the metrics available for this scraper.
| **elasticsearch.node.cache.memory.usage** | The size in bytes of the cache. | By | Sum(Int) | <ul> <li>cache_name</li> </ul> |
| **elasticsearch.node.cluster.connections** | The number of open tcp connections for internal cluster communication. | {connections} | Sum(Int) | <ul> </ul> |
| **elasticsearch.node.cluster.io** | The number of bytes sent and received on the network for internal cluster communication. | By | Sum(Int) | <ul> <li>direction</li> </ul> |
| **elasticsearch.node.cluster.io.received** | The number of bytes received on the network for internal cluster communication. | By | Sum(Int) | <ul> </ul> |
| **elasticsearch.node.cluster.io.sent** | The number of bytes sent on the network for internal cluster communication. | By | Sum(Int) | <ul> </ul> |
| **elasticsearch.node.disk.io.read** | The total number of kilobytes read across all file stores for this node. | KiBy | Sum(Int) | <ul> </ul> |
| **elasticsearch.node.disk.io.write** | The total number of kilobytes written across all file stores for this node. | KiBy | Sum(Int) | <ul> </ul> |
| **elasticsearch.node.documents** | The number of documents on the node. | {documents} | Sum(Int) | <ul> <li>document_state</li> </ul> |
Expand Down
15 changes: 0 additions & 15 deletions receiver/elasticsearchreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ import (
"go.opentelemetry.io/collector/config"
"go.opentelemetry.io/collector/config/confighttp"
"go.opentelemetry.io/collector/consumer"
"go.opentelemetry.io/collector/featuregate"
"go.opentelemetry.io/collector/receiver/scraperhelper"
"go.uber.org/zap"

"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver/internal/metadata"
)
Expand Down Expand Up @@ -64,12 +62,6 @@ func createDefaultConfig() config.Receiver {

var errConfigNotES = errors.New("config was not an elasticsearch receiver config")

func logDeprecatedFeatureGateForDirection(log *zap.Logger, gate featuregate.Gate) {
log.Warn("WARNING: The " + gate.ID + " feature gate is deprecated and will be removed in the next release. The change to remove " +
"the direction attribute has been reverted in the specification. See https://github.com/open-telemetry/opentelemetry-specification/issues/2726 " +
"for additional details.")
}

// createMetricsReceiver creates a metrics receiver for scraping elasticsearch metrics.
func createMetricsReceiver(
_ context.Context,
Expand All @@ -83,13 +75,6 @@ func createMetricsReceiver(
}
es := newElasticSearchScraper(params, c)

if !es.emitMetricsWithDirectionAttribute {
logDeprecatedFeatureGateForDirection(es.settings.Logger, emitMetricsWithDirectionAttributeFeatureGate)
}

if es.emitMetricsWithoutDirectionAttribute {
logDeprecatedFeatureGateForDirection(es.settings.Logger, emitMetricsWithoutDirectionAttributeFeatureGate)
}
scraper, err := scraperhelper.NewScraper(typeStr, es.scrape, scraperhelper.WithStart(es.start))
if err != nil {
return nil, err
Expand Down

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

21 changes: 0 additions & 21 deletions receiver/elasticsearchreceiver/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ metrics:
value_type: int
attributes: [ ]
enabled: true
# produced when receiver.elasticsearchreceiver.emitMetricsWithDirectionAttribute feature gate is enabled
elasticsearch.node.cluster.io:
description: The number of bytes sent and received on the network for internal cluster communication.
unit: By
Expand All @@ -266,26 +265,6 @@ metrics:
value_type: int
attributes: [direction]
enabled: true
# produced when receiver.elasticsearchreceiver.emitMetricsWithoutDirectionAttribute feature gate is enabled
elasticsearch.node.cluster.io.received:
description: The number of bytes received on the network for internal cluster communication.
unit: By
sum:
monotonic: true
aggregation: cumulative
value_type: int
attributes: []
enabled: true
# produced when receiver.elasticsearchreceiver.emitMetricsWithoutDirectionAttribute feature gate is enabled
elasticsearch.node.cluster.io.sent:
description: The number of bytes sent on the network for internal cluster communication.
unit: By
sum:
monotonic: true
aggregation: cumulative
value_type: int
attributes: []
enabled: true
elasticsearch.node.cluster.connections:
description: The number of open tcp connections for internal cluster communication.
unit: "{connections}"
Expand Down
Loading