Skip to content

No tracing on bad requests, using starlette+connexion+flask #98

Open
@leclercmartin

Description

@leclercmartin

Describe the bug
No trace is sent to Dynatrace on detected bad requests (HTTP status 400), when using the stack starlette:0.32.0.post1 + connexion:3.0.5 + flask:3.0.0.

When doing some other tests, I see tracing of requests for there use cases:

  • 200: successful request handled
  • 404: no resource found
  • 500: internal error

Here is my observation. The new version of connexion (v3 - ASGI) handles the request before delegating to flask. In the different scenarios listed above, successful processing, no resource found or internal error, they all pass through flask code. The case of bd request, connexion detects the base request and calls its error handling mechanism (which can be overriden)

To Reproduce
Steps to reproduce the behavior:

  1. Create a dummy application using the connexion guideline, using FlaskApp, with simple openapi definition, adding a dependency on autodynatrace and appropriate configuration
  2. Send an valid vs invalid request
  3. Dynatrace will contain only the successful traces
  4. No error found in log...

Expected behavior
I would expect that the bad requests be reported in Dynatrace.

Thanks in advance for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions