Browse Source

fix(onboarding): start_profiling -> start_profiler in python frameworks (#79886)

Simon Hellmayr 4 months ago
parent
commit
f200202822

+ 4 - 4
static/app/gettingStartedDocs/python/celery.spec.tsx

@@ -46,10 +46,10 @@ describe('celery onboarding docs', function () {
 
     // Does not render continuous profiling config
     expect(
-      screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.start_profiling\(\)/))
+      screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.start_profiler\(\)/))
     ).not.toBeInTheDocument();
     expect(
-      screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiling\(\)/))
+      screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiler\(\)/))
     ).not.toBeInTheDocument();
 
     // Does render transaction profiling config
@@ -78,10 +78,10 @@ describe('celery onboarding docs', function () {
 
     // Does render continuous profiling config
     expect(
-      screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.start_profiling\(\)/))
+      screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.start_profiler\(\)/))
     ).toBeInTheDocument();
     expect(
-      screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiling\(\)/))
+      screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiler\(\)/))
     ).toBeInTheDocument();
   });
 });

+ 3 - 3
static/app/gettingStartedDocs/python/celery.tsx

@@ -49,11 +49,11 @@ sentry_sdk.init(
   params.profilingOptions?.defaultProfilingMode === 'continuous'
     ? `
 
-# Manually call start_profiling and stop_profiling
+# Manually call start_profiler and stop_profiler
 # to profile the code in between
-sentry_sdk.profiler.start_profiling()
+sentry_sdk.profiler.start_profiler()
 # do some work here
-sentry_sdk.profiler.stop_profiling()`
+sentry_sdk.profiler.stop_profiler()`
     : ''
 }`;
 

+ 4 - 4
static/app/gettingStartedDocs/python/rq.spec.tsx

@@ -47,10 +47,10 @@ describe('rq onboarding docs', function () {
 
     // Does not render continuous profiling config
     expect(
-      screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.start_profiling\(\)/))
+      screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.start_profiler\(\)/))
     ).not.toBeInTheDocument();
     expect(
-      screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiling\(\)/))
+      screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiler\(\)/))
     ).not.toBeInTheDocument();
 
     // Does render transaction profiling config
@@ -81,13 +81,13 @@ describe('rq onboarding docs', function () {
 
     // Does render continuous profiling config
     const startMatches = screen.queryAllByText(
-      textWithMarkupMatcher(/sentry_sdk.profiler.start_profiling\(\)/)
+      textWithMarkupMatcher(/sentry_sdk.profiler.start_profiler\(\)/)
     );
     expect(startMatches.length).toBeGreaterThan(0);
     startMatches.forEach(match => expect(match).toBeInTheDocument());
 
     const stopMatches = screen.queryAllByText(
-      textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiling\(\)/)
+      textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiler\(\)/)
     );
     expect(stopMatches.length).toBeGreaterThan(0);
     stopMatches.forEach(match => expect(match).toBeInTheDocument());

+ 3 - 3
static/app/gettingStartedDocs/python/rq.tsx

@@ -42,11 +42,11 @@ sentry_sdk.init(
   params.profilingOptions?.defaultProfilingMode === 'continuous'
     ? `
 
-# Manually call start_profiling and stop_profiling
+# Manually call start_profiler and stop_profiler
 # to profile the code in between
-sentry_sdk.profiler.start_profiling()
+sentry_sdk.profiler.start_profiler()
 # do some work here
-sentry_sdk.profiler.stop_profiling()`
+sentry_sdk.profiler.stop_profiler()`
     : ''
 }`;