Skip to content

Marking agent auto instrumentation span as ok from code #13288

Open
@anderssv

Description

@anderssv

Is your feature request related to a problem? Please describe.

We are calling a Postgres DB and getting exceptions for the normal flow of things (we shouldn't, but do). In the current code we set the span status to ok when we catch the exception. But this is not reflected in the child span started by the agent auto instrumentation.

We would like these to be set as OK, but need to do this from the call site (the parent span). Could it be possible to add a context attribute to say something to the agent about expected results?

We're using Applicationinsights agent, which is a repackaged OT agent to my understanding.

Describe the solution you'd like

A way to update the child as ok. A less optimal way could be to instruct the agent to disable auto instrumentation for the following call.

Describe alternatives you've considered

I see there are options to disable a certain auto instrumentation and filter on classes etc, but this is actually more fine grained than that.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds triageNew issue that requires triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions