Class MuleTracingModuleOperations

java.lang.Object
org.mule.extension.mule.tracing.module.internal.MuleTracingModuleOperations

public class MuleTracingModuleOperations extends Object
Tracing Module Operations
  • Constructor Details

    • MuleTracingModuleOperations

      public MuleTracingModuleOperations()
  • Method Details

    • withCorrelationId

      @DisplayName("With CorrelationID") @Summary("Runs the inner chain with the given correlation ID, restoring the previous one once the chain finishes executing.") @MediaType(value="*/*", strict=false) @PassThroughOutputChainResolver public void withCorrelationId(@PassThroughInputChainResolver @ExecutionOccurrence(ONCE) org.mule.runtime.extension.api.runtime.route.Chain chain, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Object,Object> callback, @Expression(REQUIRED) @Summary("The correlation ID to use while the inner chain executes.") String correlationId)
      Scope that runs the inner chain with the given correlation ID. Once the inner chain finishes executing, the correlation ID goes back to the previous one.
      Parameters:
      correlationId - The correlation ID to use while the inner chain executes.
    • setLoggingVariable

      @Summary("Adds a variable to the event logging context. It will be present in the following operation executions for this event.") public void setLoggingVariable(@Summary("Name of the logging variable to add.") String variableName, @Summary("Value to assign to the logging variable.") String value)
      Adds a new variable to the event logging context. It will be present in the following operation executions for this event.
      Parameters:
      variableName - Name of the logging variable to add.
      value - Value to assign to the logging variable.
    • removeLoggingVariable

      @Summary("Removes a variable from the event logging context.") public void removeLoggingVariable(@Summary("Name of the logging variable to remove.") String variableName)
      Removes a variable from the event logging context.
      Parameters:
      variableName - Name of the logging variable to remove.
    • clearLoggingVariables

      @Summary("Clears all the custom variables from the event logging context, without removing the correlation ID or the current event processor.") public void clearLoggingVariables()
      Clears all the custom variables from the event logging context. It will *not* remove the correlation ID nor the current event processor, since those variables are managed internally by the Mule runtime.
    • addRootSpanAttributes

      @Summary("Adds the given attributes to the root span of the local trace, regardless of the depth at which this operation is invoked. Requires Mule runtime 4.13.0 or later; a no-op on earlier runtimes.") public void addRootSpanAttributes(org.mule.sdk.api.runtime.source.DistributedTraceContextManager distributedTraceContextManager, @Summary("The key-value pairs to add as attributes to the root span.") @Example("#[{ \'key\' : \'value\' }]") Map<String,String> attributes)
      Adds the given attributes to the root span of the local trace, regardless of the depth at which this operation is invoked. The root span is the top-most exported span of the local trace (the flow span, or the policy chain span when a policy is applied). It is exported when the transaction ends, so attributes added mid-flow are included in the exported root span.

      When there is an inbound distributed trace context, this adds the attributes to this application's local root span, never to the upstream caller's span.

      Requires Mule runtime 4.13.0 or later; on earlier runtimes this operation is a no-op.

      Parameters:
      attributes - the attributes to add to the root span.