@compas/server
Advanced tools
Comparing version 0.13.1 to 0.14.0
{ | ||
"name": "@compas/server", | ||
"version": "0.13.1", | ||
"version": "0.14.0", | ||
"description": "Koa server and common middleware", | ||
@@ -24,3 +24,3 @@ "exports": { | ||
"dependencies": { | ||
"@compas/stdlib": "0.13.1", | ||
"@compas/stdlib": "0.14.0", | ||
"@types/formidable": "2.0.6", | ||
@@ -27,0 +27,0 @@ "@types/koa": "2.15.0", |
@@ -115,3 +115,3 @@ import { Transform } from "node:stream"; | ||
// Discard sampled spans which don't match a route. | ||
span.setAttribute("_compas.skip-event", true); | ||
_compasSentryExport.setExtra("_compas.skip-event", true); | ||
} | ||
@@ -118,0 +118,0 @@ |
@@ -1,7 +0,3 @@ | ||
import { _compasSentryExport, uuid } from "@compas/stdlib"; | ||
import { _compasSentryExport } from "@compas/stdlib"; | ||
const cbIdentity = (cb) => { | ||
return cb(); | ||
}; | ||
/** | ||
@@ -39,14 +35,5 @@ * Sentry support; | ||
const _sentry = _compasSentryExport; | ||
// Sentry v7 / v8 compat | ||
const startNewTrace = _sentry.startNewTrace ?? cbIdentity; | ||
return startNewTrace(() => { | ||
return _sentry.startSpanManual( | ||
return _sentry.withIsolationScope(async () => { | ||
return await _sentry.startSpanManual( | ||
{ | ||
// @ts-expect-error compat | ||
// | ||
// v7 / v8 compat to force a new trace | ||
traceId: uuid().replace(/-/g, ""), | ||
spanId: uuid().replace(/-/g, "").slice(16), | ||
op: "http.server", | ||
@@ -53,0 +40,0 @@ name: "http", |
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
40548
1150
+ Added@compas/stdlib@0.14.0(transitive)
+ Added@types/express-serve-static-core@5.0.1(transitive)
+ Added@types/node@22.5.1(transitive)
- Removed@compas/stdlib@0.13.1(transitive)
- Removed@types/express-serve-static-core@5.0.2(transitive)
- Removed@types/node@22.5.0(transitive)
Updated@compas/stdlib@0.14.0