Skip to content

Add timeout status to http spans. #2091

Open
@antonpirker

Description

@antonpirker

Based on a slack thread - here's a snippet from @gggritso about behaviour that he would like to see for timeouts.

import urllib
import urllib.request

try:
    response = urllib.request.urlopen('http://python.org/', timeout=0.0001)
    html = response.read()
except urllib.error.URLError as e:
    print("URL Error", e.reason)
    if (e.reason == 'timed out'):
        span['status'] = 'time out'
        raise e

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeaturePythonSDKTriagedHas been looked at recently during old issue triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions