Skip to content

Commit

Permalink
Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremydvoss committed Jan 23, 2024
1 parent 6056a3f commit 546f186
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ def get_azure_vm_metadata(self): # pylint: disable=no-self-use
request = Request(_AZURE_VM_METADATA_ENDPOINT)
request.add_header("Metadata", "True")
try:
# TODO: Changed to 4s to fit into OTel SDK's 5 second timeout.
# Lengthen or allow user input if issue is resolved.
# See https://github.com/open-telemetry/opentelemetry-python/issues/3644
with urlopen(request, timeout=4) as response:
return loads(response.read())
except URLError:
Expand Down

0 comments on commit 546f186

Please sign in to comment.