-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DD trace with Objection js support #657
Comments
This should work regardless of the ORM used since we patch the driver directly. Do you not see Postgres spans specifically, or are you not seeing traces at all? If you see traces appear but not the Postgres spans, then do you see a service called Also, do you call |
hi @rochdev
yes we init our tracer as follows
and export it in the first line of our server.ts file like below
|
Ok, it sounds like the scope is lost in the ORM which causes the trace to be disconnected. I'll have to look into it. If you can set up a small reproduction snippet that makes a simple call to the database and results in a disconnected trace, it would definitely help me expedite the fix since I don't know this ORM. |
sure, i will post it here once i have it ready. Thanks for the help! |
a small modification of their example. tested on my local.
|
Sorry I think I misunderstood the original issue, since in this example you are using Knex directly. In order to use Knex with async/await we need to work around an issue in Node described in #654. Can you try using tracer.init({
experimental: {
thenables: true
}
}) |
sure, i will give a try and let you know how it goes. |
@rochdev I think dd-trace 0.15.0-beta worked for me. we can close this issue. btw by any chance do you know when will 0.15.0 be released? |
I don't have an exact timeline, but it should be in the next few days. |
cool, thanks for your help! |
We have applications that uses objection.js
https://vincit.github.io/objection.js/
https://github.com/Vincit/objection.js/
When i use
it doesn't display any span about pg_query or knex in datadog APM.
Is there any workaround for it?
if not could we add a objection js plugin in dd-trace-js?
or do we have anything that can monkey patch the 3rd party libraries like
https://github.com/DataDog/dd-trace-py/blob/master/ddtrace/monkey.py
also i can try to create a pr if i can get any help on where to start.
Thanks
The text was updated successfully, but these errors were encountered: