# Trace capturing

Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fuser-guides%2Frum%2Fsdk-features%2Ftrace-capturing.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fuser-guides%2Frum%2Fsdk-features%2Ftrace-capturing.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

## Overview[​](#overview "Direct link to Overview")

Specifying URLs for trace header propagation involves defining the specific endpoints in your application where trace headers will be transmitted during requests. This practice is essential for maintaining context in distributed systems and ensuring effective monitoring and debugging.

## Configuration[​](#configuration "Direct link to Configuration")

### Define URLs for trace header propagation[​](#define-urls-for-trace-header-propagation "Direct link to Define URLs for trace header propagation")

Coralogix allows you to control the URLs for trace capturing, using the `allowedTracingUrls` parameter. It’s used for first-party URLs only; for third-part URLs, use the `propagateTraceHeaderCorsUrls` parameter.

Note

When the `allowedTracingUrls` parameter is omitted, the trace header is propagated to all URLs.

**Example**

To propagate the trace header only for URLs that contain the word `alpha`:

```
CoralogixRum.init({

  // ...

  traceParentInHeader: {

    enabled: true,

    options: {

      allowedTracingUrls: [new RegExp('alpha')],

    },

  },

});
```

### Specify backend domain[​](#specify-backend-domain "Direct link to Specify backend domain")

When the backend domain is different from the app domain, specify the backend domain using the `propagateTraceHeaderCorsUrls` command.

**Example**

If an app is hosted on `https://app.com` and the backend is hosted on `https://webapi.com`, specify the backend domain as follows.

```
CoralogixRum.init({

  // ...

  traceParentInHeader: {

    enabled: true,

    options: {

      propagateTraceHeaderCorsUrls: [new RegExp('https://webapi.*')],

    },

  },

});
```
