Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/configuration/tracecontext.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ declare(strict_types=1);

use DR\SymfonyTraceBundle\TraceStorage;
use Sentry\State\HubInterface;
use Symfony\Config\SentryConfig;
use Symfony\Config\SymfonyTraceConfig;

return static function (SymfonyTraceConfig $config): void {
return static function (SymfonyTraceConfig $config, ?SentryConfig $sentry): void {
// Whether to trust the incoming request header. This is turned on by default.
// If true a value in the `traceparent` header in the request
// will be used and parsed to get the trace ID for the rest of the request. If false
Expand Down Expand Up @@ -56,5 +57,7 @@ return static function (SymfonyTraceConfig $config): void {
$config->sentry()
->enabled(true)
->hubService(HubInterface::class);
// disable sentry's own tracing
$sentry?->tracing()?->enabled(false);
};
```
5 changes: 4 additions & 1 deletion docs/configuration/traceid.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ declare(strict_types=1);
use DR\SymfonyTraceBundle\Generator\TraceId\RamseyUuid4Generator;
use DR\SymfonyTraceBundle\TraceStorage;
use Sentry\State\HubInterface;
use Symfony\Config\SentryConfig;
use Symfony\Config\SymfonyTraceConfig;

return static function (SymfonyTraceConfig $config): void {
return static function (SymfonyTraceConfig $config, ?SentryConfig $sentry): void {
$config->traceMode('traceId');

// Whether to trust the incoming request header. This is turned
Expand Down Expand Up @@ -75,5 +76,7 @@ return static function (SymfonyTraceConfig $config): void {
$config->sentry()
->enabled(true)
->hubService(HubInterface::class);
// disable sentry's own tracing
$sentry?->tracing()?->enabled(false);
};
```
5 changes: 4 additions & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@ private function createSentryConfiguration(): NodeDefinition
->addDefaultsIfNotSet()
->children()
->booleanNode('enabled')
->info('Whether or not to enable passing trace and transaction id to Sentry')
->info(
'Whether or not to enable passing trace and transaction id to Sentry. ' .
'Note: ensure to set $sentry->tracing->enabled(false) to disable Sentry\'s own tracing.'
)
->defaultFalse()
->end()
->scalarNode('hub_service')
Expand Down