Skip to content

Commit

Permalink
fix(tracing): Update paths for DB drivers auto-instrumentation (#4083)
Browse files Browse the repository at this point in the history
* fix(tracing): Update paths for DB drivers auto-instrumentation
  • Loading branch information
kamilogorek authored Oct 25, 2021
1 parent bcf30ca commit 6608d39
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions packages/tracing/src/hubextensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,19 +232,25 @@ function _autoloadDatabaseIntegrations(): void {

const packageToIntegrationMapping: Record<string, () => Integration> = {
mongodb() {
const integration = dynamicRequire(module, './integrations/mongo') as { Mongo: IntegrationClass<Integration> };
const integration = dynamicRequire(module, './integrations/node/mongo') as {
Mongo: IntegrationClass<Integration>;
};
return new integration.Mongo();
},
mongoose() {
const integration = dynamicRequire(module, './integrations/mongo') as { Mongo: IntegrationClass<Integration> };
const integration = dynamicRequire(module, './integrations/node/mongo') as {
Mongo: IntegrationClass<Integration>;
};
return new integration.Mongo({ mongoose: true });
},
mysql() {
const integration = dynamicRequire(module, './integrations/mysql') as { Mysql: IntegrationClass<Integration> };
const integration = dynamicRequire(module, './integrations/node/mysql') as {
Mysql: IntegrationClass<Integration>;
};
return new integration.Mysql();
},
pg() {
const integration = dynamicRequire(module, './integrations/postgres') as {
const integration = dynamicRequire(module, './integrations/node/postgres') as {
Postgres: IntegrationClass<Integration>;
};
return new integration.Postgres();
Expand Down

0 comments on commit 6608d39

Please sign in to comment.