8000 fix: A bunch of typos (#2849) · ebeloded/sentry-javascript@4f75e8f · GitHub
[go: up one dir, main page]

Skip to content

Commit 4f75e8f

Browse files
fix: A bunch of typos (getsentry#2849)
Co-authored-by: Katie Byers <katie.byers@sentry.io>
1 parent a0cf6be commit 4f75e8f

File tree

10 files changed

+21
-22
lines changed

10 files changed

+21
-22
lines changed

packages/angular/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ import { createErrorHandler } from '@sentry/angular';
6464
export class AppModule {}
6565
```
6666

67-
Additionally, `createErrorHandler` accepts a set of options that allows you to configure its behaviour. For more details
67+
Additionally, `createErrorHandler` accepts a set of options that allows you to configure its behavior. For more details
6868
see `ErrorHandlerOptions` interface in `src/errorhandler.ts`.
6969

7070
### Tracing
@@ -76,9 +76,9 @@ components initializations.
7676

7777
#### Install
7878

79-
Registering a Trace Service is a 3 steps process.
79+
Registering a Trace Service is a 3-step process.
8080

81-
1. Register and configure `@sentry/tracing` `BrowserTracing` integration, including custom Angular routing
81+
1. Register and configure the `BrowserTracing` integration from `@sentry/tracing`, including custom Angular routing
8282
instrumentation:
8383

8484
```javascript
@@ -117,7 +117,7 @@ import { TraceService } from '@sentry/angular';
117117
export class AppModule {}
118118
```
119119

120-
3. Either require the `TraceService` from inside `AppModule` or use `APP_INITIALIZER` to force instantiate Tracing.
120+
3. Either require the `TraceService` from inside `AppModule` or use `APP_INITIALIZER` to force-instantiate Tracing.
121121

122122
```javascript
123123
@NgModule({

packages/angular/src/errorhandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ErrorHandler as AngularErrorHandler, Injectable } from '@angular/core';
33
import * as Sentry from '@sentry/browser';
44

55
/**
6-
* Options used to configure the behaviour of the Angular ErrorHandler.
6+
* Options used to configure the behavior of the Angular ErrorHandler.
77
*/
88
export interface ErrorHandlerOptions {
99
logErrors?: boolean;

packages/gatsby/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Register the package as a plugin in `gastby-config.js`:
2424
}
2525
```
2626

27-
Options will be passed directly to `Sentry.init`. See all available options in [our docs](https://docs.sentry.io/error-reporting/configuration/?platform=javascript). The `environment` value defaults to `NODE_ENV` (or `development` if not set).
27+
Options will be passed directly to `Sentry.init`. See all available options in [our docs](https://docs.sentry.io/error-reporting/configuration/?platform=javascript). The `environment` value defaults to `NODE_ENV` (or `'development'` if `NODE_ENV` is not set).
2828

2929
## GitHub Actions
3030

packages/hub/src/hub.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ import { Scope } from './scope';
2525
/**
2626
* API compatibility version of this hub.
2727
*
28-
* WARNING: This number should only be incresed when the global interface
29-
* changes a and new methods are introduced.
28+
* WARNING: This number should only be increased when the global interface
29+
* changes and new methods are introduced.
3030
*
3131
* @hidden
3232
*/
@@ -457,7 +457,7 @@ export function getCurrentHub(): Hub {
457457
}
458458

459459
/**
460-
* Try to read the hub from an active domain, fallback to the registry if one doesnt exist
460+
* Try to read the hub from an active domain, and fallback to the registry if one doesn't exist
461461
* @returns discovered hub
462462
*/
463463
function getHubFromActiveDomain(registry: Carrier): Hub {
@@ -473,12 +473,12 @@ function getHubFromActiveDomain(registry: Carrier): Hub {
473473
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
474474
const activeDomain = domain.active;
475475

476-
// If there no active domain, just return global hub
476+
// If there's no active domain, just return global hub
477477
if (!activeDomain) {
478478
return getHubFromCarrier(registry);
479479
}
480480

481-
// If there's no hub on current domain, or its an old API, assign a new one
481+
// If there's no hub on current domain, or it's an old API, assign a new one
482482
if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {
483483
const registryHubTopStack = getHubFromCarrier(registry).getStackTop();
484484
setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));

packages/node/src/handlers.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { flush } from './sdk';
1616
const DEFAULT_SHUTDOWN_TIMEOUT = 2000;
1717

1818
/**
19-
* Express compatible tracing handler.
19+
* Express-compatible tracing handler.
2020
* @see Exposed as `Handlers.tracingHandler`
2121
*/
2222
export function tracingHandler(): (
@@ -29,7 +29,7 @@ export function tracingHandler(): (
2929
res: http.ServerResponse,
3030
next: (error?: any) => void,
3131
): void {
32-
// TODO: At this point req.route.path we use in `extractTransaction` is not available
32+
// TODO: At this point `req.route.path` (which we use in `extractTransaction`) is not available
3333
// but `req.path` or `req.url` should do the job as well. We could unify this here.
3434
const reqMethod = (req.method || '').toUpperCase();
3535
const reqUrl = req.url;
@@ -38,8 +38,7 @@ export function tracingHandler(): (
3838
let parentSpanId;
3939
let sampled;
4040

41-
// If there is a trace header set, we extract the data from it and set the span on the scope
42-
// to be the origin an created transaction set the parent_span_id / trace_id
41+
// If there is a trace header set, we extract the data from it (parentSpanId, traceId, and sampling decision)
4342
if (req.headers && isString(req.headers['sentry-trace'])) {
4443
const span = Span.fromTraceparent(req.headers['sentry-trace'] as string);
4544
if (span) {

packages/tracing/src/browser/browsertracing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export interface BrowserTracingOptions extends RequestInstrumentationOptions {
6363

6464
/**
6565
* beforeNavigate is called before a pageload/navigation transaction is created and allows for users
66-
* to set custom transaction context. Defaults behaviour is to return `window.location.pathname`.
66+
* to set custom transaction context. Default behavior is to return `window.location.pathname`.
6767
*
6868
* If undefined is returned, a pageload/navigation transaction will not be created.
6969
*/

packages/tracing/src/browser/router.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ export function defaultRoutingInstrumentation<T extends TransactionType>(
3030
/**
3131
* This early return is there to account for some cases where navigation transaction
3232
* starts right after long running pageload. We make sure that if `from` is undefined
33-
* and that a valid `startingURL` exists, we don't uncessarily create a navigation transaction.
33+
* and that a valid `startingURL` exists, we don't unnecessarily create a navigation transaction.
3434
*
35-
* This was hard to duplicate, but this behaviour stopped as soon as this fix
35+
* This was hard to duplicate, but this behavior stopped as soon as this fix
3636
* was applied. This issue might also only be caused in certain development environments
3737
* where the usage of a hot module reloader is causing errors.
3838
*/

packages/tracing/src/transaction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export class Transaction extends SpanClass {
7272

7373
if (this.sampled !== true) {
7474
// At this point if `sampled !== true` we want to discard the transaction.
75-
logger.warn('Discarding transaction because it was not chosen to be sampled.');
75+
logger.log('[Tracing] Discarding transaction because its trace was not chosen to be sampled.');
7676
return undefined;
7777
}
7878

packages/types/src/options.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ export interface Options {
8181
/**
8282
* Sample rate to determine trace sampling.
8383
*
84-
* 0.0 = 0% chance of instrumenting
85-
* 1.0 = 100% chance of instrumenting
84+
* 0.0 = 0% chance of a given trace being sent (send no traces)
85+
* 1.0 = 100% chance of a given trace being sent (send all traces)
8686
*
8787
* Default: 0.0
8888
*/

packages/types/src/transaction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Span, SpanContext } from './span';
22

33
/**
4-
* Interface holding Transaction specific properties
4+
* Interface holding Transaction-specific properties
55
*/
66
export interface TransactionContext extends SpanContext {
77
name: string;

0 commit comments

Comments
 (0)
0