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

emit_count_metrics has wrong name #3628

Closed
danielhoherd opened this issue Feb 10, 2022 · 1 comment · Fixed by #3630
Closed

emit_count_metrics has wrong name #3628

danielhoherd opened this issue Feb 10, 2022 · 1 comment · Fixed by #3630
Labels
bug Something isn't working

Comments

@danielhoherd
Copy link

danielhoherd commented Feb 10, 2022

Describe the bug

While digging through code I think I found a bug where emit_count_metrics has the wrong metrics_create name.

@emit_count_metrics = metrics_create(namespace: "fluentd", subsystem: "bare_output", name: "emit_records", help_text: "Number of count emits")
@emit_records_metrics = metrics_create(namespace: "fluentd", subsystem: "bare_output", name: "emit_records", help_text: "Number of emit records")

Both emit_count_metrics and emit_records_metrics call metrics_create(namespace: "fluentd", subsystem: "bare_output", name: "emit_records") with just different help_text. It seems like emit_count_metrics should have the name emit_count.

To Reproduce

Look at

@emit_count_metrics = metrics_create(namespace: "fluentd", subsystem: "bare_output", name: "emit_records", help_text: "Number of count emits")
@emit_records_metrics = metrics_create(namespace: "fluentd", subsystem: "bare_output", name: "emit_records", help_text: "Number of emit records")

This also shows up in a few more places.

Expected behavior

Honestly, I expected fluentd_output_status_emit_count and fluentd_output_status_emit_records from the prometheus plugin to not look identical, which took me down a rabbit hole and led me here.

Your Environment

N/A, just digging through code

Your Configuration

k8s 1.21 in GKE

Your Error Log

N/A

Additional context

No response

@kenhys kenhys added the bug Something isn't working label Feb 14, 2022
kenhys added a commit to kenhys/fluentd that referenced this issue Feb 14, 2022
When implementing metrics plugin mechanism, it should be
named emit_count instead of emit_records.

Closes: fluent#3628

See
fluent@4a0335a

Signed-off-by: Kentaro Hayashi <[email protected]>
kenhys added a commit that referenced this issue Feb 14, 2022
When implementing metrics plugin mechanism, it should be
named emit_count instead of emit_records.

Closes: #3628

See
4a0335a

Signed-off-by: Kentaro Hayashi <[email protected]>
@kenhys
Copy link
Contributor

kenhys commented Feb 14, 2022

@danielhoherd thank you for reporting!

Fixed via #3630

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants