-
-
Notifications
You must be signed in to change notification settings - Fork 120
Optional Dictionary to add custom tags when creating a SentryEvent #149
Conversation
The |
Right now you can add tags using sentryEvent.Tags.Add( one by one. |
When we add a parameter in constructor it is more hard do maintenance and new parameters in sentryEvent easily could maintain the same pattern (constructor hell.) Maybe is more interesting create a method like |
I'm not a fan of having several methods pertaining a property on the class itself; I think it's neater to group the methods within the property instead. That would require an extension method or a new interface for the |
Good idea. Using Extension is the better solution. On Mon, Sep 5, 2016 at 9:40 AM, Asbjørn Ulsberg notifications@github.com
Regards, *Samuel Pereira * |
Hey Asbjørn! Can you be a bit more specific, what do you mean by "extension method for Thanks -sige On Mon, Sep 5, 2016 at 4:04 PM Samuel P. notifications@github.com wrote:
|
@sigebacsi Since public static void Add(this IDictionary<string, string> instance, IDictionary<string, string> dictionary)
{
foreach (var kvp in dictionary)
{
instance.Add(kvp);
}
} This method can reside in the SharpRaven library, but seeing how simple it is, I'd say you can just add it to your own code. No need to wait for a new release of SharpRaven to simplify your own code. 😄 |
Okay. |
Any specific reason for the setter of
|
@genne Good question. It's helpful for SharpRaven itself to know that it can't be |
To make it easier to include tags directly when constructing a new `SentryEvent`. Related to PR getsentry#149.
@sigebacsi Now that #157 is merged, does it give you what you need? If so, can this PR be closed? |
…assign from SentryEvent.Tags
…assign from SentryEvent.Tags
* develop: (90 commits) Fixing typo. Added initial doc about breadcrumbs. Demangle Anonymous Function Names Improve exception frame tests Demangle Function Name from Async Calls Solution reordering Updating configurations Fixing Build Configurations Targetframework dependency fix Refactoring # directives position Complementing the PR #149. Some tests case to ensure public assign from SentryEvent.Tags Web Test configurations Multiple code refactoring Fixing reference Newtonsoft targetFramework in .net 4.5 build Removing unnecessary variables. Removing inconsistent build configurations Changing NSubstitute targetFramework dependency on .net 4.5 Adding missing using Using .net 3.5 way whenever it is possible Solution configurations Removing unnecessary usings ...
* develop: (90 commits) Fixing typo. Added initial doc about breadcrumbs. Demangle Anonymous Function Names Improve exception frame tests Demangle Function Name from Async Calls Solution reordering Updating configurations Fixing Build Configurations Targetframework dependency fix Refactoring # directives position Complementing the PR #149. Some tests case to ensure public assign from SentryEvent.Tags Web Test configurations Multiple code refactoring Fixing reference Newtonsoft targetFramework in .net 4.5 build Removing unnecessary variables. Removing inconsistent build configurations Changing NSubstitute targetFramework dependency on .net 4.5 Adding missing using Using .net 3.5 way whenever it is possible Solution configurations Removing unnecessary usings ...
This change is