Skip to content

Commit

Permalink
fix: Update span ops
Browse files Browse the repository at this point in the history
  • Loading branch information
cleptric committed Oct 6, 2022
1 parent d78e1c0 commit 2a8a47a
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
2 changes: 2 additions & 0 deletions phpstan.neon
Expand Up @@ -10,6 +10,8 @@ parameters:
- src/aliases.php
excludePaths:
- src/aliases.php
- src/Tracing/Cache/TraceableCacheAdapterForV2.php
- src/Tracing/Cache/TraceableTagAwareCacheAdapterForV2.php
- src/Tracing/Doctrine/DBAL/TracingStatementForV2.php
- src/Tracing/Doctrine/DBAL/TracingDriverForV2.php
- tests/End2End/App
Expand Down
2 changes: 1 addition & 1 deletion src/Tracing/Doctrine/DBAL/AbstractTracingStatement.php
Expand Up @@ -14,7 +14,7 @@ abstract class AbstractTracingStatement
/**
* @internal
*/
public const SPAN_OP_STMT_EXECUTE = 'sql.stmt.execute';
public const SPAN_OP_STMT_EXECUTE = 'db.sql.execute';

/**
* @var HubInterface The current hub
Expand Down
12 changes: 6 additions & 6 deletions src/Tracing/Doctrine/DBAL/TracingDriverConnection.php
Expand Up @@ -23,32 +23,32 @@ final class TracingDriverConnection implements TracingDriverConnectionInterface
/**
* @internal
*/
public const SPAN_OP_CONN_PREPARE = 'sql.conn.prepare';
public const SPAN_OP_CONN_PREPARE = 'db.sql.prepare';

/**
* @internal
*/
public const SPAN_OP_CONN_QUERY = 'sql.conn.query';
public const SPAN_OP_CONN_QUERY = 'db.sql.query';

/**
* @internal
*/
public const SPAN_OP_CONN_EXEC = 'sql.conn.exec';
public const SPAN_OP_CONN_EXEC = 'db.sql.exec';

/**
* @internal
*/
public const SPAN_OP_CONN_BEGIN_TRANSACTION = 'sql.conn.begin_transaction';
public const SPAN_OP_CONN_BEGIN_TRANSACTION = 'db.sql.transaction.begin';

/**
* @internal
*/
public const SPAN_OP_TRANSACTION_COMMIT = 'sql.transaction.commit';
public const SPAN_OP_TRANSACTION_COMMIT = 'db.sql.transaction.commit';

/**
* @internal
*/
public const SPAN_OP_TRANSACTION_ROLLBACK = 'sql.transaction.rollback';
public const SPAN_OP_TRANSACTION_ROLLBACK = 'db.sql.transaction.rollback';

/**
* @var HubInterface The current hub
Expand Down
4 changes: 4 additions & 0 deletions tests/End2End/App/Kernel.php
Expand Up @@ -44,6 +44,10 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
$loader->load(__DIR__ . '/deprecations_for_5.yml');
}

if (self::VERSION_ID >= 60000) {
$loader->load(__DIR__ . '/deprecations_for_6.yml');
}

if (interface_exists(MessageBusInterface::class) && self::VERSION_ID >= 40300) {
$loader->load(__DIR__ . '/messenger.yml');
}
Expand Down
1 change: 1 addition & 0 deletions tests/End2End/App/config.yml
@@ -1,4 +1,5 @@
sentry:
dsn: http://public@example.com/sentry/1
tracing:
enabled: true
options:
Expand Down
2 changes: 2 additions & 0 deletions tests/End2End/App/deprecations_for_6.yml
@@ -0,0 +1,2 @@
framework:
http_method_override: false

0 comments on commit 2a8a47a

Please sign in to comment.