Skip to content
Next Next commit
Remove supression for prometheus
  • Loading branch information
Vishwesh Bankwar committed Nov 13, 2023
commit f0178be56d6f9323f27936b0be9a7ca54844b304
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,6 @@ public void OnEventWritten_New(string name, object payload)
return;
}

// TODO: Prometheus pulls metrics by invoking the /metrics endpoint. Decide if it makes sense to suppress this.
// Below is just a temporary way of achieving this suppression for metrics (we should consider suppressing traces too).
// If we want to suppress activity from Prometheus then we should use SuppressInstrumentationScope.
if (context.Request.Path.HasValue && context.Request.Path.Value.Contains("metrics"))
{
return;
}

TagList tags = default;

// see the spec https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/http/http-spans.md
Expand Down