question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[QUERY] Cannot understand how to remove REDACTED when using AzureEventSourceListener

See original GitHub issue

Query/Question I’ve read page https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/core/Azure.Core/samples/Diagnostics.md about activating logging.

I used:

using AzureEventSourceListener listener = AzureEventSourceListener.CreateConsoleLogger();

Output looks like:

Azure-Core: Request [a9113e9a-44fd-48f0-bb8f-45024850e3d9] GET http://127.0.0.1:10002/devstoreaccount1/aaaatest1()?$format=REDACTED&$filter=REDACTED
x-ms-version:REDACTED
DataServiceVersion:REDACTED
.....

I do not understand how to remove REDACTED and having full parameters visible. The page mentions SecretClientOptions options but it’s not clear how to use it with AzureEventSourceListener.CreateConsoleLogger

Environment:

  • Name and version of the Library package used: Azure.Data.Tables - 12.0.0-beta.7

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
JoshLove-msftcommented, Apr 17, 2021

So the equivalent for the Tables library is the TableClientOptions type. You would use that instead of SecretClientOptions from the example, and include the names of any headers and query parameters that you would like to not be redacted. You would then pass your TableClientOptions instance into the constructor for the TableClient.

using AzureEventSourceListener listener = AzureEventSourceListener.CreateConsoleLogger();
TableClientOptions options = new TableClientOptions()
{
    Diagnostics =
    {
        LoggedHeaderNames = { "x-ms-request-id", "DataServiceVersion" },
        LoggedQueryParameters = { "api-version", "format", "filter" }
    }
};

var client = new TableClient("<connection string>", "<table name>", options);
0reactions
JoshLove-msftcommented, Apr 21, 2021

Sure, I will do that. It’s also possible that these particular query parameters and headers should be logged by default by having these specified in the TableClientOptions, so that users don’t have to add these themselves. /cc @christothes

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure SDK diagnostics
Requests and responses; Authentication attempts; Retries. The simplest way to see the logs is to enable the console logging using the AzureEventSourceListener ....
Read more >
Redact faces with Azure Video Indexer API
This article shows how to use the Azure Video Indexer face redaction feature by using an API. ... To redact all faces, remove...
Read more >
Review data for a subject rights request - Microsoft Priva
Use the Annotate command to redact text; Enter notes about a file. Note. Delete requests involve an additional approval substage at the review ......
Read more >
Response was not set, make sure SendAsync was called - ...
I'm trying to connect to an Azure Service Bus and I'm facing an issue. It seems impossible to connect as I always get...
Read more >
Microsoft Cognitive Services Can Now Detect & Redact PII In ...
Recently Microsoft added to their cognitive services the ability to detect and redact Personally Identifiable Information (PII) in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found