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

eventlistener_event_count metric without not status label #1711

Open
joaosilva15 opened this issue Apr 5, 2024 · 1 comment
Open

eventlistener_event_count metric without not status label #1711

joaosilva15 opened this issue Apr 5, 2024 · 1 comment
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@joaosilva15
Copy link

Expected Behavior

eventlistener_event_count for Prometheus exporter should have a status label.

Actual Behavior

eventlistener_event_count has no status label

Steps to Reproduce the Problem

  1. Run eventlistener
  2. Curl the prometheus port on the /metrics path and search for the eventlistener_event_count metric
  3. The metric will be like
# HELP eventlistener_event_count Number of events sent
# TYPE eventlistener_event_count counter
eventlistener_event_count{event_source="",event_type="",name="",namespace_name="",resource_group="",response_code="",response_code_class="",response_error="",response_timeout=""} 1

All labels are empty and thus removed when scraped by Prometheus. You can also see that the status label is not present.

Additional Info

I believe the issue is that this metric is being registered in the default opencensus register and is conflicting with this metric. As the latter metric is registered after the metric created by the event listener the labels are replaced.

  • Tekton Triggers version: We noticed it first in 0.24.2. It is still present in 0.25.x. We also bumped from 0.16 to 0.24 so I do not know the precise version the issue was introduced.

I'm happy to open a PR fixing it but I'll need some guidance on how we wish to do it. Should we change the metric name? Or we can change the opencensus register, if possible, and use a non-default one (if possible), but that will complicate the current code a bit.

@joaosilva15 joaosilva15 added the kind/bug Categorizes issue or PR as related to a bug. label Apr 5, 2024
@khrm
Copy link
Contributor

khrm commented Apr 9, 2024

I'm happy to open a PR fixing it but I'll need some guidance on how we wish to do it. Should we change the metric name?

Please change the name of the metrics. I am happy to review that PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants