Skip to content

Commit aa46acb

Browse files
committed
more public overloads for convenience (API Approval Tests)
1 parent 9485ca4 commit aa46acb

File tree

4 files changed

+68
-28
lines changed

4 files changed

+68
-28
lines changed

test/Sentry.Tests/ApiApprovalTests.Run.DotNet10_0.verified.txt

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,26 +1053,36 @@ namespace Sentry
10531053
}
10541054
public abstract class SentryTraceMetrics
10551055
{
1056-
public void AddCounter<T>(string name, T value, Sentry.Scope? scope = null)
1056+
public void AddCounter<T>(string name, T value)
10571057
where T : struct { }
1058-
public void AddCounter<T>(string name, T value, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes = null, Sentry.Scope? scope = null)
1058+
public void AddCounter<T>(string name, T value, Sentry.Scope? scope)
1059+
where T : struct { }
1060+
public void AddCounter<T>(string name, T value, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes, Sentry.Scope? scope = null)
10591061
where T : struct { }
10601062
public void AddCounter<T>(string name, T value, System.ReadOnlySpan<System.Collections.Generic.KeyValuePair<string, object>> attributes, Sentry.Scope? scope = null)
10611063
where T : struct { }
10621064
protected abstract void CaptureMetric<T>(Sentry.SentryMetric<T> metric)
10631065
where T : struct;
10641066
protected abstract void Flush();
1065-
public void RecordDistribution<T>(string name, T value, string? unit = null, Sentry.Scope? scope = null)
1067+
public void RecordDistribution<T>(string name, T value)
1068+
where T : struct { }
1069+
public void RecordDistribution<T>(string name, T value, string? unit)
1070+
where T : struct { }
1071+
public void RecordDistribution<T>(string name, T value, string? unit, Sentry.Scope? scope)
1072+
where T : struct { }
1073+
public void RecordDistribution<T>(string name, T value, string? unit, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes, Sentry.Scope? scope = null)
10661074
where T : struct { }
10671075
public void RecordDistribution<T>(string name, T value, string? unit, System.ReadOnlySpan<System.Collections.Generic.KeyValuePair<string, object>> attributes, Sentry.Scope? scope = null)
10681076
where T : struct { }
1069-
public void RecordDistribution<T>(string name, T value, string? unit = null, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes = null, Sentry.Scope? scope = null)
1077+
public void RecordGauge<T>(string name, T value)
10701078
where T : struct { }
1071-
public void RecordGauge<T>(string name, T value, string? unit = null, Sentry.Scope? scope = null)
1079+
public void RecordGauge<T>(string name, T value, string? unit)
10721080
where T : struct { }
1073-
public void RecordGauge<T>(string name, T value, string? unit, System.ReadOnlySpan<System.Collections.Generic.KeyValuePair<string, object>> attributes, Sentry.Scope? scope = null)
1081+
public void RecordGauge<T>(string name, T value, string? unit, Sentry.Scope? scope)
1082+
where T : struct { }
1083+
public void RecordGauge<T>(string name, T value, string? unit, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes, Sentry.Scope? scope = null)
10741084
where T : struct { }
1075-
public void RecordGauge<T>(string name, T value, string? unit = null, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes = null, Sentry.Scope? scope = null)
1085+
public void RecordGauge<T>(string name, T value, string? unit, System.ReadOnlySpan<System.Collections.Generic.KeyValuePair<string, object>> attributes, Sentry.Scope? scope = null)
10761086
where T : struct { }
10771087
}
10781088
public class SentryTransaction : Sentry.IEventLike, Sentry.IHasData, Sentry.IHasExtra, Sentry.IHasTags, Sentry.ISentryJsonSerializable, Sentry.ISpanData, Sentry.ITransactionContext, Sentry.ITransactionData, Sentry.Protocol.ITraceContext

test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,26 +1053,36 @@ namespace Sentry
10531053
}
10541054
public abstract class SentryTraceMetrics
10551055
{
1056-
public void AddCounter<T>(string name, T value, Sentry.Scope? scope = null)
1056+
public void AddCounter<T>(string name, T value)
10571057
where T : struct { }
1058-
public void AddCounter<T>(string name, T value, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes = null, Sentry.Scope? scope = null)
1058+
public void AddCounter<T>(string name, T value, Sentry.Scope? scope)
1059+
where T : struct { }
1060+
public void AddCounter<T>(string name, T value, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes, Sentry.Scope? scope = null)
10591061
where T : struct { }
10601062
public void AddCounter<T>(string name, T value, System.ReadOnlySpan<System.Collections.Generic.KeyValuePair<string, object>> attributes, Sentry.Scope? scope = null)
10611063
where T : struct { }
10621064
protected abstract void CaptureMetric<T>(Sentry.SentryMetric<T> metric)
10631065
where T : struct;
10641066
protected abstract void Flush();
1065-
public void RecordDistribution<T>(string name, T value, string? unit = null, Sentry.Scope? scope = null)
1067+
public void RecordDistribution<T>(string name, T value)
1068+
where T : struct { }
1069+
public void RecordDistribution<T>(string name, T value, string? unit)
1070+
where T : struct { }
1071+
public void RecordDistribution<T>(string name, T value, string? unit, Sentry.Scope? scope)
1072+
where T : struct { }
1073+
public void RecordDistribution<T>(string name, T value, string? unit, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes, Sentry.Scope? scope = null)
10661074
where T : struct { }
10671075
public void RecordDistribution<T>(string name, T value, string? unit, System.ReadOnlySpan<System.Collections.Generic.KeyValuePair<string, object>> attributes, Sentry.Scope? scope = null)
10681076
where T : struct { }
1069-
public void RecordDistribution<T>(string name, T value, string? unit = null, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes = null, Sentry.Scope? scope = null)
1077+
public void RecordGauge<T>(string name, T value)
10701078
where T : struct { }
1071-
public void RecordGauge<T>(string name, T value, string? unit = null, Sentry.Scope? scope = null)
1079+
public void RecordGauge<T>(string name, T value, string? unit)
10721080
where T : struct { }
1073-
public void RecordGauge<T>(string name, T value, string? unit, System.ReadOnlySpan<System.Collections.Generic.KeyValuePair<string, object>> attributes, Sentry.Scope? scope = null)
1081+
public void RecordGauge<T>(string name, T value, string? unit, Sentry.Scope? scope)
1082+
where T : struct { }
1083+
public void RecordGauge<T>(string name, T value, string? unit, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes, Sentry.Scope? scope = null)
10741084
where T : struct { }
1075-
public void RecordGauge<T>(string name, T value, string? unit = null, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes = null, Sentry.Scope? scope = null)
1085+
public void RecordGauge<T>(string name, T value, string? unit, System.ReadOnlySpan<System.Collections.Generic.KeyValuePair<string, object>> attributes, Sentry.Scope? scope = null)
10761086
where T : struct { }
10771087
}
10781088
public class SentryTransaction : Sentry.IEventLike, Sentry.IHasData, Sentry.IHasExtra, Sentry.IHasTags, Sentry.ISentryJsonSerializable, Sentry.ISpanData, Sentry.ITransactionContext, Sentry.ITransactionData, Sentry.Protocol.ITraceContext

test/Sentry.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,26 +1053,36 @@ namespace Sentry
10531053
}
10541054
public abstract class SentryTraceMetrics
10551055
{
1056-
public void AddCounter<T>(string name, T value, Sentry.Scope? scope = null)
1056+
public void AddCounter<T>(string name, T value)
10571057
where T : struct { }
1058-
public void AddCounter<T>(string name, T value, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes = null, Sentry.Scope? scope = null)
1058+
public void AddCounter<T>(string name, T value, Sentry.Scope? scope)
1059+
where T : struct { }
1060+
public void AddCounter<T>(string name, T value, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes, Sentry.Scope? scope = null)
10591061
where T : struct { }
10601062
public void AddCounter<T>(string name, T value, System.ReadOnlySpan<System.Collections.Generic.KeyValuePair<string, object>> attributes, Sentry.Scope? scope = null)
10611063
where T : struct { }
10621064
protected abstract void CaptureMetric<T>(Sentry.SentryMetric<T> metric)
10631065
where T : struct;
10641066
protected abstract void Flush();
1065-
public void RecordDistribution<T>(string name, T value, string? unit = null, Sentry.Scope? scope = null)
1067+
public void RecordDistribution<T>(string name, T value)
1068+
where T : struct { }
1069+
public void RecordDistribution<T>(string name, T value, string? unit)
1070+
where T : struct { }
1071+
public void RecordDistribution<T>(string name, T value, string? unit, Sentry.Scope? scope)
1072+
where T : struct { }
1073+
public void RecordDistribution<T>(string name, T value, string? unit, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes, Sentry.Scope? scope = null)
10661074
where T : struct { }
10671075
public void RecordDistribution<T>(string name, T value, string? unit, System.ReadOnlySpan<System.Collections.Generic.KeyValuePair<string, object>> attributes, Sentry.Scope? scope = null)
10681076
where T : struct { }
1069-
public void RecordDistribution<T>(string name, T value, string? unit = null, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes = null, Sentry.Scope? scope = null)
1077+
public void RecordGauge<T>(string name, T value)
10701078
where T : struct { }
1071-
public void RecordGauge<T>(string name, T value, string? unit = null, Sentry.Scope? scope = null)
1079+
public void RecordGauge<T>(string name, T value, string? unit)
10721080
where T : struct { }
1073-
public void RecordGauge<T>(string name, T value, string? unit, System.ReadOnlySpan<System.Collections.Generic.KeyValuePair<string, object>> attributes, Sentry.Scope? scope = null)
1081+
public void RecordGauge<T>(string name, T value, string? unit, Sentry.Scope? scope)
1082+
where T : struct { }
1083+
public void RecordGauge<T>(string name, T value, string? unit, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes, Sentry.Scope? scope = null)
10741084
where T : struct { }
1075-
public void RecordGauge<T>(string name, T value, string? unit = null, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes = null, Sentry.Scope? scope = null)
1085+
public void RecordGauge<T>(string name, T value, string? unit, System.ReadOnlySpan<System.Collections.Generic.KeyValuePair<string, object>> attributes, Sentry.Scope? scope = null)
10761086
where T : struct { }
10771087
}
10781088
public class SentryTransaction : Sentry.IEventLike, Sentry.IHasData, Sentry.IHasExtra, Sentry.IHasTags, Sentry.ISentryJsonSerializable, Sentry.ISpanData, Sentry.ITransactionContext, Sentry.ITransactionData, Sentry.Protocol.ITraceContext

test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,26 +1022,36 @@ namespace Sentry
10221022
}
10231023
public abstract class SentryTraceMetrics
10241024
{
1025-
public void AddCounter<T>(string name, T value, Sentry.Scope? scope = null)
1025+
public void AddCounter<T>(string name, T value)
10261026
where T : struct { }
1027-
public void AddCounter<T>(string name, T value, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes = null, Sentry.Scope? scope = null)
1027+
public void AddCounter<T>(string name, T value, Sentry.Scope? scope)
1028+
where T : struct { }
1029+
public void AddCounter<T>(string name, T value, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes, Sentry.Scope? scope = null)
10281030
where T : struct { }
10291031
public void AddCounter<T>(string name, T value, System.ReadOnlySpan<System.Collections.Generic.KeyValuePair<string, object>> attributes, Sentry.Scope? scope = null)
10301032
where T : struct { }
10311033
protected abstract void CaptureMetric<T>(Sentry.SentryMetric<T> metric)
10321034
where T : struct;
10331035
protected abstract void Flush();
1034-
public void RecordDistribution<T>(string name, T value, string? unit = null, Sentry.Scope? scope = null)
1036+
public void RecordDistribution<T>(string name, T value)
1037+
where T : struct { }
1038+
public void RecordDistribution<T>(string name, T value, string? unit)
1039+
where T : struct { }
1040+
public void RecordDistribution<T>(string name, T value, string? unit, Sentry.Scope? scope)
1041+
where T : struct { }
1042+
public void RecordDistribution<T>(string name, T value, string? unit, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes, Sentry.Scope? scope = null)
10351043
where T : struct { }
10361044
public void RecordDistribution<T>(string name, T value, string? unit, System.ReadOnlySpan<System.Collections.Generic.KeyValuePair<string, object>> attributes, Sentry.Scope? scope = null)
10371045
where T : struct { }
1038-
public void RecordDistribution<T>(string name, T value, string? unit = null, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes = null, Sentry.Scope? scope = null)
1046+
public void RecordGauge<T>(string name, T value)
10391047
where T : struct { }
1040-
public void RecordGauge<T>(string name, T value, string? unit = null, Sentry.Scope? scope = null)
1048+
public void RecordGauge<T>(string name, T value, string? unit)
10411049
where T : struct { }
1042-
public void RecordGauge<T>(string name, T value, string? unit, System.ReadOnlySpan<System.Collections.Generic.KeyValuePair<string, object>> attributes, Sentry.Scope? scope = null)
1050+
public void RecordGauge<T>(string name, T value, string? unit, Sentry.Scope? scope)
1051+
where T : struct { }
1052+
public void RecordGauge<T>(string name, T value, string? unit, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes, Sentry.Scope? scope = null)
10431053
where T : struct { }
1044-
public void RecordGauge<T>(string name, T value, string? unit = null, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>? attributes = null, Sentry.Scope? scope = null)
1054+
public void RecordGauge<T>(string name, T value, string? unit, System.ReadOnlySpan<System.Collections.Generic.KeyValuePair<string, object>> attributes, Sentry.Scope? scope = null)
10451055
where T : struct { }
10461056
}
10471057
public class SentryTransaction : Sentry.IEventLike, Sentry.IHasData, Sentry.IHasExtra, Sentry.IHasTags, Sentry.ISentryJsonSerializable, Sentry.ISpanData, Sentry.ITransactionContext, Sentry.ITransactionData, Sentry.Protocol.ITraceContext

0 commit comments

Comments
 (0)