Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
vishweshbankwar committed Jul 7, 2023
1 parent e0efd7c commit 39f9862
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
using OpenTelemetry.Internal;
#endif
using OpenTelemetry.Trace;
using static OpenTelemetry.Internal.HttpSemanticConventionHelper;

namespace OpenTelemetry.Instrumentation.AspNetCore.Implementation
{
Expand All @@ -44,12 +45,12 @@ internal HttpInMetricsListener(string name, Meter meter, AspNetCoreMetricsInstru
this.options = options;
this.httpServerDuration = meter.CreateHistogram<double>(HttpServerDurationMetricName, "ms", "Measures the duration of inbound HTTP requests.");

if (this.options.HttpSemanticConvention.HasFlag(HttpSemanticConventionHelper.HttpSemanticConvention.Old))
if (this.options.HttpSemanticConvention.HasFlag(HttpSemanticConvention.Old))
{
this.emitOldAttributes = true;
}

if (this.options.HttpSemanticConvention.HasFlag(HttpSemanticConventionHelper.HttpSemanticConvention.New))
if (this.options.HttpSemanticConvention.HasFlag(HttpSemanticConvention.New))
{
this.emitNewAttributes = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
using OpenTelemetry.Internal;
#endif
using OpenTelemetry.Trace;
using static OpenTelemetry.Internal.HttpSemanticConventionHelper;

namespace OpenTelemetry.Instrumentation.Http.Implementation
{
Expand All @@ -41,12 +42,12 @@ public HttpHandlerMetricsDiagnosticListener(string name, Meter meter, HttpClient
this.httpClientDuration = meter.CreateHistogram<double>("http.client.duration", "ms", "Measures the duration of outbound HTTP requests.");
this.options = options;

if (this.options.HttpSemanticConvention.HasFlag(HttpSemanticConventionHelper.HttpSemanticConvention.Old))
if (this.options.HttpSemanticConvention.HasFlag(HttpSemanticConvention.Old))
{
this.emitOldAttributes = true;
}

if (this.options.HttpSemanticConvention.HasFlag(HttpSemanticConventionHelper.HttpSemanticConvention.New))
if (this.options.HttpSemanticConvention.HasFlag(HttpSemanticConvention.New))
{
this.emitNewAttributes = true;
}
Expand Down

0 comments on commit 39f9862

Please sign in to comment.