Giter VIP home page Giter VIP logo

Comments (8)

asbjornu avatar asbjornu commented on August 31, 2024

@ryankanno Thanks for reporting this. I've released a 2.1 prerelease on NuGet that I would very much appreciate if you could test and report back whether fixes the problem or not.

from raven-csharp.

lwhuybrechts avatar lwhuybrechts commented on August 31, 2024

@ryankanno We've also experienced this problem. The way we fixed it is to inject a custom SentryUserFactory in the RavenClient, in which we override the OnCreate function. Here we set the properties of the user.

from raven-csharp.

ryankanno avatar ryankanno commented on August 31, 2024

@lwhuybrechts I did look at https://github.com/getsentry/raven-csharp/blob/develop/src/app/SharpRaven/RavenClient.cs#L288 to do that, but in my case, I wanted to dynamically set properties based on constructs that weren't in a global scope. I could have it injected it somewhere where it would be accessible (like in the HttpContext), but it felt a bit like I was fighting the lib. :)

from raven-csharp.

asbjornu avatar asbjornu commented on August 31, 2024

@ryankanno If you have ideas on how it could be done more elegantly, please write them here or submit a pull request. I don't have time to look into this myself in a while, I'm afraid.

from raven-csharp.

ryankanno avatar ryankanno commented on August 31, 2024

@asbjornu I could take a stab at it. Is there any historical context as to why it wasn't exposed on the SentryEvent interface? (Only so that I don't go down routes that weren't expected). At first glance, it seems like the resulting JsonPacket could just absorb the User from the SentryEvent interface (if it were exposed).

from raven-csharp.

asbjornu avatar asbjornu commented on August 31, 2024

@ryankanno There's no particular reason I can think of, so please add it the way you think is best and do a PR in which we can discuss the details. 👍

from raven-csharp.

asbjornu avatar asbjornu commented on August 31, 2024

Closing this in await for a pull request.

from raven-csharp.

rollsch avatar rollsch commented on August 31, 2024

Did anyone attempt a pull request? I might do so if no one has as I've made the changes locally to inject user as part of the Capture method.

from raven-csharp.

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.