Socket
Socket
Sign inDemoInstall

@sentry/types

Package Overview
Dependencies
0
Maintainers
11
Versions
424
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 8.0.0-alpha.5 to 8.0.0-alpha.6

2

package.json
{
"name": "@sentry/types",
"version": "8.0.0-alpha.5",
"version": "8.0.0-alpha.6",
"description": "Types for all Sentry JavaScript SDKs",

@@ -5,0 +5,0 @@ "repository": "git://github.com/getsentry/sentry-javascript.git",

@@ -11,5 +11,4 @@ import { AttachmentType } from './attachment';

import { SerializedSession, Session, SessionAggregates } from './session';
import { Transaction } from './transaction';
export type DynamicSamplingContext = {
trace_id: Transaction['traceId'];
trace_id: string;
public_key: DsnComponents['publicKey'];

@@ -16,0 +15,0 @@ sample_rate?: string;

@@ -16,3 +16,3 @@ export { Attachment } from './attachment';

export { Hub } from './hub';
export { Integration, IntegrationClass, IntegrationFn, IntegrationFnResult } from './integration';
export { Integration, IntegrationClass, IntegrationFn } from './integration';
export { Mechanism } from './mechanism';

@@ -19,0 +19,0 @@ export { ExtractedNodeRequestData, HttpHeaderValue, Primitive, WorkerLocation } from './misc';

import { Client } from './client';
import { Event, EventHint } from './event';
import { EventProcessor } from './eventprocessor';
import { Hub } from './hub';
/** Integration Class Interface */

@@ -13,5 +11,4 @@ export interface IntegrationClass<T> {

}
/** Integration interface.
* This is more or less the same as `Integration`, but with a slimmer `setupOnce` siganture. */
export interface IntegrationFnResult {
/** Integration interface */
export interface Integration {
/**

@@ -55,39 +52,3 @@ * The name of the integration.

*/
export type IntegrationFn = (...rest: any[]) => IntegrationFnResult;
/** Integration interface */
export interface Integration {
/**
* The name of the integration.
*/
name: string;
/**
* This hook is only called once, even if multiple clients are created.
* It does not receives any arguments, and should only use for e.g. global monkey patching and similar things.
*/
setupOnce?(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;
/**
* Set up an integration for the given client.
* Receives the client as argument.
*
* Whenever possible, prefer this over `setupOnce`, as that is only run for the first client,
* whereas `setup` runs for each client. Only truly global things (e.g. registering global handlers)
* should be done in `setupOnce`.
*/
setup?(client: Client): void;
/**
* This hook is triggered after `setupOnce()` and `setup()` have been called for all integrations.
* You can use it if it is important that all other integrations have been run before.
*/
afterAllSetup?(client: Client): void;
/**
* An optional hook that allows to preprocess an event _before_ it is passed to all other event processors.
*/
preprocessEvent?(event: Event, hint: EventHint | undefined, client: Client): void;
/**
* An optional hook that allows to process an event.
* Return `null` to drop the event, or mutate the event & return it.
* This receives the client that the integration was installed for as third argument.
*/
processEvent?(event: Event, hint: EventHint, client: Client): Event | null | PromiseLike<Event | null>;
}
export type IntegrationFn = (...rest: any[]) => Integration;
//# sourceMappingURL=integration.d.ts.map

@@ -138,13 +138,2 @@ import { Attachment } from './attachment';

/**
* Sets the Span on the scope.
* @param span Span
* @deprecated Instead of setting a span on a scope, use `startSpan()`/`startSpanManual()` instead.
*/
setSpan(span?: Span): this;
/**
* Returns the `Span` if there is one.
* @deprecated Use `getActiveSpan()` instead.
*/
getSpan(): Span | undefined;
/**
* Returns the `Transaction` attached to the scope (if there is one).

@@ -151,0 +140,0 @@ * @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.

@@ -52,19 +52,4 @@ import { Context } from './context';

*/
export interface Transaction extends Pick<TransactionContext, Exclude<keyof TransactionContext, 'name' | 'op'>>, Span {
export interface Transaction extends Pick<TransactionContext, Exclude<keyof TransactionContext, 'name' | 'op' | 'spanId' | 'traceId'>>, Span {
/**
* The ID of the transaction.
* @deprecated Use `spanContext().spanId` instead.
*/
spanId: string;
/**
* The ID of the trace.
* @deprecated Use `spanContext().traceId` instead.
*/
traceId: string;
/**
* Was this transaction chosen to be sent as part of the sample?
* @deprecated Use `spanIsSampled(transaction)` instead.
*/
sampled?: boolean | undefined;
/**
* @inheritDoc

@@ -175,11 +160,2 @@ */

requestPath?: string;
/**
* Metadata for the transaction's spans, keyed by spanId.
* @deprecated This will be removed in v8.
*/
spanMetadata: {
[spanId: string]: {
[key: string]: unknown;
};
};
}

@@ -186,0 +162,0 @@ /**

@@ -11,5 +11,4 @@ import type { AttachmentType } from './attachment';

import type { SerializedSession, Session, SessionAggregates } from './session';
import type { Transaction } from './transaction';
export type DynamicSamplingContext = {
trace_id: Transaction['traceId'];
trace_id: string;
public_key: DsnComponents['publicKey'];

@@ -16,0 +15,0 @@ sample_rate?: string;

@@ -16,3 +16,3 @@ export type { Attachment } from './attachment';

export type { Hub } from './hub';
export type { Integration, IntegrationClass, IntegrationFn, IntegrationFnResult } from './integration';
export type { Integration, IntegrationClass, IntegrationFn } from './integration';
export type { Mechanism } from './mechanism';

@@ -19,0 +19,0 @@ export type { ExtractedNodeRequestData, HttpHeaderValue, Primitive, WorkerLocation } from './misc';

import type { Client } from './client';
import type { Event, EventHint } from './event';
import type { EventProcessor } from './eventprocessor';
import type { Hub } from './hub';
/** Integration Class Interface */

@@ -13,5 +11,4 @@ export interface IntegrationClass<T> {

}
/** Integration interface.
* This is more or less the same as `Integration`, but with a slimmer `setupOnce` siganture. */
export interface IntegrationFnResult {
/** Integration interface */
export interface Integration {
/**

@@ -55,39 +52,3 @@ * The name of the integration.

*/
export type IntegrationFn = (...rest: any[]) => IntegrationFnResult;
/** Integration interface */
export interface Integration {
/**
* The name of the integration.
*/
name: string;
/**
* This hook is only called once, even if multiple clients are created.
* It does not receives any arguments, and should only use for e.g. global monkey patching and similar things.
*/
setupOnce?(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;
/**
* Set up an integration for the given client.
* Receives the client as argument.
*
* Whenever possible, prefer this over `setupOnce`, as that is only run for the first client,
* whereas `setup` runs for each client. Only truly global things (e.g. registering global handlers)
* should be done in `setupOnce`.
*/
setup?(client: Client): void;
/**
* This hook is triggered after `setupOnce()` and `setup()` have been called for all integrations.
* You can use it if it is important that all other integrations have been run before.
*/
afterAllSetup?(client: Client): void;
/**
* An optional hook that allows to preprocess an event _before_ it is passed to all other event processors.
*/
preprocessEvent?(event: Event, hint: EventHint | undefined, client: Client): void;
/**
* An optional hook that allows to process an event.
* Return `null` to drop the event, or mutate the event & return it.
* This receives the client that the integration was installed for as third argument.
*/
processEvent?(event: Event, hint: EventHint, client: Client): Event | null | PromiseLike<Event | null>;
}
export type IntegrationFn = (...rest: any[]) => Integration;
//# sourceMappingURL=integration.d.ts.map

@@ -138,13 +138,2 @@ import type { Attachment } from './attachment';

/**
* Sets the Span on the scope.
* @param span Span
* @deprecated Instead of setting a span on a scope, use `startSpan()`/`startSpanManual()` instead.
*/
setSpan(span?: Span): this;
/**
* Returns the `Span` if there is one.
* @deprecated Use `getActiveSpan()` instead.
*/
getSpan(): Span | undefined;
/**
* Returns the `Transaction` attached to the scope (if there is one).

@@ -151,0 +140,0 @@ * @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.

@@ -52,19 +52,4 @@ import type { Context } from './context';

*/
export interface Transaction extends Omit<TransactionContext, 'name' | 'op'>, Span {
export interface Transaction extends Omit<TransactionContext, 'name' | 'op' | 'spanId' | 'traceId'>, Span {
/**
* The ID of the transaction.
* @deprecated Use `spanContext().spanId` instead.
*/
spanId: string;
/**
* The ID of the trace.
* @deprecated Use `spanContext().traceId` instead.
*/
traceId: string;
/**
* Was this transaction chosen to be sent as part of the sample?
* @deprecated Use `spanIsSampled(transaction)` instead.
*/
sampled?: boolean | undefined;
/**
* @inheritDoc

@@ -175,11 +160,2 @@ */

requestPath?: string;
/**
* Metadata for the transaction's spans, keyed by spanId.
* @deprecated This will be removed in v8.
*/
spanMetadata: {
[spanId: string]: {
[key: string]: unknown;
};
};
}

@@ -186,0 +162,0 @@ /**

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc