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

Labels with empty values are not added #192

Open
svend opened this issue Sep 3, 2021 · 0 comments
Open

Labels with empty values are not added #192

svend opened this issue Sep 3, 2021 · 0 comments

Comments

@svend
Copy link

svend commented Sep 3, 2021

A label with an empty value does not get added to the Prometheus metrics. Here is an example. I would expect that every metric would have a label should_be_empty="".

    <labels>
      should_be_foo foo
      should_be_empty ""
      http_status ${http_status}
      proxy_host ${proxy_host}
    </labels>

However, the should_be_empty label does not show up on any metrics.

proxy_request_duration_seconds_count{http_status="200",instance="fluentd:9090",job="fluentd",proxy_host="upstream-a",should_be_foo="foo"}
proxy_request_duration_seconds_count{http_status="200",instance="fluentd:9090",job="fluentd",proxy_host="upstream-b",should_be_foo="foo"}
proxy_request_duration_seconds_count{http_status="404",instance="fluentd:9090",job="fluentd",proxy_host="example.com",should_be_foo="foo"}
proxy_request_duration_seconds_count{http_status="418",instance="fluentd:9090",job="fluentd",should_be_foo="foo"}
proxy_request_duration_seconds_count{http_status="500",instance="fluentd:9090",job="fluentd",proxy_host="upstream-a",should_be_foo="foo"}
proxy_request_duration_seconds_count{http_status="500",instance="fluentd:9090",job="fluentd",proxy_host="upstream-b",should_be_foo="foo"}
proxy_request_duration_seconds_count{http_status="504",instance="fluentd:9090",job="fluentd",proxy_host="example.com",should_be_foo="foo"}

Tested with gem 'fluent-plugin-prometheus' version '2.0.1'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant