Skip to content

Commit 0a08b61

Browse files
authored
chore(various): Small fixes (#3368)
1 parent 8e349e7 commit 0a08b61

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

packages/core/test/lib/request.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ describe('eventToSentryRequest', () => {
8282
};
8383
});
8484

85-
it('ads correct type, url, and event data', () => {
85+
it('adds correct type, url, and event data', () => {
8686
const result = eventToSentryRequest(transactionEvent, api);
8787
const envelope = parseEnvelopeRequest(result);
8888

packages/ember/addon/instance-initializers/sentry-performance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function initialize(appInstance: ApplicationInstance): void {
2424
}
2525
}
2626

27-
function getTransitionInformation(transition: any, router: any) {
27+
function getTransitionInformation(transition: any, router: any): { [key: string]: any } {
2828
const fromRoute = transition?.from?.name;
2929
const toRoute = transition && transition.to ? transition.to.name : router.currentRouteName;
3030
return {

packages/tracing/src/span.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export class Span implements SpanInterface {
126126
if (spanContext.parentSpanId) {
127127
this.parentSpanId = spanContext.parentSpanId;
128128
}
129-
// We want to include booleans as well here
129+
// check this way instad of the normal way to make sure we don't miss cases where sampled = false
130130
if ('sampled' in spanContext) {
131131
this.sampled = spanContext.sampled;
132132
}

packages/tracing/src/transaction.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ export class Transaction extends SpanClass implements TransactionInterface {
4040
this._trimEnd = transactionContext.trimEnd;
4141
this._hub = hub || getCurrentHub();
4242

43-
// this is because transactions are also spans, and spans have a transaction pointer
43+
// this is because transactions are also spans, and spans have a transaction pointer (it doesn't get set in `super`
44+
// because theoretically you can create a span without a transaction, though it does you no good)
4445
this.transaction = this;
4546
}
4647

packages/utils/src/string.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export function unicodeToBase64(plaintext: string): string {
143143
return bytes.toString('base64');
144144
}
145145
} catch (err) {
146-
throw new SentryError(`${errMsg} Got error: ${err}`);
146+
throw new SentryError(`${errMsg}\nGot error: ${err}`);
147147
}
148148

149149
// 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 {
189189
return bytes.toString('utf-8');
190190
}
191191
} catch (err) {
192-
throw new SentryError(`${errMsg} Got error: ${err}`);
192+
throw new SentryError(`${errMsg}\nGot error: ${err}`);
193193
}
194194

195195
// we shouldn't ever get here, because one of `atob` and `Buffer` should exist, but just in case...

0 commit comments

Comments
 (0)