Socket
Socket
Sign inDemoInstall

@sentry/types

Package Overview
Dependencies
Maintainers
11
Versions
463
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/types - npm Package Compare versions

Comparing version 7.98.0 to 7.99.0

types-ts3.8/startSpanOptions.d.ts

2

package.json
{
"name": "@sentry/types",
"version": "7.98.0",
"version": "7.99.0",
"description": "Types for all Sentry JavaScript SDKs",

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

@@ -18,2 +18,3 @@ import { Breadcrumb, BreadcrumbHint } from './breadcrumb';

import { Severity, SeverityLevel } from './severity';
import { StartSpanOptions } from './startSpanOptions';
import { Transaction } from './transaction';

@@ -224,2 +225,10 @@ import { Transport, TransportMakeRequestResponse } from './transport';

/**
* A hook for BrowserTracing to trigger a span start for a page load.
*/
on?(hook: 'startPageLoadSpan', callback: (options: StartSpanOptions) => void): void;
/**
* A hook for BrowserTracing to trigger a span for a navigation.
*/
on?(hook: 'startNavigationSpan', callback: (options: StartSpanOptions) => void): void;
/**
* Fire a hook event for transaction start.

@@ -271,3 +280,11 @@ * Expects to be given a transaction as the second argument.

}): void;
/**
* Emit a hook event for BrowserTracing to trigger a span start for a page load.
*/
emit?(hook: 'startPageLoadSpan', options: StartSpanOptions): void;
/**
* Emit a hook event for BrowserTracing to trigger a span for a navigation.
*/
emit?(hook: 'startNavigationSpan', options: StartSpanOptions): void;
}
//# sourceMappingURL=client.d.ts.map

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

export { PropagationContext, TracePropagationTargets } from './tracing';
export { StartSpanOptions } from './startSpanOptions';
export { CustomSamplingContext, SamplingContext, TraceparentData, Transaction, TransactionContext, TransactionMetadata, TransactionSource, } from './transaction';

@@ -39,0 +40,0 @@ export { DurationUnit, InformationUnit, FractionUnit, MeasurementUnit, NoneUnit, Measurements, } from './measurement';

@@ -37,2 +37,7 @@ import { Client } from './client';

/**
* 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.

@@ -76,2 +81,7 @@ */

/**
* 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.

@@ -78,0 +88,0 @@ */

@@ -12,3 +12,8 @@ import { TraceContext } from './context';

export type SpanAttributeValue = string | number | boolean | Array<null | undefined | string> | Array<null | undefined | number> | Array<null | undefined | boolean>;
export type SpanAttributes = Record<string, SpanAttributeValue | undefined>;
export type SpanAttributes = Partial<{
'sentry.origin': string;
'sentry.op': string;
'sentry.source': string;
'sentry.sample_rate': number;
}> & Record<string, SpanAttributeValue | undefined>;
/** This type is aligned with the OpenTelemetry TimeInput type. */

@@ -279,2 +284,3 @@ export type SpanTimeInput = HrTime | number | Date;

* @param httpStatus http code used to set the status
* @deprecated Use top-level `setHttpStatus()` instead.
*/

@@ -281,0 +287,0 @@ setHttpStatus(httpStatus: number): this;

import { DynamicSamplingContext } from './envelope';
export type TracePropagationTargets = (string | RegExp)[];
/**
* `PropagationContext` represents the data from an incoming trace. It should be constructed from incoming trace data,
* usually represented by `sentry-trace` and `baggage` HTTP headers.
*
* There is always a propagation context present in the SDK (or rather on Scopes), holding at least a `traceId`. This is
* to ensure that there is always a trace we can attach events onto, even if performance monitoring is disabled. If
* there was no incoming `traceId`, the `traceId` will be generated by the current SDK.
*/
export interface PropagationContext {
/**
* Either represents the incoming `traceId` or the `traceId` generated by the current SDK, if there was no incoming trace.
*/
traceId: string;
/**
* Represents the execution context of the current SDK. This acts as a fallback value to associate events with a
* particular execution context when performance monitoring is disabled.
*
* The ID of a current span (if one exists) should have precedence over this value when propagating trace data.
*/
spanId: string;
/**
* Represents the sampling decision of the incoming trace.
*
* The current SDK should not modify this value!
*/
sampled?: boolean;
/**
* The `parentSpanId` denotes the ID of the incoming client span. If there is no `parentSpanId` on the propagation
* context, it means that the the incoming trace didn't come from a span.
*
* The current SDK should not modify this value!
*/
parentSpanId?: string;
dsc?: DynamicSamplingContext;
/**
* An undefined dsc in the propagation context means that the current SDK invocation is the head of trace and still free to modify and set the DSC for outgoing requests.
*
* The current SDK should not modify this value!
*/
dsc?: Partial<DynamicSamplingContext>;
}
//# sourceMappingURL=tracing.d.ts.map

@@ -18,2 +18,3 @@ import type { Breadcrumb, BreadcrumbHint } from './breadcrumb';

import type { Severity, SeverityLevel } from './severity';
import type { StartSpanOptions } from './startSpanOptions';
import type { Transaction } from './transaction';

@@ -224,2 +225,10 @@ import type { Transport, TransportMakeRequestResponse } from './transport';

/**
* A hook for BrowserTracing to trigger a span start for a page load.
*/
on?(hook: 'startPageLoadSpan', callback: (options: StartSpanOptions) => void): void;
/**
* A hook for BrowserTracing to trigger a span for a navigation.
*/
on?(hook: 'startNavigationSpan', callback: (options: StartSpanOptions) => void): void;
/**
* Fire a hook event for transaction start.

@@ -271,3 +280,11 @@ * Expects to be given a transaction as the second argument.

}): void;
/**
* Emit a hook event for BrowserTracing to trigger a span start for a page load.
*/
emit?(hook: 'startPageLoadSpan', options: StartSpanOptions): void;
/**
* Emit a hook event for BrowserTracing to trigger a span for a navigation.
*/
emit?(hook: 'startNavigationSpan', options: StartSpanOptions): void;
}
//# sourceMappingURL=client.d.ts.map

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

export type { PropagationContext, TracePropagationTargets } from './tracing';
export type { StartSpanOptions } from './startSpanOptions';
export type { CustomSamplingContext, SamplingContext, TraceparentData, Transaction, TransactionContext, TransactionMetadata, TransactionSource, } from './transaction';

@@ -39,0 +40,0 @@ export type { DurationUnit, InformationUnit, FractionUnit, MeasurementUnit, NoneUnit, Measurements, } from './measurement';

@@ -37,2 +37,7 @@ import type { Client } from './client';

/**
* 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.

@@ -76,2 +81,7 @@ */

/**
* 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.

@@ -78,0 +88,0 @@ */

@@ -12,3 +12,8 @@ import type { TraceContext } from './context';

export type SpanAttributeValue = string | number | boolean | Array<null | undefined | string> | Array<null | undefined | number> | Array<null | undefined | boolean>;
export type SpanAttributes = Record<string, SpanAttributeValue | undefined>;
export type SpanAttributes = Partial<{
'sentry.origin': string;
'sentry.op': string;
'sentry.source': string;
'sentry.sample_rate': number;
}> & Record<string, SpanAttributeValue | undefined>;
/** This type is aligned with the OpenTelemetry TimeInput type. */

@@ -279,2 +284,3 @@ export type SpanTimeInput = HrTime | number | Date;

* @param httpStatus http code used to set the status
* @deprecated Use top-level `setHttpStatus()` instead.
*/

@@ -281,0 +287,0 @@ setHttpStatus(httpStatus: number): this;

import type { DynamicSamplingContext } from './envelope';
export type TracePropagationTargets = (string | RegExp)[];
/**
* `PropagationContext` represents the data from an incoming trace. It should be constructed from incoming trace data,
* usually represented by `sentry-trace` and `baggage` HTTP headers.
*
* There is always a propagation context present in the SDK (or rather on Scopes), holding at least a `traceId`. This is
* to ensure that there is always a trace we can attach events onto, even if performance monitoring is disabled. If
* there was no incoming `traceId`, the `traceId` will be generated by the current SDK.
*/
export interface PropagationContext {
/**
* Either represents the incoming `traceId` or the `traceId` generated by the current SDK, if there was no incoming trace.
*/
traceId: string;
/**
* Represents the execution context of the current SDK. This acts as a fallback value to associate events with a
* particular execution context when performance monitoring is disabled.
*
* The ID of a current span (if one exists) should have precedence over this value when propagating trace data.
*/
spanId: string;
/**
* Represents the sampling decision of the incoming trace.
*
* The current SDK should not modify this value!
*/
sampled?: boolean;
/**
* The `parentSpanId` denotes the ID of the incoming client span. If there is no `parentSpanId` on the propagation
* context, it means that the the incoming trace didn't come from a span.
*
* The current SDK should not modify this value!
*/
parentSpanId?: string;
dsc?: DynamicSamplingContext;
/**
* An undefined dsc in the propagation context means that the current SDK invocation is the head of trace and still free to modify and set the DSC for outgoing requests.
*
* The current SDK should not modify this value!
*/
dsc?: Partial<DynamicSamplingContext>;
}
//# sourceMappingURL=tracing.d.ts.map

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc