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

[fix]: memcachedreceiver updated to deprecate operation_hit_ratio metric #33375

Closed
Closed
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
38 changes: 24 additions & 14 deletions receiver/memcachedreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,6 @@ Bytes transferred over the network.
| ---- | ----------- | ------ |
| direction | Direction of data flow. | Str: ``sent``, ``received`` |

### memcached.operation_hit_ratio

Hit ratio for operations, expressed as a percentage value between 0.0 and 100.0.

| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| % | Gauge | Double |

#### Attributes

| Name | Description | Values |
| ---- | ----------- | ------ |
| operation | The type of operation. | Str: ``increment``, ``decrement``, ``get`` |

### memcached.operations

Operation counts.
Expand All @@ -130,3 +116,27 @@ Number of threads used by the memcached instance.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {threads} | Sum | Int | Cumulative | false |

## Optional Metrics

The following metrics are not emitted by default. Each of them can be enabled by applying the following configuration:

```yaml
metrics:
<metric_name>:
enabled: true
```

### memcached.operation_hit_ratio

Hit ratio for operations, expressed as a percentage value between 0.0 and 100.0.

| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| % | Gauge | Double |

#### Attributes

| Name | Description | Values |
| ---- | ----------- | ------ |
| operation | The type of operation. | Str: ``increment``, ``decrement``, ``get`` |
3 changes: 1 addition & 2 deletions receiver/memcachedreceiver/generated_package_test.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.

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.

6 changes: 5 additions & 1 deletion receiver/memcachedreceiver/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,12 @@ metrics:
aggregation_temporality: cumulative
attributes: [type,operation]
memcached.operation_hit_ratio:
enabled: true
enabled: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should leave this as true for at least one release so that users have a chance to adjust before changes are imposed on them.

description: Hit ratio for operations, expressed as a percentage value between 0.0 and 100.0.
warnings:
if_enabled: memcached.operation_hit_ratio is deprecated
if_enabled_not_set: memcached.operation_hit_ratio is deprecated
if_configured: memcached.operation_hit_ratio is deprecated
unit: '%'
gauge:
value_type: double
Expand Down
Loading