question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enhance WebRequestTraceFilter to allow excluding capture of certain request paths(eg /management)

See original GitHub issue

The WebRequestTraceFilter captures and stores all requests currently.

Sometimes, I just want to trace the request mapped in my own Controller, and exclude others that I don’t care about. Based on this feature, it’s easier to integrate more useful features. For a simple example, only captures real user’s request, assigns or get a request-id, then calculates response time, and store the trace result.

I currently defined a TraceRepository bean, rewrite the TraceRepository.add method to exclude certain request paths. But I think it’s better to enhance WebRequestTraceFilter. I would propose adding a collection named ‘excludedPaths’ to TraceProperties, and checking against in WebRequestTraceFilter.doFilterInternal()

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
wilkinsonacommented, Jul 13, 2016

Thanks to the changes made for #6309 you can declare your own custom WebRequestTraceFilter bean in 1.4. You can subclass WebRequestTraceFilter and override shouldNotFilter to exclude certain paths.

0reactions
lowzjcommented, Jul 13, 2016

great, thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring Boot Actuator Trace: Logging HTTP requests
Enabling the Spring Boot Actuator Trace endpoint. The trace endpoint is at http://localhost:8080/trace. Unfortunately, if you try this without ...
Read more >
Spring Boot - How to log all requests and responses with ...
Hosting providers, Heroku for example, provide request logging as part of their service and you don't need to do any coding whatsoever then....
Read more >
Excluding URLs for a Filter in a Spring Web Application
In this tutorial, we'll learn how a filter-style task can be included or excluded from execution for a given set of URLs. 2....
Read more >
Spring Cloud Gateway
GatewayFilter Factories. Route filters allow the modification of the incoming HTTP request or outgoing HTTP response in some manner. Route filters are scoped...
Read more >
Help, my Spring Boot info actuator endpoint is enabled, but I ...
Did you recently upgrade your Spring Boot application to version 2.6.x? ... the management.endpoints.web.exposure.include property to enable ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found