-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Instrumentation.AWSLambda] Fix AoT warnings (#1544)
- Loading branch information
1 parent
fffb571
commit 6f064e1
Showing
5 changed files
with
32 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/OpenTelemetry.Instrumentation.AWSLambda/SourceGenerationContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
using System.Text.Json.Serialization; | ||
using Amazon.Lambda.SNSEvents; | ||
|
||
namespace OpenTelemetry.Instrumentation.AWSLambda; | ||
|
||
/// <summary> | ||
/// "Source Generation" is feature added to System.Text.Json in .NET 6.0. | ||
/// This is a performance optimization that avoids runtime reflection when performing serialization. | ||
/// Serialization metadata will be computed at compile-time and included in the assembly. | ||
/// <see href="https://learn.microsoft.com/dotnet/standard/serialization/system-text-json/source-generation-modes" />. | ||
/// <see href="https://learn.microsoft.com/dotnet/standard/serialization/system-text-json/source-generation" />. | ||
/// <see href="https://devblogs.microsoft.com/dotnet/try-the-new-system-text-json-source-generator/" />. | ||
/// </summary> | ||
[JsonSerializable(typeof(SNSEvent.SNSMessage))] | ||
internal sealed partial class SourceGenerationContext : JsonSerializerContext | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters