From 49a792d9a18ca3e034dcdb9e231b5196314f1853 Mon Sep 17 00:00:00 2001 From: David Cramer Date: Wed, 16 Sep 2015 23:43:45 -0700 Subject: [PATCH] Support release attribute (fixes GH-76) --- src/app/SharpRaven/Data/JsonPacket.cs | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/app/SharpRaven/Data/JsonPacket.cs b/src/app/SharpRaven/Data/JsonPacket.cs index 656ee445..5561414e 100644 --- a/src/app/SharpRaven/Data/JsonPacket.cs +++ b/src/app/SharpRaven/Data/JsonPacket.cs @@ -2,21 +2,21 @@ // Copyright (c) 2014 The Sentry Team and individual contributors. // All rights reserved. -// +// // Redistribution and use in source and binary forms, with or without modification, are permitted // provided that the following conditions are met: -// +// // 1. Redistributions of source code must retain the above copyright notice, this list of // conditions and the following disclaimer. -// +// // 2. Redistributions in binary form must reproduce the above copyright notice, this list of // conditions and the following disclaimer in the documentation and/or other materials // provided with the distribution. -// +// // 3. Neither the name of the Sentry nor the names of its contributors may be used to // endorse or promote products derived from this software without specific prior written // permission. -// +// // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND // FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR @@ -141,6 +141,8 @@ private JsonPacket() // Platform Platform = "csharp"; + Release = ""; + // Get data from the HTTP request Request = SentryRequest.GetRequest(); @@ -190,7 +192,7 @@ private JsonPacket() /// /// The name of the logger which created the record. /// If missing, defaults to the string root. - /// + /// /// Ex: "my.logger.name" /// [JsonProperty(PropertyName = "logger", NullValueHandling = NullValueHandling.Ignore)] @@ -219,7 +221,7 @@ private JsonPacket() public IDictionary Modules { get; set; } /// - /// A string representing the platform the client is submitting from. + /// A string representing the platform the client is submitting from. /// This will be used by the Sentry interface to customize various components in the interface. /// [JsonProperty(PropertyName = "platform", NullValueHandling = NullValueHandling.Ignore)] @@ -246,6 +248,12 @@ private JsonPacket() [JsonProperty(PropertyName = "server_name", NullValueHandling = NullValueHandling.Ignore)] public string ServerName { get; set; } + /// + /// Identifies the version of the application. + /// + [JsonProperty(PropertyName = "release", NullValueHandling = NullValueHandling.Ignore)] + public string Release { get; set; } + /// /// A map or list of tags for this event. /// @@ -293,4 +301,4 @@ public override string ToString() return JsonConvert.SerializeObject(this); } } -} \ No newline at end of file +}