---
schema_version: "1"
id: 89b157d14610a2e06a1b73f1da8d6704801d45a97424fbdcb55039ba02007ab8
title: Tracing Module 1.3 Reference
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/tracing-module/latest/tracing-module-reference.md
canonical_url: https://docs.mulesoft.com/tracing-module/latest/tracing-module-reference
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 2b67695f6552003e8933482594b1ce23ba7a86390d76567bdfd54e78ef33288d
description: MuleSoft Documentation Site
release: "1.3"
latest: true
---
---
product: Tracing Module
version: 1.3
is-latest-version: true
---

# Tracing Module 1.3 Reference

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Tracing module enables you to enhance your logs by adding, removing, and clearing variables from the
logging context for a given Mule event. It also enables you to modify the correlation ID during flow
execution.

## Configurations

---

### Default Configuration

Default configuration

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Name</p></td><td><p>String</p></td><td><p>The name for this configuration. Connectors reference the configuration with this name.</p></td><td></td><td><p>x</p></td></tr></tbody></table>

## Operations

### Clear Logging Variables

`<clear-logging-variables>`

Clears all the logging variables from the event logging context. This operation does not remove the
correlation ID nor the current event processor because those variables are managed by Mule runtime
engine.

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Name</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Display name for the operation</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

### Remove Logging Variables

`<remove-logging-variable>`

Removes a variable from the event logging context.

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Name</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Display name for the operation.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Variable name</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the variable to remove.</p></div></div></td><td><div><div><p>x</p></div></div></td><td><div></div></td></tr></tbody></table>

### Set Logging Variables

`<set-logging-variable>`

Sets a new logging variable and its value. The new variable is present in the next operation
execution for the event.

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Name</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Display name for the operation.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Variable name</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the variable to log.</p></div></div></td><td><div><div><p>x</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Value</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Value to assign to the variable. Accepts DataWeave expressions.</p></div></div></td><td><div><div><p>x</p></div></div></td><td><div></div></td></tr></tbody></table>

> [!NOTE] When OpenTelemetry tracing is enabled, the variable set by this operation is also added as
> an attribute of the span that represents the operation and of the spans and log records generated
> during the rest of the flow’s execution, including subflows, flow references, and error handlers.

### Add Root Span Attributes

`<add-root-span-attributes>`

Adds custom attributes to the current transaction’s root (server) span, regardless of how deeply
nested the calling flow is. Use this operation to attach transaction-level fields, such as a client
ID or conversation ID, to the primary span instead of a child span.

> [!NOTE] This operation requires Mule runtime engine 4.13 or later. On earlier runtimes, it is a
> no-op.

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Name</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Display name for the operation.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Attributes</strong></p></td><td><div><div><p>Object</p></div></div></td><td><div><div><p>Key-value pairs to add as attributes on the root span. Accepts DataWeave expressions.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr></tbody></table>

## Scopes

### With CorrelationID

`<with-correlation-id>`

Scope that runs the inner chain with the given correlation ID. After the inner chain finishes
executing, the correlation ID returns to the previous one.

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Name</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Display name for the scope</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Correlation id</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Set a custom correlation ID.</p></div></div></td><td><div><div><p>x</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Variable</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the variable that stores the operation’s output.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Value</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr></tbody></table>

## See Also

- [Salesforce Help](https://help.salesforce.com)
