Surface msal telemetry as a long opaque string#575
Conversation
93761f5 to
b5ec699
Compare
Kusto has replace or extract function to handle escape values. However, is that possible to use single quote instead of double quote in the value strings in order to reduce the number of escaped characters as well as the query runtime? |
That long string is the standard output of a stringify algorithm. Ideally, we shall not use regex to manually parse it. Will this BTW, currently, the double-escape happens only because the inner wam telemetry is stringified (which also using the same double quotation mark). You could just return its original json object in MsalRuntime layer, so that MSAL Python will stringify it only once. That way, you will only need to deal with single-escape. |
5abb1c1 to
83f0b2f
Compare
83f0b2f to
fea7ea9
Compare
|
@jiasli , this branch has been shipped as MSAL 1.24.0b1, which is also available from PyPI. |
There will be a new
msal_telemetrykey in MSAL Python's return value. Its content is a long string which is considered opaque. Callers can store it as-is into their existing telemetry database.The key does not always appear, so, consumer better tolerates its absence, by using
result.get("msal_telemetry").{ "access_token": "...token...", "msal_telemetry": "A long long string which would contain escaped (\") and even double-escaped (\\\") quotation marks for its nested json blobs", "expires_in": 3600, "token_type": "Bearer" }A real world example for the long telemetry string, containing escaped (") and even double-escaped (\") quotation marks. Is that OK with you, @MSamWils ?
UPDATE: For now, the
wam_telemetrycontent and its long value are removed, so that you won't seeaccount_idin the telemetry.