@pydantic/logfire-cf-workers 0.11.10 → 0.12.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.
package/README.md CHANGED
@@ -21,6 +21,38 @@ If you need to instrument your browser application, see the [Logfire Browser pac
21
21
 
22
22
  See the [cf-worker example](https://github.com/pydantic/logfire-js/tree/main/examples/cf-worker) for a primer.
23
23
 
24
+ The Cloudflare package's `instrument(handler, config)` function configures the
25
+ Worker runtime. To wrap an individual function in a manual Logfire span, import
26
+ the core wrapper from `logfire`:
27
+
28
+ ```ts
29
+ import { instrument as instrumentFunction } from 'logfire'
30
+ import { instrument as instrumentWorker } from '@pydantic/logfire-cf-workers'
31
+ ```
32
+
33
+ ## Runtime lifecycle
34
+
35
+ Cloudflare Workers do not have a process-style shutdown hook. Logfire relies on
36
+ the Worker request lifetime instead: each instrumented handler schedules span
37
+ export with `ctx.waitUntil()` after the handler finishes.
38
+
39
+ This applies to both Logfire entrypoints:
40
+
41
+ - `instrumentInProcess()` and its `instrument()` alias configure in-process OTLP
42
+ export.
43
+ - `instrumentTail()` configures tail Worker export.
44
+
45
+ Both entrypoints delegate to the underlying `@pydantic/otel-cf-workers`
46
+ `instrument()` helper. That helper proxies the Worker execution context, tracks
47
+ promises passed to `ctx.waitUntil()` inside the user handler, then schedules span
48
+ export on the original context with `ctx.waitUntil()`. Export waits for a
49
+ scheduler tick and the tracked promises before force-flushing the configured span
50
+ processors.
51
+
52
+ Because export is tied to each Worker event, there is no long-lived Logfire
53
+ runtime to shut down after deployment. Use `ctx.waitUntil()` for any asynchronous
54
+ work that should be included in request-lifetime telemetry.
55
+
24
56
  ## Managed Variables
25
57
 
26
58
  Cloudflare Workers can use local managed variables from `logfire/vars` when the
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});let e=require(`@opentelemetry/sdk-trace-base`),t=require(`@pydantic/otel-cf-workers`),n=require(`logfire`),r=require(`@opentelemetry/core`),i=require(`@opentelemetry/otlp-transformer`);async function a(e,t){let r=t.LOGFIRE_TOKEN;if(r===void 0||r===``){console.warn(`No token provided, not sending payload to Logfire`);return}let i=(0,n.resolveBaseUrl)(t,void 0,r),a=o(e);if(a!==null)try{return await fetch(`${i}/v1/traces`,{body:JSON.stringify(a),headers:{Authorization:r,"Content-Type":`application/json`},method:`POST`})}catch(e){console.error(e);return}}function o(e){for(let t of e)for(let e of t.logs)if(Array.isArray(e.message)){for(let t of e.message)if(s(t))return t}return null}function s(e){return typeof e==`object`&&!!e&&`resourceSpans`in e}const c={1:`trace`,5:`debug`,9:`info`,10:`notice`,13:`warning`,17:`error`,21:`fatal`};var l=class{export(e,t){this.sendSpans(e,t)}async forceFlush(){return Promise.resolve()}async shutdown(){return this.sendSpans([]),this.forceFlush()}exportInfo(e){return{attributes:e.attributes,duration:(0,r.hrTimeToMicroseconds)(e.duration),events:e.events,id:e.spanContext().spanId,instrumentationScope:e.instrumentationScope,kind:e.kind,links:e.links,name:e.name,parentSpanContext:e.parentSpanContext,resource:{attributes:e.resource.attributes},status:e.status,timestamp:(0,r.hrTimeToMicroseconds)(e.startTime),traceId:e.spanContext().traceId,traceState:e.spanContext().traceState?.serialize()}}sendSpans(e,t){for(let t of e){let e=c[t.attributes[`logfire.level_num`]]??`info`,{attributes:n,name:r,...i}=this.exportInfo(t);console.log(`Logfire: ${e} >> ${r}`),console.log(`Attributes:`),console.log(JSON.stringify(n,null,2)),console.log(`---`),console.log(`Span details:`),console.log(JSON.stringify(i,null,2)),console.log(`---`)}t&&t({code:r.ExportResultCode.SUCCESS})}},u=class{export(e,t){this.sendSpans(e,t)}async shutdown(){return this.sendSpans([]),Promise.resolve()}cleanNullValues(e){if(!e.resourceSpans)return e;for(let t of e.resourceSpans){d(t.resource);for(let e of t.scopeSpans){e.scope&&d(e.scope);for(let t of e.spans??[])d(t)}}return e}sendSpans(e,t){let n=i.JsonTraceSerializer.serializeRequest(e),a=new TextDecoder().decode(n),o=JSON.parse(a),s=this.cleanNullValues(o);return console.log(s),t?.({code:r.ExportResultCode.SUCCESS})}};function d(e){e?.attributes&&(e.attributes=e.attributes.filter(f))}function f(e){return Object.keys(e.value).length>0}function p(t){return r=>{let{LOGFIRE_ENVIRONMENT:i,LOGFIRE_TOKEN:a=``}=r,o=(0,n.resolveBaseUrl)(r,t.baseUrl,a),s=t.environment??i,c=t.additionalSpanProcessors??[];return t.console===!0&&c.push(new e.SimpleSpanProcessor(new l)),{...t,additionalSpanProcessors:c,exporter:{headers:{Authorization:a},url:`${o}/v1/traces`},idGenerator:new n.ULIDGenerator,postProcessor:e=>v(e),...s===void 0?{}:{environment:s}}}}function m(e){return t=>({...e,exporter:new u,idGenerator:new n.ULIDGenerator})}function h(e,r){return r.scrubbing!==void 0&&(0,n.configureLogfireApi)({scrubbing:r.scrubbing}),(0,t.instrument)(e,p(r))}function g(e,n){return(0,t.instrument)(e,m(n))}const _=h;function v(e){for(let t of e){for(let e of Object.keys(t.attributes))t.attributes[e]??delete t.attributes[e];Object.assign(t.attributes,(0,n.serializeAttributes)(t.attributes))}return e}const y={exportTailEventsToLogfire:a,configureLogfireApi:n.configureLogfireApi,debug:n.debug,error:n.error,fatal:n.fatal,getTailConfig:m,info:n.info,instrument:_,instrumentInProcess:h,instrumentTail:g,Level:n.Level,log:n.log,logfireApiConfig:n.logfireApiConfig,LogfireAttributeScrubber:n.LogfireAttributeScrubber,NoopAttributeScrubber:n.NoopAttributeScrubber,notice:n.notice,reportError:n.reportError,resolveBaseUrl:n.resolveBaseUrl,resolveSendToLogfire:n.resolveSendToLogfire,serializeAttributes:n.serializeAttributes,span:n.span,startSpan:n.startSpan,trace:n.trace,ULIDGenerator:n.ULIDGenerator,warning:n.warning};exports.default=y,exports.exportTailEventsToLogfire=a,exports.getTailConfig=m,exports.instrument=_,exports.instrumentInProcess=h,exports.instrumentTail=g;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});let e=require(`@opentelemetry/sdk-trace-base`),t=require(`@pydantic/otel-cf-workers`),n=require(`logfire`),r=require(`@opentelemetry/core`),i=require(`@opentelemetry/otlp-transformer`);async function a(e,t){let r=t.LOGFIRE_TOKEN;if(r===void 0||r===``){console.warn(`No token provided, not sending payload to Logfire`);return}let i=(0,n.resolveBaseUrl)(t,void 0,r),a=o(e);if(a!==null)try{return await fetch(`${i}/v1/traces`,{body:JSON.stringify(a),headers:{Authorization:r,"Content-Type":`application/json`},method:`POST`})}catch(e){console.error(e);return}}function o(e){for(let t of e)for(let e of t.logs)if(Array.isArray(e.message)){for(let t of e.message)if(s(t))return t}return null}function s(e){return typeof e==`object`&&!!e&&`resourceSpans`in e}const c={1:`trace`,5:`debug`,9:`info`,10:`notice`,13:`warning`,17:`error`,21:`fatal`};var l=class{export(e,t){this.sendSpans(e,t)}async forceFlush(){return Promise.resolve()}async shutdown(){return this.sendSpans([]),this.forceFlush()}exportInfo(e){return{attributes:e.attributes,duration:(0,r.hrTimeToMicroseconds)(e.duration),events:e.events,id:e.spanContext().spanId,instrumentationScope:e.instrumentationScope,kind:e.kind,links:e.links,name:e.name,parentSpanContext:e.parentSpanContext,resource:{attributes:e.resource.attributes},status:e.status,timestamp:(0,r.hrTimeToMicroseconds)(e.startTime),traceId:e.spanContext().traceId,traceState:e.spanContext().traceState?.serialize()}}sendSpans(e,t){for(let t of e){let e=c[t.attributes[`logfire.level_num`]]??`info`,{attributes:n,name:r,...i}=this.exportInfo(t);console.log(`Logfire: ${e} >> ${r}`),console.log(`Attributes:`),console.log(JSON.stringify(n,null,2)),console.log(`---`),console.log(`Span details:`),console.log(JSON.stringify(i,null,2)),console.log(`---`)}t&&t({code:r.ExportResultCode.SUCCESS})}},u=class{export(e,t){this.sendSpans(e,t)}async shutdown(){return this.sendSpans([]),Promise.resolve()}cleanNullValues(e){if(!e.resourceSpans)return e;for(let t of e.resourceSpans){d(t.resource);for(let e of t.scopeSpans){e.scope&&d(e.scope);for(let t of e.spans??[])d(t)}}return e}sendSpans(e,t){let n=i.JsonTraceSerializer.serializeRequest(e),a=new TextDecoder().decode(n),o=JSON.parse(a),s=this.cleanNullValues(o);return console.log(s),t?.({code:r.ExportResultCode.SUCCESS})}};function d(e){e?.attributes&&(e.attributes=e.attributes.filter(f))}function f(e){return Object.keys(e.value).length>0}function p(t){return r=>{let{LOGFIRE_ENVIRONMENT:i,LOGFIRE_TOKEN:a=``}=r,o=(0,n.resolveBaseUrl)(r,t.baseUrl,a),s=t.environment??i,c=t.additionalSpanProcessors??[];return t.console===!0&&c.push(new e.SimpleSpanProcessor(new l)),{...t,additionalSpanProcessors:c,exporter:{headers:{Authorization:a},url:`${o}/v1/traces`},idGenerator:new n.ULIDGenerator,postProcessor:e=>v(e),...s===void 0?{}:{environment:s}}}}function m(e){return t=>({...e,exporter:new u,idGenerator:new n.ULIDGenerator})}function h(e,r){return r.scrubbing!==void 0&&(0,n.configureLogfireApi)({scrubbing:r.scrubbing}),(0,t.instrument)(e,p(r))}function g(e,n){return(0,t.instrument)(e,m(n))}const _=h;function v(e){for(let t of e){for(let e of Object.keys(t.attributes))t.attributes[e]??delete t.attributes[e];Object.assign(t.attributes,(0,n.serializeAttributes)(t.attributes))}return e}const y={exportTailEventsToLogfire:a,configureLogfireApi:n.configureLogfireApi,debug:n.debug,error:n.error,fatal:n.fatal,getTailConfig:m,info:n.info,instrument:_,instrumentInProcess:h,instrumentTail:g,Level:n.Level,log:n.log,logfireApiConfig:n.logfireApiConfig,LogfireAttributeScrubber:n.LogfireAttributeScrubber,NoopAttributeScrubber:n.NoopAttributeScrubber,notice:n.notice,reportError:n.reportError,resolveBaseUrl:n.resolveBaseUrl,resolveSendToLogfire:n.resolveSendToLogfire,serializeAttributes:n.serializeAttributes,span:n.span,startPendingSpan:n.startPendingSpan,startSpan:n.startSpan,trace:n.trace,ULIDGenerator:n.ULIDGenerator,warning:n.warning,withSettings:n.withSettings,withTags:n.withTags};exports.default=y,exports.exportTailEventsToLogfire=a,exports.getTailConfig=m,exports.instrument=_,exports.instrumentInProcess=h,exports.instrumentTail=g;
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { SpanProcessor } from "@opentelemetry/sdk-trace-base";
2
2
  import { TraceConfig } from "@pydantic/otel-cf-workers";
3
- import { Level, LogfireAttributeScrubber, NoopAttributeScrubber, ScrubbingOptions, ULIDGenerator, configureLogfireApi, debug, error, fatal, info, log, logfireApiConfig, notice, reportError, resolveBaseUrl, resolveSendToLogfire, serializeAttributes, span, startSpan, trace, warning } from "logfire";
3
+ import { Level, LogfireAttributeScrubber, NoopAttributeScrubber, ScrubbingOptions, ULIDGenerator, configureLogfireApi, debug, error, fatal, info, log, logfireApiConfig, notice, reportError, resolveBaseUrl, resolveSendToLogfire, serializeAttributes, span, startPendingSpan, startSpan, trace, warning, withSettings, withTags } from "logfire";
4
4
 
5
5
  //#region src/exportTailEventsToLogfire.d.ts
6
6
  interface TraceItem {
@@ -59,9 +59,12 @@ declare const defaultExport: {
59
59
  resolveSendToLogfire: typeof resolveSendToLogfire;
60
60
  serializeAttributes: typeof serializeAttributes;
61
61
  span: typeof span;
62
+ startPendingSpan: typeof startPendingSpan;
62
63
  startSpan: typeof startSpan;
63
64
  trace: typeof trace;
64
65
  warning: typeof warning;
66
+ withSettings: typeof withSettings;
67
+ withTags: typeof withTags;
65
68
  };
66
69
  //#endregion
67
70
  export { InProcessConfigOptions, TailConfigOptions, TraceItem, defaultExport as default, exportTailEventsToLogfire, getTailConfig, instrument, instrumentInProcess, instrumentTail };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { SpanProcessor } from "@opentelemetry/sdk-trace-base";
2
2
  import { TraceConfig } from "@pydantic/otel-cf-workers";
3
- import { Level, LogfireAttributeScrubber, NoopAttributeScrubber, ScrubbingOptions, ULIDGenerator, configureLogfireApi, debug, error, fatal, info, log, logfireApiConfig, notice, reportError, resolveBaseUrl, resolveSendToLogfire, serializeAttributes, span, startSpan, trace, warning } from "logfire";
3
+ import { Level, LogfireAttributeScrubber, NoopAttributeScrubber, ScrubbingOptions, ULIDGenerator, configureLogfireApi, debug, error, fatal, info, log, logfireApiConfig, notice, reportError, resolveBaseUrl, resolveSendToLogfire, serializeAttributes, span, startPendingSpan, startSpan, trace, warning, withSettings, withTags } from "logfire";
4
4
 
5
5
  //#region src/exportTailEventsToLogfire.d.ts
6
6
  interface TraceItem {
@@ -59,9 +59,12 @@ declare const defaultExport: {
59
59
  resolveSendToLogfire: typeof resolveSendToLogfire;
60
60
  serializeAttributes: typeof serializeAttributes;
61
61
  span: typeof span;
62
+ startPendingSpan: typeof startPendingSpan;
62
63
  startSpan: typeof startSpan;
63
64
  trace: typeof trace;
64
65
  warning: typeof warning;
66
+ withSettings: typeof withSettings;
67
+ withTags: typeof withTags;
65
68
  };
66
69
  //#endregion
67
70
  export { InProcessConfigOptions, TailConfigOptions, TraceItem, defaultExport as default, exportTailEventsToLogfire, getTailConfig, instrument, instrumentInProcess, instrumentTail };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{SimpleSpanProcessor as e}from"@opentelemetry/sdk-trace-base";import{instrument as t}from"@pydantic/otel-cf-workers";import{Level as n,LogfireAttributeScrubber as r,NoopAttributeScrubber as i,ULIDGenerator as a,configureLogfireApi as o,debug as s,error as c,fatal as l,info as u,log as d,logfireApiConfig as f,notice as p,reportError as m,resolveBaseUrl as h,resolveSendToLogfire as g,serializeAttributes as _,span as v,startSpan as y,trace as b,warning as x}from"logfire";import{ExportResultCode as S,hrTimeToMicroseconds as C}from"@opentelemetry/core";import{JsonTraceSerializer as w}from"@opentelemetry/otlp-transformer";async function T(e,t){let n=t.LOGFIRE_TOKEN;if(n===void 0||n===``){console.warn(`No token provided, not sending payload to Logfire`);return}let r=h(t,void 0,n),i=E(e);if(i!==null)try{return await fetch(`${r}/v1/traces`,{body:JSON.stringify(i),headers:{Authorization:n,"Content-Type":`application/json`},method:`POST`})}catch(e){console.error(e);return}}function E(e){for(let t of e)for(let e of t.logs)if(Array.isArray(e.message)){for(let t of e.message)if(D(t))return t}return null}function D(e){return typeof e==`object`&&!!e&&`resourceSpans`in e}const O={1:`trace`,5:`debug`,9:`info`,10:`notice`,13:`warning`,17:`error`,21:`fatal`};var k=class{export(e,t){this.sendSpans(e,t)}async forceFlush(){return Promise.resolve()}async shutdown(){return this.sendSpans([]),this.forceFlush()}exportInfo(e){return{attributes:e.attributes,duration:C(e.duration),events:e.events,id:e.spanContext().spanId,instrumentationScope:e.instrumentationScope,kind:e.kind,links:e.links,name:e.name,parentSpanContext:e.parentSpanContext,resource:{attributes:e.resource.attributes},status:e.status,timestamp:C(e.startTime),traceId:e.spanContext().traceId,traceState:e.spanContext().traceState?.serialize()}}sendSpans(e,t){for(let t of e){let e=O[t.attributes[`logfire.level_num`]]??`info`,{attributes:n,name:r,...i}=this.exportInfo(t);console.log(`Logfire: ${e} >> ${r}`),console.log(`Attributes:`),console.log(JSON.stringify(n,null,2)),console.log(`---`),console.log(`Span details:`),console.log(JSON.stringify(i,null,2)),console.log(`---`)}t&&t({code:S.SUCCESS})}},A=class{export(e,t){this.sendSpans(e,t)}async shutdown(){return this.sendSpans([]),Promise.resolve()}cleanNullValues(e){if(!e.resourceSpans)return e;for(let t of e.resourceSpans){j(t.resource);for(let e of t.scopeSpans){e.scope&&j(e.scope);for(let t of e.spans??[])j(t)}}return e}sendSpans(e,t){let n=w.serializeRequest(e),r=new TextDecoder().decode(n),i=JSON.parse(r),a=this.cleanNullValues(i);return console.log(a),t?.({code:S.SUCCESS})}};function j(e){e?.attributes&&(e.attributes=e.attributes.filter(M))}function M(e){return Object.keys(e.value).length>0}function N(t){return n=>{let{LOGFIRE_ENVIRONMENT:r,LOGFIRE_TOKEN:i=``}=n,o=h(n,t.baseUrl,i),s=t.environment??r,c=t.additionalSpanProcessors??[];return t.console===!0&&c.push(new e(new k)),{...t,additionalSpanProcessors:c,exporter:{headers:{Authorization:i},url:`${o}/v1/traces`},idGenerator:new a,postProcessor:e=>R(e),...s===void 0?{}:{environment:s}}}}function P(e){return t=>({...e,exporter:new A,idGenerator:new a})}function F(e,n){return n.scrubbing!==void 0&&o({scrubbing:n.scrubbing}),t(e,N(n))}function I(e,n){return t(e,P(n))}const L=F;function R(e){for(let t of e){for(let e of Object.keys(t.attributes))t.attributes[e]??delete t.attributes[e];Object.assign(t.attributes,_(t.attributes))}return e}const z={exportTailEventsToLogfire:T,configureLogfireApi:o,debug:s,error:c,fatal:l,getTailConfig:P,info:u,instrument:L,instrumentInProcess:F,instrumentTail:I,Level:n,log:d,logfireApiConfig:f,LogfireAttributeScrubber:r,NoopAttributeScrubber:i,notice:p,reportError:m,resolveBaseUrl:h,resolveSendToLogfire:g,serializeAttributes:_,span:v,startSpan:y,trace:b,ULIDGenerator:a,warning:x};export{z as default,T as exportTailEventsToLogfire,P as getTailConfig,L as instrument,F as instrumentInProcess,I as instrumentTail};
1
+ import{SimpleSpanProcessor as e}from"@opentelemetry/sdk-trace-base";import{instrument as t}from"@pydantic/otel-cf-workers";import{Level as n,LogfireAttributeScrubber as r,NoopAttributeScrubber as i,ULIDGenerator as a,configureLogfireApi as o,debug as s,error as c,fatal as l,info as u,log as d,logfireApiConfig as f,notice as p,reportError as m,resolveBaseUrl as h,resolveSendToLogfire as g,serializeAttributes as _,span as v,startPendingSpan as y,startSpan as b,trace as x,warning as S,withSettings as C,withTags as w}from"logfire";import{ExportResultCode as T,hrTimeToMicroseconds as E}from"@opentelemetry/core";import{JsonTraceSerializer as D}from"@opentelemetry/otlp-transformer";async function O(e,t){let n=t.LOGFIRE_TOKEN;if(n===void 0||n===``){console.warn(`No token provided, not sending payload to Logfire`);return}let r=h(t,void 0,n),i=k(e);if(i!==null)try{return await fetch(`${r}/v1/traces`,{body:JSON.stringify(i),headers:{Authorization:n,"Content-Type":`application/json`},method:`POST`})}catch(e){console.error(e);return}}function k(e){for(let t of e)for(let e of t.logs)if(Array.isArray(e.message)){for(let t of e.message)if(A(t))return t}return null}function A(e){return typeof e==`object`&&!!e&&`resourceSpans`in e}const j={1:`trace`,5:`debug`,9:`info`,10:`notice`,13:`warning`,17:`error`,21:`fatal`};var M=class{export(e,t){this.sendSpans(e,t)}async forceFlush(){return Promise.resolve()}async shutdown(){return this.sendSpans([]),this.forceFlush()}exportInfo(e){return{attributes:e.attributes,duration:E(e.duration),events:e.events,id:e.spanContext().spanId,instrumentationScope:e.instrumentationScope,kind:e.kind,links:e.links,name:e.name,parentSpanContext:e.parentSpanContext,resource:{attributes:e.resource.attributes},status:e.status,timestamp:E(e.startTime),traceId:e.spanContext().traceId,traceState:e.spanContext().traceState?.serialize()}}sendSpans(e,t){for(let t of e){let e=j[t.attributes[`logfire.level_num`]]??`info`,{attributes:n,name:r,...i}=this.exportInfo(t);console.log(`Logfire: ${e} >> ${r}`),console.log(`Attributes:`),console.log(JSON.stringify(n,null,2)),console.log(`---`),console.log(`Span details:`),console.log(JSON.stringify(i,null,2)),console.log(`---`)}t&&t({code:T.SUCCESS})}},N=class{export(e,t){this.sendSpans(e,t)}async shutdown(){return this.sendSpans([]),Promise.resolve()}cleanNullValues(e){if(!e.resourceSpans)return e;for(let t of e.resourceSpans){P(t.resource);for(let e of t.scopeSpans){e.scope&&P(e.scope);for(let t of e.spans??[])P(t)}}return e}sendSpans(e,t){let n=D.serializeRequest(e),r=new TextDecoder().decode(n),i=JSON.parse(r),a=this.cleanNullValues(i);return console.log(a),t?.({code:T.SUCCESS})}};function P(e){e?.attributes&&(e.attributes=e.attributes.filter(F))}function F(e){return Object.keys(e.value).length>0}function I(t){return n=>{let{LOGFIRE_ENVIRONMENT:r,LOGFIRE_TOKEN:i=``}=n,o=h(n,t.baseUrl,i),s=t.environment??r,c=t.additionalSpanProcessors??[];return t.console===!0&&c.push(new e(new M)),{...t,additionalSpanProcessors:c,exporter:{headers:{Authorization:i},url:`${o}/v1/traces`},idGenerator:new a,postProcessor:e=>V(e),...s===void 0?{}:{environment:s}}}}function L(e){return t=>({...e,exporter:new N,idGenerator:new a})}function R(e,n){return n.scrubbing!==void 0&&o({scrubbing:n.scrubbing}),t(e,I(n))}function z(e,n){return t(e,L(n))}const B=R;function V(e){for(let t of e){for(let e of Object.keys(t.attributes))t.attributes[e]??delete t.attributes[e];Object.assign(t.attributes,_(t.attributes))}return e}const H={exportTailEventsToLogfire:O,configureLogfireApi:o,debug:s,error:c,fatal:l,getTailConfig:L,info:u,instrument:B,instrumentInProcess:R,instrumentTail:z,Level:n,log:d,logfireApiConfig:f,LogfireAttributeScrubber:r,NoopAttributeScrubber:i,notice:p,reportError:m,resolveBaseUrl:h,resolveSendToLogfire:g,serializeAttributes:_,span:v,startPendingSpan:y,startSpan:b,trace:x,ULIDGenerator:a,warning:S,withSettings:C,withTags:w};export{H as default,O as exportTailEventsToLogfire,L as getTailConfig,B as instrument,R as instrumentInProcess,z as instrumentTail};
package/package.json CHANGED
@@ -26,7 +26,7 @@
26
26
  "stats",
27
27
  "monitoring"
28
28
  ],
29
- "version": "0.11.10",
29
+ "version": "0.12.0",
30
30
  "type": "module",
31
31
  "main": "./dist/index.cjs",
32
32
  "module": "./dist/index.js",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@pydantic/otel-cf-workers": "^1.0.0-rc.56",
48
- "logfire": "0.15.2"
48
+ "logfire": "0.17.0"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@cloudflare/workers-types": "4.20260528.1",