[Extensions.AWS] Fix sampling behaviour for .NET 11 compatibility#4396
Conversation
Fix sampling behaviour to be compatible with ActivityTraceFlags.RandomTraceId in .NET 11.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4396 +/- ##
=======================================
Coverage 75.69% 75.69%
=======================================
Files 456 456
Lines 18246 18246
=======================================
Hits 13811 13811
Misses 4435 4435
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Ensure recording is enabled if it wasn't already.
There was a problem hiding this comment.
Pull request overview
Fixes the AWS X-Ray ID generator sampling logic so it preserves trace flags (including the new ActivityTraceFlags.RandomTraceId added in .NET 11) instead of clobbering them by resetting to None. Instead of clearing all flags and re-adding Recorded when sampled, the code now selectively toggles only the Recorded bit.
Changes:
- Removed the
activity.ActivityTraceFlags = ActivityTraceFlags.None;reset inUpdateSamplingDecision. - Added an
elsebranch that clears only theRecordedflag (&= ~ActivityTraceFlags.Recorded) when sampling result is notAllDataAndRecorded. - Added a CHANGELOG entry referencing PR #4396.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/OpenTelemetry.Extensions.AWS/AWSXRayIdGenerator.cs | Preserve unrelated trace flags by toggling only the Recorded bit instead of resetting all flags. |
| src/OpenTelemetry.Extensions.AWS/CHANGELOG.md | Document the .NET 11 sampling compatibility fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Updated [Microsoft.EntityFrameworkCore.Design](https://github.com/dotnet/dotnet) from 10.0.8 to 10.0.9. <details> <summary>Release notes</summary> _Sourced from [Microsoft.EntityFrameworkCore.Design's releases](https://github.com/dotnet/dotnet/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/dotnet/commits). </details> Updated [Microsoft.EntityFrameworkCore.SqlServer](https://github.com/dotnet/dotnet) from 10.0.8 to 10.0.9. <details> <summary>Release notes</summary> _Sourced from [Microsoft.EntityFrameworkCore.SqlServer's releases](https://github.com/dotnet/dotnet/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/dotnet/commits). </details> Updated [Microsoft.EntityFrameworkCore.Tools](https://github.com/dotnet/dotnet) from 10.0.8 to 10.0.9. <details> <summary>Release notes</summary> _Sourced from [Microsoft.EntityFrameworkCore.Tools's releases](https://github.com/dotnet/dotnet/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/dotnet/commits). </details> Updated [Microsoft.Extensions.Caching.StackExchangeRedis](https://github.com/dotnet/dotnet) from 10.0.8 to 10.0.9. <details> <summary>Release notes</summary> _Sourced from [Microsoft.Extensions.Caching.StackExchangeRedis's releases](https://github.com/dotnet/dotnet/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/dotnet/commits). </details> Updated [Microsoft.VisualStudio.Azure.Containers.Tools.Targets](https://aka.ms/vscontainertools) from 1.20.1 to 1.23.0. Updated [OpenTelemetry.Instrumentation.AspNetCore](https://github.com/open-telemetry/opentelemetry-dotnet-contrib) from 1.15.2 to 1.16.0. <details> <summary>Release notes</summary> _Sourced from [OpenTelemetry.Instrumentation.AspNetCore's releases](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/releases)._ ## 1.16.0 * NuGet: [OpenTelemetry.Extensions.AWS v1.16.0](https://www.nuget.org/packages/OpenTelemetry.Extensions.AWS/1.16.0) * Fix sampling behaviour to be compatible with .NET 11. ([#4396](open-telemetry/opentelemetry-dotnet-contrib#4396)) * Updated OpenTelemetry core component version(s) to `1.16.0`. ([#4487](open-telemetry/opentelemetry-dotnet-contrib#4487)) See [CHANGELOG](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.AWS-1.16.0/src/OpenTelemetry.Extensions.AWS/CHANGELOG.md) for details. * NuGet: [OpenTelemetry.Instrumentation.AWS v1.16.0](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AWS/1.16.0) * Add instrumentation scope version and schema URL to metrics and traces. ([#4063](open-telemetry/opentelemetry-dotnet-contrib#4063)) * Pass AWS attribute values to created meters as tags. ([#4063](open-telemetry/opentelemetry-dotnet-contrib#4063)) * Capture SNS `TopicArn` as the `aws.sns.topic.arn` span attribute. ([#4043](open-telemetry/opentelemetry-dotnet-contrib#4043)) * Add `cloud.region` attribute to all AWS SDK client spans. ([#4043](open-telemetry/opentelemetry-dotnet-contrib#4043)) * Add messaging attributes for AWS SNS and SQS. ([#4043](open-telemetry/opentelemetry-dotnet-contrib#4043)) * BREAKING: Update latest AWS Semantic Conventions to 1.40.0. ([#4043](open-telemetry/opentelemetry-dotnet-contrib#4043)) * Fix suppression scope leakage when `SuppressDownstreamInstrumentation` is enabled. ([#4304](open-telemetry/opentelemetry-dotnet-contrib#4304)) See [CHANGELOG](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.AWS-1.16.0/src/OpenTelemetry.Instrumentation.AWS/CHANGELOG.md) for details. * NuGet: [OpenTelemetry.Instrumentation.AWSLambda v1.16.0](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AWSLambda/1.16.0) * Update `System.Text.Json` for `netstandard2.0` to `8.0.5`. ([#4154](open-telemetry/opentelemetry-dotnet-contrib#4154)) * Add instrumentation scope version and schema URL to traces. ([#4063](open-telemetry/opentelemetry-dotnet-contrib#4063)) See [CHANGELOG](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.AWS-1.16.0/src/OpenTelemetry.Instrumentation.AWSLambda/CHANGELOG.md) for details. ## 1.16.0-beta.1 * NuGet: [OpenTelemetry.Instrumentation.ServiceFabricRemoting v1.16.0-beta.1](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.ServiceFabricRemoting/1.16.0-beta.1) * Raised the minimum required version of `Microsoft.ServiceFabric.Actors` and `Microsoft.ServiceFabric.Services.Remoting` from `7.1.2448` to `8.4.268`, as the `7.1` Service Fabric runtime is going out of support. ([#4510](open-telemetry/opentelemetry-dotnet-contrib#4510)) * Updated OpenTelemetry core component version(s) to `1.16.0`. ([#4487](open-telemetry/opentelemetry-dotnet-contrib#4487)) See [CHANGELOG](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.ServiceFabricRemoting-1.16.0-beta.1/src/OpenTelemetry.Instrumentation.ServiceFabricRemoting/CHANGELOG.md) for details. ## 1.16.0-alpha.1 * NuGet: [OpenTelemetry.Instrumentation.EventCounters v1.16.0-alpha.1](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.EventCounters/1.16.0-alpha.1) * Fixed `OnEventWritten` processing events from EventSources that were not configured via `AddEventSources`. ([#4031](open-telemetry/opentelemetry-dotnet-contrib#4031)) * Updated OpenTelemetry core component version(s) to `1.16.0`. ([#4487](open-telemetry/opentelemetry-dotnet-contrib#4487)) See [CHANGELOG](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/Instrumentation.EventCounters-1.16.0-alpha.1/src/OpenTelemetry.Instrumentation.EventCounters/CHANGELOG.md) for details. Commits viewable in [compare view](open-telemetry/opentelemetry-dotnet-contrib@Exporter.Geneva-1.15.2...Instrumentation.AWS-1.16.0). </details> Updated [Swashbuckle.AspNetCore](https://github.com/domaindrivendev/Swashbuckle.AspNetCore) from 6.4.0 to 6.9.0. <details> <summary>Release notes</summary> _Sourced from [Swashbuckle.AspNetCore's releases](https://github.com/domaindrivendev/Swashbuckle.AspNetCore/releases)._ ## 6.9.0 ## What's Changed * Generate Properties whenever there are objects without schema(Not onl… by @jgarciadelanoceda in domaindrivendev/Swashbuckle.AspNetCore#3095 * fix: Pass props to multi targeting by @xC0dex in domaindrivendev/Swashbuckle.AspNetCore#3107 * Types with TryParse must be set with type string by @jgarciadelanoceda in domaindrivendev/Swashbuckle.AspNetCore#3108 * Add native AoT support for ReDoc by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3088 ## New Contributors * @xC0dex made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#3107 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v6.8.1...v6.9.0 ## 6.8.1 ## What's Changed * Fix issue when applying filters for WithOpenApi extension by @jgarciadelanoceda in domaindrivendev/Swashbuckle.AspNetCore#3085 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v6.8.0...v6.8.1 ## 6.8.0 ## What's Changed * Added dependency injection/easy registration for async filters by @tofi92 in domaindrivendev/Swashbuckle.AspNetCore#3030 * Improve IncludeXmlComments performance (2) by @mus65 in domaindrivendev/Swashbuckle.AspNetCore#3044 * Apply ParameterFilters and RequestBodyFilters for WithOpenApi endpoints by @jgarciadelanoceda in domaindrivendev/Swashbuckle.AspNetCore#3059 * Swagger plugins support by @jvmlet in domaindrivendev/Swashbuckle.AspNetCore#3056 * Add benchmarks project by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3050 * Fix NuGet badge by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3064 * SwaggerGen - Improved handling of dictionaries with enum key by @flarestudiopl in domaindrivendev/Swashbuckle.AspNetCore#3068 * Fix typo by @tom-star119 in domaindrivendev/Swashbuckle.AspNetCore#3073 * Do not fill the RequestBody description with the first parameter of a… by @jgarciadelanoceda in domaindrivendev/Swashbuckle.AspNetCore#3076 ## New Contributors * @tofi92 made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#3030 * @mus65 made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#3044 * @jvmlet made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#3056 * @flarestudiopl made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#3068 * @tom-star119 made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#3073 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v6.7.3...v6.8.0 ## 6.7.3 ## What's Changed * Fix nested types nullable context check by @VladimirTyrin in domaindrivendev/Swashbuckle.AspNetCore#3043 * Use NullabilityInfoContext to determine if member is nullable by @patrikwlund in domaindrivendev/Swashbuckle.AspNetCore#3046 ## New Contributors * @VladimirTyrin made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#3043 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v6.7.2...v6.7.3 ## 6.7.2 ## What's Changed * Use NullabilityInfoContext to determine dictionary value nullability by @patrikwlund in domaindrivendev/Swashbuckle.AspNetCore#3041 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v6.7.1...v6.7.2 ## 6.7.1 ## What's Changed * docs: Update README.md by @WeihanLi in domaindrivendev/Swashbuckle.AspNetCore#3002 * Support `[DataMember]` `IsRequired` in `NewtonsoftDataContractResolver` by @ouvreboite in domaindrivendev/Swashbuckle.AspNetCore#2644 * Add API analysers by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3003 * Update README by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3004 * docs: fix example code formatting by @WeihanLi in domaindrivendev/Swashbuckle.AspNetCore#3010 * Fixes nullability problems with dictionaries by @ozziepeeps in domaindrivendev/Swashbuckle.AspNetCore#3023 * Fix handling of nullable structs by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3015 * Fix missing form parameter XML documentation by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#3020 ## New Contributors * @ouvreboite made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#2644 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v6.7.0...v6.7.1 ## 6.7.0 ## What's Changed * Allow Swagger UI CSS and JS paths to be configurable by @mag1art in domaindrivendev/Swashbuckle.AspNetCore#2908 * Add `IncludeXmlCommentsForAssembly()` convience overload by @leotsarev in domaindrivendev/Swashbuckle.AspNetCore#2909 * Add snapshot tests using Verify by @keahpeters in domaindrivendev/Swashbuckle.AspNetCore#2929 * Add posibility to ignore properties in `[FromForm]` with `[SwaggerIgnore]` by @jgarciadelanoceda in domaindrivendev/Swashbuckle.AspNetCore#2928 * Adding check for existing directory and creating if doesn't exist by @matt-lethargic in domaindrivendev/Swashbuckle.AspNetCore#2927 * Default null value on nullable types caused errors by @jgarciadelanoceda in domaindrivendev/Swashbuckle.AspNetCore#2941 * Add additional Verify tests by @keahpeters in domaindrivendev/Swashbuckle.AspNetCore#2950 * Only apply a SchemaFilter to create the description on SwaggerUI by @jgarciadelanoceda in domaindrivendev/Swashbuckle.AspNetCore#2943 * Add support for async filters by @mauve in domaindrivendev/Swashbuckle.AspNetCore#2938 * Fix package validation by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2926 * Adding support for .NET 8 Model State attributes by @jgarciadelanoceda in domaindrivendev/Swashbuckle.AspNetCore#2958 * Only set Exclusive Range when they are by @jgarciadelanoceda in domaindrivendev/Swashbuckle.AspNetCore#2960 * `[AsParameters]` throwing error on cast when showing the description with `EnableAnnotations()` by @jgarciadelanoceda in domaindrivendev/Swashbuckle.AspNetCore#2962 * Fix `RequestBodyFilterAnnotation` and `MultipleFromForm` for Minimal APIs by @jgarciadelanoceda in domaindrivendev/Swashbuckle.AspNetCore#2963 * Swagger UI refactoring by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2942 * Add help wanted badge by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2911 * Move inline css and js to external files for SwaggerUI and ReDoc by @junior-santana in domaindrivendev/Swashbuckle.AspNetCore#2965 * Missing properties section when generating `IFomFile`/`IFormFileCollection` by @jgarciadelanoceda in domaindrivendev/Swashbuckle.AspNetCore#2972 * Missing Encoding and RequiredProperties when `IFormFile` with OpenAPI by @jgarciadelanoceda in domaindrivendev/Swashbuckle.AspNetCore#2979 * Use `ApiParameter.Type` by @jgarciadelanoceda in domaindrivendev/Swashbuckle.AspNetCore#2980 * Document arrays of generic parameters with XML comments and support overload methods by @jgarciadelanoceda in domaindrivendev/Swashbuckle.AspNetCore#2982 * Take into account [JsonRequired] for System.Text.Json by @jgarciadelanoceda in domaindrivendev/Swashbuckle.AspNetCore#2988 * Configure non-nullable types as required by @AntiGuideAkquinet in domaindrivendev/Swashbuckle.AspNetCore#2803 * Use `HttpMethods.IsGet()` by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2971 ## New Contributors * @mag1art made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#2908 * @jgarciadelanoceda made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#2928 * @matt-lethargic made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#2927 * @mauve made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#2938 * @junior-santana made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#2965 * @AntiGuideAkquinet made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#2803 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v6.6.2...v6.7.0 ## 6.6.2 ## What's Changed * Fix to make required and nullable properties nullable in schema by @keahpeters in domaindrivendev/Swashbuckle.AspNetCore#2879 * Update Swagger UI section in README by @cremor in domaindrivendev/Swashbuckle.AspNetCore#2883 * Add support for the `[Length]`attribute. by @satma0745 in domaindrivendev/Swashbuckle.AspNetCore#2882 * Existing output file should be deleted/overwritten by @patrikwlund in domaindrivendev/Swashbuckle.AspNetCore#2886 * Fix libraries being handled as test projects by @patrikwlund in domaindrivendev/Swashbuckle.AspNetCore#2898 * Avoid competing swagger generation during test build by @patrikwlund in domaindrivendev/Swashbuckle.AspNetCore#2897 * Replace `<br />`, `<br/>`, and `<br>` in XML comments with `Environment.Newline` by @mburumaxwell in domaindrivendev/Swashbuckle.AspNetCore#2899 * Fix schema generation for c#9 positional record with param tag without example property creating unexpected empty example by @stb-co in domaindrivendev/Swashbuckle.AspNetCore#2901 * Fix serialization of `AdditionalItems` by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2890 * Disable parallel build by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2894 * Do not run `IHostedService` implementations by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2880 * Fix interceptor JSON casing by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2907 * Fix generation when `[DefaultValue]`'s type differs by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2895 ## New Contributors * @satma0745 made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#2882 * @patrikwlund made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#2886 * @stb-co made their first contribution in domaindrivendev/Swashbuckle.AspNetCore#2901 **Full Changelog**: domaindrivendev/Swashbuckle.AspNetCore@v6.6.1...v6.6.2 ## 6.6.1 ## What's Changed * Modernise build and migrate to GitHub Actions for CI by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2775 * Update Redoc spelling in docs by @Quppa in domaindrivendev/Swashbuckle.AspNetCore#2568 * C# 9 Record - Read example/summary from positional record by @pixellos in domaindrivendev/Swashbuckle.AspNetCore#2546 * Grammatical correction of some comments by @mokarchi in domaindrivendev/Swashbuckle.AspNetCore#2768 * Update README.md for nested types custom schemaId support by @antmeehan in domaindrivendev/Swashbuckle.AspNetCore#2746 * Add support for `WithSummary` and `WithDescription` metadata by @hwoodiwiss in domaindrivendev/Swashbuckle.AspNetCore#2414 * Update README.md - Fix `Add Security Definitions and Requirements for Bearer auth` URL by @Saibamen in domaindrivendev/Swashbuckle.AspNetCore#2705 * Replace <see href="link">text</see> with Markdown link format by @mburumaxwell in domaindrivendev/Swashbuckle.AspNetCore#2392 * Add support for required keyword by @keahpeters in domaindrivendev/Swashbuckle.AspNetCore#2810 * Resolves #2717 by @MerickOWA in domaindrivendev/Swashbuckle.AspNetCore#2718 * Observe the route template constraints in the Swagger middleware by @0xced in domaindrivendev/Swashbuckle.AspNetCore#2418 * Added Swashbuckle.AspNetCore.Annotations.SwaggerIgnoreAttribute by @jcracknell in domaindrivendev/Swashbuckle.AspNetCore#2610 * Fix schema generation with allOf inheritance by @bkoelman in domaindrivendev/Swashbuckle.AspNetCore#2815 * avoid triple enumeration of formParameters by @SimonCropp in domaindrivendev/Swashbuckle.AspNetCore#2823 * reduce some linq allocation by @SimonCropp in domaindrivendev/Swashbuckle.AspNetCore#2819 * remove some duplicate dictionary lookups by @SimonCropp in domaindrivendev/Swashbuckle.AspNetCore#2822 * remove redundant any check in InferRequestContentTypes by @SimonCropp in domaindrivendev/Swashbuckle.AspNetCore#2824 * Correctly respect interfaces in `GetInheritanceChain` by @angelaki in domaindrivendev/Swashbuckle.AspNetCore#2826 * Generate Enum-Dictionary-Keys (analogous to Newtonsoft) by @angelaki in domaindrivendev/Swashbuckle.AspNetCore#2825 * Fix build badge by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2782 * Fix preview package versions by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2783 * Handle Stream and PipeReader content types correctly by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2784 * Add NuGet package READMEs by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2808 * Bump redoc to 2.1.3 by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2807 * Sort system usings first by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2790 * Throw if unsupported HTTP method used by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2797 * Fix configuration properties not being copied by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2796 * Add security policy by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2785 * Bump Microsoft.OpenApi by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2795 * Update to Swagger UI v5 by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2806 * Add customized document serialization support by @remcolam in domaindrivendev/Swashbuckle.AspNetCore#2677 * Added documentation for ISwaggerDocumentSerializer by @remcolam in domaindrivendev/Swashbuckle.AspNetCore#2837 * Fix flaky tests by locking on the statup type by @remcolam in domaindrivendev/Swashbuckle.AspNetCore#2838 * #2765 Allow Filter instance reuse by @remcolam in domaindrivendev/Swashbuckle.AspNetCore#2839 * Throw an error when a user uses FromForm attribute with IFormFile in … by @nikunjbhargava in domaindrivendev/Swashbuckle.AspNetCore#2840 * Filter illegal header fields by @keahpeters in domaindrivendev/Swashbuckle.AspNetCore#2842 * Fix handling of FileResult's with content types by @IGx89 in domaindrivendev/Swashbuckle.AspNetCore#2841 * Adding additional responses when 5XX errors are thrown. by @say25 in domaindrivendev/Swashbuckle.AspNetCore#2852 * Fix that XML comment examples do not show up if the type is string and the example contains quotation marks by @dldl-cmd in domaindrivendev/Swashbuckle.AspNetCore#2727 * Exclude unused Swagger-UI files by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2851 * Fix RequestBodyFilters not being deep copied by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2850 * Avoid GitHub step summary file write conflicts by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2848 * Extend built-in supported types by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2804 * Update compatibility table by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2856 * Add GitHub issue and PR templates by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2788 * Fix stale permissions by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2855 * Add .NET 8 support by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2799 * Release automation workflows by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2809 ... (truncated) ## 6.6.0 ## What's Changed * Modernise build and migrate to GitHub Actions for CI by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2775 * Update Redoc spelling in docs by @Quppa in domaindrivendev/Swashbuckle.AspNetCore#2568 * C# 9 Record - Read example/summary from positional record by @pixellos in domaindrivendev/Swashbuckle.AspNetCore#2546 * Grammatical correction of some comments by @mokarchi in domaindrivendev/Swashbuckle.AspNetCore#2768 * Update README.md for nested types custom schemaId support by @antmeehan in domaindrivendev/Swashbuckle.AspNetCore#2746 * Add support for `WithSummary` and `WithDescription` metadata by @hwoodiwiss in domaindrivendev/Swashbuckle.AspNetCore#2414 * Update README.md - Fix `Add Security Definitions and Requirements for Bearer auth` URL by @Saibamen in domaindrivendev/Swashbuckle.AspNetCore#2705 * Replace <see href="link">text</see> with Markdown link format by @mburumaxwell in domaindrivendev/Swashbuckle.AspNetCore#2392 * Add support for required keyword by @keahpeters in domaindrivendev/Swashbuckle.AspNetCore#2810 * Resolves #2717 by @MerickOWA in domaindrivendev/Swashbuckle.AspNetCore#2718 * Observe the route template constraints in the Swagger middleware by @0xced in domaindrivendev/Swashbuckle.AspNetCore#2418 * Added Swashbuckle.AspNetCore.Annotations.SwaggerIgnoreAttribute by @jcracknell in domaindrivendev/Swashbuckle.AspNetCore#2610 * Fix schema generation with allOf inheritance by @bkoelman in domaindrivendev/Swashbuckle.AspNetCore#2815 * avoid triple enumeration of formParameters by @SimonCropp in domaindrivendev/Swashbuckle.AspNetCore#2823 * reduce some linq allocation by @SimonCropp in domaindrivendev/Swashbuckle.AspNetCore#2819 * remove some duplicate dictionary lookups by @SimonCropp in domaindrivendev/Swashbuckle.AspNetCore#2822 * remove redundant any check in InferRequestContentTypes by @SimonCropp in domaindrivendev/Swashbuckle.AspNetCore#2824 * Correctly respect interfaces in `GetInheritanceChain` by @angelaki in domaindrivendev/Swashbuckle.AspNetCore#2826 * Generate Enum-Dictionary-Keys (analogous to Newtonsoft) by @angelaki in domaindrivendev/Swashbuckle.AspNetCore#2825 * Fix build badge by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2782 * Fix preview package versions by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2783 * Handle Stream and PipeReader content types correctly by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2784 * Add NuGet package READMEs by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2808 * Bump redoc to 2.1.3 by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2807 * Sort system usings first by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2790 * Throw if unsupported HTTP method used by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2797 * Fix configuration properties not being copied by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2796 * Add security policy by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2785 * Bump Microsoft.OpenApi by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2795 * Update to Swagger UI v5 by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2806 * Add customized document serialization support by @remcolam in domaindrivendev/Swashbuckle.AspNetCore#2677 * Added documentation for ISwaggerDocumentSerializer by @remcolam in domaindrivendev/Swashbuckle.AspNetCore#2837 * Fix flaky tests by locking on the statup type by @remcolam in domaindrivendev/Swashbuckle.AspNetCore#2838 * #2765 Allow Filter instance reuse by @remcolam in domaindrivendev/Swashbuckle.AspNetCore#2839 * Throw an error when a user uses FromForm attribute with IFormFile in … by @nikunjbhargava in domaindrivendev/Swashbuckle.AspNetCore#2840 * Filter illegal header fields by @keahpeters in domaindrivendev/Swashbuckle.AspNetCore#2842 * Fix handling of FileResult's with content types by @IGx89 in domaindrivendev/Swashbuckle.AspNetCore#2841 * Adding additional responses when 5XX errors are thrown. by @say25 in domaindrivendev/Swashbuckle.AspNetCore#2852 * Fix that XML comment examples do not show up if the type is string and the example contains quotation marks by @dldl-cmd in domaindrivendev/Swashbuckle.AspNetCore#2727 * Exclude unused Swagger-UI files by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2851 * Fix RequestBodyFilters not being deep copied by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2850 * Avoid GitHub step summary file write conflicts by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2848 * Extend built-in supported types by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2804 * Update compatibility table by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2856 * Add GitHub issue and PR templates by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2788 * Fix stale permissions by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2855 * Add .NET 8 support by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2799 * Release automation workflows by @martincostello in domaindrivendev/Swashbuckle.AspNetCore#2809 ... (truncated) ## 6.5.0 [Changes since v6.4.0](domaindrivendev/Swashbuckle.AspNetCore@v6.4.0...v6.5.0) Commits viewable in [compare view](domaindrivendev/Swashbuckle.AspNetCore@v6.4.0...v6.9.0). </details> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Changes
Fix sampling behaviour to be compatible with
ActivityTraceFlags.RandomTraceIdin .NET 11 (dotnet/runtime#124509).OpenTelemetry.Extensions.AWS doesn't directly reference System.DiagnosticSource and the relevant code only targets .NET Framework so
Activity.HasRandomizedTraceIdcan't be referenced in the code, but if the flag were set by other code the current approach would clobber the flag.This refactors to leave the original flags as-is, then turn off
ActivityTraceFlags.Recordedif needed.Merge requirement checklist
Unit tests added/updatedCHANGELOG.mdfiles updated for non-trivial changesChanges in public API reviewed (if applicable)