Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sentry/types

Package Overview
Dependencies
Maintainers
13
Versions
486
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 5.16.0-beta.1 to 5.16.0-beta.2

10

dist/hub.d.ts

@@ -162,10 +162,10 @@ import { Breadcrumb, BreadcrumbHint } from './breadcrumb';

/**
* This functions starts a span. If argument passed is of type `Span`, it'll run sampling on it if configured
* and attach a `SpanRecorder`. If it's of type `SpanContext` and there is already a `Span` on the Scope,
* the created Span will have a reference to it and become it's child. Otherwise it'll crete a new `Span`.
* This functions starts a span. If there is already a `Span` on the Scope,
* the created Span with the SpanContext will have a reference to it and become it's child.
* Otherwise it'll crete a new `Span`.
*
* @param span Already constructed span which should be started or properties with which the span should be created
* @param spanContext Properties with which the span should be created
*/
startSpan(span?: Span | SpanContext, forceNoChild?: boolean): Span;
startSpan(spanContext?: SpanContext): Span;
}
//# sourceMappingURL=hub.d.ts.map

@@ -20,3 +20,3 @@ export { Breadcrumb, BreadcrumbHint } from './breadcrumb';

export { Severity } from './severity';
export { Span, SpanContext, SpanStatus } from './span';
export { Span, SpanContext } from './span';
export { StackFrame } from './stackframe';

@@ -23,0 +23,0 @@ export { Stacktrace } from './stacktrace';

@@ -6,6 +6,4 @@ Object.defineProperty(exports, "__esModule", { value: true });

exports.Severity = severity_1.Severity;
var span_1 = require("./span");
exports.SpanStatus = span_1.SpanStatus;
var status_1 = require("./status");
exports.Status = status_1.Status;
//# sourceMappingURL=index.js.map

@@ -54,5 +54,6 @@ /** Span holding trace_id, span_id */

* Sets the status attribute on the current span
* See: {@sentry/apm SpanStatus} for possible values
* @param status http code used to set the status
*/
setStatus(status: SpanStatus): this;
setStatus(status: string): this;
/**

@@ -89,4 +90,5 @@ * Sets the status attribute on the current span based on the http code

* Completion status of the Span.
* See: {@sentry/apm SpanStatus} for possible values
*/
status?: SpanStatus;
status?: string;
/**

@@ -125,48 +127,2 @@ * Parent Span ID

}
/** The status of an Span. */
export declare enum SpanStatus {
/** The operation completed successfully. */
Ok = "ok",
/** Deadline expired before operation could complete. */
DeadlineExceeded = "deadline_exceeded",
/** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */
Unauthenticated = "unauthenticated",
/** 403 Forbidden */
PermissionDenied = "permission_denied",
/** 404 Not Found. Some requested entity (file or directory) was not found. */
NotFound = "not_found",
/** 429 Too Many Requests */
ResourceExhausted = "resource_exhausted",
/** Client specified an invalid argument. 4xx. */
InvalidArgument = "invalid_argument",
/** 501 Not Implemented */
Unimplemented = "unimplemented",
/** 503 Service Unavailable */
Unavailable = "unavailable",
/** Other/generic 5xx. */
InternalError = "internal_error",
/** Unknown. Any non-standard HTTP status code. */
UnknownError = "unknown_error",
/** The operation was cancelled (typically by the user). */
Cancelled = "cancelled",
/** Already exists (409) */
AlreadyExists = "already_exists",
/** Operation was rejected because the system is not in a state required for the operation's */
FailedPrecondition = "failed_precondition",
/** The operation was aborted, typically due to a concurrency issue. */
Aborted = "aborted",
/** Operation was attempted past the valid range. */
OutOfRange = "out_of_range",
/** Unrecoverable data loss or corruption */
DataLoss = "data_loss"
}
export declare namespace SpanStatus {
/**
* Converts a HTTP status code into a {@link SpanStatus}.
*
* @param httpStatus The HTTP response status code.
* @returns The span status or {@link SpanStatus.UnknownError}.
*/
function fromHttpCode(httpStatus: number): SpanStatus;
}
//# sourceMappingURL=span.d.ts.map
Object.defineProperty(exports, "__esModule", { value: true });
/** The status of an Span. */
var SpanStatus;
(function (SpanStatus) {
/** The operation completed successfully. */
SpanStatus["Ok"] = "ok";
/** Deadline expired before operation could complete. */
SpanStatus["DeadlineExceeded"] = "deadline_exceeded";
/** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */
SpanStatus["Unauthenticated"] = "unauthenticated";
/** 403 Forbidden */
SpanStatus["PermissionDenied"] = "permission_denied";
/** 404 Not Found. Some requested entity (file or directory) was not found. */
SpanStatus["NotFound"] = "not_found";
/** 429 Too Many Requests */
SpanStatus["ResourceExhausted"] = "resource_exhausted";
/** Client specified an invalid argument. 4xx. */
SpanStatus["InvalidArgument"] = "invalid_argument";
/** 501 Not Implemented */
SpanStatus["Unimplemented"] = "unimplemented";
/** 503 Service Unavailable */
SpanStatus["Unavailable"] = "unavailable";
/** Other/generic 5xx. */
SpanStatus["InternalError"] = "internal_error";
/** Unknown. Any non-standard HTTP status code. */
SpanStatus["UnknownError"] = "unknown_error";
/** The operation was cancelled (typically by the user). */
SpanStatus["Cancelled"] = "cancelled";
/** Already exists (409) */
SpanStatus["AlreadyExists"] = "already_exists";
/** Operation was rejected because the system is not in a state required for the operation's */
SpanStatus["FailedPrecondition"] = "failed_precondition";
/** The operation was aborted, typically due to a concurrency issue. */
SpanStatus["Aborted"] = "aborted";
/** Operation was attempted past the valid range. */
SpanStatus["OutOfRange"] = "out_of_range";
/** Unrecoverable data loss or corruption */
SpanStatus["DataLoss"] = "data_loss";
})(SpanStatus = exports.SpanStatus || (exports.SpanStatus = {}));
// tslint:disable:no-unnecessary-qualifier no-namespace
(function (SpanStatus) {
/**
* Converts a HTTP status code into a {@link SpanStatus}.
*
* @param httpStatus The HTTP response status code.
* @returns The span status or {@link SpanStatus.UnknownError}.
*/
// tslint:disable-next-line:completed-docs
function fromHttpCode(httpStatus) {
if (httpStatus < 400) {
return SpanStatus.Ok;
}
if (httpStatus >= 400 && httpStatus < 500) {
switch (httpStatus) {
case 401:
return SpanStatus.Unauthenticated;
case 403:
return SpanStatus.PermissionDenied;
case 404:
return SpanStatus.NotFound;
case 409:
return SpanStatus.AlreadyExists;
case 413:
return SpanStatus.FailedPrecondition;
case 429:
return SpanStatus.ResourceExhausted;
default:
return SpanStatus.InvalidArgument;
}
}
if (httpStatus >= 500 && httpStatus < 600) {
switch (httpStatus) {
case 501:
return SpanStatus.Unimplemented;
case 503:
return SpanStatus.Unavailable;
case 504:
return SpanStatus.DeadlineExceeded;
default:
return SpanStatus.InternalError;
}
}
return SpanStatus.UnknownError;
}
SpanStatus.fromHttpCode = fromHttpCode;
})(SpanStatus = exports.SpanStatus || (exports.SpanStatus = {}));
//# sourceMappingURL=span.js.map

@@ -162,10 +162,10 @@ import { Breadcrumb, BreadcrumbHint } from './breadcrumb';

/**
* This functions starts a span. If argument passed is of type `Span`, it'll run sampling on it if configured
* and attach a `SpanRecorder`. If it's of type `SpanContext` and there is already a `Span` on the Scope,
* the created Span will have a reference to it and become it's child. Otherwise it'll crete a new `Span`.
* This functions starts a span. If there is already a `Span` on the Scope,
* the created Span with the SpanContext will have a reference to it and become it's child.
* Otherwise it'll crete a new `Span`.
*
* @param span Already constructed span which should be started or properties with which the span should be created
* @param spanContext Properties with which the span should be created
*/
startSpan(span?: Span | SpanContext, forceNoChild?: boolean): Span;
startSpan(spanContext?: SpanContext): Span;
}
//# sourceMappingURL=hub.d.ts.map

@@ -20,3 +20,3 @@ export { Breadcrumb, BreadcrumbHint } from './breadcrumb';

export { Severity } from './severity';
export { Span, SpanContext, SpanStatus } from './span';
export { Span, SpanContext } from './span';
export { StackFrame } from './stackframe';

@@ -23,0 +23,0 @@ export { Stacktrace } from './stacktrace';

export { LogLevel } from './loglevel';
export { Severity } from './severity';
export { SpanStatus } from './span';
export { Status } from './status';
//# sourceMappingURL=index.js.map

@@ -54,5 +54,6 @@ /** Span holding trace_id, span_id */

* Sets the status attribute on the current span
* See: {@sentry/apm SpanStatus} for possible values
* @param status http code used to set the status
*/
setStatus(status: SpanStatus): this;
setStatus(status: string): this;
/**

@@ -89,4 +90,5 @@ * Sets the status attribute on the current span based on the http code

* Completion status of the Span.
* See: {@sentry/apm SpanStatus} for possible values
*/
status?: SpanStatus;
status?: string;
/**

@@ -125,48 +127,2 @@ * Parent Span ID

}
/** The status of an Span. */
export declare enum SpanStatus {
/** The operation completed successfully. */
Ok = "ok",
/** Deadline expired before operation could complete. */
DeadlineExceeded = "deadline_exceeded",
/** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */
Unauthenticated = "unauthenticated",
/** 403 Forbidden */
PermissionDenied = "permission_denied",
/** 404 Not Found. Some requested entity (file or directory) was not found. */
NotFound = "not_found",
/** 429 Too Many Requests */
ResourceExhausted = "resource_exhausted",
/** Client specified an invalid argument. 4xx. */
InvalidArgument = "invalid_argument",
/** 501 Not Implemented */
Unimplemented = "unimplemented",
/** 503 Service Unavailable */
Unavailable = "unavailable",
/** Other/generic 5xx. */
InternalError = "internal_error",
/** Unknown. Any non-standard HTTP status code. */
UnknownError = "unknown_error",
/** The operation was cancelled (typically by the user). */
Cancelled = "cancelled",
/** Already exists (409) */
AlreadyExists = "already_exists",
/** Operation was rejected because the system is not in a state required for the operation's */
FailedPrecondition = "failed_precondition",
/** The operation was aborted, typically due to a concurrency issue. */
Aborted = "aborted",
/** Operation was attempted past the valid range. */
OutOfRange = "out_of_range",
/** Unrecoverable data loss or corruption */
DataLoss = "data_loss"
}
export declare namespace SpanStatus {
/**
* Converts a HTTP status code into a {@link SpanStatus}.
*
* @param httpStatus The HTTP response status code.
* @returns The span status or {@link SpanStatus.UnknownError}.
*/
function fromHttpCode(httpStatus: number): SpanStatus;
}
//# sourceMappingURL=span.d.ts.map

@@ -1,86 +0,1 @@

/** The status of an Span. */
export var SpanStatus;
(function (SpanStatus) {
/** The operation completed successfully. */
SpanStatus["Ok"] = "ok";
/** Deadline expired before operation could complete. */
SpanStatus["DeadlineExceeded"] = "deadline_exceeded";
/** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */
SpanStatus["Unauthenticated"] = "unauthenticated";
/** 403 Forbidden */
SpanStatus["PermissionDenied"] = "permission_denied";
/** 404 Not Found. Some requested entity (file or directory) was not found. */
SpanStatus["NotFound"] = "not_found";
/** 429 Too Many Requests */
SpanStatus["ResourceExhausted"] = "resource_exhausted";
/** Client specified an invalid argument. 4xx. */
SpanStatus["InvalidArgument"] = "invalid_argument";
/** 501 Not Implemented */
SpanStatus["Unimplemented"] = "unimplemented";
/** 503 Service Unavailable */
SpanStatus["Unavailable"] = "unavailable";
/** Other/generic 5xx. */
SpanStatus["InternalError"] = "internal_error";
/** Unknown. Any non-standard HTTP status code. */
SpanStatus["UnknownError"] = "unknown_error";
/** The operation was cancelled (typically by the user). */
SpanStatus["Cancelled"] = "cancelled";
/** Already exists (409) */
SpanStatus["AlreadyExists"] = "already_exists";
/** Operation was rejected because the system is not in a state required for the operation's */
SpanStatus["FailedPrecondition"] = "failed_precondition";
/** The operation was aborted, typically due to a concurrency issue. */
SpanStatus["Aborted"] = "aborted";
/** Operation was attempted past the valid range. */
SpanStatus["OutOfRange"] = "out_of_range";
/** Unrecoverable data loss or corruption */
SpanStatus["DataLoss"] = "data_loss";
})(SpanStatus || (SpanStatus = {}));
// tslint:disable:no-unnecessary-qualifier no-namespace
(function (SpanStatus) {
/**
* Converts a HTTP status code into a {@link SpanStatus}.
*
* @param httpStatus The HTTP response status code.
* @returns The span status or {@link SpanStatus.UnknownError}.
*/
// tslint:disable-next-line:completed-docs
function fromHttpCode(httpStatus) {
if (httpStatus < 400) {
return SpanStatus.Ok;
}
if (httpStatus >= 400 && httpStatus < 500) {
switch (httpStatus) {
case 401:
return SpanStatus.Unauthenticated;
case 403:
return SpanStatus.PermissionDenied;
case 404:
return SpanStatus.NotFound;
case 409:
return SpanStatus.AlreadyExists;
case 413:
return SpanStatus.FailedPrecondition;
case 429:
return SpanStatus.ResourceExhausted;
default:
return SpanStatus.InvalidArgument;
}
}
if (httpStatus >= 500 && httpStatus < 600) {
switch (httpStatus) {
case 501:
return SpanStatus.Unimplemented;
case 503:
return SpanStatus.Unavailable;
case 504:
return SpanStatus.DeadlineExceeded;
default:
return SpanStatus.InternalError;
}
}
return SpanStatus.UnknownError;
}
SpanStatus.fromHttpCode = fromHttpCode;
})(SpanStatus || (SpanStatus = {}));
//# sourceMappingURL=span.js.map
{
"name": "@sentry/types",
"version": "5.16.0-beta.1",
"version": "5.16.0-beta.2",
"description": "Types for all Sentry JavaScript SDKs",

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

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

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

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