@veryfront/ext-observability-sentry 0.1.1179 → 0.1.1180
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -3
- package/esm/application-error-contract.d.ts +25 -0
- package/esm/application-error-contract.d.ts.map +1 -0
- package/esm/application-error-contract.js +1 -0
- package/esm/config.d.ts +7 -0
- package/esm/config.d.ts.map +1 -0
- package/esm/config.js +1 -0
- package/esm/deno.d.ts +4 -2
- package/esm/deno.d.ts.map +1 -1
- package/esm/index.d.ts +2 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/node.d.ts +4 -2
- package/esm/node.d.ts.map +1 -1
- package/esm/policy.d.ts +1 -1
- package/esm/policy.d.ts.map +1 -1
- package/esm/policy.js +2 -0
- package/package.json +29 -2
package/README.md
CHANGED
|
@@ -18,11 +18,21 @@ OpenTelemetry as the owner of traces, metrics, and logs.
|
|
|
18
18
|
## Runtime entrypoints
|
|
19
19
|
|
|
20
20
|
- `@veryfront/ext-observability-sentry` keeps the V1 Deno-compatible root
|
|
21
|
-
reporter export.
|
|
22
|
-
|
|
23
|
-
- `@veryfront/ext-observability-sentry
|
|
21
|
+
reporter export and the compatible `./deno` and `./node` subpaths. This
|
|
22
|
+
package still depends on both Sentry SDKs for existing consumers.
|
|
23
|
+
- `@veryfront/ext-observability-sentry-deno` exports the Deno reporter with only
|
|
24
|
+
`@sentry/deno`.
|
|
25
|
+
- `@veryfront/ext-observability-sentry-node` exports the Node reporter with only
|
|
26
|
+
`@sentry/node`.
|
|
24
27
|
|
|
25
28
|
The Node and Deno reporters share the same privacy policy, service tags,
|
|
26
29
|
`veryfront.boundary` tagging, Grafana trace correlation, fingerprinting, and
|
|
27
30
|
bounded flush behavior. They only use Sentry for error capture; tracing, logs,
|
|
28
31
|
request bodies, user data, and OpenTelemetry provider setup remain disabled.
|
|
32
|
+
|
|
33
|
+
The runtime-specific packages do not require the `veryfront` package at runtime
|
|
34
|
+
or type-resolution time. They export the shared application-error declarations
|
|
35
|
+
(`ApplicationErrorContext` and `ApplicationErrorReporter`) from the same source
|
|
36
|
+
used by the framework reporter. Set `context.processRole` to preserve the
|
|
37
|
+
`process_role` Sentry tag used by dashboards and alerts. Host and server names
|
|
38
|
+
are not captured by default because they identify deployment infrastructure.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Scalar metadata value attached to an application error. */
|
|
2
|
+
export type ApplicationErrorAttributeValue = string | number | boolean;
|
|
3
|
+
/** Sanitized context attached when a runtime reports an application error. */
|
|
4
|
+
export type ApplicationErrorContext = {
|
|
5
|
+
/** Stable boundary name for the failing runtime operation. */
|
|
6
|
+
boundary: string;
|
|
7
|
+
/** HTTP method associated with the failure. */
|
|
8
|
+
method?: string;
|
|
9
|
+
/** Stable process role used by Sentry dashboards and alerts. */
|
|
10
|
+
processRole?: string;
|
|
11
|
+
/** Request correlation identifier. */
|
|
12
|
+
requestId?: string;
|
|
13
|
+
/** OpenTelemetry span correlation identifier. */
|
|
14
|
+
spanId?: string;
|
|
15
|
+
/** OpenTelemetry trace correlation identifier. */
|
|
16
|
+
traceId?: string;
|
|
17
|
+
/** Sanitized scalar metadata for the failure boundary. */
|
|
18
|
+
attributes?: Record<string, ApplicationErrorAttributeValue>;
|
|
19
|
+
};
|
|
20
|
+
/** Provider-neutral application error capture and flush interface. */
|
|
21
|
+
export type ApplicationErrorReporter = {
|
|
22
|
+
capture(error: unknown, context: ApplicationErrorContext): string | undefined;
|
|
23
|
+
flush(timeoutMs?: number): Promise<boolean>;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=application-error-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-error-contract.d.ts","sourceRoot":"","sources":["../src/application-error-contract.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,MAAM,MAAM,8BAA8B,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEvE,8EAA8E;AAC9E,MAAM,MAAM,uBAAuB,GAAG;IACpC,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,+CAA+C;IAC/C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,8BAA8B,CAAC,CAAC;CAC7D,CAAC;AAEF,sEAAsE;AACtE,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,uBAAuB,GAAG,MAAM,GAAG,SAAS,CAAC;IAC9E,KAAK,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC7C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/esm/config.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC"}
|
package/esm/config.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/esm/deno.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as Sentry from "@sentry/deno";
|
|
2
|
-
import type { ApplicationErrorReporter
|
|
2
|
+
import type { ApplicationErrorReporter } from "./application-error-contract.js";
|
|
3
|
+
import type { SentryConfig } from "./config.js";
|
|
3
4
|
import { type SentryPolicySdk } from "./policy.js";
|
|
5
|
+
export type { ApplicationErrorContext, ApplicationErrorReporter, } from "./application-error-contract.js";
|
|
6
|
+
export type { SentryConfig } from "./config.js";
|
|
4
7
|
type DenoSentrySdk = SentryPolicySdk & {
|
|
5
8
|
init(options: Parameters<typeof Sentry.init>[0]): unknown;
|
|
6
9
|
};
|
|
7
10
|
export declare function createDenoSentryApplicationErrorReporter(config: Required<SentryConfig>, sdk?: DenoSentrySdk): ApplicationErrorReporter;
|
|
8
|
-
export {};
|
|
9
11
|
//# sourceMappingURL=deno.d.ts.map
|
package/esm/deno.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deno.d.ts","sourceRoot":"","sources":["../src/deno.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"deno.d.ts","sourceRoot":"","sources":["../src/deno.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AAErB,YAAY,EACV,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,iCAAiC,CAAC;AACzC,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAShD,KAAK,aAAa,GAAG,eAAe,GAAG;IACrC,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC;CAC3D,CAAC;AAEF,wBAAgB,wCAAwC,CACtD,MAAM,EAAE,QAAQ,CAAC,YAAY,CAAC,EAC9B,GAAG,GAAE,aAAsB,GAC1B,wBAAwB,CA+B1B"}
|
package/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { ExtensionFactory } from "veryfront/extensions";
|
|
2
2
|
export { createDenoSentryApplicationErrorReporter, createDenoSentryApplicationErrorReporter as createSentryApplicationErrorReporter, } from "./deno.js";
|
|
3
|
+
export type { ApplicationErrorContext, ApplicationErrorReporter, } from "./application-error-contract.js";
|
|
4
|
+
export type { SentryConfig } from "./config.js";
|
|
3
5
|
declare const extSentry: ExtensionFactory;
|
|
4
6
|
export default extSentry;
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
package/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EACL,wCAAwC,EACxC,wCAAwC,IAAI,oCAAoC,GACjF,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EACL,wCAAwC,EACxC,wCAAwC,IAAI,oCAAoC,GACjF,MAAM,WAAW,CAAC;AACnB,YAAY,EACV,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,iCAAiC,CAAC;AACzC,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,QAAA,MAAM,SAAS,EAAE,gBAOf,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
package/esm/node.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as Sentry from "@sentry/node";
|
|
2
|
-
import type { ApplicationErrorReporter
|
|
2
|
+
import type { ApplicationErrorReporter } from "./application-error-contract.js";
|
|
3
|
+
import type { SentryConfig } from "./config.js";
|
|
3
4
|
import { type SentryPolicySdk } from "./policy.js";
|
|
5
|
+
export type { ApplicationErrorContext, ApplicationErrorReporter, } from "./application-error-contract.js";
|
|
6
|
+
export type { SentryConfig } from "./config.js";
|
|
4
7
|
type NodeSentrySdk = SentryPolicySdk & {
|
|
5
8
|
init(options: Parameters<typeof Sentry.init>[0]): unknown;
|
|
6
9
|
};
|
|
7
10
|
export declare function createNodeSentryApplicationErrorReporter(config: Required<SentryConfig>, sdk?: NodeSentrySdk): ApplicationErrorReporter;
|
|
8
|
-
export {};
|
|
9
11
|
//# sourceMappingURL=node.d.ts.map
|
package/esm/node.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AAErB,YAAY,EACV,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,iCAAiC,CAAC;AACzC,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,KAAK,aAAa,GAAG,eAAe,GAAG;IACrC,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC;CAC3D,CAAC;AAEF,wBAAgB,wCAAwC,CACtD,MAAM,EAAE,QAAQ,CAAC,YAAY,CAAC,EAC9B,GAAG,GAAE,aAAsB,GAC1B,wBAAwB,CA8B1B"}
|
package/esm/policy.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ApplicationErrorContext } from "
|
|
1
|
+
import type { ApplicationErrorContext } from "./application-error-contract.js";
|
|
2
2
|
export declare const DEFAULT_FINGERPRINT = "{{ default }}";
|
|
3
3
|
export type SentryPolicyScope = {
|
|
4
4
|
setContext(name: string, context: Record<string, unknown>): void;
|
package/esm/policy.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../src/policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../src/policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACxB,MAAM,iCAAiC,CAAC;AAEzC,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AAWnD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACjE,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC5C,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACzC,KAAK,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5C,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,GAAG,IAAI,CAAC;CAC/D,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;IAC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AAED,wBAAgB,kCAAkC,CAChD,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GACpD,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAU3C;AAOD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAW5D"}
|
package/esm/policy.js
CHANGED
|
@@ -29,6 +29,8 @@ export async function flushWithSentryPolicy(sdk, timeoutMs) {
|
|
|
29
29
|
export function applySentryScopePolicy(scope, serviceName, context) {
|
|
30
30
|
scope.setFingerprint([serviceName, DEFAULT_FINGERPRINT]);
|
|
31
31
|
scope.setTag("service.name", serviceName);
|
|
32
|
+
if (context.processRole)
|
|
33
|
+
scope.setTag("process_role", context.processRole);
|
|
32
34
|
scope.setTag("veryfront.boundary", context.boundary);
|
|
33
35
|
if (context.method)
|
|
34
36
|
scope.setTag("http.request.method", context.method);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veryfront/ext-observability-sentry",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1180",
|
|
4
4
|
"description": "Veryfront first-party extension package for ext-observability-sentry",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"veryfront",
|
|
@@ -42,6 +42,33 @@
|
|
|
42
42
|
},
|
|
43
43
|
"veryfront": {
|
|
44
44
|
"extension": true,
|
|
45
|
+
"npm": {
|
|
46
|
+
"stagedSources": [
|
|
47
|
+
{
|
|
48
|
+
"specifier": "#veryfront/observability/application-error-contract.ts",
|
|
49
|
+
"source": "src/observability/application-error-contract.ts",
|
|
50
|
+
"target": "src/application-error-contract.ts"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"runtimePackages": [
|
|
54
|
+
{
|
|
55
|
+
"name": "@veryfront/ext-observability-sentry-node",
|
|
56
|
+
"export": "./node",
|
|
57
|
+
"dependencies": [
|
|
58
|
+
"@sentry/node"
|
|
59
|
+
],
|
|
60
|
+
"peerVeryfront": false
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "@veryfront/ext-observability-sentry-deno",
|
|
64
|
+
"export": "./deno",
|
|
65
|
+
"dependencies": [
|
|
66
|
+
"@sentry/deno"
|
|
67
|
+
],
|
|
68
|
+
"peerVeryfront": false
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
45
72
|
"capabilities": [
|
|
46
73
|
{
|
|
47
74
|
"type": "net:outbound",
|
|
@@ -56,7 +83,7 @@
|
|
|
56
83
|
"@sentry/node": "10.68.0"
|
|
57
84
|
},
|
|
58
85
|
"peerDependencies": {
|
|
59
|
-
"veryfront": "^0.1.
|
|
86
|
+
"veryfront": "^0.1.1180"
|
|
60
87
|
},
|
|
61
88
|
"type": "module",
|
|
62
89
|
"types": "./esm/index.d.ts",
|