Skip to content

Commit 5685ebd

Browse files
author
Shannon Anahata
committed
updating options to be in a table
1 parent 05858fc commit 5685ebd

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

platform-includes/metrics/options/dotnet.mdx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,18 @@ SentrySdk.Init(options =>
2727
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.
2828

2929
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. |
3942

4043
The numeric value of `SentryMetric` has the same numeric type that the metric was emitted with.
4144
The supported numeric types are `byte`, `short`, `int`, `long`, `float`, and `double`.

0 commit comments

Comments
 (0)