Skip to content

chore(various): Small fixes #3368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/core/test/lib/request.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion packages/tracing/src/span.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion packages/tracing/src/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/utils/src/string.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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...
Expand Down Expand Up @@ -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...
Expand Down