diff --git a/docs/platforms/php/guides/symfony/configuration/symfony-options.mdx b/docs/platforms/php/guides/symfony/configuration/symfony-options.mdx index e1cbe845eec96..fb8439f9a19b9 100644 --- a/docs/platforms/php/guides/symfony/configuration/symfony-options.mdx +++ b/docs/platforms/php/guides/symfony/configuration/symfony-options.mdx @@ -77,6 +77,7 @@ sentry: enabled: true dbal: enabled: true + ignore_prepare_spans: false connections: - default twig: diff --git a/docs/platforms/php/guides/symfony/tracing/instrumentation/automatic-instrumentation.mdx b/docs/platforms/php/guides/symfony/tracing/instrumentation/automatic-instrumentation.mdx index 41ba91794e0aa..0170d2e596319 100644 --- a/docs/platforms/php/guides/symfony/tracing/instrumentation/automatic-instrumentation.mdx +++ b/docs/platforms/php/guides/symfony/tracing/instrumentation/automatic-instrumentation.mdx @@ -39,6 +39,15 @@ sentry: enabled: false ``` +By default, Doctrine ORM prepares each SQL query before executing it. This leads to traces that contain both `db.sql.prepare` and `db.sql.execute` spans for the same query. Set `ignore_prepare_spans` to `true` to suppress the prepare spans and keep your traces more compact. + +```yaml {filename:config/packages/sentry.yaml} +sentry: + tracing: + dbal: # DB queries + ignore_prepare_spans: true +``` + ## Twig This integration adds distributed tracing for Twig template rendering using Sentry.