Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Do not merge] Testing azure core 2.0 w/ logging policy #4

Draft
wants to merge 2 commits into
base: azure-2.0-loggingpolicy
Choose a base branch
from

Conversation

m-redding
Copy link
Owner

Contributing to the Azure SDK

Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.

For specific information about pull request etiquette and best practices, see this section.

@@ -12,29 +12,12 @@ namespace Azure.Core.Diagnostics
[EventSource(Name = EventSourceName)]
internal sealed class AzureCoreEventSource : AzureEventSource
{
private const string EventSourceName = "Azure-Core";
private const string EventSourceName = "Azure-Core-ext";
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will still work with AzureCoreEventListener while avoiding conflicts with the event source created for "Azure-Core" created inside of System.ClientModel. The downside is that anyone with filtering that they implement on their own in something like app insights could be broken if they do an equals check on the name itself rather than using traits or doing something like a contains/starts with check.

@@ -46,7 +47,7 @@ protected ClientLoggingPolicy(string logName, string[]? logTraits = default, Log
_assemblyName = loggingOptions.LoggedClientAssemblyName;
_clientRequestIdHeaderName = loggingOptions.RequestIdHeaderName;
_isLoggingEnabled = loggingOptions.IsLoggingEnabled;
_sanitizer = new PipelineMessageSanitizer(loggingOptions.AllowedQueryParameters, loggingOptions.AllowedHeaderNames);
_sanitizer = new PipelineMessageSanitizer(loggingOptions.AllowedQueryParameters.ToArray(), loggingOptions.AllowedHeaderNames.ToArray());
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgot to cherry pick this one - not actually part of these changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant