-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[Documentation] Request update on the documentation of IL2026 #85274
Comments
Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti Issue DetailsRelated to: On suppressing the warnings for https://github.com/open-telemetry/opentelemetry-dotnet/blob/ef0c9217087bfca0d6fe9206ccde343eb4e5738c/src/OpenTelemetry/Internal/OpenTelemetrySdkEventSource.cs#L203 Regarding the below documentation: When enabling trimming analysis, the message specifies: I checked with @eerhardt that IL2026 could be suppressed in this case: https://github.com/open-telemetry/opentelemetry-dotnet/blob/10eb79cdddbe400608fcdf2dd8ccf91d5a36f262/src/OpenTelemetry/Internal/OpenTelemetrySdkEventSource.cs#L203 because the definition of primitive type here is different from the definition of The definition of the primitive type here means: runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/Statics.cs Lines 484 to 574 in ab2b80d
I'd like to request an update on the IL2026 documentation to provide the definition/exhaustive list of primitive type where the warning could be safely suppressed.
|
My PR (#83751) will make this obsolete as the warning will go away entirely, assuming you are using one of the trim-compatible input types. |
Closing via #83751 |
Related to:
open-telemetry/opentelemetry-dotnet#4428
open-telemetry/opentelemetry-dotnet#4392
On suppressing the warnings for https://github.com/open-telemetry/opentelemetry-dotnet/blob/ef0c9217087bfca0d6fe9206ccde343eb4e5738c/src/OpenTelemetry/Internal/OpenTelemetrySdkEventSource.cs#L203
Regarding the below documentation:
https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trim-warnings/il2026
When enabling trimming analysis, the message specifies:
"... EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type"
I checked with @eerhardt that IL2026 could be suppressed in this case: https://github.com/open-telemetry/opentelemetry-dotnet/blob/10eb79cdddbe400608fcdf2dd8ccf91d5a36f262/src/OpenTelemetry/Internal/OpenTelemetrySdkEventSource.cs#L203
because the definition of primitive type here is different from the definition of
system.type.isprimitive
.The definition of the primitive type here means:
runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/Statics.cs
Lines 484 to 574 in ab2b80d
I'd like to request an update on the IL2026 documentation to provide the definition/exhaustive list of primitive type where the warning could be safely suppressed.
@agocke , @LakshanF
The text was updated successfully, but these errors were encountered: