Skip to content

Warn about known aspnet instrumentation failure scenarios #2830

@nrcventura

Description

@nrcventura

Aspnet instrumentation stores its context data (transaction and current segment in HttpContext). Sometimes this context storage can get cleared out, when this happens the agent will lose track of the transaction until it is garbage collected. This results in incorrect timing and missing data from the transaction

Calls to Response.End can trigger the aspnet runtime to return the response immediately and not run anymore steps in the aspnet pipeline. This prevents the final step in the pipeline from running which results in the transaction never ending. This also results in the transaction being lost and eventually being garbage collected. This can result in missing data (such as a missing response status code) and incorrect timing.

We should determine whether its possible to write some instrumentation for these two scenarios to at least be able to log a warning about this happening. If it's possible, we should also consider writing code to better handle these situations.

Estimates

Initial t-shirt size: M

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions