---
title: "Limiting Trace Propagation"
description: "Learn how to restrict outgoing trace headers to trusted backend services in your Godot game."
url: https://docs.sentry.io/platforms/godot/tracing/distributed-tracing/limiting-trace-propagation/
---

# Limiting Trace Propagation | Sentry for Godot Engine

By default, the SDK returns tracing headers for any destination URL. To restrict propagation to specific services, configure [`trace_propagation_targets`](https://docs.sentry.io/platforms/godot/configuration/options.md#trace_propagation_targets):

```GDScript
class_name ProjectMainLoop
extends SceneTree

func _initialize() -> void:
	SentrySDK.init(func(options: SentryOptions) -> void:
		options.trace_propagation_targets = [
			RegEx.create_from_string("^https://api\\.example\\.com/"),
		]
	)
```

This matches URLs such as `https://api.example.com/scores`. See [Programmatic Configuration](https://docs.sentry.io/platforms/godot/configuration/options.md#programmatic-configuration) for the manual initialization setup.

Pass the destination URL to `get_trace_headers(url)` to apply these targets. Unmatched URLs receive no tracing headers; an empty target list blocks all URLs. Calling `get_trace_headers()` without a URL bypasses filtering. You still need to [attach the returned headers to your request](https://docs.sentry.io/platforms/godot/tracing/distributed-tracing/custom-trace-propagation.md).

The [option reference](https://docs.sentry.io/platforms/godot/configuration/options.md#trace_propagation_targets) explains string and regular expression matching and configuration through Project Settings.
