Skip to content

Inject trace_configs as an argument to opentelemetry aiohttp_client._instrument instrumentation #1073

@nemoshlag

Description

@nemoshlag

Is your feature request related to a problem?

I would like to add data to a span based on on_request_chunk_sent event. Using the request/response hooks doesn't provide a good solution for my use case since it's "too late" in the timeline.

Describe the solution you'd like

I would like to pass trace_configs (or a single trace_config) to aiohttp_client opentelemetry instrumentation. It will allow me to specify which events I would like to "catch" and will allow more customization solving many use-cases that the request/response hooks cannot.

Describe alternatives you've considered

I've doubled the instrument_init method and set it up with my own trace_configs, bypassing opentelemetry implementation.

Additional context
If this issue will be approved I would like to contribute my solution, thanks

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