Skip to content
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
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Changelog

## Version Five

### API Changes

- You should no longer pass `AndroidContext` as an argument to `SentrySdk.Init` ([#3562](https://github.com/getsentry/sentry-dotnet/pull/3562))
- The `SentryUser.Segment` property has been deprecated. Consider sending this as a tag or additional data instead ([#3563](https://github.com/getsentry/sentry-dotnet/pull/3563))

- The ITraceContext now includes an [Origin](https://develop.sentry.dev/sdk/telemetry/traces/trace-origin/), which is set automatically and is primarily used internally by the Sentry server ([#3564](https://github.com/getsentry/sentry-dotnet/pull/3564))

## 4.10.2

### Various fixes & improvements
Expand Down
2 changes: 1 addition & 1 deletion src/Sentry/IBaseTracer.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Sentry;

internal interface IBaseTracer : ITraceContextInternal
internal interface IBaseTracer
{
internal bool IsOtelInstrumenter { get; }
}
19 changes: 0 additions & 19 deletions src/Sentry/ITraceContextInternal.cs

This file was deleted.

2 changes: 1 addition & 1 deletion src/Sentry/Internal/NoOpSpan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Sentry.Internal;
/// <summary>
/// Span class to use when we can't return null but a request to create a span couldn't be completed.
/// </summary>
internal class NoOpSpan : ISpan, ITraceContextInternal
internal class NoOpSpan : ISpan
{
public static ISpan Instance { get; } = new NoOpSpan();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ internal TransactionContextFacade(JavaSdk.TransactionContext context)

public string Operation => _context.Operation;

public string? Origin => _context.Origin;

public string? Description => _context.Description;

public SpanStatus? Status => _context.Status?.ToSpanStatus();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ internal TransactionContextFacade(CocoaSdk.SentryTransactionContext context)

public string Operation => _context.Operation;

public string? Origin => _context.Origin;

public string Description => _context.Description;

// Note: SentrySpanContext.Status was removed from the Cocoa SDK in 8.0.0
Expand Down
8 changes: 8 additions & 0 deletions src/Sentry/Protocol/ITraceContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ public interface ITraceContext
/// </summary>
string Operation { get; }

/// <summary>
/// Specifies the origin of the trace. If no origin is set then the trace origin is assumed to be "manual".
/// </summary>
/// <remarks>
/// See https://develop.sentry.dev/sdk/performance/trace-origin/ for more information.
/// </remarks>
string? Origin { get; }

/// <summary>
/// Description.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Sentry/Protocol/Trace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Sentry.Protocol;
/// <summary>
/// Trace context data.
/// </summary>
public class Trace : ITraceContext, ITraceContextInternal, ISentryJsonSerializable, ICloneable<Trace>, IUpdatable<Trace>
public class Trace : ITraceContext, ISentryJsonSerializable, ICloneable<Trace>, IUpdatable<Trace>
{
/// <summary>
/// Tells Sentry which type of context this is.
Expand Down
2 changes: 1 addition & 1 deletion src/Sentry/SentrySpan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Sentry;
/// <summary>
/// Transaction span.
/// </summary>
public class SentrySpan : ISpanData, ISentryJsonSerializable, ITraceContextInternal
public class SentrySpan : ISpanData, ISentryJsonSerializable
{
/// <inheritdoc />
public SpanId SpanId { get; private set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Sentry/SentryTransaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Sentry;
/// <summary>
/// Sentry performance transaction.
/// </summary>
public class SentryTransaction : ITransactionData, ISentryJsonSerializable, ITraceContextInternal
public class SentryTransaction : ITransactionData, ISentryJsonSerializable
{
/// <summary>
/// Transaction's event ID.
Expand Down
2 changes: 1 addition & 1 deletion src/Sentry/SpanContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Sentry;
/// <summary>
/// Span metadata used for sampling.
/// </summary>
public class SpanContext : ITraceContext, ITraceContextInternal
public class SpanContext : ITraceContext
{
/// <inheritdoc />
public SpanId SpanId { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1660,6 +1660,7 @@ namespace Sentry.Protocol
string? Description { get; }
bool? IsSampled { get; }
string Operation { get; }
string? Origin { get; }
Sentry.SpanId? ParentSpanId { get; }
Sentry.SpanId SpanId { get; }
Sentry.SpanStatus? Status { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1660,6 +1660,7 @@ namespace Sentry.Protocol
string? Description { get; }
bool? IsSampled { get; }
string Operation { get; }
string? Origin { get; }
Sentry.SpanId? ParentSpanId { get; }
Sentry.SpanId SpanId { get; }
Sentry.SpanStatus? Status { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1662,6 +1662,7 @@ namespace Sentry.Protocol
string? Description { get; }
bool? IsSampled { get; }
string Operation { get; }
string? Origin { get; }
Sentry.SpanId? ParentSpanId { get; }
Sentry.SpanId SpanId { get; }
Sentry.SpanStatus? Status { get; }
Expand Down
1 change: 1 addition & 0 deletions test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1658,6 +1658,7 @@ namespace Sentry.Protocol
string? Description { get; }
bool? IsSampled { get; }
string Operation { get; }
string? Origin { get; }
Sentry.SpanId? ParentSpanId { get; }
Sentry.SpanId SpanId { get; }
Sentry.SpanStatus? Status { get; }
Expand Down