Code Monkey home page Code Monkey logo

Comments (8)

bcaudan avatar bcaudan commented on September 24, 2024 2

Hello @fromi,

Thanks for the feedback!
It is something that we plan to do in the coming weeks.

We will ping here when it will be available.

from browser-sdk.

barshopen avatar barshopen commented on September 24, 2024

Hi guys, any update?
Also are you planning to also add console.log to this collection process?

from browser-sdk.

bcaudan avatar bcaudan commented on September 24, 2024

Hi @barshopen, it is not in our current priorities but it is still something that we want to do at some point.
Yes, console.log should also be addressed with other console APIs.

from browser-sdk.

schauhandiv avatar schauhandiv commented on September 24, 2024

According to https://www.datadoghq.com/blog/monitor-javascript-console-logs/ & https://docs.datadoghq.com/logs/log_collection/javascript/ console.log should go to Datadog. In my react app, I am using the @datadog/browser-logs npm pkg, but I can't see any logs in Datadog. I also tried the datadogLogs.logger.info(), that doesn't send any logs to Datadog either. I haven't been able to send send logs from my React app to Datadog. The user interactions and console errors do go, but no logs. Is that feature working as per the two articles above?

from browser-sdk.

gwdp avatar gwdp commented on September 24, 2024

Logrocket does automatic console forward to their service. Evaluating migrating to DG and this feature a deal-breaker for us. (200k+ sessions monthly).

Not a surprise Logrocket is the leader in this segment right now. while DG is slowly trying to catch up. 2 years on the most basic RUM feature you could ask for and still not a priority.

from browser-sdk.

BenoitZugmeyer avatar BenoitZugmeyer commented on September 24, 2024

@gwdp Thanks for your feedback. We are actively working on it and fine tune the last details before releasing it. Stay tuned!

from browser-sdk.

gwdp avatar gwdp commented on September 24, 2024

Hi @BenoitZugmeyer, really appreciate your quick reply.
I seem forwardConsoleLogs popping up :) Hopefully, we will be able to use it soon.

In the meanwhile, if anyone needs it, I was able to make it work with very few lines of code. Still, not the ideal solution, but gets the job done.

  datadogLogs.init({ ...config.DatadogOptions }); //->> @datadog/browser-logs
  (() => {
    const { log, error, debug, warn } = console;
    global.console.info = (...args) => { datadogLogs.logger.info(...args); log(...args); };
    global.console.log = (...args) => { datadogLogs.logger.info(...args); log(...args); };
    global.console.error = (...args) => { datadogLogs.logger.error(...args); error(...args); };
    global.console.debug = (...args) => { datadogLogs.logger.debug(...args); debug(...args); };
    global.console.warn = (...args) => { datadogLogs.logger.warn(...args); warn(...args); };
  })();  

from browser-sdk.

BenoitZugmeyer avatar BenoitZugmeyer commented on September 24, 2024

This feature has been released in the Logs Browser SDK v4.8.0! See forwardConsoleLogs initialization parameter in the documentation

from browser-sdk.

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.