Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Sequelize instrumentation is not working. #246

Open
bharatbcssarl opened this issue Nov 11, 2022 · 2 comments
Open

Sequelize instrumentation is not working. #246

bharatbcssarl opened this issue Nov 11, 2022 · 2 comments

Comments

@bharatbcssarl
Copy link

I have added in tracing.js which is called before app.js
registerInstrumentations({ tracerProvider: provider, instrumentations: [ getNodeAutoInstrumentations({}), new MySQL2Instrumentation(), new SequelizeInstrumentation({ // see under for available configuration }) ], });

http tracing is working with auto Instrumentation but not SequelizeInstrumentation.
I tried to debug and found this.patchConnectionManager.bind(this) & this.unpatchConnectionManager.bind(this) are not called on any Sequelize sql operation.

@bharatbcssarl
Copy link
Author

issue was with esm module.
so below line solves issue
"start": "node -r esm --experimental-loader=import-in-the-middle/hook.mjs --require './src/tracing.js' -r esm ./src/app.js",

@blumamir
Copy link
Contributor

Thanks for the update :)
Looks like it is working for you now, right?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants