Skip to content

Commit fd4d48c

Browse files
committed
random cleanup
1 parent 9c6f0cb commit fd4d48c

File tree

6 files changed

+28
-25
lines changed

6 files changed

+28
-25
lines changed

packages/minimal/src/index.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -191,23 +191,21 @@ export function _callOnClient(method: string, ...args: any[]): void {
191191
}
192192

193193
/**
194-
* Starts a new `Transaction` and returns it. This is the entry point to manual
195-
* tracing instrumentation.
194+
* Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.
196195
*
197-
* A tree structure can be built by adding child spans to the transaction, and
198-
* child spans to other spans. To start a new child span within the transaction
199-
* or any span, call the respective `.startChild()` method.
196+
* A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a
197+
* new child span within the transaction or any span, call the respective `.startChild()` method.
200198
*
201-
* Every child span must be finished before the transaction is finished,
202-
* otherwise the unfinished spans are discarded.
199+
* Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.
203200
*
204-
* The transaction must be finished with a call to its `.finish()` method, at
205-
* which point the transaction with all its finished child spans will be sent to
206-
* Sentry.
201+
* The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its
202+
* finished child spans will be sent to Sentry.
207203
*
208204
* @param context Properties of the new `Transaction`.
209205
* @param customSampleContext Information given to the transaction sampling function (along with context-dependent
210206
* default values). See {@link Options.tracesSampler}.
207+
*
208+
* @returns The transaction which was just started
211209
*/
212210
export function startTransaction(context: TransactionContext, customSampleContext?: CustomSampleContext): Transaction {
213211
return callOnHub('startTransaction', { ...context }, customSampleContext);

packages/types/src/hub.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -183,23 +183,21 @@ export interface Hub {
183183
startSpan(context: SpanContext): Span;
184184

185185
/**
186-
* Starts a new `Transaction` and returns it. This is the entry point to manual
187-
* tracing instrumentation.
186+
* Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.
188187
*
189-
* A tree structure can be built by adding child spans to the transaction, and
190-
* child spans to other spans. To start a new child span within the transaction
191-
* or any span, call the respective `.startChild()` method.
188+
* A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a
189+
* new child span within the transaction or any span, call the respective `.startChild()` method.
192190
*
193-
* Every child span must be finished before the transaction is finished,
194-
* otherwise the unfinished spans are discarded.
191+
* Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.
195192
*
196-
* The transaction must be finished with a call to its `.finish()` method, at
197-
* which point the transaction with all its finished child spans will be sent to
198-
* Sentry.
193+
* The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its
194+
* finished child spans will be sent to Sentry.
199195
*
200196
* @param context Properties of the new `Transaction`.
201197
* @param customSampleContext Information given to the transaction sampling function (along with context-dependent
202198
* default values). See {@link Options.tracesSampler}.
199+
*
200+
* @returns The transaction which was just started
203201
*/
204202
startTransaction(context: TransactionContext, customSampleContext?: CustomSampleContext): Transaction;
205203
}

packages/types/src/options.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ export interface Options {
105105
*/
106106
shutdownTimeout?: number;
107107

108+
/**
109+
* Options which are in beta, or otherwise not guaranteed to be stable.
110+
*/
108111
_experiments?: {
109112
[key: string]: any;
110113
};

packages/types/src/request.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
/** JSDoc */
1+
/**
2+
* Request data included in an event as sent to Sentry
3+
*/
24
export interface Request {
35
url?: string;
46
method?: string;

packages/types/src/transaction.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ export interface CustomSampleContext {
6565
export interface SampleContext extends CustomSampleContext {
6666
/**
6767
* Object representing the URL of the current page or worker script. Passed by default in a browser or service worker
68-
* context
68+
* context.
6969
*/
7070
location?: Location | WorkerLocation;
7171

7272
/**
73-
* Object representing the incoming request to a node server. Passed by default in a node server context.
73+
* Object representing the incoming request to a node server. Passed by default when using the TracingHandler.
7474
*/
7575
request?: ExtractedNodeRequestData;
7676
}

packages/utils/src/misc.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,14 @@ export function consoleSandbox(callback: () => any): any {
157157
return callback();
158158
}
159159

160-
const originalConsole = global.console as ExtensibleConsole;
160+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
161+
const originalConsole = (global as any).console as ExtensibleConsole;
161162
const wrappedLevels: { [key: string]: any } = {};
162163

163164
// Restore all wrapped console methods
164165
levels.forEach(level => {
165-
if (level in global.console && (originalConsole[level] as WrappedFunction).__sentry_original__) {
166+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
167+
if (level in (global as any).console && (originalConsole[level] as WrappedFunction).__sentry_original__) {
166168
wrappedLevels[level] = originalConsole[level] as WrappedFunction;
167169
originalConsole[level] = (originalConsole[level] as WrappedFunction).__sentry_original__;
168170
}

0 commit comments

Comments
 (0)