Skip to content

Commit

Permalink
[Jaeger] Update preprocessor directives in Jaeger thrift code (#4349)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeBlanch authored Mar 30, 2023
1 parent 533513f commit a274f06
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public override void WriteDouble(double d)
WriteI64(BitConverter.DoubleToInt64Bits(d));
}

#if NETSTANDARD2_1_OR_GREATER
#if NETSTANDARD2_1_OR_GREATER || NET6_0_OR_GREATER
public override void WriteBinary(ReadOnlySpan<byte> bytes)
{
WriteI32(bytes.Length);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ public override void WriteDouble(double d)
Transport.Write(PreAllocatedBuffer, 0, 8);
}

#if NETSTANDARD2_1_OR_GREATER
#if NETSTANDARD2_1_OR_GREATER || NET6_0_OR_GREATER
public override void WriteBinary(ReadOnlySpan<byte> bytes)
{
Int32ToVarInt((uint)bytes.Length, ref PreAllocatedVarInt);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ protected virtual void Dispose(bool disposing)

public virtual void WriteString(string s)
{
#if NETSTANDARD2_1_OR_GREATER
#if NETSTANDARD2_1_OR_GREATER || NET6_0_OR_GREATER
if (s.Length <= 128)
{
Span<byte> buffer = stackalloc byte[256];
Expand All @@ -165,7 +165,7 @@ public virtual void WriteString(string s)
}
}

#if NETSTANDARD2_1_OR_GREATER
#if NETSTANDARD2_1_OR_GREATER || NET6_0_OR_GREATER
public abstract void WriteBinary(ReadOnlySpan<byte> bytes);
#endif

Expand Down
3 changes: 3 additions & 0 deletions src/OpenTelemetry.Exporter.Jaeger/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Enabled performance optimizations for .NET 6.0+ runtimes.
([#4349](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4349))

## 1.5.0-alpha.1

Released 2023-Mar-07
Expand Down

0 comments on commit a274f06

Please sign in to comment.