Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Unable to set tags in 2.0 #111

Closed
Meilu opened this issue Mar 16, 2016 · 5 comments
Closed

Unable to set tags in 2.0 #111

Meilu opened this issue Mar 16, 2016 · 5 comments

Comments

@Meilu
Copy link
Contributor

Meilu commented Mar 16, 2016

Just downloaded the new 2.0 version and it looks like i am no longer able to set the tags in the new Capture method. The old CaptureEvent does support a dictionary with tags as parameter but seems to be tagged as obsolete. How are we supposed to set tags in the new version?

@rustyswayne
Copy link
Contributor

I encountered the same issue when trying to set the ErrorLevel when passing a SentryEvent to the Capture method. What is happening is the JsonPacketFactory instantiates the default type but does not assign all of the properties from the SentryEvent.

I just fixed it in my implementation and will submit a pull for to be reviewed.

asbjornu added a commit that referenced this issue Mar 17, 2016
Issue #111 - Addresses issue with JsonPacket not being fully built by JsonPacketFactory when passing SentryEvent
@asbjornu
Copy link
Contributor

@Meilu 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.

@Meilu
Copy link
Contributor Author

Meilu commented Mar 18, 2016

Hello guys, thank you for looking into this. I have tried the new version except i am still having the same issue. I checked out the source and i think the problem here is that the tags property on the sentryevent object is private without a set method. How can i pass a sentryevent with tags when it is set to private and without a set method?

@Meilu
Copy link
Contributor Author

Meilu commented Mar 21, 2016

Scratch my last comment, i didn't realise i could just call the add method on the dictionary. Looks like the issue is solved, thanks.

@Meilu Meilu closed this as completed Mar 21, 2016
@asbjornu
Copy link
Contributor

@Meilu Awesome, thanks for reporting back! 😃

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants