Coder Social home page Coder Social logo

log initialization about dd-trace-js HOT 7 CLOSED

datadog avatar datadog commented on June 1, 2024
log initialization

from dd-trace-js.

Comments (7)

andrewsouthard1 avatar andrewsouthard1 commented on June 1, 2024 1

@gajus We've since added default startup logs in addition to debug logging: https://docs.datadoghq.com/tracing/troubleshooting/tracer_startup_logs/?tab=nodejs#startup-logs please reach out if you have any other questions!

from dd-trace-js.

gajus avatar gajus commented on June 1, 2024

Never mind, it looks like you have a {debug: true} configuration.

https://docs.datadoghq.com/tracing/setup/nodejs/#debug-mode

It would be handy to have all of this in README.md.

Generally, configuration such as debug/ logging should be controlled using environment variables rather than application variables. This way, a system admin can enable/ disable these settings without the need to redeploy the app.

from dd-trace-js.

gajus avatar gajus commented on June 1, 2024

Either way, looks like enabling debug does not log anything of value with regards to plugin loading issues.

from dd-trace-js.

rochdev avatar rochdev commented on June 1, 2024

You can also set your own logger by using the logger option

Please let me know if you think anything is missing from the debug logs! We went with a minimal approach to start and only logged the components that are the most difficult to debug.

Currently which plugin is loaded is not included, but I agree it would be very helpful.

Are you importing express and pg before initializing the tracer? This is usually the only reason a plugin would not be loaded. Also note that hoisting can happen when transpiling with Babel.

from dd-trace-js.

rochdev avatar rochdev commented on June 1, 2024

Actually the version could also be a cause, and this should be logged as well if there is a version mismatch.

from dd-trace-js.

gajus avatar gajus commented on June 1, 2024

Either way, looks like enabling debug does not log anything of value with regards to plugin loading issues.

There is DD_TRACE_DEBUG setting.

https://github.com/DataDog/dd-trace-js/blob/master/src/config.js#L11-L20

from dd-trace-js.

gajus avatar gajus commented on June 1, 2024

Actually the version could also be a cause, and this should be logged as well if there is a version mismatch.

That is the case indeed. Yes, this should be logged.

from dd-trace-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.