Skip to content
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

fix(vue): Cast name parameter to string #4483

Merged
merged 4 commits into from
Feb 2, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions packages/tracing/src/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Span as SpanClass, SpanRecorder } from './span';

/** JSDoc */
export class Transaction extends SpanClass implements TransactionInterface {
public name: string;
public name: string | Symbol;

public metadata: TransactionMetadata;

Expand Down Expand Up @@ -51,7 +51,7 @@ export class Transaction extends SpanClass implements TransactionInterface {
/**
* JSDoc
*/
public setName(name: string): void {
public setName(name: string | Symbol): void {
this.name = name;
}

Expand Down Expand Up @@ -142,7 +142,7 @@ export class Transaction extends SpanClass implements TransactionInterface {
transaction.measurements = this._measurements;
}

logger.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`);
logger.log(`[Tracing] Finishing ${this.op} transaction: ${this.name.toString()}.`);

return this._hub.captureEvent(transaction);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/types/src/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface Event {
environment?: string;
sdk?: SdkInfo;
request?: Request;
transaction?: string;
transaction?: string | Symbol;
modules?: { [key: string]: string };
fingerprint?: string[];
exception?: {
Expand All @@ -37,7 +37,7 @@ export interface Event {
stacktrace?: Stacktrace;
breadcrumbs?: Breadcrumb[];
contexts?: Contexts;
tags?: { [key: string]: Primitive };
tags?: { [key: string]: Primitive | Symbol };
extra?: Extras;
user?: User;
type?: EventType;
Expand Down
6 changes: 3 additions & 3 deletions packages/types/src/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface TransactionContext extends SpanContext {
/**
* Human-readable identifier for the transaction
*/
name: string;
name: string | Symbol;

/**
* If true, sets the end timestamp of the transaction to the highest timestamp of child spans, trimming
Expand Down Expand Up @@ -56,7 +56,7 @@ export interface Transaction extends TransactionContext, Span {
/**
* @inheritDoc
*/
tags: { [key: string]: Primitive };
tags: { [key: string]: Primitive | Symbol };

/**
* @inheritDoc
Expand All @@ -71,7 +71,7 @@ export interface Transaction extends TransactionContext, Span {
/**
* Set the name of the transaction
*/
setName(name: string): void;
setName(name: string | Symbol): void;

/** Returns the current transaction properties as a `TransactionContext` */
toContext(): TransactionContext;
Expand Down