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

Make descriptions static where they are not #3201

Merged
merged 2 commits into from
May 27, 2022

Conversation

jonatan-ivanov
Copy link
Member

Since the description of the Meters can be different per Meter, we can run into weird situations when the description is dynamic/different for different Meter.Ids that share the same name but differ in tags for backends that does not support different description per time series.

jvm.threads.states
The description here (Prometheus group) is The current number of threads having NEW state.
This is somewhat misleading since we have time series for all of the states not just NEW.

# HELP jvm_threads_states_threads The current number of threads having NEW state
# TYPE jvm_threads_states_threads gauge
jvm_threads_states_threads{state="new",} 0.0
jvm_threads_states_threads{state="timed-waiting",} 3.0
jvm_threads_states_threads{state="blocked",} 0.0
jvm_threads_states_threads{state="waiting",} 12.0
jvm_threads_states_threads{state="terminated",} 0.0
jvm_threads_states_threads{state="runnable",} 7.0

logback.events
The description here (Prometheus group) is Number of error level events that made it to the logs.
This is somewhat misleading since we have time series for all of the levels not just error.

# HELP logback_events_total Number of error level events that made it to the logs
# TYPE logback_events_total counter
logback_events_total{level="info",} 6.0
logback_events_total{level="debug",} 0.0
logback_events_total{level="warn",} 0.0
logback_events_total{level="error",} 0.0
logback_events_total{level="trace",} 0.0

Since the description of the Meters can be different per Meter, we can run into weird situations when the description is dynamic/different for different Meter.Ids that share the same name but differ in tags for backends that does not support different description per time series.

jvm.threads.states:
The description here (Prometheus group) is "The current number of threads having NEW state".
This is somewhat misleading since we have time series for all of the states not just "NEW".

# HELP jvm_threads_states_threads The current number of threads having NEW state
# TYPE jvm_threads_states_threads gauge
jvm_threads_states_threads{state="new",} 0.0
jvm_threads_states_threads{state="timed-waiting",} 3.0
jvm_threads_states_threads{state="blocked",} 0.0
jvm_threads_states_threads{state="waiting",} 12.0
jvm_threads_states_threads{state="terminated",} 0.0
jvm_threads_states_threads{state="runnable",} 7.0

logback.events:
The description here (Prometheus group) is "Number of error level events that made it to the logs".
This is somewhat misleading since we have time series for all of the levels not just "error".

# HELP logback_events_total Number of error level events that made it to the logs
# TYPE logback_events_total counter
logback_events_total{level="info",} 6.0
logback_events_total{level="debug",} 0.0
logback_events_total{level="warn",} 0.0
logback_events_total{level="error",} 0.0
logback_events_total{level="trace",} 0.0
@shakuzen shakuzen added this to the 1.8.7 milestone May 27, 2022
@shakuzen shakuzen added module: micrometer-core An issue that is related to our core module enhancement A general enhancement labels May 27, 2022
@shakuzen shakuzen merged commit f89d384 into micrometer-metrics:1.8.x May 27, 2022
@jonatan-ivanov jonatan-ivanov deleted the static-descriptions branch May 27, 2022 04:52
@julian-zhu96
Copy link

Hi jonatan,

I found there are a log of similar cases here, such as cache.misses, cache.xa.commits, will you fix all of them?

@jonatan-ivanov
Copy link
Member Author

@julian-zhu96 I can go through the cache-related binders, I see the ones you mentioned, do you happen to have a list about them?

@jonatan-ivanov
Copy link
Member Author

jonatan-ivanov commented Jul 28, 2022

@julian-zhu96 see #3321
/cc @jack-berg

@julian-zhu96
Copy link

@jonatan-ivanov No, I don't have a list. But I found this to be the case for almost half of the meters, because I lost almost half of the microservice metrics data when collected by opentelemetry collector and sent to prometheus

@jonatan-ivanov
Copy link
Member Author

Check with the latest snapshot, theoretically I fixed it for cache metrics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A general enhancement module: micrometer-core An issue that is related to our core module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants