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

metricsgenerationprocessor skips a rule if the second operand is 0 #29667

Closed
flyfire2002 opened this issue Dec 5, 2023 · 6 comments
Closed
Labels
bug Something isn't working closed as inactive processor/metricsgeneration Metrics Generation processor Stale

Comments

@flyfire2002
Copy link

Component(s)

processor/metricsgeneration

What happened?

Description

the check here means that if the second operand is 0 (even for actons like add or subtract), the affected rule is skipped (and the metric not generated)

Steps to Reproduce

  1. Have a rule
  experimental_metricsgeneration/subset:
    rules:
    - name: part_b
      type: calculate
      metric1: total
      metric2: part_a
      operation: subtract
  1. make sure part_a has a value of 0
  2. query part_b

Expected Result

part_b has the same value as total.

Actual Result

part_b is not generated at all.

Collector version

main, 0.90.1

Environment information

No response

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@flyfire2002 flyfire2002 added bug Something isn't working needs triage New item requiring triage labels Dec 5, 2023
@github-actions github-actions bot added the processor/metricsgeneration Metrics Generation processor label Dec 5, 2023
Copy link
Contributor

github-actions bot commented Dec 5, 2023

Pinging code owners:

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

@crobert-1
Copy link
Member

Thanks for filing @flyfire2002, and including references to the failing code. I was able to confirm your findings. This may have been done to protect against dividing by 0, or even creating new metrics that are just identical to existing, but I think the better functionality is to properly handle dividing by 0 (which is already done) and still create metrics even if they match existing values.

@Aneurysm9 may be able to share if there's something else we're missing here though. One thing also to be aware of is this component is still in Development stability. so there may be more issues like this.

@crobert-1 crobert-1 removed the needs triage New item requiring triage label Dec 6, 2023
Copy link
Contributor

github-actions bot commented Feb 5, 2024

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 Feb 5, 2024
@crobert-1 crobert-1 removed the Stale label Feb 5, 2024
Copy link
Contributor

github-actions bot commented Apr 8, 2024

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 Apr 8, 2024
@crobert-1 crobert-1 removed the Stale label Apr 8, 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 Jun 10, 2024
Copy link
Contributor

github-actions bot commented Aug 9, 2024

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 Aug 9, 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 processor/metricsgeneration Metrics Generation processor Stale
Projects
None yet
Development

No branches or pull requests

2 participants