You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Bjørnar Ruud (Jira)" <ji...@apache.org> on 2025/03/10 10:44:00 UTC

[jira] [Created] (CAMEL-21854) Possible memory leak when using camel-observability

Bjørnar Ruud created CAMEL-21854:
------------------------------------

             Summary: 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


 

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].

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)