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
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import * as Sentry from '@sentry/node';

async function run() {
// Yield a microtick so the DC subscriber (deferred via Promise.resolve().then)
// is registered before ioredis creates its native TracingChannels on import.
await Promise.resolve();

const { default: Redis } = await import('ioredis-5');
const redisClient = new Redis({ host: '127.0.0.1', port: 6382, lazyConnect: true });

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ const CONNECT_CONFIG = {
};

async function run() {
// Yield a microtick so the DC subscriber (deferred via Promise.resolve().then)
// is registered before mysql2 publishes on its native TracingChannels.
await Promise.resolve();

// Gate on the DB actually accepting a connection before opening the span (see `waitForConnection`).
// MySQL keeps finalizing for a short window after the healthcheck passes and drops early handshakes,
// so this retries a real connect. It runs outside an active span, so the connect stays uninstrumented.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import * as Sentry from '@sentry/node';

async function run() {
// Yield a microtick so the DC subscriber (deferred via Promise.resolve().then)
// is registered before node-redis eagerly creates its native TracingChannels on require().
await Promise.resolve();

const { createClient } = await import('redis-5-tracing');
const redisClient = await createClient({ socket: { host: '127.0.0.1', port: 6381 } }).connect();

Expand Down
Loading