Skip to content

Commit 2a41c48

Browse files
authored
feat: Renamed Sentry.Transaction to Sentry.SentryTransaction (#3023)
1 parent 90dd027 commit 2a41c48

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+380
-379
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- Class renamed `Sentry.User` to `Sentry.SentryUser` ([#3015](https://github.com/getsentry/sentry-dotnet/pull/3015))
1515
- Class renamed `Sentry.Runtime` to `Sentry.SentryRuntime` ([#3016](https://github.com/getsentry/sentry-dotnet/pull/3016))
1616
- Class renamed `Sentry.Span` to `Sentry.SentrySpan` ([#3021](https://github.com/getsentry/sentry-dotnet/pull/3021))
17+
- Class renamed `Sentry.Transaction` to `Sentry.SentryTransaction` ([#3023](https://github.com/getsentry/sentry-dotnet/pull/3023))
1718

1819
### Dependencies
1920

benchmarks/Sentry.Benchmarks/ProfilingBenchmarks.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public void StartProfiler()
2525
public void StopProfiler()
2626
{
2727
_profiler?.Finish();
28-
(_profiler as SamplingTransactionProfiler)?.CollectAsync(new Transaction("", "")).Wait();
28+
(_profiler as SamplingTransactionProfiler)?.CollectAsync(new SentryTransaction("", "")).Wait();
2929
_profiler = null;
3030
_factory.Dispose();
3131
_factory = null;
@@ -52,7 +52,7 @@ public long Transaction(int runtimeMs, bool collect)
5252
tt.TransactionProfiler = _factory.Start(tt, CancellationToken.None);
5353
var result = RunForMs(runtimeMs);
5454
tt.TransactionProfiler.Finish();
55-
var transaction = new Transaction(tt);
55+
var transaction = new SentryTransaction(tt);
5656
if (collect)
5757
{
5858
var collectTask = (tt.TransactionProfiler as SamplingTransactionProfiler).CollectAsync(transaction);

src/Sentry.OpenTelemetry/OpenTelemetryTransactionProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace Sentry.OpenTelemetry;
44

55
internal class OpenTelemetryTransactionProcessor : ISentryTransactionProcessor
66
{
7-
public Transaction Process(Transaction transaction)
7+
public SentryTransaction Process(SentryTransaction transaction)
88
{
99
var activity = Activity.Current;
1010
if (activity != null)

src/Sentry.Profiling/SamplingTransactionProfiler.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ public void Finish()
9797
}
9898

9999
/// <inheritdoc />
100-
public Protocol.Envelopes.ISerializable? Collect(Transaction transaction)
100+
public Protocol.Envelopes.ISerializable? Collect(SentryTransaction transaction)
101101
=> Protocol.Envelopes.AsyncJsonSerializable.CreateFrom(CollectAsync(transaction));
102102

103-
internal async Task<ProfileInfo> CollectAsync(Transaction transaction)
103+
internal async Task<ProfileInfo> CollectAsync(SentryTransaction transaction)
104104
{
105105
if (!_stopped)
106106
{
@@ -118,7 +118,7 @@ internal async Task<ProfileInfo> CollectAsync(Transaction transaction)
118118
return CreateProfileInfo(transaction, _processor.Profile);
119119
}
120120

121-
internal static ProfileInfo CreateProfileInfo(Transaction transaction, SampleProfile profile)
121+
internal static ProfileInfo CreateProfileInfo(SentryTransaction transaction, SampleProfile profile)
122122
{
123123
return new()
124124
{

src/Sentry/Extensibility/DisabledHub.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,14 @@ public void BindClient(ISentryClient client)
151151
/// <summary>
152152
/// No-Op.
153153
/// </summary>
154-
public void CaptureTransaction(Transaction transaction)
154+
public void CaptureTransaction(SentryTransaction transaction)
155155
{
156156
}
157157

158158
/// <summary>
159159
/// No-Op.
160160
/// </summary>
161-
public void CaptureTransaction(Transaction transaction, Scope? scope, Hint? hint)
161+
public void CaptureTransaction(SentryTransaction transaction, Scope? scope, Hint? hint)
162162
{
163163
}
164164

src/Sentry/Extensibility/HubAdapter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,15 +244,15 @@ public SentryId CaptureException(Exception exception)
244244
/// </summary>
245245
[DebuggerStepThrough]
246246
[EditorBrowsable(EditorBrowsableState.Never)]
247-
public void CaptureTransaction(Transaction transaction)
247+
public void CaptureTransaction(SentryTransaction transaction)
248248
=> SentrySdk.CaptureTransaction(transaction);
249249

250250
/// <summary>
251251
/// Forwards the call to <see cref="SentrySdk"/>.
252252
/// </summary>
253253
[DebuggerStepThrough]
254254
[EditorBrowsable(EditorBrowsableState.Never)]
255-
public void CaptureTransaction(Transaction transaction, Scope? scope, Hint? hint)
255+
public void CaptureTransaction(SentryTransaction transaction, Scope? scope, Hint? hint)
256256
=> SentrySdk.CaptureTransaction(transaction, scope, hint);
257257

258258
/// <summary>

src/Sentry/Extensibility/ISentryTransactionProcessor.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
namespace Sentry.Extensibility;
22

33
/// <summary>
4-
/// Process a <see cref="Transaction"/> during the prepare phase.
4+
/// Process a <see cref="SentryTransaction"/> during the prepare phase.
55
/// </summary>
66
public interface ISentryTransactionProcessor
77
{
88
/// <summary>
9-
/// Process the <see cref="Transaction"/>
9+
/// Process the <see cref="SentryTransaction"/>
1010
/// </summary>
1111
/// <param name="transaction">The Transaction to process</param>
1212
/// <remarks>
1313
/// The transaction returned can be the same instance received or a new one.
1414
/// Returning null will stop the processing pipeline.
1515
/// Meaning the transaction should no longer be processed nor send.
1616
/// </remarks>
17-
Transaction? Process(Transaction transaction);
17+
SentryTransaction? Process(SentryTransaction transaction);
1818
}
1919

2020
internal static class ISentryTransactionProcessorExtensions
2121
{
22-
internal static Transaction? DoProcessTransaction(this ISentryTransactionProcessor processor, Transaction transaction, Hint hint)
22+
internal static SentryTransaction? DoProcessTransaction(this ISentryTransactionProcessor processor, SentryTransaction transaction, Hint hint)
2323
{
2424
return (processor is ISentryTransactionProcessorWithHint contextualProcessor)
2525
? contextualProcessor.Process(transaction, hint)
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
namespace Sentry.Extensibility;
22

33
/// <summary>
4-
/// Process a <see cref="Transaction"/> during the prepare phase.
4+
/// Process a <see cref="SentryTransaction"/> during the prepare phase.
55
/// </summary>
66
public interface ISentryTransactionProcessorWithHint: ISentryTransactionProcessor
77
{
88
/// <summary>
9-
/// Process the <see cref="Transaction"/>
9+
/// Process the <see cref="SentryTransaction"/>
1010
/// </summary>
1111
/// <param name="transaction">The Transaction to process</param>
1212
/// <param name="hint">A <see cref="Hint"/> with context that may be useful prior to sending the transaction</param>
@@ -15,5 +15,5 @@ public interface ISentryTransactionProcessorWithHint: ISentryTransactionProcesso
1515
/// Returning null will stop the processing pipeline.
1616
/// Meaning the transaction should no longer be processed nor send.
1717
/// </remarks>
18-
Transaction? Process(Transaction transaction, Hint hint);
18+
SentryTransaction? Process(SentryTransaction transaction, Hint hint);
1919
}

src/Sentry/ISentryClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public interface ISentryClient
3434
/// </remarks>
3535
/// <param name="transaction">The transaction.</param>
3636
[EditorBrowsable(EditorBrowsableState.Never)]
37-
void CaptureTransaction(Transaction transaction);
37+
void CaptureTransaction(SentryTransaction transaction);
3838

3939
/// <summary>
4040
/// Captures a transaction.
@@ -50,7 +50,7 @@ public interface ISentryClient
5050
/// This will be available in callbacks prior to processing the transaction.
5151
/// </param>
5252
[EditorBrowsable(EditorBrowsableState.Never)]
53-
void CaptureTransaction(Transaction transaction, Scope? scope, Hint? hint);
53+
void CaptureTransaction(SentryTransaction transaction, Scope? scope, Hint? hint);
5454

5555
/// <summary>
5656
/// Captures a session update.

src/Sentry/Internal/DelegateTransactionProcessor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ namespace Sentry.Internal;
44

55
internal class DelegateTransactionProcessor : ISentryTransactionProcessor
66
{
7-
private readonly Func<Transaction, Transaction?> _func;
7+
private readonly Func<SentryTransaction, SentryTransaction?> _func;
88

9-
public DelegateTransactionProcessor(Func<Transaction, Transaction?> func)
9+
public DelegateTransactionProcessor(Func<SentryTransaction, SentryTransaction?> func)
1010
{
1111
_func = func;
1212
}
1313

14-
public Transaction? Process(Transaction transaction)
14+
public SentryTransaction? Process(SentryTransaction transaction)
1515
{
1616
return _func(transaction);
1717
}

0 commit comments

Comments
 (0)