Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for Cloud Role Name for Quickpulse SDK #2100

Merged
merged 10 commits into from
Oct 30, 2020
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