Skip to content

Commit 10a70dc

Browse files
committed
Merge branch 'release/5.0.0'
2 parents 8bfd555 + ad2eb76 commit 10a70dc

19 files changed

+284
-2651
lines changed

.gitignore

Lines changed: 67 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Created with the help of https://www.gitignore.io/api/visualstudio
2+
# Edit at https://www.gitignore.io/?templates=visualstudio
23

34
### VisualStudio ###
45
## Ignore Visual Studio temporary files, build results, and
@@ -7,6 +8,7 @@
78
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
89

910
# User-specific files
11+
*.rsuser
1012
*.suo
1113
*.user
1214
*.userosscache
@@ -22,16 +24,21 @@
2224
[Rr]eleases/
2325
x64/
2426
x86/
27+
[Aa][Rr][Mm]/
28+
[Aa][Rr][Mm]64/
2529
bld/
2630
[Bb]in/
2731
[Oo]bj/
2832
[Ll]og/
2933

30-
# Visual Studio 2015 cache/options directory
34+
# Visual Studio 2015/2017 cache/options directory
3135
.vs/
3236
# Uncomment if you have tasks that create the project's static files in wwwroot
3337
#wwwroot/
3438

39+
# Visual Studio 2017 auto generated files
40+
Generated\ Files/
41+
3542
# MSTest test Results
3643
[Tt]est[Rr]esult*/
3744
[Bb]uild[Ll]og.*
@@ -45,20 +52,28 @@ TestResult.xml
4552
[Rr]eleasePS/
4653
dlldata.c
4754

55+
# Benchmark Results
56+
BenchmarkDotNet.Artifacts/
57+
4858
# .NET Core
4959
project.lock.json
5060
project.fragment.lock.json
5161
artifacts/
52-
**/Properties/launchSettings.json
5362

63+
# StyleCop
64+
StyleCopReport.xml
65+
66+
# Files built by Visual Studio
5467
*_i.c
5568
*_p.c
56-
*_i.h
69+
*_h.h
5770
*.ilk
5871
*.meta
5972
*.obj
73+
*.iobj
6074
*.pch
6175
*.pdb
76+
*.ipdb
6277
*.pgc
6378
*.pgd
6479
*.rsp
@@ -68,6 +83,7 @@ artifacts/
6883
*.tlh
6984
*.tmp
7085
*.tmp_proj
86+
*_wpftmp.csproj
7187
*.log
7288
*.vspscc
7389
*.vssscc
@@ -96,6 +112,9 @@ ipch/
96112
*.vspx
97113
*.sap
98114

115+
# Visual Studio Trace Files
116+
*.e2e
117+
99118
# TFS 2012 Local Workspace
100119
$tf/
101120

@@ -116,6 +135,10 @@ _TeamCity*
116135
# DotCover is a Code Coverage Tool
117136
*.dotCover
118137

138+
# AxoCover is a Code Coverage Tool
139+
.axoCover/*
140+
!.axoCover/settings.json
141+
119142
# Visual Studio code coverage results
120143
*.coverage
121144
*.coveragexml
@@ -151,11 +174,9 @@ publish/
151174
# Publish Web Output
152175
*.[Pp]ublish.xml
153176
*.azurePubxml
154-
# TODO: Uncomment the next line to ignore your web deploy settings.
155-
# By default, sensitive information, such as encrypted password
156-
# should be stored in the .pubxml.user file.
157-
#*.pubxml
158-
*.pubxml.user
177+
# Note: Comment the next line if you want to checkin your web deploy settings,
178+
# but database connection strings (with potential passwords) will be unencrypted
179+
*.pubxml
159180
*.publishproj
160181

161182
# Microsoft Azure Web App publish settings. Comment the next line if you want to
@@ -166,11 +187,11 @@ PublishScripts/
166187
# NuGet Packages
167188
*.nupkg
168189
# The packages folder can be ignored because of Package Restore
169-
**/packages/*
190+
**/[Pp]ackages/*
170191
# except build/, which is used as an MSBuild target.
171-
!**/packages/build/
192+
!**/[Pp]ackages/build/
172193
# Uncomment if necessary however generally it will be regenerated when needed
173-
#!**/packages/repositories.config
194+
#!**/[Pp]ackages/repositories.config
174195
# NuGet v3's project.json files produces more ignorable files
175196
*.nuget.props
176197
*.nuget.targets
@@ -188,12 +209,13 @@ AppPackages/
188209
BundleArtifacts/
189210
Package.StoreAssociation.xml
190211
_pkginfo.txt
212+
*.appx
191213

192214
# Visual Studio cache files
193215
# files ending in .cache can be ignored
194216
*.[Cc]ache
195217
# but keep track of directories ending in .cache
196-
!*.[Cc]ache/
218+
!?*.[Cc]ache/
197219

198220
# Others
199221
ClientBin/
@@ -206,9 +228,15 @@ ClientBin/
206228
*.publishsettings
207229
orleans.codegen.cs
208230

231+
# Including strong name files can present a security risk
232+
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
233+
#*.snk
234+
209235
# Since there are multiple workflows, uncomment next line to ignore bower_components
210236
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
211237
#bower_components/
238+
# ASP.NET Core default setup: bower directory is configured as wwwroot/lib/ and bower restore is true
239+
**/wwwroot/lib/
212240

213241
# RIA/Silverlight projects
214242
Generated_Code/
@@ -220,6 +248,8 @@ _UpgradeReport_Files/
220248
Backup*/
221249
UpgradeLog*.XML
222250
UpgradeLog*.htm
251+
ServiceFabricBackup/
252+
*.rptproj.bak
223253

224254
# SQL Server files
225255
*.mdf
@@ -230,6 +260,7 @@ UpgradeLog*.htm
230260
*.rdl.data
231261
*.bim.layout
232262
*.bim_*.settings
263+
*.rptproj.rsuser
233264

234265
# Microsoft Fakes
235266
FakesAssemblies/
@@ -241,9 +272,6 @@ FakesAssemblies/
241272
.ntvs_analysis.dat
242273
node_modules/
243274

244-
# Typescript v1 declaration files
245-
typings/
246-
247275
# Visual Studio 6 build log
248276
*.plg
249277

@@ -272,8 +300,8 @@ paket-files/
272300
.idea/
273301
*.sln.iml
274302

275-
# CodeRush
276-
.cr/
303+
# CodeRush personal settings
304+
.cr/personal
277305

278306
# Python Tools for Visual Studio (PTVS)
279307
__pycache__/
@@ -283,6 +311,9 @@ __pycache__/
283311
tools/**
284312
!tools/packages.config
285313

314+
# Tabs Studio
315+
*.tss
316+
286317
# Telerik's JustMock configuration file
287318
*.jmconfig
288319

@@ -292,10 +323,26 @@ tools/**
292323
*.odx.cs
293324
*.xsd.cs
294325

295-
### VisualStudio Patch ###
296-
# By default, sensitive information, such as encrypted password
297-
# should be stored in the .pubxml.user file.
326+
# OpenCover UI analysis results
327+
OpenCover/
328+
329+
# Azure Stream Analytics local run output
330+
ASALocalRun/
331+
332+
# MSBuild Binary and Structured Log
333+
*.binlog
334+
335+
# NVidia Nsight GPU debugger configuration file
336+
*.nvuser
337+
338+
# MFractors (Xamarin productivity tool) working folder
339+
.mfractor/
340+
341+
# Local History for Visual Studio
342+
.localhistory/
298343

344+
# BeatPulse healthcheck temp database
345+
healthchecksdb
299346

300347
# WinMerge
301348
*.bak

Source/Picton.Messaging.IntegrationTests/ColoredConsoleLogProvider.cs

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
namespace Picton.Messaging.IntegrationTests
22
{
33
using Logging;
4+
using Picton.Messaging.Logging.LogProviders;
45
using System;
56
using System.Collections.Generic;
67
using System.Globalization;
@@ -23,7 +24,6 @@ public ColoredConsoleLogProvider(LogLevel minLevel = LogLevel.Trace)
2324
_minLevel = minLevel;
2425
}
2526

26-
2727
/// <summary>
2828
/// Gets the specified named logger.
2929
/// </summary>
@@ -36,11 +36,11 @@ public Logger GetLogger(string name)
3636
// messageFunc is null when checking if logLevel is enabled
3737
if (messageFunc == null) return (logLevel >= _minLevel);
3838

39-
// Please note: locking is important to ensure that multiple threads
40-
// don't attempt to change the foreground color at the same time
41-
lock (this)
39+
if (logLevel >= _minLevel)
4240
{
43-
if (logLevel >= _minLevel)
41+
// Please note: locking is important to ensure that multiple threads
42+
// don't attempt to change the foreground color at the same time
43+
lock (this)
4444
{
4545
if (Colors.TryGetValue(logLevel, out ConsoleColor consoleColor))
4646
{
@@ -61,27 +61,11 @@ public Logger GetLogger(string name)
6161
}
6262
}
6363
}
64+
6465
return true;
6566
};
6667
}
6768

68-
private static void WriteMessage(
69-
LogLevel logLevel,
70-
string name,
71-
Func<string> messageFunc,
72-
object[] formatParameters,
73-
Exception exception)
74-
{
75-
var message = messageFunc();
76-
if (formatParameters?.Length > 0) message = string.Format(CultureInfo.InvariantCulture, message, formatParameters);
77-
if (exception != null)
78-
{
79-
message = message + "|" + exception;
80-
}
81-
Console.WriteLine("{0} | {1} | {2} | {3}", DateTime.UtcNow, logLevel, name, message);
82-
}
83-
84-
8569
/// <summary>
8670
/// Opens a nested diagnostics context. Not supported in EntLib logging.
8771
/// </summary>
@@ -91,8 +75,7 @@ public IDisposable OpenNestedContext(string message)
9175
{
9276
return NullDisposable.Instance;
9377
}
94-
95-
78+
9679
/// <summary>
9780
/// Opens a mapped diagnostics context. Not supported in EntLib logging.
9881
/// </summary>
@@ -111,5 +94,21 @@ private class NullDisposable : IDisposable
11194
public void Dispose()
11295
{ }
11396
}
97+
98+
private static void WriteMessage(
99+
LogLevel logLevel,
100+
string name,
101+
Func<string> messageFunc,
102+
object[] formatParameters,
103+
Exception exception)
104+
{
105+
var message = messageFunc();
106+
if (formatParameters?.Length > 0) message = string.Format(CultureInfo.InvariantCulture, message, formatParameters);
107+
if (exception != null)
108+
{
109+
message = message + "|" + exception;
110+
}
111+
Console.WriteLine("{0} | {1} | {2} | {3}", DateTime.UtcNow, logLevel, name, message);
112+
}
114113
}
115114
}

Source/Picton.Messaging.IntegrationTests/Datadog/DatadogFormatter.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,16 @@ public DatadogFormatter(DatadogFormatterOptions options)
2929
using (var streamWriter = new StreamWriter(output))
3030
{
3131
using (var writer = new MetricSnapshotDatadogWriter(streamWriter, _options))
32-
serializer.Serialize(writer, metricsData);
32+
serializer.Serialize(writer, metricsData, this.MetricFields);
3333
}
3434

3535
return Task.CompletedTask;
3636
}
3737

3838
/// <inheritdoc />
3939
public MetricsMediaTypeValue MediaType => new MetricsMediaTypeValue("application", "com.datadoghq.metrics", "v1", "json");
40+
41+
/// <inheritdoc />
42+
public MetricFields MetricFields { get; set; }
4043
}
4144
}

Source/Picton.Messaging.IntegrationTests/Datadog/MetricSnapshotDatadogWriter.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ public void Dispose()
4646
}
4747

4848
/// <inheritdoc />
49-
public void Write(string context, string name, object value, MetricTags tags, DateTime timestamp)
49+
public void Write(string context, string name, string field, object value, MetricTags tags, DateTime timestamp)
5050
{
51-
Write(context, name, new[] { "value" }, new[] { value }, tags, timestamp);
51+
Write(context, name, new[] { field }, new[] { value }, tags, timestamp);
5252
}
5353

5454
/// <inheritdoc />
@@ -133,7 +133,5 @@ private void Flush()
133133
{
134134
_streamWriter.Write(JsonConvert.SerializeObject(new SeriesJson { Series = _metrics.ToArray() }, JsonSettings));
135135
}
136-
137-
public GeneratedMetricNameMapping MetricNameMapping { get; } = new GeneratedMetricNameMapping();
138136
}
139137
}

Source/Picton.Messaging.IntegrationTests/Picton.Messaging.IntegrationTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="App.Metrics.Reporting.Http" Version="2.0.0" />
15+
<PackageReference Include="App.Metrics.Reporting.Http" Version="3.0.0" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

0 commit comments

Comments
 (0)