From 8a8e3b4c241bf1573684e234bb9f459618841c35 Mon Sep 17 00:00:00 2001 From: "Bock, Jason" Date: Thu, 23 Jan 2025 12:59:51 -0600 Subject: [PATCH 1/2] Removed .NET 6, updated package references, couple of small code improvements --- Directory.Build.props | 4 ++-- ...Lib.DistributedTracing.AspNetCore.Tests.csproj | 14 +++++++------- .../AspNetCore/HttpContextExtensions.cs | 4 +++- .../CHANGELOG.md | 5 +++++ .../RockLib.DistributedTracing.AspNetCore.csproj | 15 +++++++-------- 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index a655009..a4fe711 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -7,12 +7,12 @@ Rocket Mortgage latest enable - net6.0;net48;net8.0 + net48;net8.0 NU1603,NU1701 true - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/RockLib.DistributedTracing.AspNetCore.Tests/RockLib.DistributedTracing.AspNetCore.Tests.csproj b/RockLib.DistributedTracing.AspNetCore.Tests/RockLib.DistributedTracing.AspNetCore.Tests.csproj index 7ba1920..f9f57d1 100644 --- a/RockLib.DistributedTracing.AspNetCore.Tests/RockLib.DistributedTracing.AspNetCore.Tests.csproj +++ b/RockLib.DistributedTracing.AspNetCore.Tests/RockLib.DistributedTracing.AspNetCore.Tests.csproj @@ -4,16 +4,16 @@ - - - - - - + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/RockLib.DistributedTracing.AspNetCore/AspNetCore/HttpContextExtensions.cs b/RockLib.DistributedTracing.AspNetCore/AspNetCore/HttpContextExtensions.cs index 489b032..7b9925e 100644 --- a/RockLib.DistributedTracing.AspNetCore/AspNetCore/HttpContextExtensions.cs +++ b/RockLib.DistributedTracing.AspNetCore/AspNetCore/HttpContextExtensions.cs @@ -41,7 +41,7 @@ public static void SetCorrelationId(this HttpContext httpContext, string correla /// The name of the correlation id header. public static ICorrelationIdAccessor GetCorrelationIdAccessor(this HttpContext httpContext, string correlationIdHeader = CorrelationId) { -#if NET6_0_OR_GREATER +#if NET8_0_OR_GREATER ArgumentNullException.ThrowIfNull(httpContext); ArgumentNullException.ThrowIfNull(correlationIdHeader); #else @@ -54,6 +54,7 @@ public static ICorrelationIdAccessor GetCorrelationIdAccessor(this HttpContext h throw new ArgumentNullException(nameof(correlationIdHeader)); } #endif +#pragma warning disable CA1859 // Use concrete types when possible for improved performance if (!httpContext.Items.TryGetValue(typeof(ICorrelationIdAccessor), out var value) || value is not ICorrelationIdAccessor accessor) { @@ -80,6 +81,7 @@ public static ICorrelationIdAccessor GetCorrelationIdAccessor(this HttpContext h httpContext.Items[typeof(ICorrelationIdAccessor)] = accessor; } +#pragma warning restore CA1859 // Use concrete types when possible for improved performance return accessor; } diff --git a/RockLib.DistributedTracing.AspNetCore/CHANGELOG.md b/RockLib.DistributedTracing.AspNetCore/CHANGELOG.md index eee6894..712540a 100644 --- a/RockLib.DistributedTracing.AspNetCore/CHANGELOG.md +++ b/RockLib.DistributedTracing.AspNetCore/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 4.0.0 - 2024-02-15 + +#### Changed +- Removed .NET 6 as a target framework. + ## 3.0.0 - 2024-02-15 #### Changed diff --git a/RockLib.DistributedTracing.AspNetCore/RockLib.DistributedTracing.AspNetCore.csproj b/RockLib.DistributedTracing.AspNetCore/RockLib.DistributedTracing.AspNetCore.csproj index 10d0ca7..1cc0a16 100644 --- a/RockLib.DistributedTracing.AspNetCore/RockLib.DistributedTracing.AspNetCore.csproj +++ b/RockLib.DistributedTracing.AspNetCore/RockLib.DistributedTracing.AspNetCore.csproj @@ -1,6 +1,6 @@  - Copyright 2024 (c) Rocket Mortgage. All rights reserved. + Copyright 2025 (c) Rocket Mortgage. All rights reserved. Embedded Defines standard interfaces for distributed tracing and extension methods for HttpContext to access them. True @@ -11,10 +11,10 @@ https://github.com/RockLib/RockLib.DistributedTracing false A changelog is available at https://github.com/RockLib/RockLib.DistributedTracing/blob/main/RockLib.DistributedTracing.AspNetCore/CHANGELOG.md. - 3.0.0 + 4.0.0 RockLib Distributed-Tracing AspNetCore True - 3.0.0 + 4.0.0 bin\$(Configuration)\$(TargetFramework)\$(PackageId).xml @@ -28,10 +28,9 @@ - - - - - + + + + From 1ed309a1ae56e6c49bb6b83d1af8a2045b9069ca Mon Sep 17 00:00:00 2001 From: "Bock, Jason" Date: Thu, 23 Jan 2025 13:03:02 -0600 Subject: [PATCH 2/2] Update CHANGELOG.md --- RockLib.DistributedTracing.AspNetCore/CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/RockLib.DistributedTracing.AspNetCore/CHANGELOG.md b/RockLib.DistributedTracing.AspNetCore/CHANGELOG.md index 712540a..7340d7b 100644 --- a/RockLib.DistributedTracing.AspNetCore/CHANGELOG.md +++ b/RockLib.DistributedTracing.AspNetCore/CHANGELOG.md @@ -5,10 +5,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## 4.0.0 - 2024-02-15 +## 4.0.0 - 2025-01-23 #### Changed - Removed .NET 6 as a target framework. +- Updated the following package references: + - Microsoft.AspNetCore.Http.Abstractions from 2.2.0 to 2.3.0 + - Microsoft.Extensions.Options from 8.0.0 to 9.0.0 + - OpenTelemetry from 1.7.0 to 1.11.1 + - System.Text.Encodings.Web from 8.0.0 to 9.0.0 ## 3.0.0 - 2024-02-15