[ https://issues.apache.org/jira/browse/CAMEL-21854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bjørnar Ruud updated CAMEL-21854: --------------------------------- Description: After setting up Micrometer Observations with @CamelObservation on a spring-boot application the MicrometerObservationTracer handling of log statements in a route is problematic when log statements is not static. If we use the ${body} in a log statement we create a new tracing metric for each unique body processed by the application. A simple route like will create 10000 tracer metrics the application needs to keep in memory: {code:java} from("timer:java?period=100") .setBody() .simple("${random(10000)}") .log("Lets create a lot of metrics: ${body}"); {code} The problem will be a lot worse if the body is always unique and of a significant size. A example of the problem can be found [here|https://github.com/bjoraru/camel-observation-metrics-problem]. Keep it running for a few minutes and check http://localhost:8080/actuator/metrics was: After setting up Micrometer Observations with @CamelObservation on a spring-boot application the MicrometerObservationTracer handling of log statements in a route is problematic when log statements is not static. If we use the ${body} in a log statement we create a new tracing metric for each unique body processed by the application. A simple route like will create 10000 tracer metrics the application needs to keep in memory: {code:java} from("timer:java?period=100") .setBody() .simple("${random(10000)}") .log("Lets create a lot of metrics: ${body}"); {code} The problem will be a lot worse if the body is always unique and of a significant size. A example of the problem can be found [here|https://github.com/bjoraru/camel-observation-metrics-problem]. > Possible memory leak when using camel-observability > --------------------------------------------------- > > Key: CAMEL-21854 > URL: https://issues.apache.org/jira/browse/CAMEL-21854 > Project: Camel > Issue Type: Bug > Reporter: Bjørnar Ruud > Priority: Major > > > After setting up Micrometer Observations with @CamelObservation on a > spring-boot application the MicrometerObservationTracer handling of log > statements in a route is problematic when log statements is not static. > If we use the ${body} in a log statement we create a new tracing metric for > each unique body processed by the application. > A simple route like will create 10000 tracer metrics the application needs to > keep in memory: > {code:java} > from("timer:java?period=100") > .setBody() > .simple("${random(10000)}") > .log("Lets create a lot of metrics: ${body}"); {code} > > The problem will be a lot worse if the body is always unique and of a > significant size. > A example of the problem can be found > [here|https://github.com/bjoraru/camel-observation-metrics-problem]. > Keep it running for a few minutes and check > http://localhost:8080/actuator/metrics > -- This message was sent by Atlassian Jira (v8.20.10#820010)