Skip to content

Commit

Permalink
Addressing warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Psichorex committed Jan 19, 2024
1 parent d165d1d commit ba9db63
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ internal sealed class NullTelemetryChannel : ITelemetryChannel
public bool? DeveloperMode { get; set; }
public string EndpointAddress { get; set; }

#pragma warning disable S1186 // Methods should not be empty
public void Dispose() { }
public void Flush() { }
public void Send(ITelemetry item) { }
#pragma warning restore S1186 // Methods should not be empty
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void Initialize(ITelemetry telemetry)
if (options.EnableUserAgentCollection && string.IsNullOrEmpty(requestTelemetry.Context.User.UserAgent))
{
// While there is requestTelemetry.Context.User.UserAgent that's not displayed on the Azure Portal.
requestTelemetry.TryAddProperty("UserAgent", httpContext.Request.Headers["User-Agent"]);
requestTelemetry.TryAddProperty("UserAgent", httpContext.Request.Headers.UserAgent);
}

if (options.EnableIpAddressCollection)
Expand Down

0 comments on commit ba9db63

Please sign in to comment.