-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Cijo Thomas <cijo.thomas@gmail.com>
- Loading branch information
1 parent
b21a0f9
commit 397e9f8
Showing
20 changed files
with
150 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
# Changelog | ||
|
||
## Unreleased | ||
|
||
* Make Extensions.Enrichment AoT compatible. | ||
([#1541](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/1541)) |
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
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
7 changes: 7 additions & 0 deletions
7
src/OpenTelemetry.ResourceDetectors.AWS/Models/AWSEC2IdentityDocumentModel.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 |
---|---|---|
@@ -1,17 +1,24 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace OpenTelemetry.ResourceDetectors.AWS.Models; | ||
|
||
internal class AWSEC2IdentityDocumentModel | ||
{ | ||
[JsonPropertyName("accountId")] | ||
public string? AccountId { get; set; } | ||
|
||
[JsonPropertyName("availabilityZone")] | ||
public string? AvailabilityZone { get; set; } | ||
|
||
[JsonPropertyName("region")] | ||
public string? Region { get; set; } | ||
|
||
[JsonPropertyName("instanceId")] | ||
public string? InstanceId { get; set; } | ||
|
||
[JsonPropertyName("instanceType")] | ||
public string? InstanceType { get; set; } | ||
} |
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
5 changes: 4 additions & 1 deletion
5
src/OpenTelemetry.ResourceDetectors.AWS/Models/AWSEKSClusterInformationModel.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 |
---|---|---|
@@ -1,9 +1,12 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace OpenTelemetry.ResourceDetectors.AWS.Models; | ||
|
||
internal class AWSEKSClusterInformationModel | ||
internal sealed class AWSEKSClusterInformationModel | ||
{ | ||
[JsonPropertyName("data")] | ||
public AWSEKSClusterDataModel? Data { get; set; } | ||
} |
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
24 changes: 24 additions & 0 deletions
24
src/OpenTelemetry.ResourceDetectors.AWS/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,24 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#if NET6_0_OR_GREATER | ||
using System.Text.Json.Serialization; | ||
using OpenTelemetry.ResourceDetectors.AWS.Models; | ||
|
||
namespace OpenTelemetry.ResourceDetectors.AWS; | ||
|
||
/// <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(AWSEBSMetadataModel))] | ||
[JsonSerializable(typeof(AWSEC2IdentityDocumentModel))] | ||
[JsonSerializable(typeof(AWSEKSClusterInformationModel))] | ||
internal sealed partial class SourceGenerationContext : JsonSerializerContext | ||
{ | ||
} | ||
#endif |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#if NET6_0_OR_GREATER | ||
using System.Text.Json.Serialization; | ||
|
||
namespace OpenTelemetry.Sampler.AWS; | ||
|
||
/// <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(GetSamplingRulesResponse))] | ||
[JsonSerializable(typeof(GetSamplingTargetsRequest))] | ||
[JsonSerializable(typeof(GetSamplingTargetsResponse))] | ||
internal sealed partial class SourceGenerationContext : JsonSerializerContext | ||
{ | ||
} | ||
#endif |
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