Skip to content

Requests are auto-timed when autotime.enabled is set to false #19981

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

Closed
wants to merge 1 commit into from

Conversation

babjo
Copy link
Contributor

@babjo babjo commented Jan 29, 2020

Background

According to this doc, it says Alternatively, when set to false, you can enable instrumentation by adding @Timed to a request-handling method. However our current actuator doesn't recognize the management.metrics.web.server.request.autotime.enabled's value in record(timingContext, request, response, exception) of WebMvcMetricsFilter.java and the actuator's metric doesn't work properly.

Changes

  • Added a testcase for it
  • Checked this.autoTimer.isEnabled()

References

@pivotal-issuemaster
Copy link

@babjo Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-issuemaster
Copy link

@babjo Thank you for signing the Contributor License Agreement!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 29, 2020
@wilkinsona wilkinsona changed the title Fix not working autotime.enabled configuration Requests are auto-timed when autotime.enabled is set to false Jan 29, 2020
@wilkinsona wilkinsona added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 29, 2020
@wilkinsona wilkinsona added this to the 2.1.x milestone Jan 29, 2020
@snicoll
Copy link
Member

snicoll commented Feb 4, 2020

Turns out this one works in 2.1 already. Seems like a regression introduced with #17026

@snicoll
Copy link
Member

snicoll commented Feb 4, 2020

@babjo thank you for making your first contribution to Spring Boot.

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

Successfully merging this pull request may close these issues.

5 participants