Skip to content

Commit 67c4939

Browse files
authored
docs(dotnet): stable Metrics APIs (#110636)
1 parent 7502de1 commit 67c4939

File tree

3 files changed

+14
-18
lines changed

3 files changed

+14
-18
lines changed

static/app/gettingStartedDocs/dotnet/metrics.spec.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ describe('metrics', () => {
1313
});
1414

1515
expect(
16-
screen.getByText(
17-
textWithMarkupMatcher(/SentrySdk\.Experimental\.Metrics\.EmitCounter/)
18-
)
16+
screen.getByText(textWithMarkupMatcher(/SentrySdk\.Metrics\.EmitCounter/))
1917
).toBeInTheDocument();
2018
});
2119

@@ -25,9 +23,7 @@ describe('metrics', () => {
2523
});
2624

2725
expect(
28-
screen.queryByText(
29-
textWithMarkupMatcher(/SentrySdk\.Experimental\.Metrics\.EmitCounter/)
30-
)
26+
screen.queryByText(textWithMarkupMatcher(/SentrySdk\.Metrics\.EmitCounter/))
3127
).not.toBeInTheDocument();
3228
});
3329
});

static/app/gettingStartedDocs/dotnet/metrics.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ export const metricsVerify = (params: DocsParams): ContentBlock => ({
2727
language: 'csharp',
2828
code: `using Sentry;
2929
30-
SentrySdk.Experimental.Metrics.EmitCounter("button_click", 5,
30+
SentrySdk.Metrics.EmitCounter("button_click", 5,
3131
[new KeyValuePair<string, object>("browser", "Firefox"), new KeyValuePair<string, object>("app_version", "1.0.0")]);
32-
SentrySdk.Experimental.Metrics.EmitDistribution("page_load", 15.0, MeasurementUnit.Duration.Millisecond,
32+
SentrySdk.Metrics.EmitDistribution("page_load", 15.0, MeasurementUnit.Duration.Millisecond,
3333
[new KeyValuePair<string, object>("page", "/home")]);
34-
SentrySdk.Experimental.Metrics.EmitGauge("page_load", 15.0, MeasurementUnit.Duration.Millisecond,
34+
SentrySdk.Metrics.EmitGauge("page_load", 15.0, MeasurementUnit.Duration.Millisecond,
3535
[new KeyValuePair<string, object>("page", "/home")]);
3636
`,
3737
},
@@ -52,7 +52,7 @@ export const metrics: OnboardingConfig = {
5252
{
5353
type: 'text',
5454
text: tct(
55-
'Install our .NET SDK with a minimum version that supports metrics ([code:6.1.0] or higher).',
55+
'Install our .NET SDK with a minimum version that supports metrics ([code:6.3.0] or higher).',
5656
{
5757
code: <code />,
5858
}
@@ -84,7 +84,7 @@ export const metrics: OnboardingConfig = {
8484
{
8585
type: 'text',
8686
text: tct(
87-
'Metrics are automatically enabled in your [code:SentrySdk.Init] configuration. You can emit metrics using the [code:SentrySdk.Experimental.Metrics] API.',
87+
'Metrics are automatically enabled in your [code:SentrySdk.Init] configuration. You can emit metrics using the [code:SentrySdk.Metrics] API.',
8888
{
8989
code: <code />,
9090
}
@@ -100,11 +100,11 @@ SentrySdk.Init(options =>
100100
options.Dsn = "${params.dsn.public}";
101101
});
102102
103-
SentrySdk.Experimental.Metrics.EmitCounter("button_click", 5,
103+
SentrySdk.Metrics.EmitCounter("button_click", 5,
104104
[new KeyValuePair<string, object>("browser", "Firefox"), new KeyValuePair<string, object>("app_version", "1.0.0")]);
105-
SentrySdk.Experimental.Metrics.EmitDistribution("page_load", 15.0, MeasurementUnit.Duration.Millisecond,
105+
SentrySdk.Metrics.EmitDistribution("page_load", 15.0, MeasurementUnit.Duration.Millisecond,
106106
[new KeyValuePair<string, object>("page", "/home")]);
107-
SentrySdk.Experimental.Metrics.EmitGauge("page_load", 15.0, MeasurementUnit.Duration.Millisecond,
107+
SentrySdk.Metrics.EmitGauge("page_load", 15.0, MeasurementUnit.Duration.Millisecond,
108108
[new KeyValuePair<string, object>("page", "/home")]);`,
109109
},
110110
{
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import type {DocsParams} from 'sentry/components/onboarding/gettingStartedDoc/types';
22
import {getPackageVersion} from 'sentry/utils/gettingStartedDocs/getPackageVersion';
33

4-
// Sentry SDK for .NET 6.1.0 adds initial experimental support for Metrics
4+
// Sentry SDK for .NET 6.3.0 adds stable APIs for Metrics
55
export const getInstallSnippetPackageManager = (params: DocsParams) => `
6-
Install-Package Sentry -Version ${getPackageVersion(params, 'sentry.dotnet', '6.1.0')}`;
6+
Install-Package Sentry -Version ${getPackageVersion(params, 'sentry.dotnet', '6.3.0')}`;
77

8-
// Sentry SDK for .NET 6.1.0 adds initial experimental support for Metrics
8+
// Sentry SDK for .NET 6.3.0 adds stable APIs for Metrics
99
export const getInstallSnippetCoreCli = (params: DocsParams) => `
10-
dotnet add package Sentry -v ${getPackageVersion(params, 'sentry.dotnet', '6.1.0')}`;
10+
dotnet add package Sentry -v ${getPackageVersion(params, 'sentry.dotnet', '6.3.0')}`;

0 commit comments

Comments
 (0)