Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exceptions are not recorded in traces from instrumented Pyramid apps #2619

Closed
rbagd opened this issue Jun 19, 2024 · 0 comments · Fixed by #2622
Closed

Exceptions are not recorded in traces from instrumented Pyramid apps #2619

rbagd opened this issue Jun 19, 2024 · 0 comments · Fixed by #2622

Comments

@rbagd
Copy link
Contributor

rbagd commented Jun 19, 2024

What problem do you want to solve?

Traces resulting from Pyramid instrumentation do not record server exceptions that have resulted in errored requests. Here is the relevant output part by calling an instrumented Pyramid app.

    "status": {
        "status_code": "ERROR"
    },
    "attributes": {
        "http.method": "GET",
        ...
        "http.status_code": 500
    },
    "events": []

In case of another WSGI, e.g. Flask, errors are bubbled up in status with the traceback as a span event looking like this

    "status": {
        "status_code": "ERROR",
        "description": "ValueError: bad value"
    },
    "attributes": {
        "http.method": "GET",
        ...
        "http.status_code": 500
    },
    "events": [
        {
            "name": "exception",
            "timestamp": "2024-06-19T10:44:00.468880Z",
            "attributes": {
                "exception.type": "ValueError",
                "exception.message": "bad value",
                "exception.stacktrace": "Traceback ...",
                "exception.escaped": "False"
            }
        }
    ]

Such traces are much more valuable in troubleshooting.

Describe the solution you'd like

Implement recording of exceptions as status attributes and span events in Pyramid instrumentation, similar to how it is done for other WSGI apps.

Describe alternatives you've considered

No response

Additional Context

No response

Would you like to implement a fix?

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant