* Fix IL2091 warnings
Part of #4002
Added DynamicallyAccessedMembers attributes where the warning was found
removed IL2091 from NoWarn in Directory.Build.targets
* Remove more warnings that are no longer necessary.
* Remove Memoize with 3 parameters.
This code isn't being used.
---------
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
* Add prIssueManagement.yml to onboard repo to GitOps.ResourceManagement as FabricBot replacement
Details on the replacement service and the syntax of the new yaml configuration file is available publicly at: https://microsoft.github.io/GitOps/policies/resource-management.html
Please review and merge this PR to complete the process of onboarding to the new service.
* Deleting fabricbot.json
---------
Co-authored-by: dotnet-policy-service[bot] <123482357+dotnet-policy-service[bot]@users.noreply.github.com>
- Fix a bug where a tag provider attached to an enumerable parameter
or property wouldn't behave as expected. Fixes#4883.
- When an event id is not specified, instead of emitting 0 for the
the id, we now hash the event name and/or method name. This matches
the behavior of the generator in dotnet/runtime and is generally
more useful.
Co-authored-by: Martin Taillefer <mataille@microsoft.com>
The README file for the Diagnostic Resource Monitoring library has been updated. It has been mentioned that this library uses control groups (cgroups) in Linux to monitor system resources. A note has also been added stating that it currently supports cgroups v1, but there is no support for cgroups v2.
Co-authored-by: Martin Obratil <maobrati@microsoft.com>
* Enable AOT compatibility for all libraries (#4625)
* Enable AOT compatibility for all libraries. Fix warnings.
- Enable configuration binder source generator
- The only library that can't use the ConfigBinder SG is the HeaderParsing library.
- Blocked by https://github.com/dotnet/runtime/issues/94547
* Fix Compliance Redaction.
* Explicitly reference Microsoft.Extensions.Configuration.Binder
For all libraries that use the Configuration.Binder source generator, explicitly reference the NuGet package. This ensures we get the latest version (8.0.1), which has all the source generator fixes.
* Respond to PR feedback.
- Change ArgumentNullException to normal ArgumentException
- Add tests to LoggingRedactionOptions collection setters to keep 100% code coverage. https://github.com/dotnet/runtime/issues/96873 causes these setters to no longer be called in the existing tests.
[main] Update dependencies from dotnet/arcade
- Coherency Updates:
- Microsoft.Bcl.TimeProvider: from 8.0.1 to 8.0.1 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- Microsoft.Extensions.Caching.Abstractions: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- Microsoft.Extensions.Caching.Memory: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- Microsoft.Extensions.Configuration.Abstractions: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- Microsoft.Extensions.Configuration.Binder: from 8.0.1 to 8.0.1 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- Microsoft.Extensions.Configuration.CommandLine: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- Microsoft.Extensions.Configuration.Json: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- Microsoft.Extensions.Configuration: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- Microsoft.Extensions.DependencyInjection.Abstractions: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- Microsoft.Extensions.DependencyInjection: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- Microsoft.Extensions.Diagnostics: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- Microsoft.Extensions.Hosting.Abstractions: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- Microsoft.Extensions.Hosting: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- Microsoft.Extensions.Http: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- Microsoft.Extensions.Logging.Abstractions: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- Microsoft.Extensions.Logging.Configuration: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- Microsoft.Extensions.Logging.Console: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- Microsoft.Extensions.Logging: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- Microsoft.Extensions.Options.ConfigurationExtensions: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- Microsoft.Extensions.Options.DataAnnotations: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- Microsoft.Extensions.Options: from 8.0.1 to 8.0.1 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- Microsoft.Extensions.Primitives: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- System.Collections.Immutable: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- System.Configuration.ConfigurationManager: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- System.Diagnostics.DiagnosticSource: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- System.Diagnostics.PerformanceCounter: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- System.IO.Hashing: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- System.Net.Http.Json: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- System.Security.Cryptography.Pkcs: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- System.Security.Cryptography.Xml: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- System.Text.Encodings.Web: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- System.Text.Json: from 8.0.1 to 8.0.1 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- System.Runtime.Caching: from 8.0.0 to 8.0.0 (parent: Microsoft.AspNetCore.App.Runtime.win-x64)
- When using [TagName] to control the name of a logging tag, the
expectation is that the logging message (if present) should be using
the tag name instead of the parameter name. SO:
```
[LoggerMessage(1, LogLevel.Information, "My message {foo.bar}")]
public static partial void Log(this ILogger logger, [TagName("foo.bar") string msg);
```
Fixes#4848
Co-authored-by: Martin Taillefer <mataille@microsoft.com>
- The generator now produces a warning when asked to log an object
which doesn't implement ToString(), IConvertible, or IFormattable.
Fixed#4835.
- Added support for the Transitive property in the LogProperties attribute. When
set to true, this causes automatic transitive traversal of a complex object, instead
of requiring manual annotations of individual properties. Fixes#4738.
- Introduce the [TagName] attribute to make it possible to control the tag name
used when logging a parameter or property. Fixes#4576.
- Fixed some situations where unnatural errors were produced as a
result of a prior error. The dummy follow-on errors are now avoided.
- Fixed handling of cases where parameters or properties were of type of the
non-generic IEnumerable. The specific type wasn't being recorgnized and treated
as an enumerable.
Co-authored-by: Martin Taillefer <mataille@microsoft.com>
* Separate EnableRedaction and EnableEnrichment
- Prior, calling EnableRedaction or EnableEnrichment would always enable
both enrichment and redaction together. Now, each call only affects the
specific feature it is intended.
Fixes#4683
* Update src/Libraries/Microsoft.Extensions.Telemetry/Logging/ExtendedLoggerFactory.cs
Co-authored-by: Igor Velikorossov <RussKie@users.noreply.github.com>
---------
Co-authored-by: Martin Taillefer <mataille@microsoft.com>
Co-authored-by: Igor Velikorossov <RussKie@users.noreply.github.com>