Skip to content

Document limitations of Servlet Filter observations #29398

@jonatan-ivanov

Description

@jonatan-ivanov

Affects: 6.0.0-SNAPSHOT

If micrometer-observation is set-up and if I throw an exception from a controller:

@GetMapping("/trouble")
String trouble() {
    LOGGER.info("3,2,1... Boom!");
    throw new IllegalArgumentException("Noooooo!");
}

The ERROR log entry does not contain the traceID/spanId, see [boot3-sample,,] (log correlation does not work):

2022-10-28T12:37:16.647-07:00  INFO [boot3-sample,635c2f6c8cb895fa15f922f7cacc6954,15f922f7cacc6954] 96088 --- [nio-8080-exec-1] i.m.boot3.samples.SampleController       : 3,2,1... Boom!
2022-10-28T12:37:16.660-07:00 ERROR [boot3-sample,,] 96088 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: java.lang.IllegalArgumentException: Noooooo!] with root cause

java.lang.IllegalArgumentException: Noooooo!
...

I think the issue is either the error logging is not "observed" or it is not "in-Scope".

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions