Skip to content

{Core} Log allow_broker configuration in telemetry#24304

Merged
evelyn-ys merged 2 commits intoAzure:devfrom
evelyn-ys:telemetry_log_allow_broker
Oct 24, 2022
Merged

{Core} Log allow_broker configuration in telemetry#24304
evelyn-ys merged 2 commits intoAzure:devfrom
evelyn-ys:telemetry_log_allow_broker

Conversation

@evelyn-ys
Copy link
Member

Description

Fix #23956

This PR adds allow_broker configuration in telemetry when it's loaded and used for calling msal

Testing Guide

Scenario 1: Test telemetry logging when no allow_broker is configured

  • Run commands:
    az login
    az group show -g {resource_group_name}

  • Open $home_dir/.azure/telemetry/cache file and check the record data, you will find "Context.Default.AzureCLI.AllowBroker": "None" for both commands

Scenario 2: Test telemetry logging when allow_broker is configured as true

  • Config with az config set core.allow_broker=true

  • Run commands:
    az version
    az login
    az group show -g {resource_group_name}

  • Open $home_dir/.azure/telemetry/cache file and check the record data, you will find
    "Context.Default.AzureCLI.AllowBroker": "None" for the first command, as az version doesn't need auth, no msal call stack
    "Context.Default.AzureCLI.AllowBroker": "True" for the other two commands, this configuration is used for calling msal auth

Scenario 3: Test telemetry logging when allow_broker is configured as false

  • Config with az config set core.allow_broker=false

  • Run commands:
    az version
    az login
    az group show -g {resource_group_name}

  • Open $home_dir/.azure/telemetry/cache file and check the record data, you will find
    "Context.Default.AzureCLI.AllowBroker": "None" for the first command, as az version doesn't need auth, no msal call stack
    "Context.Default.AzureCLI.AllowBroker": "False" for the other two commands, this configuration is used for calling msal auth


This checklist is used to make sure that common guidelines for a pull request are followed.

@ghost ghost added Auto-Assign Auto assign by bot Core CLI core infrastructure labels Oct 20, 2022
@ghost ghost requested a review from yonzhan October 20, 2022 09:30
@ghost ghost assigned jiasli Oct 20, 2022
@ghost ghost added this to the Oct 2022 (2022-11-01) milestone Oct 20, 2022
@evelyn-ys evelyn-ys changed the title {Core} Log allow_broker configuration in telemetry {Core} Log allow_broker configuration in telemetry Oct 20, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented Oct 20, 2022

telemetry for WAM feature

@jiasli
Copy link
Member

jiasli commented Oct 24, 2022

Really descriptive PR description.

@evelyn-ys evelyn-ys merged commit 060b414 into Azure:dev Oct 24, 2022
avgale pushed a commit to avgale/azure-cli that referenced this pull request Aug 24, 2023
* Log allow_broker configuration in telemetry

* rename
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot Core CLI core infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Log when az login uses WAM as authentication method

3 participants