Skip to content

Commit

Permalink
Remove net5.0 from Zipkin and replace with net6.0 (#3222)
Browse files Browse the repository at this point in the history
* Remove net5.0 from Zipkin and replace with net6.0

* Public api
  • Loading branch information
cijothomas authored Apr 22, 2022
1 parent 11699a3 commit e35216a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
6 changes: 6 additions & 0 deletions src/OpenTelemetry.Exporter.Zipkin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Unreleased

* Removes net5.0 target and replaced with net6.0
as .NET 5.0 is going out of support.
The package keeps netstandard2.0 target, so it
can still be used with .NET5.0 apps.
([#3147](https://github.com/open-telemetry/opentelemetry-dotnet/issues/3147))

## 1.3.0-beta.1

Released 2022-Apr-15
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- OmniSharp/VS Code requires TargetFrameworks to be in descending order for IntelliSense and analysis. -->
<TargetFrameworks>net5.0;netstandard2.0;net462;</TargetFrameworks>
<TargetFrameworks>net6.0;netstandard2.0;net462;</TargetFrameworks>
<Description>Zipkin exporter for OpenTelemetry .NET</Description>
<PackageTags>$(PackageTags);Zipkin;distributed-tracing</PackageTags>
<MinVerTagPrefix>core-</MinVerTagPrefix>
</PropertyGroup>

<!--Do not run ApiCompat for net462 as this is newly added. There is no existing contract for net462 against which we could compare the implementation.
Remove this property once we have released a stable net462 version.-->
<PropertyGroup Condition="'$(TargetFramework)' == 'net462'">
<!--Do not run ApiCompat for net462/net6.0 as this is newly added. There is no existing contract for net462 against which we could compare the implementation.
Remove this property once we have released a stable net462/net6.0 version.-->
<PropertyGroup Condition="'$(TargetFramework)' == 'net462' OR '$(TargetFramework)' == 'net6.0'">
<RunApiCompat>false</RunApiCompat>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions src/OpenTelemetry.Exporter.Zipkin/ZipkinExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public override ExportResult Export(in Batch<Activity> batch)
Content = new JsonContent(this, batch),
};

#if NET5_0_OR_GREATER
#if NET6_0_OR_GREATER
using var response = this.httpClient.Send(request, CancellationToken.None);
#else
using var response = this.httpClient.SendAsync(request, CancellationToken.None).GetAwaiter().GetResult();
Expand Down Expand Up @@ -206,7 +206,7 @@ public JsonContent(ZipkinExporter exporter, in Batch<Activity> batch)
this.Headers.ContentType = JsonHeader;
}

#if NET5_0_OR_GREATER
#if NET6_0_OR_GREATER
protected override void SerializeToStream(Stream stream, TransportContext context, CancellationToken cancellationToken)
{
this.SerializeToStreamInternal(stream);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<Description>Unit test project for Zipkin Exporter for OpenTelemetry</Description>
<!-- OmniSharp/VS Code requires TargetFrameworks to be in descending order for IntelliSense and analysis. -->
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net6.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks Condition="$(OS) == 'Windows_NT'">$(TargetFrameworks);net462</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down

0 comments on commit e35216a

Please sign in to comment.