Skip to content

Provide typescript decorator to auto instrument functions #3827

@pksunkara

Description

@pksunkara

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

Right now, for the end-user to trace their functions call, they have to write code to surround the respective function body in an active span, and then end the span at the end of the body.

This is very cumbersome and adds a lot of noise to the code.

Describe the solution you'd like

Provide a typescript decorator that does this automatically for functions. Inspired by the instrument macro from Rust.

It's possible to add support for this using decorators.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions