Skip to content

Commit b2500fb

Browse files
committed
Revert "Make the request tracing enableable"
This reverts commit 39891a4.
1 parent 39891a4 commit b2500fb

File tree

12 files changed

+4
-87
lines changed

12 files changed

+4
-87
lines changed

phpstan-baseline.neon

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ parameters:
1111
path: src/DependencyInjection/Configuration.php
1212

1313
-
14-
message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeParentInterface\\:\\:arrayNode\\(\\)\\.$#"
14+
message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeParentInterface\\:\\:end\\(\\)\\.$#"
1515
count: 1
1616
path: src/DependencyInjection/Configuration.php
1717

@@ -106,17 +106,17 @@ parameters:
106106
path: src/aliases.php
107107

108108
-
109-
message: "#^Class Symfony\\\\Component\\\\HttpKernel\\\\Event\\\\FilterControllerEvent not found\\.$#"
109+
message: "#^Class Symfony\\\\Component\\\\HttpKernel\\\\Event\\\\FilterResponseEvent not found\\.$#"
110110
count: 1
111111
path: src/aliases.php
112112

113113
-
114-
message: "#^Class Symfony\\\\Component\\\\HttpKernel\\\\Event\\\\FilterResponseEvent not found\\.$#"
114+
message: "#^Class Symfony\\\\Component\\\\HttpKernel\\\\Event\\\\PostResponseEvent not found\\.$#"
115115
count: 1
116116
path: src/aliases.php
117117

118118
-
119-
message: "#^Class Symfony\\\\Component\\\\HttpKernel\\\\Event\\\\PostResponseEvent not found\\.$#"
119+
message: "#^Class Symfony\\\\Component\\\\HttpKernel\\\\Event\\\\FilterControllerEvent not found\\.$#"
120120
count: 1
121121
path: src/aliases.php
122122

src/DependencyInjection/Configuration.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,6 @@ private function addDistributedTracingSection(ArrayNodeDefinition $rootNode): vo
153153
->arrayNode('tracing')
154154
->addDefaultsIfNotSet()
155155
->children()
156-
->arrayNode('request')
157-
->canBeEnabled()
158-
->end()
159156
->arrayNode('dbal')
160157
->canBeEnabled()
161158
->fixXmlConfig('connection')

src/DependencyInjection/SentryExtension.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
use Sentry\Options;
1717
use Sentry\SentryBundle\EventListener\ErrorListener;
1818
use Sentry\SentryBundle\EventListener\MessengerListener;
19-
use Sentry\SentryBundle\EventListener\TracingRequestListener;
20-
use Sentry\SentryBundle\EventListener\TracingSubRequestListener;
2119
use Sentry\SentryBundle\SentryBundle;
2220
use Sentry\SentryBundle\Tracing\Doctrine\DBAL\ConnectionConfigurator;
2321
use Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingDriverMiddleware;
@@ -64,7 +62,6 @@ protected function loadInternal(array $mergedConfig, ContainerBuilder $container
6462
$this->registerConfiguration($container, $mergedConfig);
6563
$this->registerErrorListenerConfiguration($container, $mergedConfig);
6664
$this->registerMessengerListenerConfiguration($container, $mergedConfig['messenger']);
67-
$this->registerRequestTracingConfigurtion($container, $mergedConfig['tracing']);
6865
$this->registerDbalTracingConfiguration($container, $mergedConfig['tracing']);
6966
$this->registerTwigTracingConfiguration($container, $mergedConfig['tracing']);
7067
}
@@ -159,19 +156,6 @@ private function registerMessengerListenerConfiguration(ContainerBuilder $contai
159156
$container->getDefinition(MessengerListener::class)->setArgument(1, $config['capture_soft_fails']);
160157
}
161158

162-
/**
163-
* @param array<string, mixed> $config
164-
*/
165-
private function registerRequestTracingConfigurtion(ContainerBuilder $container, array $config): void
166-
{
167-
$isConfigEnabled = $this->isConfigEnabled($container, $config['request']);
168-
169-
if (!$isConfigEnabled) {
170-
$container->removeDefinition(TracingRequestListener::class);
171-
$container->removeDefinition(TracingSubRequestListener::class);
172-
}
173-
}
174-
175159
/**
176160
* @param array<string, mixed> $config
177161
*/

src/Resources/config/schema/sentry-1.0.xsd

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,11 @@
8383

8484
<xsd:complexType name="tracing">
8585
<xsd:choice maxOccurs="unbounded">
86-
<xsd:element name="request" type="tracing-request" minOccurs="0" maxOccurs="1" />
8786
<xsd:element name="dbal" type="tracing-dbal" minOccurs="0" maxOccurs="1" />
8887
<xsd:element name="twig" type="tracing-twig" minOccurs="0" maxOccurs="1" />
8988
</xsd:choice>
9089
</xsd:complexType>
9190

92-
<xsd:complexType name="tracing-request">
93-
<xsd:attribute name="enabled" type="xsd:boolean" />
94-
</xsd:complexType>
95-
9691
<xsd:complexType name="tracing-dbal">
9792
<xsd:sequence maxOccurs="unbounded">
9893
<xsd:element name="connection" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />

tests/DependencyInjection/ConfigurationTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ public function testProcessConfigurationWithDefaultConfiguration(): void
3737
'capture_soft_fails' => true,
3838
],
3939
'tracing' => [
40-
'request' => [
41-
'enabled' => false,
42-
],
4340
'dbal' => [
4441
'enabled' => false,
4542
'connections' => class_exists(DoctrineBundle::class) ? ['%doctrine.default_connection%'] : [],

tests/DependencyInjection/Fixtures/php/full.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@
4343
'capture_soft_fails' => false,
4444
],
4545
'tracing' => [
46-
'request' => [
47-
'enabled' => false,
48-
],
4946
'dbal' => [
5047
'enabled' => false,
5148
'connections' => ['default'],

tests/DependencyInjection/Fixtures/php/request_tracing_enabled.php

Lines changed: 0 additions & 14 deletions
This file was deleted.

tests/DependencyInjection/Fixtures/xml/full.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
</sentry:options>
3939
<sentry:messenger enabled="true" capture-soft-fails="false" />
4040
<sentry:tracing>
41-
<sentry:request enabled="false" />
4241
<sentry:dbal enabled="false">
4342
<sentry:connection>default</sentry:connection>
4443
</sentry:dbal>

tests/DependencyInjection/Fixtures/xml/request_tracing_enabled.xml

Lines changed: 0 additions & 14 deletions
This file was deleted.

tests/DependencyInjection/Fixtures/yml/full.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ sentry:
3838
enabled: true
3939
capture_soft_fails: false
4040
tracing:
41-
request:
42-
enabled: false
4341
dbal:
4442
enabled: false
4543
connections:

0 commit comments

Comments
 (0)