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

Incorrect result for memcached.operation_hit_ratio #30695

Closed
vijayaggarwal opened this issue Jan 21, 2024 · 10 comments
Closed

Incorrect result for memcached.operation_hit_ratio #30695

vijayaggarwal opened this issue Jan 21, 2024 · 10 comments
Assignees
Labels
bug Something isn't working closed as inactive good first issue Good for newcomers help wanted Extra attention is needed receiver/memcached Stale

Comments

@vijayaggarwal
Copy link

Component(s)

receiver/memcached

What happened?

Description

The memcached.operation_hit_ratio actually calculates miss ratio instead of hit ratio.

The function calculateHitRatio() (https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.92.0/receiver/memcachedreceiver/scraper.go#L175) expects arguments in the order (misses, hits) but is being passed arguments in the order (hits, misses). Thus, it actually calculates miss ratio instead of hit ratio.

Also, on a separate note, this metric calculates the ratio since the memcached instance start/restart, and hence the result changes on instance restart. This is counterintuitive in my opinion, as I would expect the metric to represent "recent" hit ratio. Since there is not universal definition of recent, I feel this metric should be deprecated and people should be encouraged to calculate the hit ratio from the memcached.operations metric as per their requirement.

Collector version

all recent versions

Environment information

No response

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@vijayaggarwal vijayaggarwal added bug Something isn't working needs triage New item requiring triage labels Jan 21, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@djaglowski
Copy link
Member

Thanks for reporting @vijayaggarwal. I'm in support of deprecating the metric.

@djaglowski djaglowski removed the needs triage New item requiring triage label Jan 22, 2024
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Mar 25, 2024
@kernelpanic77
Copy link
Contributor

@djaglowski Can I take this up ?

@djaglowski
Copy link
Member

Yes, thanks @kernelpanic77

@github-actions github-actions bot removed the Stale label May 15, 2024
@kernelpanic77
Copy link
Contributor

@djaglowski Should we deprecate this metric or disable it in the metadata.yaml of memcachedreciever ?

@djaglowski
Copy link
Member

@kernelpanic77 we should follow the process described here.

Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Jul 22, 2024
@djaglowski djaglowski added help wanted Extra attention is needed good first issue Good for newcomers and removed Stale labels Jul 22, 2024
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Sep 23, 2024
Copy link
Contributor

This issue has been closed as inactive because it has been stale for 120 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working closed as inactive good first issue Good for newcomers help wanted Extra attention is needed receiver/memcached Stale
Projects
None yet
Development

No branches or pull requests

3 participants