Skip to content
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

[Exporter.OneCollector] Remove .NET 6 target #2123

Merged
merged 7 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build/Common.nonprod.props
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<OpenTelemetryExporterInMemoryPkgVer>$(OpenTelemetryCoreLatestVersion)</OpenTelemetryExporterInMemoryPkgVer>
<OpenTelemetryExporterInMemoryLatestPreReleasePkgVer>$(OpenTelemetryCoreLatestPrereleaseVersion)</OpenTelemetryExporterInMemoryLatestPreReleasePkgVer>
<SupportedNetTargets>net8.0;net6.0</SupportedNetTargets>
<SupportedNetTargetsWithoutNet6>net8.0</SupportedNetTargetsWithoutNet6>
<XUnitRunnerVisualStudioPkgVer>[2.8.2,3.0)</XUnitRunnerVisualStudioPkgVer>
<XUnitPkgVer>[2.9.0,3.0)</XUnitPkgVer>
<WiremockNetPkgVer>[1.6.3,2.0)</WiremockNetPkgVer>
Expand Down
3 changes: 3 additions & 0 deletions src/OpenTelemetry.Exporter.OneCollector/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Drop support for .NET 6 as this target is no longer supported.
([#2123](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/2123))

## 1.10.0-alpha.1

Released 2024-Sep-06
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/diagnostic-ids -->
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Suppression>
<DiagnosticId>CP0008</DiagnosticId>
<Target>T:OpenTelemetry.Exporter.OneCollector.OneCollectorExporterSerializationExceptionStackTraceHandlingType</Target>
<Left>lib/net6.0/OpenTelemetry.Exporter.OneCollector.dll</Left>
<Right>lib/netstandard2.1/OpenTelemetry.Exporter.OneCollector.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0008</DiagnosticId>
<Target>T:OpenTelemetry.Exporter.OneCollector.OneCollectorExporterSerializationExceptionStackTraceHandlingType</Target>
<Left>lib/net7.0/OpenTelemetry.Exporter.OneCollector.dll</Left>
<Right>lib/net6.0/OpenTelemetry.Exporter.OneCollector.dll</Right>
<Right>lib/netstandard2.1/OpenTelemetry.Exporter.OneCollector.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
</Suppressions>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public IDisposable Add(T callback)

lock (this.lockObject)
{
#if NET8_0_OR_GREATER
#if NET
ObjectDisposedException.ThrowIf(this.disposed, nameof(CallbackManager<T>));
#else
if (this.disposed)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace OpenTelemetry.Exporter.OneCollector;

internal readonly struct BatchSerializationResult
{
#if NET8_0_OR_GREATER
#if NET
public required int NumberOfItemsSerialized { get; init; }

public required int NumberOfItemsDropped { get; init; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public static void SerializeValueToJson(object? value, Utf8JsonWriter writer)
writer.WriteStringValue(v);
return;

#if NET8_0_OR_GREATER
#if NET
case DateOnly v:
JsonMetadataServices.DateOnlyConverter.Write(writer, v, null!);
return;
Expand All @@ -111,7 +111,7 @@ public static void SerializeValueToJson(object? value, Utf8JsonWriter writer)
JsonMetadataServices.TimeSpanConverter.Write(writer, v, null!);
return;

#if NET8_0_OR_GREATER
#if NET
case TimeOnly v:
JsonMetadataServices.TimeOnlyConverter.Write(writer, v, null!);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public TransportSendRequest()
#endif
}

#if NET8_0_OR_GREATER
#if NET
public required string ItemType { get; init; }

public required OneCollectorExporterSerializationFormatType ItemSerializationFormat { get; init; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Description>An OpenTelemetry .NET exporter that sends telemetry to Microsoft OneCollector</Description>
<TargetFrameworks>net8.0;net6.0;netstandard2.1;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net8.0;netstandard2.1;netstandard2.0</TargetFrameworks>
CodeBlanch marked this conversation as resolved.
Show resolved Hide resolved
<TargetFrameworks Condition="$(OS) == 'Windows_NT'">$(TargetFrameworks);net462</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Description>An OpenTelemetry .NET exporter that sends telemetry to Microsoft OneCollector.</Description>
<MinVerTagPrefix>Exporter.OneCollector-</MinVerTagPrefix>
<EnableConfigurationBindingGenerator>true</EnableConfigurationBindingGenerator>
<!-- Note: SYSLIB1100;SYSLIB1101 - Configuration.Binder: Can't create
Expand All @@ -23,7 +23,7 @@

<ItemGroup>
<PackageReference Include="OpenTelemetry" Version="$(OTelSdkVersion)" />
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonPkgVer)" Condition="'$(TargetFramework)' != 'net8.0' AND '$(TargetFramework)' != 'net6.0'" />
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonPkgVer)" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="$(MicrosoftExtensionsConfigurationBinderPkgVer)" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<Description>Benchmark project for OpenTelemetry .NET OneCollectorExporter.</Description>
<!-- OmniSharp/VS Code requires TargetFrameworks to be in descending order for IntelliSense and analysis. -->
<TargetFrameworks>$(SupportedNetTargets)</TargetFrameworks>
Kielek marked this conversation as resolved.
Show resolved Hide resolved
<TargetFrameworks>$(SupportedNetTargetsWithoutNet6)</TargetFrameworks>
<TargetFrameworks Condition="$(OS) == 'Windows_NT'">$(TargetFrameworks);net48;net472;net471;net47;net462</TargetFrameworks>
<OutputType>Exe</OutputType>
<Description>Benchmark project for OpenTelemetry .NET OneCollectorExporter.</Description>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="$(BenchmarkDotNetPkgVer)" />
<PackageReference Include="System.Net.Http" Version="$(SystemNetHttp)" Condition="'$(TargetFramework)' != 'net6.0' AND '$(TargetFramework)' != 'net8.0'" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.OneCollector\OpenTelemetry.Exporter.OneCollector.csproj" />
</ItemGroup>

<ItemGroup>
<Reference Include="System.Net.Http" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>Unit test project for OpenTelemetry .NET OneCollectorExporter.</Description>
<!-- OmniSharp/VS Code requires TargetFrameworks to be in descending order for IntelliSense and analysis. -->
<TargetFrameworks>$(SupportedNetTargets)</TargetFrameworks>
<TargetFrameworks>$(SupportedNetTargetsWithoutNet6)</TargetFrameworks>
<TargetFrameworks Condition="$(OS) == 'Windows_NT'">$(TargetFrameworks);net48;net472;net471;net47;net462</TargetFrameworks>
<Description>Unit test project for OpenTelemetry .NET OneCollectorExporter.</Description>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Net.Http" Version="$(SystemNetHttp)" Condition="'$(TargetFramework)' != 'net6.0' AND '$(TargetFramework)' != 'net8.0'" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.OneCollector\OpenTelemetry.Exporter.OneCollector.csproj" />
</ItemGroup>
Expand Down
Loading