Skip to content

Azure Monitor opentelemetry exporter uses deprecated locale.getdefaultlocale #32232

Closed
@jenshnielsen

Description

@jenshnielsen
  • Package Name: azure-monitor-opentelemetry-exporter
  • Package Version: 1.0.0.b17
  • Operating System: windows 11
  • Python Version: python 3.11

Describe the bug
Using Azure Monitor Opentelemetry exporter triggers a deprecation warning

C:\Users\jenielse\Miniconda3\envs\myenv\Lib\site-packages\azure\monitor\opentelemetry\exporter_utils.py:57: DeprecationWarning: Use setlocale(), getencoding() and getlocale() instead
"ai.device.locale": locale.getdefaultlocale()[0],

To Reproduce
Steps to reproduce the behavior:

  1. Configure export with azure monitor opentelemetry exporter.

Or any other opteration that triggers an import of _utils.py from the package

Expected behavior

No deprecation warning.

Additional context

Afaik this only became deprecated in python 3.11

Note however that on windows the replacement has some issues python/cpython#82986

Metadata

Metadata

Labels

ClientThis issue points to a problem in the data-plane of the library.Monitor - ExporterMonitor OpenTelemetry Exportercustomer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions