You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: platform-includes/metrics/options/dotnet.mdx
+12-9Lines changed: 12 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,15 +27,18 @@ SentrySdk.Init(options =>
27
27
The `beforeSendMetric` delegate receives a metric object, and should return the metric object if you want it to be sent to Sentry, or `null` if you want to discard it.
28
28
29
29
The metric object of type `SentryMetric` has the following members:
30
-
-`Timestamp` Property: (`DateTimeOffset`) Timestamp indicating when the metric was emitted.
31
-
-`TraceId` Property: (`SentryId`) The trace ID of the trace this metric belongs to.
32
-
-`Type` Property: (`SentryMetricType`) The type of metric. One of `Counter`, `Gauge`, `Distribution`.
33
-
-`Name` Property: (`string`) The name of the metric.
34
-
-`SpanId` Property: (`SpanId?`) The span ID of the span that was active when the metric was emitted.
35
-
-`Unit` Property: (`string?`) The unit of measurement for the metric value. Applies to `Gauge` and `Distribution` only.
36
-
-`TryGetValue<TValue>(out TValue value)` Method: Gets the numeric value of the metric. Returns `true` if the metric value is of type `TValue`, otherwise `false`. Supported numeric value types are `byte`, `short`, `int`, `long`, `float`, and `double`.
37
-
-`TryGetAttribute<TAttribute>(string key, out TAttribute value)` Method: Gets the attribute value associated with the specified key. Returns `true` if the metric contains an attribute with the specified key and its value is of type `TAttribute`, otherwise `false`.
38
-
-`SetAttribute<TAttribute>(string key, TAttribute value)` Method: Sets a key-value pair of data attached to the metric. Supported types are `string`, `bool`, integers up to a size of 64-bit signed, and floating-point numbers up to a size of 64-bit.
30
+
31
+
| Member | Type | Description |
32
+
|--------|------|-------------|
33
+
|`Timestamp`|`DateTimeOffset`| Timestamp indicating when the metric was emitted. |
34
+
|`TraceId`|`SentryId`| The trace ID of the trace this metric belongs to. |
35
+
|`Type`|`SentryMetricType`| The type of metric. One of `Counter`, `Gauge`, `Distribution`. |
36
+
|`Name`|`string`| The name of the metric. |
37
+
|`SpanId`|`SpanId?`| The span ID of the span that was active when the metric was emitted. |
38
+
|`Unit`|`string?`| The unit of measurement for the metric value. Applies to `Gauge` and `Distribution` only. |
39
+
|`TryGetValue<TValue>(out TValue value)`| Method | Gets the numeric value of the metric. Returns `true` if the metric value is of type `TValue`, otherwise `false`. Supported numeric value types are `byte`, `short`, `int`, `long`, `float`, and `double`. |
40
+
|`TryGetAttribute<TAttribute>(string key, out TAttribute value)`| Method | Gets the attribute value associated with the specified key. Returns `true` if the metric contains an attribute with the specified key and its value is of type `TAttribute`, otherwise `false`. |
41
+
|`SetAttribute<TAttribute>(string key, TAttribute value)`| Method | Sets a key-value pair of data attached to the metric. Supported types are `string`, `bool`, integers up to a size of 64-bit signed, and floating-point numbers up to a size of 64-bit. |
39
42
40
43
The numeric value of `SentryMetric` has the same numeric type that the metric was emitted with.
41
44
The supported numeric types are `byte`, `short`, `int`, `long`, `float`, and `double`.
0 commit comments