diff --git a/packages/core/test/lib/request.test.ts b/packages/core/test/lib/request.test.ts index 445cbb9abb81..c215693ca58e 100644 --- a/packages/core/test/lib/request.test.ts +++ b/packages/core/test/lib/request.test.ts @@ -82,7 +82,7 @@ describe('eventToSentryRequest', () => { }; }); - it('ads correct type, url, and event data', () => { + it('adds correct type, url, and event data', () => { const result = eventToSentryRequest(transactionEvent, api); const envelope = parseEnvelopeRequest(result); diff --git a/packages/ember/addon/instance-initializers/sentry-performance.ts b/packages/ember/addon/instance-initializers/sentry-performance.ts index 1e5e9d7d8fad..07c3f9db9df7 100644 --- a/packages/ember/addon/instance-initializers/sentry-performance.ts +++ b/packages/ember/addon/instance-initializers/sentry-performance.ts @@ -24,7 +24,7 @@ export function initialize(appInstance: ApplicationInstance): void { } } -function getTransitionInformation(transition: any, router: any) { +function getTransitionInformation(transition: any, router: any): { [key: string]: any } { const fromRoute = transition?.from?.name; const toRoute = transition && transition.to ? transition.to.name : router.currentRouteName; return { diff --git a/packages/tracing/src/span.ts b/packages/tracing/src/span.ts index 273d33ff08e0..c24576d401bc 100644 --- a/packages/tracing/src/span.ts +++ b/packages/tracing/src/span.ts @@ -126,7 +126,7 @@ export class Span implements SpanInterface { if (spanContext.parentSpanId) { this.parentSpanId = spanContext.parentSpanId; } - // We want to include booleans as well here + // check this way instad of the normal way to make sure we don't miss cases where sampled = false if ('sampled' in spanContext) { this.sampled = spanContext.sampled; } diff --git a/packages/tracing/src/transaction.ts b/packages/tracing/src/transaction.ts index a198e8daeb3c..20abbe9076d7 100644 --- a/packages/tracing/src/transaction.ts +++ b/packages/tracing/src/transaction.ts @@ -40,7 +40,8 @@ export class Transaction extends SpanClass implements TransactionInterface { this._trimEnd = transactionContext.trimEnd; this._hub = hub || getCurrentHub(); - // this is because transactions are also spans, and spans have a transaction pointer + // this is because transactions are also spans, and spans have a transaction pointer (it doesn't get set in `super` + // because theoretically you can create a span without a transaction, though it does you no good) this.transaction = this; } diff --git a/packages/utils/src/string.ts b/packages/utils/src/string.ts index a568244029d3..39d1fd251094 100644 --- a/packages/utils/src/string.ts +++ b/packages/utils/src/string.ts @@ -143,7 +143,7 @@ export function unicodeToBase64(plaintext: string): string { return bytes.toString('base64'); } } catch (err) { - throw new SentryError(`${errMsg} Got error: ${err}`); + throw new SentryError(`${errMsg}\nGot error: ${err}`); } // we shouldn't ever get here, because one of `btoa` and `Buffer` should exist, but just in case... @@ -189,7 +189,7 @@ export function base64ToUnicode(base64String: string): string { return bytes.toString('utf-8'); } } catch (err) { - throw new SentryError(`${errMsg} Got error: ${err}`); + throw new SentryError(`${errMsg}\nGot error: ${err}`); } // we shouldn't ever get here, because one of `atob` and `Buffer` should exist, but just in case...