Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-2563

The Trace mechanism is inflexible and inefficient - specifically it doesn't enable custom tracing around a node.

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3.0
    • 2.3.0
    • camel-core
    • None
    • All.

    Description

      What it won't let me do:
      I want to be able to correlate the "out" trace with the "in" trace, in one database row without commiting the row until the route has completed.
      This requires a JPA transaction to exist around each of the nodes that are called.
      I'm finding that the transaction has ended by the time of the "out" trace.

      Inefficiencies:
      1. It causes the construction of the new Exchange object and a bunch of String objects that I don't want.
      2. It causes the invocation of a new route, that is unnecessary.

      I think it would be better to:
      1. Pass the class to use as the TraceInterceptor into Tracer.
      2. Break the existing TraceInterceptor into two, a base class that tracks the RouteNodes and a subclass that implements traceExchange.
      3. Change traceExchange so that it returns an Object and pass that Object in to the call to traceExchange for "out" traces.
      4. Give the Tracer a payload object that can be used to pass information to the TraceInterceptor.
      5. Change the various trace* functions to take in and return a payload Object.
      Custom users could then dervice from TraceInterceptor and override the trace* functions as necessary (probably just traceExchange).

      I'm working on a patch.

      Attachments

        1. tracechanges.diff
          6 kB
          Yaytay
        2. tracechanges.diff
          18 kB
          Yaytay
        3. tracechanges.diff
          27 kB
          Yaytay
        4. tracechanges.diff
          67 kB
          Yaytay
        5. tracechanges.diff
          68 kB
          Yaytay

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            davsclaus Claus Ibsen
            yaytay Yaytay
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 20h
                20h
                Remaining:
                Remaining Estimate - 20h
                20h
                Logged:
                Time Spent - Not Specified
                Not Specified

                Slack

                  Issue deployment