Skip to content

OTLP exporter for metrics isn't setting the user agent string #4474

@codeboten

Description

@codeboten

Describe your environment

OS: n/a
Python version: 3.11
SDK version: 1.30.0
API version: 1.30.0

What happened?

Emitting metrics using the OTLP exporter results in the User-Agent being incorrectly set to python-requests/version instead of the expected "OTel-OTLP-Exporter-Python/" + __version__,

Steps to Reproduce

Used the example flask app from opentelemetry.io and exported metrics to a backend

Expected Result

User agent to match OTel-OTLP-Exporter-Python/1.30.0

Actual Result

User agent was python-requests/2.32.3

Additional context

No response

Would you like to implement a fix?

Yes

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