Skip to content

Commit 8940f56

Browse files
authored
feat(php): Adjust docs for Laravel DS (#5601)
1 parent 431983f commit 8940f56

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/includes/sampling-supported-sdks.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- React Native: 4.3.0 or later
66
- Dart and Flutter: 6.11.0 or later
77
- PHP: 3.9.0 or later
8+
- Laravel: 3.0.0 or later
89
- Ruby: 5.5.0 or later
910
- Java: 6.5.0 or later
1011
- .NET: 3.22.0 or later

src/platforms/php/guides/laravel/performance/connect-services.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@ sidebar_order: 40
44
description: "Learn how to connect backend and frontend transactions."
55
---
66

7-
If you are also using Performance Monitoring for [JavaScript](/platforms/javascript/performance/) you can use a helper function to continue the trace started from your backend in order to [connect services](/platforms/javascript/performance/connect-services/#navigation-and-other-xhr-requests).
7+
If you're also using Performance Monitoring for [JavaScript](/platforms/javascript/performance/), you can use a helper function to continue the trace and propagate the Dynamic Sampling context started from your backend in order to [connect services](/platforms/javascript/performance/connect-services/#navigation-and-other-xhr-requests). (The Dynamic Sampling context contains additional trace-related data that is used for trace-based sampling.)
88
Add the following line to your blade template rendering the `<head/>` of your page:
99

1010
```php {filename:app.blade.php}
1111
<head>
1212
...
13-
{!! \Sentry\Laravel\Integration::sentryTracingMeta() !!}
13+
{!! \Sentry\Laravel\Integration::sentryMeta() !!}
1414
...
1515
</head>
1616
```
1717

18-
This helper function will render a meta tag similar to this `<meta name="sentry-trace" content="49879feb76c84743ba5034bd2d3f1ca3-7cb5535c930d4666-1"/>`, which our JavaScript SDK will pick up and continue the trace. Therefore, your frontend and your backend are connected by way of the same trace.
18+
This helper function will render two meta tags similar to `<meta name="sentry-trace" content="49879feb76c84743ba5034bd2d3f1ca3-7cb5535c930d4666-1"/>` and `<meta name="baggage" content="sentry-trace_id=49879feb76c84743ba5034bd2d3f1ca3,sentry-sample_rate=0.2,sentry-transaction=my-transaction,sentry-public_key=public,sentry-release=1.0.0,sentry-environment=prod>`. Our JavaScript SDK will pick these up and then continue the trace and propagate the Dynamic Sampling context.
19+
As a result, your frontend and your backend are connected by way of the same trace.
1920

2021
Otherwise, other backend services with Performance Monitoring will connect automatically.

0 commit comments

Comments
 (0)