Skip to content

Commit

Permalink
Suppress http calls for outgoing metadata request (#1297)
Browse files Browse the repository at this point in the history
  • Loading branch information
vishweshbankwar authored Aug 8, 2023
1 parent 11a786c commit b0e0828
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ public Resource Detect()
{
try
{
// Prevents the http operations from being instrumented.
using var scope = SuppressInstrumentationScope.Begin();

var vmMetaDataResponse = AzureVmMetaDataRequestor.GetAzureVmMetaDataResponse();
if (vmMetaDataResponse == null)
{
Expand Down
4 changes: 4 additions & 0 deletions src/OpenTelemetry.ResourceDetectors.Azure/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

* Suppress instrumentation for outgoing http call made to metadata service
during `Detect()`.
([#1297](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/1297))

## 1.0.0-beta.2

Released 2023-Jul-26
Expand Down

0 comments on commit b0e0828

Please sign in to comment.