Code Monkey home page Code Monkey logo

Comments (7)

BenoitZugmeyer avatar BenoitZugmeyer commented on September 24, 2024 6

We'll have to talk a bit about it internally. The issue is, if we want to filter events, we can't do this at the same place as beforeSend, because (for example) when an Error event is generated, it increments the View event view.error.count field. If we want to filter-out the Error event, we should make sure the count does not get incremented.

from browser-sdk.

BenoitZugmeyer avatar BenoitZugmeyer commented on September 24, 2024 3

This has been implemented in v2.5.5

from browser-sdk.

BenoitZugmeyer avatar BenoitZugmeyer commented on September 24, 2024 2

We are working on it. We implemented a beforeSend callback to edit sensitive data, but doesn't support canceling the data sent yet.

from browser-sdk.

bcaudan avatar bcaudan commented on September 24, 2024

Hi @gabceb!

That is an interesting feature indeed, we will work on it soon.

from browser-sdk.

dels07 avatar dels07 commented on September 24, 2024

any info on this, I got so many XHR request error from algolia instantsearch when user decide to correct their search

from browser-sdk.

FelixGraf avatar FelixGraf commented on September 24, 2024

@BenoitZugmeyer Is this something one could implement and make a pull request? I would really love to see this feature and could try implementing it (if that's fine for you - at least I'd assume based on the CONTRIBUTION guideline).

I think it could be implemented fairly easy by giving the option to return a boolean in the existing beforeSend callback. Depending on the returned value, RUM could either send the event to Datdog or cancel the sending.

datadogRum.init({
    ...,
    beforeSend: (event) => {
        // Example: don't send failed requests google analytics
        return !event.error.resource.url.startsWith('https://www.google-analytics.com');
    },
    ...
});

If the beforeSend function shouldn't be used for this, adding a new callback filterEvent(event: Event): boolean would also work.

from browser-sdk.

gabceb avatar gabceb commented on September 24, 2024

Amazing. Thank you @BenoitZugmeyer

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.