@synnaxlabs/alamos 0.32.0 → 0.33.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/dist/dev.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./instrumentation-B1UXX26I.cjs");var f;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(f||(f={}));var T="0000000000000000",S="00000000000000000000000000000000",N={traceId:S,spanId:T,traceFlags:f.NONE},u=function(){function t(e){e===void 0&&(e=N),this._spanContext=e}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,r){return this},t.prototype.setAttributes=function(e){return this},t.prototype.addEvent=function(e,r){return this},t.prototype.setStatus=function(e){return this},t.prototype.updateName=function(e){return this},t.prototype.end=function(e){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(e,r){},t}(),d=o.createContextKey("OpenTelemetry Context Key SPAN");function l(t){return t.getValue(d)||void 0}function m(){return l(o.ContextAPI.getInstance().active())}function g(t,e){return t.setValue(d,e)}function D(t){return t.deleteValue(d)}function E(t,e){return g(t,new u(e))}function P(t){var e;return(e=l(t))===null||e===void 0?void 0:e.spanContext()}var w=/^([0-9a-f]{32})$/i,C=/^[0-9a-f]{16}$/i;function R(t){return w.test(t)&&t!==S}function b(t){return C.test(t)&&t!==T}function A(t){return R(t.traceId)&&b(t.spanId)}function V(t){return new u(t)}var p=o.ContextAPI.getInstance(),I=function(){function t(){}return t.prototype.startSpan=function(e,r,n){n===void 0&&(n=p.active());var i=!!(r!=null&&r.root);if(i)return new u;var a=n&&P(n);return O(a)&&A(a)?new u(a):new u},t.prototype.startActiveSpan=function(e,r,n,i){var a,c,s;if(!(arguments.length<2)){arguments.length===2?s=r:arguments.length===3?(a=r,s=n):(a=r,c=n,s=i);var _=c??p.active(),h=this.startSpan(e,a,_),x=g(_,h);return p.with(x,s,void 0,h)}},t}();function O(t){return typeof t=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var L=new I,G=function(){function t(e,r,n,i){this._provider=e,this.name=r,this.version=n,this.options=i}return t.prototype.startSpan=function(e,r,n){return this._getTracer().startSpan(e,r,n)},t.prototype.startActiveSpan=function(e,r,n,i){var a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)},t.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):L},t}(),M=function(){function t(){}return t.prototype.getTracer=function(e,r,n){return new I},t}(),K=new M,y=function(){function t(){}return t.prototype.getTracer=function(e,r,n){var i;return(i=this.getDelegateTracer(e,r,n))!==null&&i!==void 0?i:new G(this,e,r,n)},t.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:K},t.prototype.setDelegate=function(e){this._delegate=e},t.prototype.getDelegateTracer=function(e,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(e,r,n)},t}(),v="trace",X=function(){function t(){this._proxyTracerProvider=new y,this.wrapSpanContext=V,this.isSpanContextValid=A,this.deleteSpan=D,this.getSpan=l,this.getActiveSpan=m,this.getSpanContext=P,this.setSpan=g,this.setSpanContext=E}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalTracerProvider=function(e){var r=o.registerGlobal(v,this._proxyTracerProvider,o.DiagAPI.instance());return r&&this._proxyTracerProvider.setDelegate(e),r},t.prototype.getTracerProvider=function(){return o.getGlobal(v)||this._proxyTracerProvider},t.prototype.getTracer=function(e,r){return this.getTracerProvider().getTracer(e,r)},t.prototype.disable=function(){o.unregisterGlobal(v,o.DiagAPI.instance()),this._proxyTracerProvider=new y},t}(),$=X.getInstance();const j=()=>{const t="synnax";return new o.Instrumentation({key:"",serviceName:t,logger:new o.Logger,tracer:new o.Tracer($.getTracerProvider().getTracer("synnax"))})};exports.instrumentation=j;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./instrumentation-CoYi8Yfu.cjs");var v;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(v||(v={}));var T="0000000000000000",S="00000000000000000000000000000000",N={traceId:S,spanId:T,traceFlags:v.NONE},u=function(){function t(e){e===void 0&&(e=N),this._spanContext=e}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,r){return this},t.prototype.setAttributes=function(e){return this},t.prototype.addEvent=function(e,r){return this},t.prototype.addLink=function(e){return this},t.prototype.addLinks=function(e){return this},t.prototype.setStatus=function(e){return this},t.prototype.updateName=function(e){return this},t.prototype.end=function(e){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(e,r){},t}(),d=o.createContextKey("OpenTelemetry Context Key SPAN");function l(t){return t.getValue(d)||void 0}function m(){return l(o.ContextAPI.getInstance().active())}function g(t,e){return t.setValue(d,e)}function D(t){return t.deleteValue(d)}function E(t,e){return g(t,new u(e))}function P(t){var e;return(e=l(t))===null||e===void 0?void 0:e.spanContext()}var w=/^([0-9a-f]{32})$/i,C=/^[0-9a-f]{16}$/i;function R(t){return w.test(t)&&t!==S}function b(t){return C.test(t)&&t!==T}function A(t){return R(t.traceId)&&b(t.spanId)}function V(t){return new u(t)}var p=o.ContextAPI.getInstance(),I=function(){function t(){}return t.prototype.startSpan=function(e,r,n){n===void 0&&(n=p.active());var i=!!(r!=null&&r.root);if(i)return new u;var a=n&&P(n);return O(a)&&A(a)?new u(a):new u},t.prototype.startActiveSpan=function(e,r,n,i){var a,c,s;if(!(arguments.length<2)){arguments.length===2?s=r:arguments.length===3?(a=r,s=n):(a=r,c=n,s=i);var _=c??p.active(),h=this.startSpan(e,a,_),x=g(_,h);return p.with(x,s,void 0,h)}},t}();function O(t){return typeof t=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var L=new I,k=function(){function t(e,r,n,i){this._provider=e,this.name=r,this.version=n,this.options=i}return t.prototype.startSpan=function(e,r,n){return this._getTracer().startSpan(e,r,n)},t.prototype.startActiveSpan=function(e,r,n,i){var a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)},t.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):L},t}(),G=function(){function t(){}return t.prototype.getTracer=function(e,r,n){return new I},t}(),M=new G,y=function(){function t(){}return t.prototype.getTracer=function(e,r,n){var i;return(i=this.getDelegateTracer(e,r,n))!==null&&i!==void 0?i:new k(this,e,r,n)},t.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:M},t.prototype.setDelegate=function(e){this._delegate=e},t.prototype.getDelegateTracer=function(e,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(e,r,n)},t}(),f="trace",K=function(){function t(){this._proxyTracerProvider=new y,this.wrapSpanContext=V,this.isSpanContextValid=A,this.deleteSpan=D,this.getSpan=l,this.getActiveSpan=m,this.getSpanContext=P,this.setSpan=g,this.setSpanContext=E}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalTracerProvider=function(e){var r=o.registerGlobal(f,this._proxyTracerProvider,o.DiagAPI.instance());return r&&this._proxyTracerProvider.setDelegate(e),r},t.prototype.getTracerProvider=function(){return o.getGlobal(f)||this._proxyTracerProvider},t.prototype.getTracer=function(e,r){return this.getTracerProvider().getTracer(e,r)},t.prototype.disable=function(){o.unregisterGlobal(f,o.DiagAPI.instance()),this._proxyTracerProvider=new y},t}(),X=K.getInstance();const $=()=>{const t="synnax";return new o.Instrumentation({key:"",serviceName:t,logger:new o.Logger,tracer:new o.Tracer(X.getTracerProvider().getTracer("synnax"))})};exports.instrumentation=$;
package/dist/dev.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as T, d as m, r as D, D as h, g as E, u as w, I as C, a as R, T as V } from "./instrumentation-mWZFzEMP.js";
1
+ import { C as T, d as m, r as D, D as h, g as E, u as w, I as C, a as R, T as V } from "./instrumentation-CBvwb_K0.js";
2
2
  var f;
3
3
  (function(t) {
4
4
  t[t.NONE = 0] = "NONE", t[t.SAMPLED = 1] = "SAMPLED";
@@ -21,6 +21,10 @@ var S = "0000000000000000", P = "00000000000000000000000000000000", b = {
21
21
  return this;
22
22
  }, t.prototype.addEvent = function(e, r) {
23
23
  return this;
24
+ }, t.prototype.addLink = function(e) {
25
+ return this;
26
+ }, t.prototype.addLinks = function(e) {
27
+ return this;
24
28
  }, t.prototype.setStatus = function(e) {
25
29
  return this;
26
30
  }, t.prototype.updateName = function(e) {
@@ -35,53 +39,53 @@ var S = "0000000000000000", P = "00000000000000000000000000000000", b = {
35
39
  function d(t) {
36
40
  return t.getValue(v) || void 0;
37
41
  }
38
- function O() {
42
+ function L() {
39
43
  return d(T.getInstance().active());
40
44
  }
41
- function g(t, e) {
45
+ function l(t, e) {
42
46
  return t.setValue(v, e);
43
47
  }
44
- function L(t) {
48
+ function O(t) {
45
49
  return t.deleteValue(v);
46
50
  }
47
- function G(t, e) {
48
- return g(t, new i(e));
51
+ function k(t, e) {
52
+ return l(t, new i(e));
49
53
  }
50
54
  function A(t) {
51
55
  var e;
52
56
  return (e = d(t)) === null || e === void 0 ? void 0 : e.spanContext();
53
57
  }
54
- var K = /^([0-9a-f]{32})$/i, M = /^[0-9a-f]{16}$/i;
55
- function X(t) {
56
- return K.test(t) && t !== P;
58
+ var G = /^([0-9a-f]{32})$/i, K = /^[0-9a-f]{16}$/i;
59
+ function M(t) {
60
+ return G.test(t) && t !== P;
57
61
  }
58
- function k(t) {
59
- return M.test(t) && t !== S;
62
+ function X(t) {
63
+ return K.test(t) && t !== S;
60
64
  }
61
65
  function I(t) {
62
- return X(t.traceId) && k(t.spanId);
66
+ return M(t.traceId) && X(t.spanId);
63
67
  }
64
68
  function $(t) {
65
69
  return new i(t);
66
70
  }
67
- var u = T.getInstance(), x = (
71
+ var c = T.getInstance(), x = (
68
72
  /** @class */
69
73
  function() {
70
74
  function t() {
71
75
  }
72
76
  return t.prototype.startSpan = function(e, r, n) {
73
- n === void 0 && (n = u.active());
77
+ n === void 0 && (n = c.active());
74
78
  var a = !!(r != null && r.root);
75
79
  if (a)
76
80
  return new i();
77
81
  var o = n && A(n);
78
82
  return j(o) && I(o) ? new i(o) : new i();
79
83
  }, t.prototype.startActiveSpan = function(e, r, n, a) {
80
- var o, s, c;
84
+ var o, s, u;
81
85
  if (!(arguments.length < 2)) {
82
- arguments.length === 2 ? c = r : arguments.length === 3 ? (o = r, c = n) : (o = r, s = n, c = a);
83
- var l = s ?? u.active(), _ = this.startSpan(e, o, l), N = g(l, _);
84
- return u.with(N, c, void 0, _);
86
+ arguments.length === 2 ? u = r : arguments.length === 3 ? (o = r, u = n) : (o = r, s = n, u = a);
87
+ var g = s ?? c.active(), _ = this.startSpan(e, o, g), N = l(g, _);
88
+ return c.with(N, u, void 0, _);
85
89
  }
86
90
  }, t;
87
91
  }()
@@ -138,7 +142,7 @@ var B = new x(), F = (
138
142
  /** @class */
139
143
  function() {
140
144
  function t() {
141
- this._proxyTracerProvider = new y(), this.wrapSpanContext = $, this.isSpanContextValid = I, this.deleteSpan = L, this.getSpan = d, this.getActiveSpan = O, this.getSpanContext = A, this.setSpan = g, this.setSpanContext = G;
145
+ this._proxyTracerProvider = new y(), this.wrapSpanContext = $, this.isSpanContextValid = I, this.deleteSpan = O, this.getSpan = d, this.getActiveSpan = L, this.getSpanContext = A, this.setSpan = l, this.setSpanContext = k;
142
146
  }
143
147
  return t.getInstance = function() {
144
148
  return this._instance || (this._instance = new t()), this._instance;
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./instrumentation-B1UXX26I.cjs"),o=Object.freeze(Object.defineProperty({__proto__:null,Instrumentation:e.Instrumentation,LOG_LEVELS:e.LOG_LEVELS,Logger:e.Logger,NOOP:e.NOOP,NoopSpan:e.NoopSpan,Tracer:e.Tracer,_Span:e._Span,logLevelKeyFiler:e.logLevelKeyFiler,logThresholdFilter:e.logThresholdFilter},Symbol.toStringTag,{value:"Module"}));exports.Instrumentation=e.Instrumentation;exports.LOG_LEVELS=e.LOG_LEVELS;exports.Logger=e.Logger;exports.NOOP=e.NOOP;exports.NoopSpan=e.NoopSpan;exports.Tracer=e.Tracer;exports._Span=e._Span;exports.logLevelKeyFiler=e.logLevelKeyFiler;exports.logThresholdFilter=e.logThresholdFilter;exports.alamos=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./instrumentation-CoYi8Yfu.cjs"),o=Object.freeze(Object.defineProperty({__proto__:null,Instrumentation:e.Instrumentation,LOG_LEVELS:e.LOG_LEVELS,Logger:e.Logger,NOOP:e.NOOP,NoopSpan:e.NoopSpan,Tracer:e.Tracer,_Span:e._Span,logLevelKeyFiler:e.logLevelKeyFiler,logThresholdFilter:e.logThresholdFilter},Symbol.toStringTag,{value:"Module"}));exports.Instrumentation=e.Instrumentation;exports.LOG_LEVELS=e.LOG_LEVELS;exports.Logger=e.Logger;exports.NOOP=e.NOOP;exports.NoopSpan=e.NoopSpan;exports.Tracer=e.Tracer;exports._Span=e._Span;exports.logLevelKeyFiler=e.logLevelKeyFiler;exports.logThresholdFilter=e.logThresholdFilter;exports.alamos=o;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { I as e, L as a, a as o, N as r, b as l, T as s, _ as t, l as n, c as p } from "./instrumentation-mWZFzEMP.js";
1
+ import { I as e, L as a, a as o, N as r, b as l, T as s, _ as t, l as n, c as p } from "./instrumentation-CBvwb_K0.js";
2
2
  const g = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3
3
  __proto__: null,
4
4
  Instrumentation: e,
@@ -63,7 +63,7 @@ const S = ["debug", "info", "warn", "error"], Pe = (r) => {
63
63
  s(v, "NOOP", new v());
64
64
  let P = v;
65
65
  const A = (r) => typeof r == "function" ? r() : r;
66
- var X = typeof globalThis == "object" ? globalThis : typeof self == "object" ? self : typeof window == "object" ? window : typeof global == "object" ? global : {}, g = "1.8.0", F = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
66
+ var X = typeof globalThis == "object" ? globalThis : typeof self == "object" ? self : typeof window == "object" ? window : typeof global == "object" ? global : {}, g = "1.9.0", F = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
67
67
  function Y(r) {
68
68
  var e = /* @__PURE__ */ new Set([r]), t = /* @__PURE__ */ new Set(), n = r.match(F);
69
69
  if (!n)
@@ -1 +1 @@
1
- "use strict";var Y=Object.defineProperty;var k=(r,e,t)=>e in r?Y(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var s=(r,e,t)=>k(r,typeof e!="symbol"?e+"":e,t);const y=class y{constructor(e,t,n="",a=!1){s(this,"_noop",!1);s(this,"key");s(this,"path");s(this,"serviceName");this.key=e,this.path=t,this.serviceName=n,this._noop=a}child(e){return new y(e,this.extendPath(e),this.serviceName,this.noop)}extendPath(e){return`${this.path}.${e}`}get noop(){return this._noop}};s(y,"NOOP",new y("","",""));let w=y;const T=["debug","info","warn","error"],D=r=>{const e=T.indexOf(r);return({level:t})=>T.indexOf(t)>=e},q=r=>{const{include:e,exclude:t}=r;return({path:n})=>!(e!=null&&!e.some(a=>n.startsWith(a))||t!=null&&t.some(a=>n.startsWith(a)))},m=class m{constructor(e={}){s(this,"meta",w.NOOP);s(this,"filters");const{filters:t=[]}=e;this.filters=t}filter(e){return!this.meta.noop&&this.filters.every(t=>t({key:this.meta.key,path:this.meta.path,level:e}))}child(e){const t=new m({filters:this.filters});return t.meta=e,t}debug(e,t,n=!1){!this.filter("debug")&&!n||(t==null?console.log("%cDEBUG","color: #8c00f0;",this.meta.path,e):console.log("%cDEBUG","color: #8c00f0;",this.meta.path,e,A(t)))}info(e,t,n=!1){!this.filter("info")&&!n||(t==null?console.log("%cINFO","color: #005eff;",this.meta.path,e):console.log("%cINFO","color: #005eff;",this.meta.path,e,A(t)))}warn(e,t,n=!1){!this.filter("warn")&&!n||(t==null?console.warn("WARN",this.meta.path,e):console.warn("WARN",this.meta.path,e,A(t)))}error(e,t,n=!1){!this.filter("error")&&!n||(t==null?console.error("ERROR",this.meta.path,e):console.error("ERROR",this.meta.path,e,A(t)))}};s(m,"NOOP",new m);let N=m;const A=r=>typeof r=="function"?r():r;var z=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},g="1.8.0",$=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function H(r){var e=new Set([r]),t=new Set,n=r.match($);if(!n)return function(){return!1};var a={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(a.prerelease!=null)return function(c){return c===r};function o(u){return t.add(u),!1}function i(u){return e.add(u),!0}return function(c){if(e.has(c))return!0;if(t.has(c))return!1;var f=c.match($);if(!f)return o(c);var p={major:+f[1],minor:+f[2],patch:+f[3],prerelease:f[4]};return p.prerelease!=null||a.major!==p.major?o(c):a.major===0?a.minor===p.minor&&a.patch<=p.patch?i(c):o(c):a.minor<=p.minor?i(c):o(c)}}var J=H(g),Q=g.split(".")[0],O=Symbol.for("opentelemetry.js.api."+Q),E=z;function R(r,e,t,n){var a;n===void 0&&(n=!1);var o=E[O]=(a=E[O])!==null&&a!==void 0?a:{version:g};if(!n&&o[r]){var i=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+r);return t.error(i.stack||i.message),!1}if(o.version!==g){var i=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+r+" does not match previously registered API v"+g);return t.error(i.stack||i.message),!1}return o[r]=e,t.debug("@opentelemetry/api: Registered a global for "+r+" v"+g+"."),!0}function h(r){var e,t,n=(e=E[O])===null||e===void 0?void 0:e.version;if(!(!n||!J(n)))return(t=E[O])===null||t===void 0?void 0:t[r]}function C(r,e){e.debug("@opentelemetry/api: Unregistering a global for "+r+" v"+g+".");var t=E[O];t&&delete t[r]}var Z=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),a,o=[],i;try{for(;(e===void 0||e-- >0)&&!(a=n.next()).done;)o.push(a.value)}catch(u){i={error:u}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(i)throw i.error}}return o},L=function(r,e,t){if(t||arguments.length===2)for(var n=0,a=e.length,o;n<a;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},ee=function(){function r(e){this._namespace=e.namespace||"DiagComponentLogger"}return r.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return v("debug",this._namespace,e)},r.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return v("error",this._namespace,e)},r.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return v("info",this._namespace,e)},r.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return v("warn",this._namespace,e)},r.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return v("verbose",this._namespace,e)},r}();function v(r,e,t){var n=h("diag");if(n)return t.unshift(e),n[r].apply(n,L([],Z(t),!1))}var l;(function(r){r[r.NONE=0]="NONE",r[r.ERROR=30]="ERROR",r[r.WARN=50]="WARN",r[r.INFO=60]="INFO",r[r.DEBUG=70]="DEBUG",r[r.VERBOSE=80]="VERBOSE",r[r.ALL=9999]="ALL"})(l||(l={}));function te(r,e){r<l.NONE?r=l.NONE:r>l.ALL&&(r=l.ALL),e=e||{};function t(n,a){var o=e[n];return typeof o=="function"&&r>=a?o.bind(e):function(){}}return{error:t("error",l.ERROR),warn:t("warn",l.WARN),info:t("info",l.INFO),debug:t("debug",l.DEBUG),verbose:t("verbose",l.VERBOSE)}}var re=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),a,o=[],i;try{for(;(e===void 0||e-- >0)&&!(a=n.next()).done;)o.push(a.value)}catch(u){i={error:u}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(i)throw i.error}}return o},ne=function(r,e,t){if(t||arguments.length===2)for(var n=0,a=e.length,o;n<a;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},ae="diag",d=function(){function r(){function e(a){return function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var u=h("diag");if(u)return u[a].apply(u,ne([],re(o),!1))}}var t=this,n=function(a,o){var i,u,c;if(o===void 0&&(o={logLevel:l.INFO}),a===t){var f=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return t.error((i=f.stack)!==null&&i!==void 0?i:f.message),!1}typeof o=="number"&&(o={logLevel:o});var p=h("diag"),j=te((u=o.logLevel)!==null&&u!==void 0?u:l.INFO,a);if(p&&!o.suppressOverrideMessage){var F=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";p.warn("Current logger will be overwritten from "+F),j.warn("Current logger will overwrite one already registered from "+F)}return R("diag",j,t,!0)};t.setLogger=n,t.disable=function(){C(ae,t)},t.createComponentLogger=function(a){return new ee(a)},t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}return r.instance=function(){return this._instance||(this._instance=new r),this._instance},r}(),oe=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),a,o=[],i;try{for(;(e===void 0||e-- >0)&&!(a=n.next()).done;)o.push(a.value)}catch(u){i={error:u}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(i)throw i.error}}return o},ie=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ue=function(){function r(e){this._entries=e?new Map(e):new Map}return r.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},r.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var t=oe(e,2),n=t[0],a=t[1];return[n,a]})},r.prototype.setEntry=function(e,t){var n=new r(this._entries);return n._entries.set(e,t),n},r.prototype.removeEntry=function(e){var t=new r(this._entries);return t._entries.delete(e),t},r.prototype.removeEntries=function(){for(var e,t,n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];var o=new r(this._entries);try{for(var i=ie(n),u=i.next();!u.done;u=i.next()){var c=u.value;o._entries.delete(c)}}catch(f){e={error:f}}finally{try{u&&!u.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return o},r.prototype.clear=function(){return new r},r}();d.instance();function se(r){return r===void 0&&(r={}),new ue(new Map(Object.entries(r)))}function V(r){return Symbol.for(r)}var ce=function(){function r(e){var t=this;t._currentContext=e?new Map(e):new Map,t.getValue=function(n){return t._currentContext.get(n)},t.setValue=function(n,a){var o=new r(t._currentContext);return o._currentContext.set(n,a),o},t.deleteValue=function(n){var a=new r(t._currentContext);return a._currentContext.delete(n),a}}return r}(),le=new ce,fe={get:function(r,e){if(r!=null)return r[e]},keys:function(r){return r==null?[]:Object.keys(r)}},pe={set:function(r,e,t){r!=null&&(r[e]=t)}},ge=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),a,o=[],i;try{for(;(e===void 0||e-- >0)&&!(a=n.next()).done;)o.push(a.value)}catch(u){i={error:u}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(i)throw i.error}}return o},he=function(r,e,t){if(t||arguments.length===2)for(var n=0,a=e.length,o;n<a;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},de=function(){function r(){}return r.prototype.active=function(){return le},r.prototype.with=function(e,t,n){for(var a=[],o=3;o<arguments.length;o++)a[o-3]=arguments[o];return t.call.apply(t,he([n],ge(a),!1))},r.prototype.bind=function(e,t){return t},r.prototype.enable=function(){return this},r.prototype.disable=function(){return this},r}(),ve=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),a,o=[],i;try{for(;(e===void 0||e-- >0)&&!(a=n.next()).done;)o.push(a.value)}catch(u){i={error:u}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(i)throw i.error}}return o},ye=function(r,e,t){if(t||arguments.length===2)for(var n=0,a=e.length,o;n<a;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},I="context",me=new de,M=function(){function r(){}return r.getInstance=function(){return this._instance||(this._instance=new r),this._instance},r.prototype.setGlobalContextManager=function(e){return R(I,e,d.instance())},r.prototype.active=function(){return this._getContextManager().active()},r.prototype.with=function(e,t,n){for(var a,o=[],i=3;i<arguments.length;i++)o[i-3]=arguments[i];return(a=this._getContextManager()).with.apply(a,ye([e,t,n],ve(o),!1))},r.prototype.bind=function(e,t){return this._getContextManager().bind(e,t)},r.prototype._getContextManager=function(){return h(I)||me},r.prototype.disable=function(){this._getContextManager().disable(),C(I,d.instance())},r}(),G;(function(r){r[r.UNSET=0]="UNSET",r[r.OK=1]="OK",r[r.ERROR=2]="ERROR"})(G||(G={}));var be=M.getInstance(),_e=function(){function r(){}return r.prototype.inject=function(e,t){},r.prototype.extract=function(e,t){return e},r.prototype.fields=function(){return[]},r}(),S=V("OpenTelemetry Baggage Key");function U(r){return r.getValue(S)||void 0}function we(){return U(M.getInstance().active())}function Oe(r,e){return r.setValue(S,e)}function Ee(r){return r.deleteValue(S)}var B="propagation",Ae=new _e,Ne=function(){function r(){this.createBaggage=se,this.getBaggage=U,this.getActiveBaggage=we,this.setBaggage=Oe,this.deleteBaggage=Ee}return r.getInstance=function(){return this._instance||(this._instance=new r),this._instance},r.prototype.setGlobalPropagator=function(e){return R(B,e,d.instance())},r.prototype.inject=function(e,t,n){return n===void 0&&(n=pe),this._getGlobalPropagator().inject(e,t,n)},r.prototype.extract=function(e,t,n){return n===void 0&&(n=fe),this._getGlobalPropagator().extract(e,t,n)},r.prototype.fields=function(){return this._getGlobalPropagator().fields()},r.prototype.disable=function(){C(B,d.instance())},r.prototype._getGlobalPropagator=function(){return h(B)||Ae},r}(),xe=Ne.getInstance();const K=["bench","debug","prod"],Pe=r=>e=>K.indexOf(e)>=K.indexOf(r),b=class b{constructor(e,t=Pe("debug")){s(this,"meta",w.NOOP);s(this,"tracer");s(this,"filter");this.tracer=e,this.filter=t}child(e){const t=new b(this.tracer,this.filter);return t.meta=e,t}debug(e,t){return this.trace(e,"debug",t)}bench(e,t){return this.trace(e,"bench",t)}prod(e,t){return this.trace(e,"prod",t)}trace(e,t,n){return this.meta.noop||!this.filter(t)?n(new X(e)):this.tracer.startActiveSpan(e,a=>{const o=new W(e,a),i=n(o);return a.end(),i})}propagate(e){if(this.meta.noop)return;const t=be.active();xe.inject(t,e,{set:(n,a,o)=>{n[a]=o}})}};s(b,"NOOP",new b);let x=b;class W{constructor(e,t){s(this,"key");s(this,"otel");this.key=e,this.otel=t}set(e,t){this.otel.setAttribute(e,t)}recordError(e){e!=null&&(this.otel.recordException(e),this.otel.setStatus({code:G.ERROR}))}}class X{constructor(e){s(this,"key");this.key=e}set(){}recordError(e){}}const _=class _{constructor({key:e="",serviceName:t="",logger:n=N.NOOP,tracer:a=x.NOOP,noop:o=!1,__meta:i}){s(this,"meta");s(this,"T");s(this,"L");this.meta=i??new w(e,e,t,o),this.T=a.child(this.meta),this.L=n.child(this.meta)}child(e){const t=this.meta.child(e);return new _({__meta:t,tracer:this.T,logger:this.L})}};s(_,"NOOP",new _({noop:!0}));let P=_;const Re=P.NOOP;exports.ContextAPI=M;exports.DiagAPI=d;exports.Instrumentation=P;exports.LOG_LEVELS=T;exports.Logger=N;exports.NOOP=Re;exports.NoopSpan=X;exports.Tracer=x;exports._Span=W;exports.createContextKey=V;exports.getGlobal=h;exports.logLevelKeyFiler=q;exports.logThresholdFilter=D;exports.registerGlobal=R;exports.unregisterGlobal=C;
1
+ "use strict";var Y=Object.defineProperty;var k=(r,e,t)=>e in r?Y(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var s=(r,e,t)=>k(r,typeof e!="symbol"?e+"":e,t);const y=class y{constructor(e,t,n="",a=!1){s(this,"_noop",!1);s(this,"key");s(this,"path");s(this,"serviceName");this.key=e,this.path=t,this.serviceName=n,this._noop=a}child(e){return new y(e,this.extendPath(e),this.serviceName,this.noop)}extendPath(e){return`${this.path}.${e}`}get noop(){return this._noop}};s(y,"NOOP",new y("","",""));let w=y;const T=["debug","info","warn","error"],D=r=>{const e=T.indexOf(r);return({level:t})=>T.indexOf(t)>=e},q=r=>{const{include:e,exclude:t}=r;return({path:n})=>!(e!=null&&!e.some(a=>n.startsWith(a))||t!=null&&t.some(a=>n.startsWith(a)))},m=class m{constructor(e={}){s(this,"meta",w.NOOP);s(this,"filters");const{filters:t=[]}=e;this.filters=t}filter(e){return!this.meta.noop&&this.filters.every(t=>t({key:this.meta.key,path:this.meta.path,level:e}))}child(e){const t=new m({filters:this.filters});return t.meta=e,t}debug(e,t,n=!1){!this.filter("debug")&&!n||(t==null?console.log("%cDEBUG","color: #8c00f0;",this.meta.path,e):console.log("%cDEBUG","color: #8c00f0;",this.meta.path,e,A(t)))}info(e,t,n=!1){!this.filter("info")&&!n||(t==null?console.log("%cINFO","color: #005eff;",this.meta.path,e):console.log("%cINFO","color: #005eff;",this.meta.path,e,A(t)))}warn(e,t,n=!1){!this.filter("warn")&&!n||(t==null?console.warn("WARN",this.meta.path,e):console.warn("WARN",this.meta.path,e,A(t)))}error(e,t,n=!1){!this.filter("error")&&!n||(t==null?console.error("ERROR",this.meta.path,e):console.error("ERROR",this.meta.path,e,A(t)))}};s(m,"NOOP",new m);let N=m;const A=r=>typeof r=="function"?r():r;var z=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},g="1.9.0",$=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function H(r){var e=new Set([r]),t=new Set,n=r.match($);if(!n)return function(){return!1};var a={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(a.prerelease!=null)return function(c){return c===r};function o(u){return t.add(u),!1}function i(u){return e.add(u),!0}return function(c){if(e.has(c))return!0;if(t.has(c))return!1;var f=c.match($);if(!f)return o(c);var p={major:+f[1],minor:+f[2],patch:+f[3],prerelease:f[4]};return p.prerelease!=null||a.major!==p.major?o(c):a.major===0?a.minor===p.minor&&a.patch<=p.patch?i(c):o(c):a.minor<=p.minor?i(c):o(c)}}var J=H(g),Q=g.split(".")[0],O=Symbol.for("opentelemetry.js.api."+Q),E=z;function R(r,e,t,n){var a;n===void 0&&(n=!1);var o=E[O]=(a=E[O])!==null&&a!==void 0?a:{version:g};if(!n&&o[r]){var i=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+r);return t.error(i.stack||i.message),!1}if(o.version!==g){var i=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+r+" does not match previously registered API v"+g);return t.error(i.stack||i.message),!1}return o[r]=e,t.debug("@opentelemetry/api: Registered a global for "+r+" v"+g+"."),!0}function h(r){var e,t,n=(e=E[O])===null||e===void 0?void 0:e.version;if(!(!n||!J(n)))return(t=E[O])===null||t===void 0?void 0:t[r]}function C(r,e){e.debug("@opentelemetry/api: Unregistering a global for "+r+" v"+g+".");var t=E[O];t&&delete t[r]}var Z=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),a,o=[],i;try{for(;(e===void 0||e-- >0)&&!(a=n.next()).done;)o.push(a.value)}catch(u){i={error:u}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(i)throw i.error}}return o},L=function(r,e,t){if(t||arguments.length===2)for(var n=0,a=e.length,o;n<a;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},ee=function(){function r(e){this._namespace=e.namespace||"DiagComponentLogger"}return r.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return v("debug",this._namespace,e)},r.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return v("error",this._namespace,e)},r.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return v("info",this._namespace,e)},r.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return v("warn",this._namespace,e)},r.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return v("verbose",this._namespace,e)},r}();function v(r,e,t){var n=h("diag");if(n)return t.unshift(e),n[r].apply(n,L([],Z(t),!1))}var l;(function(r){r[r.NONE=0]="NONE",r[r.ERROR=30]="ERROR",r[r.WARN=50]="WARN",r[r.INFO=60]="INFO",r[r.DEBUG=70]="DEBUG",r[r.VERBOSE=80]="VERBOSE",r[r.ALL=9999]="ALL"})(l||(l={}));function te(r,e){r<l.NONE?r=l.NONE:r>l.ALL&&(r=l.ALL),e=e||{};function t(n,a){var o=e[n];return typeof o=="function"&&r>=a?o.bind(e):function(){}}return{error:t("error",l.ERROR),warn:t("warn",l.WARN),info:t("info",l.INFO),debug:t("debug",l.DEBUG),verbose:t("verbose",l.VERBOSE)}}var re=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),a,o=[],i;try{for(;(e===void 0||e-- >0)&&!(a=n.next()).done;)o.push(a.value)}catch(u){i={error:u}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(i)throw i.error}}return o},ne=function(r,e,t){if(t||arguments.length===2)for(var n=0,a=e.length,o;n<a;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},ae="diag",d=function(){function r(){function e(a){return function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var u=h("diag");if(u)return u[a].apply(u,ne([],re(o),!1))}}var t=this,n=function(a,o){var i,u,c;if(o===void 0&&(o={logLevel:l.INFO}),a===t){var f=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return t.error((i=f.stack)!==null&&i!==void 0?i:f.message),!1}typeof o=="number"&&(o={logLevel:o});var p=h("diag"),j=te((u=o.logLevel)!==null&&u!==void 0?u:l.INFO,a);if(p&&!o.suppressOverrideMessage){var F=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";p.warn("Current logger will be overwritten from "+F),j.warn("Current logger will overwrite one already registered from "+F)}return R("diag",j,t,!0)};t.setLogger=n,t.disable=function(){C(ae,t)},t.createComponentLogger=function(a){return new ee(a)},t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}return r.instance=function(){return this._instance||(this._instance=new r),this._instance},r}(),oe=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),a,o=[],i;try{for(;(e===void 0||e-- >0)&&!(a=n.next()).done;)o.push(a.value)}catch(u){i={error:u}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(i)throw i.error}}return o},ie=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ue=function(){function r(e){this._entries=e?new Map(e):new Map}return r.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},r.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var t=oe(e,2),n=t[0],a=t[1];return[n,a]})},r.prototype.setEntry=function(e,t){var n=new r(this._entries);return n._entries.set(e,t),n},r.prototype.removeEntry=function(e){var t=new r(this._entries);return t._entries.delete(e),t},r.prototype.removeEntries=function(){for(var e,t,n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];var o=new r(this._entries);try{for(var i=ie(n),u=i.next();!u.done;u=i.next()){var c=u.value;o._entries.delete(c)}}catch(f){e={error:f}}finally{try{u&&!u.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return o},r.prototype.clear=function(){return new r},r}();d.instance();function se(r){return r===void 0&&(r={}),new ue(new Map(Object.entries(r)))}function V(r){return Symbol.for(r)}var ce=function(){function r(e){var t=this;t._currentContext=e?new Map(e):new Map,t.getValue=function(n){return t._currentContext.get(n)},t.setValue=function(n,a){var o=new r(t._currentContext);return o._currentContext.set(n,a),o},t.deleteValue=function(n){var a=new r(t._currentContext);return a._currentContext.delete(n),a}}return r}(),le=new ce,fe={get:function(r,e){if(r!=null)return r[e]},keys:function(r){return r==null?[]:Object.keys(r)}},pe={set:function(r,e,t){r!=null&&(r[e]=t)}},ge=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),a,o=[],i;try{for(;(e===void 0||e-- >0)&&!(a=n.next()).done;)o.push(a.value)}catch(u){i={error:u}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(i)throw i.error}}return o},he=function(r,e,t){if(t||arguments.length===2)for(var n=0,a=e.length,o;n<a;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},de=function(){function r(){}return r.prototype.active=function(){return le},r.prototype.with=function(e,t,n){for(var a=[],o=3;o<arguments.length;o++)a[o-3]=arguments[o];return t.call.apply(t,he([n],ge(a),!1))},r.prototype.bind=function(e,t){return t},r.prototype.enable=function(){return this},r.prototype.disable=function(){return this},r}(),ve=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),a,o=[],i;try{for(;(e===void 0||e-- >0)&&!(a=n.next()).done;)o.push(a.value)}catch(u){i={error:u}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(i)throw i.error}}return o},ye=function(r,e,t){if(t||arguments.length===2)for(var n=0,a=e.length,o;n<a;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},I="context",me=new de,M=function(){function r(){}return r.getInstance=function(){return this._instance||(this._instance=new r),this._instance},r.prototype.setGlobalContextManager=function(e){return R(I,e,d.instance())},r.prototype.active=function(){return this._getContextManager().active()},r.prototype.with=function(e,t,n){for(var a,o=[],i=3;i<arguments.length;i++)o[i-3]=arguments[i];return(a=this._getContextManager()).with.apply(a,ye([e,t,n],ve(o),!1))},r.prototype.bind=function(e,t){return this._getContextManager().bind(e,t)},r.prototype._getContextManager=function(){return h(I)||me},r.prototype.disable=function(){this._getContextManager().disable(),C(I,d.instance())},r}(),G;(function(r){r[r.UNSET=0]="UNSET",r[r.OK=1]="OK",r[r.ERROR=2]="ERROR"})(G||(G={}));var be=M.getInstance(),_e=function(){function r(){}return r.prototype.inject=function(e,t){},r.prototype.extract=function(e,t){return e},r.prototype.fields=function(){return[]},r}(),S=V("OpenTelemetry Baggage Key");function U(r){return r.getValue(S)||void 0}function we(){return U(M.getInstance().active())}function Oe(r,e){return r.setValue(S,e)}function Ee(r){return r.deleteValue(S)}var B="propagation",Ae=new _e,Ne=function(){function r(){this.createBaggage=se,this.getBaggage=U,this.getActiveBaggage=we,this.setBaggage=Oe,this.deleteBaggage=Ee}return r.getInstance=function(){return this._instance||(this._instance=new r),this._instance},r.prototype.setGlobalPropagator=function(e){return R(B,e,d.instance())},r.prototype.inject=function(e,t,n){return n===void 0&&(n=pe),this._getGlobalPropagator().inject(e,t,n)},r.prototype.extract=function(e,t,n){return n===void 0&&(n=fe),this._getGlobalPropagator().extract(e,t,n)},r.prototype.fields=function(){return this._getGlobalPropagator().fields()},r.prototype.disable=function(){C(B,d.instance())},r.prototype._getGlobalPropagator=function(){return h(B)||Ae},r}(),xe=Ne.getInstance();const K=["bench","debug","prod"],Pe=r=>e=>K.indexOf(e)>=K.indexOf(r),b=class b{constructor(e,t=Pe("debug")){s(this,"meta",w.NOOP);s(this,"tracer");s(this,"filter");this.tracer=e,this.filter=t}child(e){const t=new b(this.tracer,this.filter);return t.meta=e,t}debug(e,t){return this.trace(e,"debug",t)}bench(e,t){return this.trace(e,"bench",t)}prod(e,t){return this.trace(e,"prod",t)}trace(e,t,n){return this.meta.noop||!this.filter(t)?n(new X(e)):this.tracer.startActiveSpan(e,a=>{const o=new W(e,a),i=n(o);return a.end(),i})}propagate(e){if(this.meta.noop)return;const t=be.active();xe.inject(t,e,{set:(n,a,o)=>{n[a]=o}})}};s(b,"NOOP",new b);let x=b;class W{constructor(e,t){s(this,"key");s(this,"otel");this.key=e,this.otel=t}set(e,t){this.otel.setAttribute(e,t)}recordError(e){e!=null&&(this.otel.recordException(e),this.otel.setStatus({code:G.ERROR}))}}class X{constructor(e){s(this,"key");this.key=e}set(){}recordError(e){}}const _=class _{constructor({key:e="",serviceName:t="",logger:n=N.NOOP,tracer:a=x.NOOP,noop:o=!1,__meta:i}){s(this,"meta");s(this,"T");s(this,"L");this.meta=i??new w(e,e,t,o),this.T=a.child(this.meta),this.L=n.child(this.meta)}child(e){const t=this.meta.child(e);return new _({__meta:t,tracer:this.T,logger:this.L})}};s(_,"NOOP",new _({noop:!0}));let P=_;const Re=P.NOOP;exports.ContextAPI=M;exports.DiagAPI=d;exports.Instrumentation=P;exports.LOG_LEVELS=T;exports.Logger=N;exports.NOOP=Re;exports.NoopSpan=X;exports.Tracer=x;exports._Span=W;exports.createContextKey=V;exports.getGlobal=h;exports.logLevelKeyFiler=q;exports.logThresholdFilter=D;exports.registerGlobal=R;exports.unregisterGlobal=C;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synnaxlabs/alamos",
3
- "version": "0.32.0",
3
+ "version": "0.33.0",
4
4
  "type": "module",
5
5
  "description": "Distributed instrumentation for Synnax",
6
6
  "repository": "https://github.com/synnaxlabs/synnax/tree/main/freighter/ts",
@@ -18,22 +18,22 @@
18
18
  "node": ">=18"
19
19
  },
20
20
  "dependencies": {
21
- "@opentelemetry/api": "^1.8.0",
22
- "@opentelemetry/context-zone": "^1.23.0",
23
- "@opentelemetry/instrumentation-document-load": "^0.37.0",
24
- "@opentelemetry/sdk-trace-web": "^1.23.0",
25
- "@uptrace/node": "^1.19.0",
26
- "@uptrace/web": "^1.19.0",
27
- "@synnaxlabs/x": "0.32.0"
21
+ "@opentelemetry/api": "^1.9.0",
22
+ "@opentelemetry/context-zone": "^1.26.0",
23
+ "@opentelemetry/instrumentation-document-load": "^0.40.0",
24
+ "@opentelemetry/sdk-trace-web": "^1.26.0",
25
+ "@uptrace/node": "^1.21.0",
26
+ "@uptrace/web": "^1.21.0",
27
+ "@synnaxlabs/x": "0.33.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@vitest/coverage-v8": "^2.1.0",
31
- "typescript": "^5.6.2",
32
- "vite": "5.4.4",
33
- "vitest": "^2.1.0",
34
- "@synnaxlabs/tsconfig": "0.0.2",
30
+ "@vitest/coverage-v8": "^2.1.2",
31
+ "typescript": "^5.6.3",
32
+ "vite": "^5.4.8",
33
+ "vitest": "^2.1.2",
34
+ "@synnaxlabs/vite-plugin": "0.0.1",
35
35
  "eslint-config-synnaxlabs": "0.0.1",
36
- "@synnaxlabs/vite-plugin": "0.0.1"
36
+ "@synnaxlabs/tsconfig": "0.0.2"
37
37
  },
38
38
  "main": "dist/index.js",
39
39
  "module": "dist/index.js",