Skip to content

Commit

Permalink
Merge pull request #2100 from microsoft/rambhatt/roles-support
Browse files Browse the repository at this point in the history
Add Support for Cloud Role Name for Quickpulse SDK
  • Loading branch information
rambhatt-msft authored Oct 30, 2020
2 parents c5c5f6a + 4b8e562 commit cb87710
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Changelog

## VNext
- [QuickPulseTelemetryModule and MonitoringDataPoint have a new Cloud Role Name field for sending with ping and post requests to QuickPulse Service.](https://github.com/microsoft/ApplicationInsights-dotnet/pull/2100)

## Version 2.16.0-beta1
- [ILogger LogError and LogWarning variants write exception `ExceptionStackTrace` when `TrackExceptionsAsExceptionTelemetry` flag is set to `false`](https://github.com/microsoft/ApplicationInsights-dotnet/pull/2065)
- [Upgrade to System.Diagnostics.DiagnosticSource v5.0.0-rc.2.20475.5](https://github.com/microsoft/ApplicationInsights-dotnet/pull/2091)
- [The `{OriginalFormat}` field in ILogger will be emitted as `OriginalFormat` with the braces removed](https://github.com/microsoft/ApplicationInsights-dotnet/pull/2071)
- ApplicationInsightsLoggerProvider populates structured logging key/values irrespective of whether Scopes are enabled or not.

## Version 2.15.0
- EventCounterCollector module does not add AggregationInterval as a dimension to the metric.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ internal sealed class QuickPulseServiceClient : IQuickPulseServiceClient
{
private readonly string instanceName;

private readonly string roleName;

private readonly string streamId;

private readonly string machineName;
Expand All @@ -45,6 +47,7 @@ internal sealed class QuickPulseServiceClient : IQuickPulseServiceClient
public QuickPulseServiceClient(
Uri serviceUri,
string instanceName,
string roleName,
string streamId,
string machineName,
string version,
Expand All @@ -55,6 +58,7 @@ public QuickPulseServiceClient(
{
this.ServiceUri = serviceUri;
this.instanceName = instanceName;
this.roleName = roleName;
this.streamId = streamId;
this.machineName = machineName;
this.version = version;
Expand Down Expand Up @@ -230,6 +234,7 @@ private void WritePingData(DateTimeOffset timestamp, Stream stream)
InvariantVersion = MonitoringDataPoint.CurrentInvariantVersion,
// InstrumentationKey = instrumentationKey, // ikey is currently set in query string parameter
Instance = this.instanceName,
RoleName = this.roleName,
StreamId = this.streamId,
MachineName = this.machineName,
Timestamp = timestamp.UtcDateTime,
Expand Down Expand Up @@ -268,6 +273,7 @@ private void WriteSamples(IEnumerable<QuickPulseDataSample> samples, string inst
InvariantVersion = MonitoringDataPoint.CurrentInvariantVersion,
InstrumentationKey = instrumentationKey,
Instance = this.instanceName,
RoleName = this.roleName,
StreamId = this.streamId,
MachineName = this.machineName,
Timestamp = sample.EndTimestamp.UtcDateTime,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ internal sealed class QuickPulseServiceClient : IQuickPulseServiceClient
{
private readonly string instanceName;

private readonly string roleName;

private readonly string streamId;

private readonly string machineName;
Expand Down Expand Up @@ -51,6 +53,7 @@ internal sealed class QuickPulseServiceClient : IQuickPulseServiceClient
public QuickPulseServiceClient(
Uri serviceUri,
string instanceName,
string roleName,
string streamId,
string machineName,
string version,
Expand All @@ -61,6 +64,7 @@ public QuickPulseServiceClient(
{
this.ServiceUri = serviceUri;
this.instanceName = instanceName;
this.roleName = roleName;
this.streamId = streamId;
this.machineName = machineName;
this.version = version;
Expand Down Expand Up @@ -234,6 +238,7 @@ private void WritePingData(DateTimeOffset timestamp, Stream stream)
InvariantVersion = MonitoringDataPoint.CurrentInvariantVersion,
// InstrumentationKey = instrumentationKey, // ikey is currently set in query string parameter
Instance = this.instanceName,
RoleName = this.roleName,
StreamId = this.streamId,
MachineName = this.machineName,
Timestamp = timestamp.UtcDateTime,
Expand Down Expand Up @@ -272,6 +277,7 @@ private void WriteSamples(IEnumerable<QuickPulseDataSample> samples, string inst
InvariantVersion = MonitoringDataPoint.CurrentInvariantVersion,
InstrumentationKey = instrumentationKey,
Instance = this.instanceName,
RoleName = this.roleName,
StreamId = this.streamId,
MachineName = this.machineName,
Timestamp = sample.EndTimestamp.UtcDateTime,
Expand Down
Loading

0 comments on commit cb87710

Please sign in to comment.