@sentry/types
Advanced tools
Comparing version 8.4.0 to 8.5.0
{ | ||
"name": "@sentry/types", | ||
"version": "8.4.0", | ||
"version": "8.5.0", | ||
"description": "Types for all Sentry JavaScript SDKs", | ||
@@ -5,0 +5,0 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", |
@@ -13,2 +13,3 @@ import { Primitive } from './misc'; | ||
state?: StateContext; | ||
profile?: ProfileContext; | ||
} | ||
@@ -112,2 +113,5 @@ export interface StateContext extends Record<string, unknown> { | ||
} | ||
export interface ProfileContext extends Record<string, unknown> { | ||
profile_id: string; | ||
} | ||
//# sourceMappingURL=context.d.ts.map |
@@ -10,3 +10,3 @@ import { AttachmentType } from './attachment'; | ||
import { SdkInfo } from './sdkinfo'; | ||
import { SerializedSession, Session, SessionAggregates } from './session'; | ||
import { SerializedSession, SessionAggregates } from './session'; | ||
import { SpanJSON } from './span'; | ||
@@ -90,3 +90,3 @@ export type DynamicSamplingContext = { | ||
export type UserFeedbackItem = BaseEnvelopeItem<UserFeedbackItemHeaders, UserFeedback>; | ||
export type SessionItem = BaseEnvelopeItem<SessionItemHeaders, Session | SerializedSession> | BaseEnvelopeItem<SessionAggregatesItemHeaders, SessionAggregates>; | ||
export type SessionItem = BaseEnvelopeItem<SessionItemHeaders, SerializedSession> | BaseEnvelopeItem<SessionAggregatesItemHeaders, SessionAggregates>; | ||
export type ClientReportItem = BaseEnvelopeItem<ClientReportItemHeaders, ClientReport>; | ||
@@ -93,0 +93,0 @@ export type CheckInItem = BaseEnvelopeItem<CheckInItemHeaders, SerializedCheckIn>; |
@@ -50,5 +50,5 @@ export { Attachment } from './attachment'; | ||
export { CheckIn, MonitorConfig, FinishedCheckIn, InProgressCheckIn, SerializedCheckIn } from './checkin'; | ||
export { MetricsAggregator, MetricBucketItem, MetricInstance, } from './metrics'; | ||
export { MetricsAggregator, MetricBucketItem, MetricInstance, MetricData, Metrics, } from './metrics'; | ||
export { ParameterizedString } from './parameterize'; | ||
export { ViewHierarchyData, ViewHierarchyWindow } from './view-hierarchy'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -0,3 +1,10 @@ | ||
import { Client } from './client'; | ||
import { MeasurementUnit } from './measurement'; | ||
import { Primitive } from './misc'; | ||
export interface MetricData { | ||
unit?: MeasurementUnit; | ||
tags?: Record<string, Primitive>; | ||
timestamp?: number; | ||
client?: Client; | ||
} | ||
/** | ||
@@ -50,2 +57,28 @@ * An abstract definition of the minimum required API | ||
} | ||
export interface Metrics { | ||
/** | ||
* Adds a value to a counter metric | ||
* | ||
* @experimental This API is experimental and might have breaking changes in the future. | ||
*/ | ||
increment(name: string, value?: number, data?: MetricData): void; | ||
/** | ||
* Adds a value to a distribution metric | ||
* | ||
* @experimental This API is experimental and might have breaking changes in the future. | ||
*/ | ||
distribution(name: string, value: number, data?: MetricData): void; | ||
/** | ||
* Adds a value to a set metric. Value must be a string or integer. | ||
* | ||
* @experimental This API is experimental and might have breaking changes in the future. | ||
*/ | ||
set(name: string, value: number | string, data?: MetricData): void; | ||
/** | ||
* Adds a value to a gauge metric | ||
* | ||
* @experimental This API is experimental and might have breaking changes in the future. | ||
*/ | ||
gauge(name: string, value: number, data?: MetricData): void; | ||
} | ||
//# sourceMappingURL=metrics.d.ts.map |
@@ -13,2 +13,3 @@ import type { Primitive } from './misc'; | ||
state?: StateContext; | ||
profile?: ProfileContext; | ||
} | ||
@@ -112,2 +113,5 @@ export interface StateContext extends Record<string, unknown> { | ||
} | ||
export interface ProfileContext extends Record<string, unknown> { | ||
profile_id: string; | ||
} | ||
//# sourceMappingURL=context.d.ts.map |
@@ -10,3 +10,3 @@ import type { AttachmentType } from './attachment'; | ||
import type { SdkInfo } from './sdkinfo'; | ||
import type { SerializedSession, Session, SessionAggregates } from './session'; | ||
import type { SerializedSession, SessionAggregates } from './session'; | ||
import type { SpanJSON } from './span'; | ||
@@ -87,3 +87,3 @@ export type DynamicSamplingContext = { | ||
export type UserFeedbackItem = BaseEnvelopeItem<UserFeedbackItemHeaders, UserFeedback>; | ||
export type SessionItem = BaseEnvelopeItem<SessionItemHeaders, Session | SerializedSession> | BaseEnvelopeItem<SessionAggregatesItemHeaders, SessionAggregates>; | ||
export type SessionItem = BaseEnvelopeItem<SessionItemHeaders, SerializedSession> | BaseEnvelopeItem<SessionAggregatesItemHeaders, SessionAggregates>; | ||
export type ClientReportItem = BaseEnvelopeItem<ClientReportItemHeaders, ClientReport>; | ||
@@ -90,0 +90,0 @@ export type CheckInItem = BaseEnvelopeItem<CheckInItemHeaders, SerializedCheckIn>; |
@@ -50,5 +50,5 @@ export type { Attachment } from './attachment'; | ||
export type { CheckIn, MonitorConfig, FinishedCheckIn, InProgressCheckIn, SerializedCheckIn } from './checkin'; | ||
export type { MetricsAggregator, MetricBucketItem, MetricInstance, } from './metrics'; | ||
export type { MetricsAggregator, MetricBucketItem, MetricInstance, MetricData, Metrics, } from './metrics'; | ||
export type { ParameterizedString } from './parameterize'; | ||
export type { ViewHierarchyData, ViewHierarchyWindow } from './view-hierarchy'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -0,3 +1,10 @@ | ||
import type { Client } from './client'; | ||
import type { MeasurementUnit } from './measurement'; | ||
import type { Primitive } from './misc'; | ||
export interface MetricData { | ||
unit?: MeasurementUnit; | ||
tags?: Record<string, Primitive>; | ||
timestamp?: number; | ||
client?: Client; | ||
} | ||
/** | ||
@@ -50,2 +57,28 @@ * An abstract definition of the minimum required API | ||
} | ||
export interface Metrics { | ||
/** | ||
* Adds a value to a counter metric | ||
* | ||
* @experimental This API is experimental and might have breaking changes in the future. | ||
*/ | ||
increment(name: string, value?: number, data?: MetricData): void; | ||
/** | ||
* Adds a value to a distribution metric | ||
* | ||
* @experimental This API is experimental and might have breaking changes in the future. | ||
*/ | ||
distribution(name: string, value: number, data?: MetricData): void; | ||
/** | ||
* Adds a value to a set metric. Value must be a string or integer. | ||
* | ||
* @experimental This API is experimental and might have breaking changes in the future. | ||
*/ | ||
set(name: string, value: number | string, data?: MetricData): void; | ||
/** | ||
* Adds a value to a gauge metric | ||
* | ||
* @experimental This API is experimental and might have breaking changes in the future. | ||
*/ | ||
gauge(name: string, value: number, data?: MetricData): void; | ||
} | ||
//# sourceMappingURL=metrics.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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
314428
6507