Skip to content

Commit bf94ed5

Browse files
authored
Merge pull request #429 from WideSpectrumComputing/master
release candidate: v3.4.0
2 parents a3859fc + feff274 commit bf94ed5

25 files changed

+1463
-275
lines changed

ReleaseNotes.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,22 @@ We are also unifying versioning for all of the modules to follow common SDK vers
5656

5757
### Fixes and Improvements
5858

59+
#### v3.4.0
60+
- feat: resolve #426: Add an ability to scrub fields by the absolute paths.
61+
- feat: resolve #427: Add an ability to scrub HTTP request/response body.
62+
- feat: resolve #428: Capture relevant notifier config with every payload.
63+
64+
#### v3.3.0
65+
- feat: resolve #404: Add explicit net48 TargetFramework.
66+
- feat: resolve #405: Upgrade bench-marking and unit-testing dependencies.
67+
- feat: resolve #407: Refactor ScrubFields defaults implementation.
68+
- feat: resolve #415: Rollbar.NetCore.AspNet: Add auto-capture of the current HTTP response by the RollbarMiddleware.
69+
- feat: resolve #416: Rollbar.Net.AspNet.WebApi: add auto-capture of the current HTTP request/response to RollbarExceptionFilterAttribute.OnException(...) handler.
70+
- feat: resolve #417: Rollbar.Net.AspNet.Mvc: add auto-capture of the current HTTP response to RollbarExceptionFilter.
71+
- feat: resolve #418: Rollbar.Net.AspNet: add auto-capture of the current HTTP request/response to RollbarHttpModule.
72+
- chore: ref #411: Fix CI build .net core 3.0 dependency issue.
73+
- chore: resolve #412: Fix CI build .net 4.8 target build issue.
74+
5975
#### v3.2.0
6076
- resolve #394: Implement the standardized Development Configuration Options.
6177
- resolve #395: Implement IRollbarConfig's Transmit option.

Rollbar/ConfigAttributesPackageDecorator.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ protected override void Decorate(Data rollbarData)
7171
return; //nothing to decorate...
7272
}
7373

74+
rollbarData.Notifier.Configuration = new RollbarConfig().Reconfigure(this._rollbarConfig);
75+
7476
// telemetry data is based on the configuration,
7577
// so let's include it if applicable:
7678
if (this._capturedTelemetryRecords != null)

Rollbar/DTOs/Client.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/// <summary>
66
/// Models Rollbar Client DTO.
77
/// </summary>
8-
/// <seealso cref="Rollbar.DTOs.ExtendableDtoBase" />
8+
/// <seealso cref="Rollbar.DTOs.HostBase" />
99
/// <remarks>
1010
/// Optional: client
1111
/// Data about the client device this event occurred on.

Rollbar/DTOs/Data.cs

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,8 @@
1313
public class Data
1414
: DtoBase
1515
{
16-
private static readonly string NotifierAssemblyVersion;
17-
1816
private static readonly string DefaultFrameworkValue;
1917

20-
private static string DetectNotifierAssemblyVersion()
21-
{
22-
return RuntimeEnvironmentUtility.GetTypeAssemblyVersion(typeof(Data));
23-
}
24-
2518
private static string DetectTargetFrameworks()
2619
{
2720
var targetFrameworks = RuntimeEnvironmentUtility.GetAssemblyTargetFrameworks(typeof(Data));
@@ -33,7 +26,6 @@ private static string DetectTargetFrameworks()
3326
/// </summary>
3427
static Data()
3528
{
36-
Data.NotifierAssemblyVersion = Data.DetectNotifierAssemblyVersion();
3729
Data.DefaultFrameworkValue = Data.DetectTargetFrameworks();
3830
Data.DefaultPlatform = RuntimeEnvironmentUtility.GetOSDescription();
3931
}
@@ -160,11 +152,7 @@ Request request
160152
this.Platform = Data.DefaultPlatform;
161153
this.Framework = Data.DefaultFrameworkValue;
162154
this.Language = Data.DefaultLanguage;
163-
this.Notifier = new Dictionary<string, string>
164-
{
165-
{ "name", "Rollbar.NET" },
166-
{ "version", Data.NotifierAssemblyVersion },
167-
};
155+
this.Notifier = new Notifier();
168156
this.GuidUuid = Guid.NewGuid();
169157
this.Timestamp = DateTimeUtil.ConvertToUnixTimestampInSeconds(DateTime.UtcNow);
170158
}
@@ -473,7 +461,7 @@ public Guid? GuidUuid
473461
/// Describes the library used to send this event.
474462
/// </remarks>
475463
[JsonProperty("notifier", DefaultValueHandling = DefaultValueHandling.Ignore)]
476-
public IDictionary<string, string> Notifier
464+
public Notifier Notifier
477465
{
478466
get;
479467
private set;
@@ -519,6 +507,10 @@ public override Validator GetValidator()
519507
(data) => data.Server,
520508
this.Server?.GetValidator() as Validator<Server>
521509
)
510+
.AddValidation(
511+
Data.DataValidationRule.NotifierRequired,
512+
(data) => { return (data.Notifier != null); }
513+
)
522514
;
523515

524516
return validator;
@@ -563,6 +555,11 @@ public enum DataValidationRule
563555
/// The valid client if any
564556
/// </summary>
565557
ValidClientIfAny,
558+
559+
/// <summary>
560+
/// The notifier required
561+
/// </summary>
562+
NotifierRequired,
566563
}
567564
}
568565
}

Rollbar/DTOs/Notifier.cs

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
namespace Rollbar.DTOs
2+
{
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Text;
6+
using Rollbar.Common;
7+
8+
/// <summary>
9+
/// Class Notifier.
10+
/// Implements the <see cref="Rollbar.DTOs.ExtendableDtoBase" />
11+
/// </summary>
12+
/// <seealso cref="Rollbar.DTOs.ExtendableDtoBase" />
13+
public class Notifier
14+
: ExtendableDtoBase
15+
{
16+
/// <summary>
17+
/// The DTO reserved properties.
18+
/// </summary>
19+
public static class ReservedProperties
20+
{
21+
/// <summary>
22+
/// The name
23+
/// </summary>
24+
public static readonly string Name = "name";
25+
/// <summary>
26+
/// The version
27+
/// </summary>
28+
public static readonly string Version = "version";
29+
/// <summary>
30+
/// The configuration
31+
/// </summary>
32+
public static readonly string Configuration = "configured_options";
33+
}
34+
35+
/// <summary>
36+
/// The notifier name
37+
/// </summary>
38+
private const string notifierName = "Rollbar.NET";
39+
/// <summary>
40+
/// The notifier assembly version
41+
/// </summary>
42+
private static readonly string NotifierAssemblyVersion;
43+
44+
/// <summary>
45+
/// Detects the notifier assembly version.
46+
/// </summary>
47+
/// <returns>System.String.</returns>
48+
private static string DetectNotifierAssemblyVersion()
49+
{
50+
return RuntimeEnvironmentUtility.GetTypeAssemblyVersion(typeof(Data));
51+
}
52+
53+
54+
/// <summary>
55+
/// Gets the name.
56+
/// </summary>
57+
/// <value>The name.</value>
58+
public string Name
59+
{
60+
get { return this._keyedValues[ReservedProperties.Name] as string; }
61+
private set { this._keyedValues[ReservedProperties.Name] = value; }
62+
}
63+
64+
/// <summary>
65+
/// Gets the version.
66+
/// </summary>
67+
/// <value>The version.</value>
68+
public string Version
69+
{
70+
get { return this._keyedValues[ReservedProperties.Version] as string; }
71+
private set { this._keyedValues[ReservedProperties.Version] = value; }
72+
}
73+
/// <summary>
74+
/// Gets or sets the configuration.
75+
/// </summary>
76+
/// <value>The configuration.</value>
77+
public IRollbarConfig Configuration
78+
{
79+
get { return this._keyedValues[ReservedProperties.Configuration] as IRollbarConfig; }
80+
set { this._keyedValues[ReservedProperties.Configuration] = value; }
81+
}
82+
83+
/// <summary>
84+
/// Initializes static members of the <see cref="Notifier"/> class.
85+
/// </summary>
86+
static Notifier()
87+
{
88+
Notifier.NotifierAssemblyVersion = Notifier.DetectNotifierAssemblyVersion();
89+
}
90+
91+
/// <summary>
92+
/// Initializes a new instance of the <see cref="Notifier"/> class.
93+
/// </summary>
94+
public Notifier()
95+
: this(null)
96+
{
97+
}
98+
99+
/// <summary>
100+
/// Initializes a new instance of the <see cref="Notifier"/> class.
101+
/// </summary>
102+
/// <param name="arbitraryKeyValuePairs">The arbitrary key value pairs.</param>
103+
public Notifier(IDictionary<string, object> arbitraryKeyValuePairs)
104+
: base(arbitraryKeyValuePairs)
105+
{
106+
this.Name = notifierName;
107+
this.Version = Notifier.NotifierAssemblyVersion;
108+
}
109+
}
110+
}

Rollbar/DTOs/_DTOs.cd

Lines changed: 63 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,15 @@
22
<ClassDiagram MajorVersion="1" MinorVersion="1" MembersFormat="FullSignature">
33
<Class Name="Rollbar.DTOs.Body">
44
<Position X="11.5" Y="7" Width="3.75" />
5+
<NestedTypes>
6+
<Enum Name="Rollbar.DTOs.Body.BodyValidationRule" Collapsed="true">
7+
<TypeIdentifier>
8+
<NewMemberFileName>DTOs\Body.cs</NewMemberFileName>
9+
</TypeIdentifier>
10+
</Enum>
11+
</NestedTypes>
512
<TypeIdentifier>
6-
<HashCode>AAAAAAAAAACAAAAAAAAAAAAAAAAgABAAAAIIIAAAAAA=</HashCode>
13+
<HashCode>AAAAACAAAAAAAAAAAAAAQAAAAAAgABAAAAIIIAAAAAA=</HashCode>
714
<FileName>DTOs\Body.cs</FileName>
815
</TypeIdentifier>
916
</Class>
@@ -33,22 +40,36 @@
3340
</Class>
3441
<Class Name="Rollbar.DTOs.CrashReport">
3542
<Position X="17.5" Y="4.25" Width="2.25" />
43+
<NestedTypes>
44+
<Enum Name="Rollbar.DTOs.CrashReport.CrashReportValidationRule" Collapsed="true">
45+
<TypeIdentifier>
46+
<NewMemberFileName>DTOs\CrashReport.cs</NewMemberFileName>
47+
</TypeIdentifier>
48+
</Enum>
49+
</NestedTypes>
3650
<TypeIdentifier>
37-
<HashCode>AAAAAAAAAACACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
51+
<HashCode>AAAAACAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
3852
<FileName>DTOs\CrashReport.cs</FileName>
3953
</TypeIdentifier>
4054
</Class>
4155
<Class Name="Rollbar.DTOs.Data">
4256
<Position X="5.5" Y="6.25" Width="5.75" />
57+
<NestedTypes>
58+
<Enum Name="Rollbar.DTOs.Data.DataValidationRule" Collapsed="true">
59+
<TypeIdentifier>
60+
<NewMemberFileName>DTOs\Data.cs</NewMemberFileName>
61+
</TypeIdentifier>
62+
</Enum>
63+
</NestedTypes>
4364
<TypeIdentifier>
44-
<HashCode>AIAAgAAmCgAAAMAwAAADCAAAAIAAgAABCAAAAkgRAAQ=</HashCode>
65+
<HashCode>AIAAgCAmCgBAAMAwAAADCAAAAIAAgAABCAAAAggRAAQ=</HashCode>
4566
<FileName>DTOs\Data.cs</FileName>
4667
</TypeIdentifier>
4768
</Class>
4869
<Class Name="Rollbar.DTOs.DtoBase">
4970
<Position X="0.5" Y="0.5" Width="4.5" />
5071
<TypeIdentifier>
51-
<HashCode>IAAiAAAAAMCAAAAAAASAAAAAAAAwAAAwAAAABAAACAE=</HashCode>
72+
<HashCode>IAAiACAAAMCAAAAAAASAAAAAAAAwAAAwAAAABAAACAE=</HashCode>
5273
<FileName>DTOs\DtoBase.cs</FileName>
5374
</TypeIdentifier>
5475
<Lollipop Position="0.2" />
@@ -71,7 +92,7 @@
7192
<Class Name="Rollbar.DTOs.Frame">
7293
<Position X="15.5" Y="7" Width="4.25" />
7394
<TypeIdentifier>
74-
<HashCode>AAAIAAAAAoCAAAAAAAAgAAAAQAAAAAAIAAQAAABEAAg=</HashCode>
95+
<HashCode>AAAIAAAAAoCAAAAAAAAgAAAAQAAAAAAIAQQAAABEAAg=</HashCode>
7596
<FileName>DTOs\Frame.cs</FileName>
7697
</TypeIdentifier>
7798
</Class>
@@ -86,23 +107,42 @@
86107
<NewMemberFileName>DTOs\Message.cs</NewMemberFileName>
87108
</TypeIdentifier>
88109
</Class>
110+
<Enum Name="Rollbar.DTOs.Message.MessageValidationRule" Collapsed="true">
111+
<TypeIdentifier>
112+
<NewMemberFileName>DTOs\Message.cs</NewMemberFileName>
113+
</TypeIdentifier>
114+
</Enum>
89115
</NestedTypes>
90116
<TypeIdentifier>
91-
<HashCode>AAAAAAAAAACAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
117+
<HashCode>AAAAACAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
92118
<FileName>DTOs\Message.cs</FileName>
93119
</TypeIdentifier>
94120
</Class>
95121
<Class Name="Rollbar.DTOs.Payload">
96122
<Position X="12" Y="0.5" Width="6.25" />
123+
<NestedTypes>
124+
<Enum Name="Rollbar.DTOs.Payload.PayloadValidationRule" Collapsed="true">
125+
<TypeIdentifier>
126+
<NewMemberFileName>DTOs\Payload.cs</NewMemberFileName>
127+
</TypeIdentifier>
128+
</Enum>
129+
</NestedTypes>
97130
<TypeIdentifier>
98-
<HashCode>AAQAAAAAAACAAAAAAAAAAAAAkAIAABAAAABAAAAAAAA=</HashCode>
131+
<HashCode>AAAAACAAAAAAAIAAAAAAAAAAkAAAABAAAAAAAAAAAAA=</HashCode>
99132
<FileName>DTOs\Payload.cs</FileName>
100133
</TypeIdentifier>
101134
</Class>
102135
<Class Name="Rollbar.DTOs.Person">
103136
<Position X="14.75" Y="4.25" Width="2.5" />
137+
<NestedTypes>
138+
<Enum Name="Rollbar.DTOs.Person.PersonValidationRule" Collapsed="true">
139+
<TypeIdentifier>
140+
<NewMemberFileName>DTOs\Person.cs</NewMemberFileName>
141+
</TypeIdentifier>
142+
</Enum>
143+
</NestedTypes>
104144
<TypeIdentifier>
105-
<HashCode>AAACAAAAACAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode>
145+
<HashCode>AAAKACAAAKAAAAAAAABAAAAAAAAAAAAAAQYAAAAAAAE=</HashCode>
106146
<FileName>DTOs\Person.cs</FileName>
107147
</TypeIdentifier>
108148
</Class>
@@ -119,7 +159,7 @@
119159
</Class>
120160
</NestedTypes>
121161
<TypeIdentifier>
122-
<HashCode>AAAAAAIAAAAAAAACAAAgAAgBCAABgAAECAAAAEAAAAA=</HashCode>
162+
<HashCode>AAAAAAIAAAAAAAACAAAgAAgBCAAAgAAECAAAAAAAAAA=</HashCode>
123163
<FileName>DTOs\Request.cs</FileName>
124164
</TypeIdentifier>
125165
</Class>
@@ -164,5 +204,19 @@
164204
<FileName>DTOs\HostBase.cs</FileName>
165205
</TypeIdentifier>
166206
</Class>
207+
<Class Name="Rollbar.DTOs.Notifier">
208+
<Position X="3.5" Y="21.25" Width="4.75" />
209+
<NestedTypes>
210+
<Class Name="Rollbar.DTOs.Notifier.ReservedProperties" Collapsed="true">
211+
<TypeIdentifier>
212+
<NewMemberFileName>DTOs\Notifier.cs</NewMemberFileName>
213+
</TypeIdentifier>
214+
</Class>
215+
</NestedTypes>
216+
<TypeIdentifier>
217+
<HashCode>IAAAAAAAAAAAAAAAAAACAAQAAAAAAAAAoAAAAEAAAAA=</HashCode>
218+
<FileName>DTOs\Notifier.cs</FileName>
219+
</TypeIdentifier>
220+
</Class>
167221
<Font Name="Segoe UI" Size="9" />
168222
</ClassDiagram>

0 commit comments

Comments
 (0)