Skip to content

Commit

Permalink
Merge pull request #289 from Microsoft/sergkanz/concurrency
Browse files Browse the repository at this point in the history
properties should support concurrency
  • Loading branch information
Sergey Kanzhelev authored Aug 20, 2016
2 parents 4eab6a3 + ba2b7d9 commit ad21097
Show file tree
Hide file tree
Showing 21 changed files with 75 additions and 13 deletions.
2 changes: 2 additions & 0 deletions Schema/generateSchema.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@ del "$currentDir\obj\gbc\*_proxies.cs"
dir "$currentDir\obj\gbc" | ForEach-Object {
# Rename namespace from AI to Microsoft.ApplicationInsights.Extensibility.Implementation.External
RegExReplace $_.FullName "(namespace AI)" "namespace Microsoft.ApplicationInsights.Extensibility.Implementation.External"
RegExReplace $_.FullName "new Dictionary" "new ConcurrentDictionary"
# Remove "using Bond" statements
RegExReplace $_.FullName "using Bond.*"
RegExReplace $_.FullName "using System.Collections.Generic;" "using System.Collections.Concurrent;`r`n using System.Collections.Generic;"
# Remove all Bond attributes
RegExReplace $_.FullName "\[global::Bond\..*\]"
# Remove derivations from Microsoft.Telemetry.Domain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

namespace Microsoft.ApplicationInsights.Extensibility.Implementation.External
{
using System.Collections.Concurrent;
using System.Collections.Generic;


Expand Down Expand Up @@ -97,8 +98,8 @@ protected AvailabilityData(string fullName, string name)
duration = "";
runLocation = "";
message = "";
properties = new Dictionary<string, string>();
measurements = new Dictionary<string, double>();
properties = new ConcurrentDictionary<string, string>();
measurements = new ConcurrentDictionary<string, double>();
}
}
} // AI
Expand All @@ -112,3 +113,5 @@ protected AvailabilityData(string fullName, string name)





Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

namespace Microsoft.ApplicationInsights.Extensibility.Implementation.External
{
using System.Collections.Concurrent;
using System.Collections.Generic;


Expand Down Expand Up @@ -58,3 +59,5 @@ protected Base(string fullName, string name)





Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

namespace Microsoft.ApplicationInsights.Extensibility.Implementation.External
{
using System.Collections.Concurrent;
using System.Collections.Generic;


Expand Down Expand Up @@ -192,3 +193,5 @@ protected ContextTagKeys(string fullName, string name)





Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

namespace Microsoft.ApplicationInsights.Extensibility.Implementation.External
{
using System.Collections.Concurrent;
using System.Collections.Generic;


Expand All @@ -46,3 +47,5 @@ internal enum DataPointType





Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

namespace Microsoft.ApplicationInsights.Extensibility.Implementation.External
{
using System.Collections.Concurrent;
using System.Collections.Generic;


Expand Down Expand Up @@ -83,3 +84,5 @@ protected DataPoint(string fullName, string name)





Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

namespace Microsoft.ApplicationInsights.Extensibility.Implementation.External
{
using System.Collections.Concurrent;
using System.Collections.Generic;


Expand Down Expand Up @@ -59,3 +60,5 @@ protected Data(string fullName, string name)





Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

namespace Microsoft.ApplicationInsights.Extensibility.Implementation.External
{
using System.Collections.Concurrent;
using System.Collections.Generic;


Expand All @@ -46,3 +47,5 @@ internal partial class Domain





Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

namespace Microsoft.ApplicationInsights.Extensibility.Implementation.External
{
using System.Collections.Concurrent;
using System.Collections.Generic;


Expand Down Expand Up @@ -94,7 +95,7 @@ protected Envelope(string fullName, string name)
sampleRate = 100.0;
seq = "";
iKey = "";
tags = new Dictionary<string, string>();
tags = new ConcurrentDictionary<string, string>();

}
}
Expand All @@ -109,3 +110,5 @@ protected Envelope(string fullName, string name)





Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

namespace Microsoft.ApplicationInsights.Extensibility.Implementation.External
{
using System.Collections.Concurrent;
using System.Collections.Generic;


Expand Down Expand Up @@ -63,8 +64,8 @@ protected EventData(string fullName, string name)
{
ver = 2;
this.name = "";
properties = new Dictionary<string, string>();
measurements = new Dictionary<string, double>();
properties = new ConcurrentDictionary<string, string>();
measurements = new ConcurrentDictionary<string, double>();
}
}
} // AI
Expand All @@ -78,3 +79,5 @@ protected EventData(string fullName, string name)





Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

namespace Microsoft.ApplicationInsights.Extensibility.Implementation.External
{
using System.Collections.Concurrent;
using System.Collections.Generic;


Expand Down Expand Up @@ -77,8 +78,8 @@ protected ExceptionData(string fullName, string name)
handledAt = "";
exceptions = new List<ExceptionDetails>();
problemId = "";
properties = new Dictionary<string, string>();
measurements = new Dictionary<string, double>();
properties = new ConcurrentDictionary<string, string>();
measurements = new ConcurrentDictionary<string, double>();
}
}
} // AI
Expand All @@ -92,3 +93,5 @@ protected ExceptionData(string fullName, string name)





Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

namespace Microsoft.ApplicationInsights.Extensibility.Implementation.External
{
using System.Collections.Concurrent;
using System.Collections.Generic;


Expand Down Expand Up @@ -88,3 +89,5 @@ protected ExceptionDetails(string fullName, string name)





Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

namespace Microsoft.ApplicationInsights.Extensibility.Implementation.External
{
using System.Collections.Concurrent;
using System.Collections.Generic;


Expand Down Expand Up @@ -61,7 +62,7 @@ protected MessageData(string fullName, string name)
{
ver = 2;
message = "";
properties = new Dictionary<string, string>();
properties = new ConcurrentDictionary<string, string>();
}
}
} // AI
Expand All @@ -75,3 +76,5 @@ protected MessageData(string fullName, string name)





Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

namespace Microsoft.ApplicationInsights.Extensibility.Implementation.External
{
using System.Collections.Concurrent;
using System.Collections.Generic;


Expand Down Expand Up @@ -56,7 +57,7 @@ protected MetricData(string fullName, string name)
{
ver = 2;
metrics = new List<DataPoint>();
properties = new Dictionary<string, string>();
properties = new ConcurrentDictionary<string, string>();
}
}
} // AI
Expand All @@ -70,3 +71,5 @@ protected MetricData(string fullName, string name)





Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

namespace Microsoft.ApplicationInsights.Extensibility.Implementation.External
{
using System.Collections.Concurrent;
using System.Collections.Generic;


Expand Down Expand Up @@ -66,3 +67,5 @@ protected PageViewData(string fullName, string name)





Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

namespace Microsoft.ApplicationInsights.Extensibility.Implementation.External
{
using System.Collections.Concurrent;
using System.Collections.Generic;


Expand Down Expand Up @@ -84,3 +85,5 @@ protected PageViewPerfData(string fullName, string name)





Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

namespace Microsoft.ApplicationInsights.Extensibility.Implementation.External
{
using System.Collections.Concurrent;
using System.Collections.Generic;


Expand Down Expand Up @@ -104,8 +105,8 @@ protected RemoteDependencyData(string fullName, string name)

dependencyTypeName = "";
target = "";
properties = new Dictionary<string, string>();
measurements = new Dictionary<string, double>();
properties = new ConcurrentDictionary<string, string>();
measurements = new ConcurrentDictionary<string, double>();
}
}
} // AI
Expand All @@ -119,3 +120,5 @@ protected RemoteDependencyData(string fullName, string name)





Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

namespace Microsoft.ApplicationInsights.Extensibility.Implementation.External
{
using System.Collections.Concurrent;
using System.Collections.Generic;


Expand Down Expand Up @@ -90,8 +91,8 @@ protected RequestData(string fullName, string name)
duration = "";
responseCode = "";
url = "";
properties = new Dictionary<string, string>();
measurements = new Dictionary<string, double>();
properties = new ConcurrentDictionary<string, string>();
measurements = new ConcurrentDictionary<string, double>();
}
}
} // AI
Expand All @@ -105,3 +106,5 @@ protected RequestData(string fullName, string name)





Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

namespace Microsoft.ApplicationInsights.Extensibility.Implementation.External
{
using System.Collections.Concurrent;
using System.Collections.Generic;


Expand All @@ -49,3 +50,5 @@ internal enum SeverityLevel





Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

namespace Microsoft.ApplicationInsights.Extensibility.Implementation.External
{
using System.Collections.Concurrent;
using System.Collections.Generic;


Expand Down Expand Up @@ -78,3 +79,5 @@ protected StackFrame(string fullName, string name)





Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

namespace Microsoft.ApplicationInsights.Extensibility.Implementation.External
{
using System.Collections.Concurrent;
using System.Collections.Generic;


Expand All @@ -46,3 +47,5 @@ internal enum TestResult





0 comments on commit ad21097

Please sign in to comment.