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 Timer and LongTaskTimer output similar in LoggingMeterRegistry #5835

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jonatan-ivanov
Copy link
Member

In case of the LoggingMeterRegistry, the output of a LongTaskTimer looks like this:

"my.ltt{} active=30 duration=30m"

while the output of a Timer is something like this:

"my.timer{} delta_count=30 throughput=0.5/s mean=1s max=1s"

We can add the missing fields to the LongTaskTimer output:

"my.ltt{} active=30 duration=30m throughput=0.5/s mean=1m max=1m"

In case of the LoggingMeterRegistry, the output of a LongTaskTimer
looks like this:
"my.ltt{} active=30 duration=30m"
while the output of a Timer is something like this:
"my.timer{} delta_count=30 throughput=0.5/s mean=1s max=1s"

We can add the missing fields to the LongTaskTimer output:
"my.ltt{} active=30 duration=30m throughput=0.5/s mean=1m max=1m"
@jonatan-ivanov jonatan-ivanov added the enhancement A general enhancement label Jan 29, 2025
@jonatan-ivanov jonatan-ivanov added this to the 1.15.0-M2 milestone Jan 29, 2025
@jonatan-ivanov jonatan-ivanov added the module: micrometer-core An issue that is related to our core module label Jan 29, 2025
Copy link
Member

@shakuzen shakuzen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how useful/meaningful throughput is when we're talking about active (unfinished) measurements. Other parts I can understand but what does throughput mean in this context?

  • active=30 there are 30 unfinished measurements now
  • duration=30m the sum of time taken so far for each of the measurements is 30 minutes
  • mean=1m the average elapsed time of all the active tasks is one minute
  • max=1m the longest active task has been running for one minute so far
  • throughput=0.5/s ???

@jonatan-ivanov
Copy link
Member Author

I thought the rate you tasks are starting but looking into the calculation behind it, mathematically it does not really mean anything (active tasks/step duration), I'm removing it.

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.

2 participants