Skip to content

AZURE CLI should add extension name to UserAgent but it doesn't workΒ #25835

@xfz11

Description

@xfz11

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Related command

This bug exists on every extension API request. Take containerapp extension as an example
az containerapp list

Describe the bug

This line show that CLI should add extension name in UA but it doesn't work

client_kwargs['user_agent'] += "CliExtension/{}".format(command_ext_name)

The actual UA is 'User-Agent': 'python/3.8.8 (Windows-10-10.0.22621-SP0) AZURECLI/2.46.0 (PIP)' not extension information.

To Reproduce

Expected behavior

UA should contains extension name. Besides, we expect extension version is also added in the UA as CLI core version.

Environment summary

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamCoreCLI core infrastructure

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions