Skip to content
Open
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
4 changes: 2 additions & 2 deletions platform-includes/metrics/options/dotnet.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#### EnableMetrics

Set to `false` in order to disable the `SentrySdk.Experimental.Metrics` APIs.
Set to `false` in order to disable the `SentrySdk.Metrics` APIs.

#### SetBeforeSendMetric

Expand All @@ -10,7 +10,7 @@ To filter metrics, or update them before they are sent to Sentry, you can use th
SentrySdk.Init(options =>
{
options.Dsn = "___PUBLIC_DSN___";
options.Experimental.SetBeforeSendMetric(static metric =>
options.SetBeforeSendMetric(static metric =>
{
if (metric.Name == "removed-metric")
{
Expand Down
8 changes: 4 additions & 4 deletions platform-includes/metrics/usage/dotnet.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Metrics are enabled by default. Once you initialize the SDK, you can send metrics using the `SentrySdk.Experimental.Metrics` APIs.
Metrics are enabled by default. Once you initialize the SDK, you can send metrics using the `SentrySdk.Metrics` APIs.

The `SentryMetricEmitter` type exposes three method groups that you can use to capture different types of metric information: `Counter`, `Gauge`, and `Distribution`.

Expand All @@ -13,7 +13,7 @@ To emit a counter, do the following:

```csharp
// Record five total button clicks
SentrySdk.Experimental.Metrics.EmitCounter("button_click", 5,
SentrySdk.Metrics.EmitCounter("button_click", 5,
[new KeyValuePair<string, object>("browser", "Firefox"), new KeyValuePair<string, object>("app_version", "1.0.0")]);
```

Expand All @@ -25,7 +25,7 @@ To emit a distribution, do the following:

```csharp
// Add '15.0' to a distribution used for tracking the loading times per page.
SentrySdk.Experimental.Metrics.EmitDistribution("page_load", 15.0, MeasurementUnit.Duration.Millisecond,
SentrySdk.Metrics.EmitDistribution("page_load", 15.0, MeasurementUnit.Duration.Millisecond,
[new KeyValuePair<string, object>("page", "/home")]);
```

Expand All @@ -37,6 +37,6 @@ To emit a gauge, do the following:

```csharp
// Add '15.0' to a gauge used for tracking the loading times for a page.
SentrySdk.Experimental.Metrics.EmitGauge("page_load", 15.0, MeasurementUnit.Duration.Millisecond,
SentrySdk.Metrics.EmitGauge("page_load", 15.0, MeasurementUnit.Duration.Millisecond,
[new KeyValuePair<string, object>("page", "/home")]);
```
Loading