@belvador/cloudflare 0.3.0 → 0.4.0

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  // privacy and sending rules. Needs the `nodejs_compat` (or `nodejs_als`)
4
4
  // compatibility flag so every request gets its own scope.
5
5
  import { consoleIntegration, dedupeIntegration, eventFiltersIntegration, fetchIntegration, linkedErrorsIntegration, requestDataIntegration, withSentry, } from "@sentry/cloudflare";
6
- import { TRACE_OPTION, buildEngineOptions, currentHooks, installTracePropagation, markHooked, noteClientAbort, runVerification, withIncomingTraceparent, } from "@belvador/core";
6
+ import { OTEL_OPTION, TRACE_OPTION, buildEngineOptions, otelBridgeIntegration, currentHooks, installTracePropagation, markHooked, noteClientAbort, runVerification, withIncomingTraceparent, } from "@belvador/core";
7
7
  export { SDK_VERSION, addBreadcrumb, captureCheckIn, captureException, captureMessage, close, flush, heartbeat, withMonitor, getDiagnostics, lastEventId, setContext, setTag, setTags, setUser, withScope, } from "@belvador/core";
8
8
  function binding(env, name) {
9
9
  if (env === null || typeof env !== "object")
@@ -81,6 +81,9 @@ export function workerEngineOptions(options, env, runtime = "cloudflare") {
81
81
  integrations.push(fetchIntegration({ breadcrumbs: true, shouldCreateSpanForRequest: () => false }));
82
82
  if (base[TRACE_OPTION])
83
83
  installTracePropagation();
84
+ const otel = base[OTEL_OPTION];
85
+ if (otel)
86
+ integrations.push(otelBridgeIntegration(otel));
84
87
  return {
85
88
  ...base,
86
89
  // 0, not undefined: an undefined value would let SENTRY_TRACES_SAMPLE_RATE turn tracing on.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@belvador/cloudflare",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Belvador error tracking for Cloudflare Workers: per-request scope, errors only, private by default.",
5
5
  "license": "MIT",
6
6
  "author": "Belvador (https://belvador.dev)",
@@ -32,7 +32,7 @@
32
32
  "node": ">=18"
33
33
  },
34
34
  "dependencies": {
35
- "@belvador/core": "0.3.0",
35
+ "@belvador/core": "0.4.0",
36
36
  "@sentry/cloudflare": "10.76.2"
37
37
  },
38
38
  "publishConfig": {