@vercel/otel 1.8.0 → 1.8.1
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/edge/index.js +4 -4
- package/dist/node/index.js +6 -6
- package/package.json +1 -1
package/dist/node/index.js
CHANGED
|
@@ -4,17 +4,17 @@ import _nPath from 'path'
|
|
|
4
4
|
const require = topLevelCreateRequire(import.meta.url);
|
|
5
5
|
const __filename = fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = _nPath.dirname(__filename);
|
|
7
|
-
var jm=Object.create;var ls=Object.defineProperty;var Gm=Object.getOwnPropertyDescriptor;var Hm=Object.getOwnPropertyNames;var Fm=Object.getPrototypeOf,Km=Object.prototype.hasOwnProperty;var X=(i=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(i,{get:(r,o)=>(typeof require<"u"?require:r)[o]}):i)(function(i){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+i+'" is not supported')});var Hc=(i,r)=>()=>(i&&(r=i(i=0)),r);var d=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports);var cn=(i,r,o,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of Hm(r))!Km.call(i,s)&&s!==o&&ls(i,s,{get:()=>r[s],enumerable:!(c=Gm(r,s))||c.enumerable});return i},bt=(i,r,o)=>(cn(i,r,"default"),o&&cn(o,r,"default")),Q=(i,r,o)=>(o=i!=null?jm(Fm(i)):{},cn(r||!i||!i.__esModule?ls(o,"default",{value:i,enumerable:!0}):o,i)),E=i=>cn(ls({},"__esModule",{value:!0}),i);var _={};import*as Ab from"@opentelemetry/api";var y=Hc(()=>{bt(_,Ab)});var br=d(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.isTracingSuppressed=De.unsuppressTracing=De.suppressTracing=void 0;var Xm=(y(),E(_)),ps=(0,Xm.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function zm(i){return i.setValue(ps,!0)}De.suppressTracing=zm;function $m(i){return i.deleteValue(ps)}De.unsuppressTracing=$m;function Ym(i){return i.getValue(ps)===!0}De.isTracingSuppressed=Ym});var fs=d(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.BAGGAGE_MAX_TOTAL_LENGTH=Z.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=Z.BAGGAGE_MAX_NAME_VALUE_PAIRS=Z.BAGGAGE_HEADER=Z.BAGGAGE_ITEMS_SEPARATOR=Z.BAGGAGE_PROPERTIES_SEPARATOR=Z.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;Z.BAGGAGE_KEY_PAIR_SEPARATOR="=";Z.BAGGAGE_PROPERTIES_SEPARATOR=";";Z.BAGGAGE_ITEMS_SEPARATOR=",";Z.BAGGAGE_HEADER="baggage";Z.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;Z.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;Z.BAGGAGE_MAX_TOTAL_LENGTH=8192});var ds=d(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.parseKeyPairsIntoRecord=Oe.parsePairKeyValue=Oe.getKeyPairs=Oe.serializeKeyPairs=void 0;var Wm=(y(),E(_)),Je=fs();function Jm(i){return i.reduce((r,o)=>{let c=`${r}${r!==""?Je.BAGGAGE_ITEMS_SEPARATOR:""}${o}`;return c.length>Je.BAGGAGE_MAX_TOTAL_LENGTH?r:c},"")}Oe.serializeKeyPairs=Jm;function Qm(i){return i.getAllEntries().map(([r,o])=>{let c=`${encodeURIComponent(r)}=${encodeURIComponent(o.value)}`;return o.metadata!==void 0&&(c+=Je.BAGGAGE_PROPERTIES_SEPARATOR+o.metadata.toString()),c})}Oe.getKeyPairs=Qm;function Fc(i){let r=i.split(Je.BAGGAGE_PROPERTIES_SEPARATOR);if(r.length<=0)return;let o=r.shift();if(!o)return;let c=o.indexOf(Je.BAGGAGE_KEY_PAIR_SEPARATOR);if(c<=0)return;let s=decodeURIComponent(o.substring(0,c).trim()),a=decodeURIComponent(o.substring(c+1).trim()),t;return r.length>0&&(t=(0,Wm.baggageEntryMetadataFromString)(r.join(Je.BAGGAGE_PROPERTIES_SEPARATOR))),{key:s,value:a,metadata:t}}Oe.parsePairKeyValue=Fc;function Zm(i){return typeof i!="string"||i.length===0?{}:i.split(Je.BAGGAGE_ITEMS_SEPARATOR).map(r=>Fc(r)).filter(r=>r!==void 0&&r.value.length>0).reduce((r,o)=>(r[o.key]=o.value,r),{})}Oe.parseKeyPairsIntoRecord=Zm});var Kc=d(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.W3CBaggagePropagator=void 0;var hs=(y(),E(_)),e_=br(),Qe=fs(),ms=ds(),_s=class{inject(r,o,c){let s=hs.propagation.getBaggage(r);if(!s||(0,e_.isTracingSuppressed)(r))return;let a=(0,ms.getKeyPairs)(s).filter(e=>e.length<=Qe.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,Qe.BAGGAGE_MAX_NAME_VALUE_PAIRS),t=(0,ms.serializeKeyPairs)(a);t.length>0&&c.set(o,Qe.BAGGAGE_HEADER,t)}extract(r,o,c){let s=c.get(o,Qe.BAGGAGE_HEADER),a=Array.isArray(s)?s.join(Qe.BAGGAGE_ITEMS_SEPARATOR):s;if(!a)return r;let t={};return a.length===0||(a.split(Qe.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let u=(0,ms.parsePairKeyValue)(n);if(u){let l={value:u.value};u.metadata&&(l.metadata=u.metadata),t[u.key]=l}}),Object.entries(t).length===0)?r:hs.propagation.setBaggage(r,hs.propagation.createBaggage(t))}fields(){return[Qe.BAGGAGE_HEADER]}};ln.W3CBaggagePropagator=_s});var Xc=d(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.AnchoredClock=void 0;var ys=class{constructor(r,o){this._monotonicClock=o,this._epochMillis=r.now(),this._performanceMillis=o.now()}now(){let r=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+r}};pn.AnchoredClock=ys});var Jc=d(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.isAttributeValue=Be.isAttributeKey=Be.sanitizeAttributes=void 0;var zc=(y(),E(_));function t_(i){let r={};if(typeof i!="object"||i==null)return r;for(let[o,c]of Object.entries(i)){if(!$c(o)){zc.diag.warn(`Invalid attribute key: ${o}`);continue}if(!Yc(c)){zc.diag.warn(`Invalid attribute value set for key: ${o}`);continue}Array.isArray(c)?r[o]=c.slice():r[o]=c}return r}Be.sanitizeAttributes=t_;function $c(i){return typeof i=="string"&&i.length>0}Be.isAttributeKey=$c;function Yc(i){return i==null?!0:Array.isArray(i)?r_(i):Wc(i)}Be.isAttributeValue=Yc;function r_(i){let r;for(let o of i)if(o!=null){if(!r){if(Wc(o)){r=typeof o;continue}return!1}if(typeof o!==r)return!1}return!0}function Wc(i){switch(typeof i){case"number":case"boolean":case"string":return!0}return!1}});var Es=d(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.loggingErrorHandler=void 0;var n_=(y(),E(_));function o_(){return i=>{n_.diag.error(i_(i))}}fn.loggingErrorHandler=o_;function i_(i){return typeof i=="string"?i:JSON.stringify(s_(i))}function s_(i){let r={},o=i;for(;o!==null;)Object.getOwnPropertyNames(o).forEach(c=>{if(r[c])return;let s=o[c];s&&(r[c]=String(s))}),o=Object.getPrototypeOf(o);return r}});var gs=d(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.globalErrorHandler=Ot.setGlobalErrorHandler=void 0;var u_=Es(),Qc=(0,u_.loggingErrorHandler)();function a_(i){Qc=i}Ot.setGlobalErrorHandler=a_;function c_(i){try{Qc(i)}catch{}}Ot.globalErrorHandler=c_});var vs=d(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.TracesSamplerValues=void 0;var l_;(function(i){i.AlwaysOff="always_off",i.AlwaysOn="always_on",i.ParentBasedAlwaysOff="parentbased_always_off",i.ParentBasedAlwaysOn="parentbased_always_on",i.ParentBasedTraceIdRatio="parentbased_traceidratio",i.TraceIdRatio="traceidratio"})(l_=Or.TracesSamplerValues||(Or.TracesSamplerValues={}))});var Zc=d(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn._globalThis=void 0;dn._globalThis=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});var hn=d(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.getEnvWithoutDefaults=C.parseEnvironment=C.DEFAULT_ENVIRONMENT=C.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=C.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=C.DEFAULT_ATTRIBUTE_COUNT_LIMIT=C.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=void 0;var Ve=(y(),E(_)),p_=vs(),f_=Zc(),d_=",",h_=["OTEL_SDK_DISABLED"];function m_(i){return h_.indexOf(i)>-1}var __=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function y_(i){return __.indexOf(i)>-1}var E_=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function g_(i){return E_.indexOf(i)>-1}C.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=1/0;C.DEFAULT_ATTRIBUTE_COUNT_LIMIT=128;C.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=128;C.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=128;C.DEFAULT_ENVIRONMENT={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:Ve.DiagLogLevel.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:C.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_ATTRIBUTE_COUNT_LIMIT:C.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:C.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:C.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:C.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:C.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:C.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:C.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:p_.TracesSamplerValues.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};function v_(i,r,o){if(typeof o[i]>"u")return;let c=String(o[i]);r[i]=c.toLowerCase()==="true"}function T_(i,r,o,c=-1/0,s=1/0){if(typeof o[i]<"u"){let a=Number(o[i]);isNaN(a)||(a<c?r[i]=c:a>s?r[i]=s:r[i]=a)}}function S_(i,r,o,c=d_){let s=o[i];typeof s=="string"&&(r[i]=s.split(c).map(a=>a.trim()))}var b_={ALL:Ve.DiagLogLevel.ALL,VERBOSE:Ve.DiagLogLevel.VERBOSE,DEBUG:Ve.DiagLogLevel.DEBUG,INFO:Ve.DiagLogLevel.INFO,WARN:Ve.DiagLogLevel.WARN,ERROR:Ve.DiagLogLevel.ERROR,NONE:Ve.DiagLogLevel.NONE};function O_(i,r,o){let c=o[i];if(typeof c=="string"){let s=b_[c.toUpperCase()];s!=null&&(r[i]=s)}}function Ts(i){let r={};for(let o in C.DEFAULT_ENVIRONMENT){let c=o;switch(c){case"OTEL_LOG_LEVEL":O_(c,r,i);break;default:if(m_(c))v_(c,r,i);else if(y_(c))T_(c,r,i);else if(g_(c))S_(c,r,i);else{let s=i[c];typeof s<"u"&&s!==null&&(r[c]=String(s))}}}return r}C.parseEnvironment=Ts;function A_(){return typeof process<"u"&&process&&process.env?Ts(process.env):Ts(f_._globalThis)}C.getEnvWithoutDefaults=A_});var tl=d(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.getEnv=void 0;var P_=X("os"),el=hn();function N_(){let i=(0,el.parseEnvironment)(process.env);return Object.assign({HOSTNAME:P_.hostname()},el.DEFAULT_ENVIRONMENT,i)}mn.getEnv=N_});var rl=d(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n._globalThis=void 0;_n._globalThis=typeof globalThis=="object"?globalThis:global});var ol=d(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.hexToBase64=void 0;function nl(i){return i>=48&&i<=57?i-48:i>=97&&i<=102?i-87:i-55}var R_=Buffer.alloc(8),x_=Buffer.alloc(16);function I_(i){let r;i.length===16?r=R_:i.length===32?r=x_:r=Buffer.alloc(i.length/2);let o=0;for(let c=0;c<i.length;c+=2){let s=nl(i.charCodeAt(c)),a=nl(i.charCodeAt(c+1));r.writeUInt8(s<<4|a,o++)}return r.toString("base64")}yn.hexToBase64=I_});var ul=d(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.RandomIdGenerator=void 0;var L_=8,sl=16,Ss=class{constructor(){this.generateTraceId=il(sl),this.generateSpanId=il(L_)}};gn.RandomIdGenerator=Ss;var En=Buffer.allocUnsafe(sl);function il(i){return function(){for(let o=0;o<i/4;o++)En.writeUInt32BE(Math.random()*2**32>>>0,o*4);for(let o=0;o<i&&!(En[o]>0);o++)o===i-1&&(En[i-1]=1);return En.toString("hex",0,i)}}});var al=d(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.otperformance=void 0;var w_=X("perf_hooks");vn.otperformance=w_.performance});var bs=d(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.VERSION=void 0;Tn.VERSION="1.19.0"});var cl=d(I=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0});I.MessageTypeValues=I.RpcGrpcStatusCodeValues=I.MessagingOperationValues=I.MessagingDestinationKindValues=I.HttpFlavorValues=I.NetHostConnectionSubtypeValues=I.NetHostConnectionTypeValues=I.NetTransportValues=I.FaasInvokedProviderValues=I.FaasDocumentOperationValues=I.FaasTriggerValues=I.DbCassandraConsistencyLevelValues=I.DbSystemValues=I.SemanticAttributes=void 0;I.SemanticAttributes={AWS_LAMBDA_INVOKED_ARN:"aws.lambda.invoked_arn",DB_SYSTEM:"db.system",DB_CONNECTION_STRING:"db.connection_string",DB_USER:"db.user",DB_JDBC_DRIVER_CLASSNAME:"db.jdbc.driver_classname",DB_NAME:"db.name",DB_STATEMENT:"db.statement",DB_OPERATION:"db.operation",DB_MSSQL_INSTANCE_NAME:"db.mssql.instance_name",DB_CASSANDRA_KEYSPACE:"db.cassandra.keyspace",DB_CASSANDRA_PAGE_SIZE:"db.cassandra.page_size",DB_CASSANDRA_CONSISTENCY_LEVEL:"db.cassandra.consistency_level",DB_CASSANDRA_TABLE:"db.cassandra.table",DB_CASSANDRA_IDEMPOTENCE:"db.cassandra.idempotence",DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:"db.cassandra.speculative_execution_count",DB_CASSANDRA_COORDINATOR_ID:"db.cassandra.coordinator.id",DB_CASSANDRA_COORDINATOR_DC:"db.cassandra.coordinator.dc",DB_HBASE_NAMESPACE:"db.hbase.namespace",DB_REDIS_DATABASE_INDEX:"db.redis.database_index",DB_MONGODB_COLLECTION:"db.mongodb.collection",DB_SQL_TABLE:"db.sql.table",EXCEPTION_TYPE:"exception.type",EXCEPTION_MESSAGE:"exception.message",EXCEPTION_STACKTRACE:"exception.stacktrace",EXCEPTION_ESCAPED:"exception.escaped",FAAS_TRIGGER:"faas.trigger",FAAS_EXECUTION:"faas.execution",FAAS_DOCUMENT_COLLECTION:"faas.document.collection",FAAS_DOCUMENT_OPERATION:"faas.document.operation",FAAS_DOCUMENT_TIME:"faas.document.time",FAAS_DOCUMENT_NAME:"faas.document.name",FAAS_TIME:"faas.time",FAAS_CRON:"faas.cron",FAAS_COLDSTART:"faas.coldstart",FAAS_INVOKED_NAME:"faas.invoked_name",FAAS_INVOKED_PROVIDER:"faas.invoked_provider",FAAS_INVOKED_REGION:"faas.invoked_region",NET_TRANSPORT:"net.transport",NET_PEER_IP:"net.peer.ip",NET_PEER_PORT:"net.peer.port",NET_PEER_NAME:"net.peer.name",NET_HOST_IP:"net.host.ip",NET_HOST_PORT:"net.host.port",NET_HOST_NAME:"net.host.name",NET_HOST_CONNECTION_TYPE:"net.host.connection.type",NET_HOST_CONNECTION_SUBTYPE:"net.host.connection.subtype",NET_HOST_CARRIER_NAME:"net.host.carrier.name",NET_HOST_CARRIER_MCC:"net.host.carrier.mcc",NET_HOST_CARRIER_MNC:"net.host.carrier.mnc",NET_HOST_CARRIER_ICC:"net.host.carrier.icc",PEER_SERVICE:"peer.service",ENDUSER_ID:"enduser.id",ENDUSER_ROLE:"enduser.role",ENDUSER_SCOPE:"enduser.scope",THREAD_ID:"thread.id",THREAD_NAME:"thread.name",CODE_FUNCTION:"code.function",CODE_NAMESPACE:"code.namespace",CODE_FILEPATH:"code.filepath",CODE_LINENO:"code.lineno",HTTP_METHOD:"http.method",HTTP_URL:"http.url",HTTP_TARGET:"http.target",HTTP_HOST:"http.host",HTTP_SCHEME:"http.scheme",HTTP_STATUS_CODE:"http.status_code",HTTP_FLAVOR:"http.flavor",HTTP_USER_AGENT:"http.user_agent",HTTP_REQUEST_CONTENT_LENGTH:"http.request_content_length",HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:"http.request_content_length_uncompressed",HTTP_RESPONSE_CONTENT_LENGTH:"http.response_content_length",HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:"http.response_content_length_uncompressed",HTTP_SERVER_NAME:"http.server_name",HTTP_ROUTE:"http.route",HTTP_CLIENT_IP:"http.client_ip",AWS_DYNAMODB_TABLE_NAMES:"aws.dynamodb.table_names",AWS_DYNAMODB_CONSUMED_CAPACITY:"aws.dynamodb.consumed_capacity",AWS_DYNAMODB_ITEM_COLLECTION_METRICS:"aws.dynamodb.item_collection_metrics",AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:"aws.dynamodb.provisioned_read_capacity",AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:"aws.dynamodb.provisioned_write_capacity",AWS_DYNAMODB_CONSISTENT_READ:"aws.dynamodb.consistent_read",AWS_DYNAMODB_PROJECTION:"aws.dynamodb.projection",AWS_DYNAMODB_LIMIT:"aws.dynamodb.limit",AWS_DYNAMODB_ATTRIBUTES_TO_GET:"aws.dynamodb.attributes_to_get",AWS_DYNAMODB_INDEX_NAME:"aws.dynamodb.index_name",AWS_DYNAMODB_SELECT:"aws.dynamodb.select",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:"aws.dynamodb.global_secondary_indexes",AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:"aws.dynamodb.local_secondary_indexes",AWS_DYNAMODB_EXCLUSIVE_START_TABLE:"aws.dynamodb.exclusive_start_table",AWS_DYNAMODB_TABLE_COUNT:"aws.dynamodb.table_count",AWS_DYNAMODB_SCAN_FORWARD:"aws.dynamodb.scan_forward",AWS_DYNAMODB_SEGMENT:"aws.dynamodb.segment",AWS_DYNAMODB_TOTAL_SEGMENTS:"aws.dynamodb.total_segments",AWS_DYNAMODB_COUNT:"aws.dynamodb.count",AWS_DYNAMODB_SCANNED_COUNT:"aws.dynamodb.scanned_count",AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:"aws.dynamodb.attribute_definitions",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:"aws.dynamodb.global_secondary_index_updates",MESSAGING_SYSTEM:"messaging.system",MESSAGING_DESTINATION:"messaging.destination",MESSAGING_DESTINATION_KIND:"messaging.destination_kind",MESSAGING_TEMP_DESTINATION:"messaging.temp_destination",MESSAGING_PROTOCOL:"messaging.protocol",MESSAGING_PROTOCOL_VERSION:"messaging.protocol_version",MESSAGING_URL:"messaging.url",MESSAGING_MESSAGE_ID:"messaging.message_id",MESSAGING_CONVERSATION_ID:"messaging.conversation_id",MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:"messaging.message_payload_size_bytes",MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:"messaging.message_payload_compressed_size_bytes",MESSAGING_OPERATION:"messaging.operation",MESSAGING_CONSUMER_ID:"messaging.consumer_id",MESSAGING_RABBITMQ_ROUTING_KEY:"messaging.rabbitmq.routing_key",MESSAGING_KAFKA_MESSAGE_KEY:"messaging.kafka.message_key",MESSAGING_KAFKA_CONSUMER_GROUP:"messaging.kafka.consumer_group",MESSAGING_KAFKA_CLIENT_ID:"messaging.kafka.client_id",MESSAGING_KAFKA_PARTITION:"messaging.kafka.partition",MESSAGING_KAFKA_TOMBSTONE:"messaging.kafka.tombstone",RPC_SYSTEM:"rpc.system",RPC_SERVICE:"rpc.service",RPC_METHOD:"rpc.method",RPC_GRPC_STATUS_CODE:"rpc.grpc.status_code",RPC_JSONRPC_VERSION:"rpc.jsonrpc.version",RPC_JSONRPC_REQUEST_ID:"rpc.jsonrpc.request_id",RPC_JSONRPC_ERROR_CODE:"rpc.jsonrpc.error_code",RPC_JSONRPC_ERROR_MESSAGE:"rpc.jsonrpc.error_message",MESSAGE_TYPE:"message.type",MESSAGE_ID:"message.id",MESSAGE_COMPRESSED_SIZE:"message.compressed_size",MESSAGE_UNCOMPRESSED_SIZE:"message.uncompressed_size"};I.DbSystemValues={OTHER_SQL:"other_sql",MSSQL:"mssql",MYSQL:"mysql",ORACLE:"oracle",DB2:"db2",POSTGRESQL:"postgresql",REDSHIFT:"redshift",HIVE:"hive",CLOUDSCAPE:"cloudscape",HSQLDB:"hsqldb",PROGRESS:"progress",MAXDB:"maxdb",HANADB:"hanadb",INGRES:"ingres",FIRSTSQL:"firstsql",EDB:"edb",CACHE:"cache",ADABAS:"adabas",FIREBIRD:"firebird",DERBY:"derby",FILEMAKER:"filemaker",INFORMIX:"informix",INSTANTDB:"instantdb",INTERBASE:"interbase",MARIADB:"mariadb",NETEZZA:"netezza",PERVASIVE:"pervasive",POINTBASE:"pointbase",SQLITE:"sqlite",SYBASE:"sybase",TERADATA:"teradata",VERTICA:"vertica",H2:"h2",COLDFUSION:"coldfusion",CASSANDRA:"cassandra",HBASE:"hbase",MONGODB:"mongodb",REDIS:"redis",COUCHBASE:"couchbase",COUCHDB:"couchdb",COSMOSDB:"cosmosdb",DYNAMODB:"dynamodb",NEO4J:"neo4j",GEODE:"geode",ELASTICSEARCH:"elasticsearch",MEMCACHED:"memcached",COCKROACHDB:"cockroachdb"};I.DbCassandraConsistencyLevelValues={ALL:"all",EACH_QUORUM:"each_quorum",QUORUM:"quorum",LOCAL_QUORUM:"local_quorum",ONE:"one",TWO:"two",THREE:"three",LOCAL_ONE:"local_one",ANY:"any",SERIAL:"serial",LOCAL_SERIAL:"local_serial"};I.FaasTriggerValues={DATASOURCE:"datasource",HTTP:"http",PUBSUB:"pubsub",TIMER:"timer",OTHER:"other"};I.FaasDocumentOperationValues={INSERT:"insert",EDIT:"edit",DELETE:"delete"};I.FaasInvokedProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};I.NetTransportValues={IP_TCP:"ip_tcp",IP_UDP:"ip_udp",IP:"ip",UNIX:"unix",PIPE:"pipe",INPROC:"inproc",OTHER:"other"};I.NetHostConnectionTypeValues={WIFI:"wifi",WIRED:"wired",CELL:"cell",UNAVAILABLE:"unavailable",UNKNOWN:"unknown"};I.NetHostConnectionSubtypeValues={GPRS:"gprs",EDGE:"edge",UMTS:"umts",CDMA:"cdma",EVDO_0:"evdo_0",EVDO_A:"evdo_a",CDMA2000_1XRTT:"cdma2000_1xrtt",HSDPA:"hsdpa",HSUPA:"hsupa",HSPA:"hspa",IDEN:"iden",EVDO_B:"evdo_b",LTE:"lte",EHRPD:"ehrpd",HSPAP:"hspap",GSM:"gsm",TD_SCDMA:"td_scdma",IWLAN:"iwlan",NR:"nr",NRNSA:"nrnsa",LTE_CA:"lte_ca"};I.HttpFlavorValues={HTTP_1_0:"1.0",HTTP_1_1:"1.1",HTTP_2_0:"2.0",SPDY:"SPDY",QUIC:"QUIC"};I.MessagingDestinationKindValues={QUEUE:"queue",TOPIC:"topic"};I.MessagingOperationValues={RECEIVE:"receive",PROCESS:"process"};I.RpcGrpcStatusCodeValues={OK:0,CANCELLED:1,UNKNOWN:2,INVALID_ARGUMENT:3,DEADLINE_EXCEEDED:4,NOT_FOUND:5,ALREADY_EXISTS:6,PERMISSION_DENIED:7,RESOURCE_EXHAUSTED:8,FAILED_PRECONDITION:9,ABORTED:10,OUT_OF_RANGE:11,UNIMPLEMENTED:12,INTERNAL:13,UNAVAILABLE:14,DATA_LOSS:15,UNAUTHENTICATED:16};I.MessageTypeValues={SENT:"SENT",RECEIVED:"RECEIVED"}});var ll=d(Ze=>{"use strict";var M_=Ze&&Ze.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),C_=Ze&&Ze.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&M_(r,i,o)};Object.defineProperty(Ze,"__esModule",{value:!0});C_(cl(),Ze)});var pl=d(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.TelemetrySdkLanguageValues=ee.OsTypeValues=ee.HostArchValues=ee.AwsEcsLaunchtypeValues=ee.CloudPlatformValues=ee.CloudProviderValues=ee.SemanticResourceAttributes=void 0;ee.SemanticResourceAttributes={CLOUD_PROVIDER:"cloud.provider",CLOUD_ACCOUNT_ID:"cloud.account.id",CLOUD_REGION:"cloud.region",CLOUD_AVAILABILITY_ZONE:"cloud.availability_zone",CLOUD_PLATFORM:"cloud.platform",AWS_ECS_CONTAINER_ARN:"aws.ecs.container.arn",AWS_ECS_CLUSTER_ARN:"aws.ecs.cluster.arn",AWS_ECS_LAUNCHTYPE:"aws.ecs.launchtype",AWS_ECS_TASK_ARN:"aws.ecs.task.arn",AWS_ECS_TASK_FAMILY:"aws.ecs.task.family",AWS_ECS_TASK_REVISION:"aws.ecs.task.revision",AWS_EKS_CLUSTER_ARN:"aws.eks.cluster.arn",AWS_LOG_GROUP_NAMES:"aws.log.group.names",AWS_LOG_GROUP_ARNS:"aws.log.group.arns",AWS_LOG_STREAM_NAMES:"aws.log.stream.names",AWS_LOG_STREAM_ARNS:"aws.log.stream.arns",CONTAINER_NAME:"container.name",CONTAINER_ID:"container.id",CONTAINER_RUNTIME:"container.runtime",CONTAINER_IMAGE_NAME:"container.image.name",CONTAINER_IMAGE_TAG:"container.image.tag",DEPLOYMENT_ENVIRONMENT:"deployment.environment",DEVICE_ID:"device.id",DEVICE_MODEL_IDENTIFIER:"device.model.identifier",DEVICE_MODEL_NAME:"device.model.name",FAAS_NAME:"faas.name",FAAS_ID:"faas.id",FAAS_VERSION:"faas.version",FAAS_INSTANCE:"faas.instance",FAAS_MAX_MEMORY:"faas.max_memory",HOST_ID:"host.id",HOST_NAME:"host.name",HOST_TYPE:"host.type",HOST_ARCH:"host.arch",HOST_IMAGE_NAME:"host.image.name",HOST_IMAGE_ID:"host.image.id",HOST_IMAGE_VERSION:"host.image.version",K8S_CLUSTER_NAME:"k8s.cluster.name",K8S_NODE_NAME:"k8s.node.name",K8S_NODE_UID:"k8s.node.uid",K8S_NAMESPACE_NAME:"k8s.namespace.name",K8S_POD_UID:"k8s.pod.uid",K8S_POD_NAME:"k8s.pod.name",K8S_CONTAINER_NAME:"k8s.container.name",K8S_REPLICASET_UID:"k8s.replicaset.uid",K8S_REPLICASET_NAME:"k8s.replicaset.name",K8S_DEPLOYMENT_UID:"k8s.deployment.uid",K8S_DEPLOYMENT_NAME:"k8s.deployment.name",K8S_STATEFULSET_UID:"k8s.statefulset.uid",K8S_STATEFULSET_NAME:"k8s.statefulset.name",K8S_DAEMONSET_UID:"k8s.daemonset.uid",K8S_DAEMONSET_NAME:"k8s.daemonset.name",K8S_JOB_UID:"k8s.job.uid",K8S_JOB_NAME:"k8s.job.name",K8S_CRONJOB_UID:"k8s.cronjob.uid",K8S_CRONJOB_NAME:"k8s.cronjob.name",OS_TYPE:"os.type",OS_DESCRIPTION:"os.description",OS_NAME:"os.name",OS_VERSION:"os.version",PROCESS_PID:"process.pid",PROCESS_EXECUTABLE_NAME:"process.executable.name",PROCESS_EXECUTABLE_PATH:"process.executable.path",PROCESS_COMMAND:"process.command",PROCESS_COMMAND_LINE:"process.command_line",PROCESS_COMMAND_ARGS:"process.command_args",PROCESS_OWNER:"process.owner",PROCESS_RUNTIME_NAME:"process.runtime.name",PROCESS_RUNTIME_VERSION:"process.runtime.version",PROCESS_RUNTIME_DESCRIPTION:"process.runtime.description",SERVICE_NAME:"service.name",SERVICE_NAMESPACE:"service.namespace",SERVICE_INSTANCE_ID:"service.instance.id",SERVICE_VERSION:"service.version",TELEMETRY_SDK_NAME:"telemetry.sdk.name",TELEMETRY_SDK_LANGUAGE:"telemetry.sdk.language",TELEMETRY_SDK_VERSION:"telemetry.sdk.version",TELEMETRY_AUTO_VERSION:"telemetry.auto.version",WEBENGINE_NAME:"webengine.name",WEBENGINE_VERSION:"webengine.version",WEBENGINE_DESCRIPTION:"webengine.description"};ee.CloudProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};ee.CloudPlatformValues={ALIBABA_CLOUD_ECS:"alibaba_cloud_ecs",ALIBABA_CLOUD_FC:"alibaba_cloud_fc",AWS_EC2:"aws_ec2",AWS_ECS:"aws_ecs",AWS_EKS:"aws_eks",AWS_LAMBDA:"aws_lambda",AWS_ELASTIC_BEANSTALK:"aws_elastic_beanstalk",AZURE_VM:"azure_vm",AZURE_CONTAINER_INSTANCES:"azure_container_instances",AZURE_AKS:"azure_aks",AZURE_FUNCTIONS:"azure_functions",AZURE_APP_SERVICE:"azure_app_service",GCP_COMPUTE_ENGINE:"gcp_compute_engine",GCP_CLOUD_RUN:"gcp_cloud_run",GCP_KUBERNETES_ENGINE:"gcp_kubernetes_engine",GCP_CLOUD_FUNCTIONS:"gcp_cloud_functions",GCP_APP_ENGINE:"gcp_app_engine"};ee.AwsEcsLaunchtypeValues={EC2:"ec2",FARGATE:"fargate"};ee.HostArchValues={AMD64:"amd64",ARM32:"arm32",ARM64:"arm64",IA64:"ia64",PPC32:"ppc32",PPC64:"ppc64",X86:"x86"};ee.OsTypeValues={WINDOWS:"windows",LINUX:"linux",DARWIN:"darwin",FREEBSD:"freebsd",NETBSD:"netbsd",OPENBSD:"openbsd",DRAGONFLYBSD:"dragonflybsd",HPUX:"hpux",AIX:"aix",SOLARIS:"solaris",Z_OS:"z_os"};ee.TelemetrySdkLanguageValues={CPP:"cpp",DOTNET:"dotnet",ERLANG:"erlang",GO:"go",JAVA:"java",NODEJS:"nodejs",PHP:"php",PYTHON:"python",RUBY:"ruby",WEBJS:"webjs"}});var fl=d(et=>{"use strict";var U_=et&&et.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),D_=et&&et.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&U_(r,i,o)};Object.defineProperty(et,"__esModule",{value:!0});D_(pl(),et)});var fe=d(ke=>{"use strict";var B_=ke&&ke.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),dl=ke&&ke.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&B_(r,i,o)};Object.defineProperty(ke,"__esModule",{value:!0});dl(ll(),ke);dl(fl(),ke)});var hl=d(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.SDK_INFO=void 0;var V_=bs(),Ar=fe();Sn.SDK_INFO={[Ar.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:"opentelemetry",[Ar.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"node",[Ar.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:Ar.TelemetrySdkLanguageValues.NODEJS,[Ar.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:V_.VERSION}});var ml=d(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.unrefTimer=void 0;function k_(i){i.unref()}bn.unrefTimer=k_});var _l=d(ae=>{"use strict";var q_=ae&&ae.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),tt=ae&&ae.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&q_(r,i,o)};Object.defineProperty(ae,"__esModule",{value:!0});tt(tl(),ae);tt(rl(),ae);tt(ol(),ae);tt(ul(),ae);tt(al(),ae);tt(hl(),ae);tt(ml(),ae)});var Os=d(rt=>{"use strict";var j_=rt&&rt.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),G_=rt&&rt.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&j_(r,i,o)};Object.defineProperty(rt,"__esModule",{value:!0});G_(_l(),rt)});var vl=d(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.addHrTimes=M.isTimeInput=M.isTimeInputHrTime=M.hrTimeToMicroseconds=M.hrTimeToMilliseconds=M.hrTimeToNanoseconds=M.hrTimeToTimeStamp=M.hrTimeDuration=M.timeInputToHrTime=M.hrTime=M.getTimeOrigin=M.millisToHrTime=void 0;var As=Os(),yl=9,H_=6,F_=Math.pow(10,H_),On=Math.pow(10,yl);function Pr(i){let r=i/1e3,o=Math.trunc(r),c=Math.round(i%1e3*F_);return[o,c]}M.millisToHrTime=Pr;function Ps(){let i=As.otperformance.timeOrigin;if(typeof i!="number"){let r=As.otperformance;i=r.timing&&r.timing.fetchStart}return i}M.getTimeOrigin=Ps;function El(i){let r=Pr(Ps()),o=Pr(typeof i=="number"?i:As.otperformance.now());return gl(r,o)}M.hrTime=El;function K_(i){if(Ns(i))return i;if(typeof i=="number")return i<Ps()?El(i):Pr(i);if(i instanceof Date)return Pr(i.getTime());throw TypeError("Invalid input type")}M.timeInputToHrTime=K_;function X_(i,r){let o=r[0]-i[0],c=r[1]-i[1];return c<0&&(o-=1,c+=On),[o,c]}M.hrTimeDuration=X_;function z_(i){let r=yl,o=`${"0".repeat(r)}${i[1]}Z`,c=o.substr(o.length-r-1);return new Date(i[0]*1e3).toISOString().replace("000Z",c)}M.hrTimeToTimeStamp=z_;function $_(i){return i[0]*On+i[1]}M.hrTimeToNanoseconds=$_;function Y_(i){return i[0]*1e3+i[1]/1e6}M.hrTimeToMilliseconds=Y_;function W_(i){return i[0]*1e6+i[1]/1e3}M.hrTimeToMicroseconds=W_;function Ns(i){return Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"}M.isTimeInputHrTime=Ns;function J_(i){return Ns(i)||typeof i=="number"||i instanceof Date}M.isTimeInput=J_;function gl(i,r){let o=[i[0]+r[0],i[1]+r[1]];return o[1]>=On&&(o[1]-=On,o[0]+=1),o}M.addHrTimes=gl});var Sl=d(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0})});var bl=d(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.ExportResultCode=void 0;var Q_;(function(i){i[i.SUCCESS=0]="SUCCESS",i[i.FAILED=1]="FAILED"})(Q_=Nr.ExportResultCode||(Nr.ExportResultCode={}))});var Al=d(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.CompositePropagator=void 0;var Ol=(y(),E(_)),Rs=class{constructor(r={}){var o;this._propagators=(o=r.propagators)!==null&&o!==void 0?o:[],this._fields=Array.from(new Set(this._propagators.map(c=>typeof c.fields=="function"?c.fields():[]).reduce((c,s)=>c.concat(s),[])))}inject(r,o,c){for(let s of this._propagators)try{s.inject(r,o,c)}catch(a){Ol.diag.warn(`Failed to inject with ${s.constructor.name}. Err: ${a.message}`)}}extract(r,o,c){return this._propagators.reduce((s,a)=>{try{return a.extract(s,o,c)}catch(t){Ol.diag.warn(`Failed to inject with ${a.constructor.name}. Err: ${t.message}`)}return s},r)}fields(){return this._fields.slice()}};An.CompositePropagator=Rs});var Pl=d(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.validateValue=At.validateKey=void 0;var xs="[_0-9a-z-*/]",Z_=`[a-z]${xs}{0,255}`,ey=`[a-z0-9]${xs}{0,240}@[a-z]${xs}{0,13}`,ty=new RegExp(`^(?:${Z_}|${ey})$`),ry=/^[ -~]{0,255}[!-~]$/,ny=/,|=/;function oy(i){return ty.test(i)}At.validateKey=oy;function iy(i){return ry.test(i)&&!ny.test(i)}At.validateValue=iy});var Ls=d(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.TraceState=void 0;var Nl=Pl(),Rl=32,sy=512,xl=",",Il="=",Is=class i{constructor(r){this._internalState=new Map,r&&this._parse(r)}set(r,o){let c=this._clone();return c._internalState.has(r)&&c._internalState.delete(r),c._internalState.set(r,o),c}unset(r){let o=this._clone();return o._internalState.delete(r),o}get(r){return this._internalState.get(r)}serialize(){return this._keys().reduce((r,o)=>(r.push(o+Il+this.get(o)),r),[]).join(xl)}_parse(r){r.length>sy||(this._internalState=r.split(xl).reverse().reduce((o,c)=>{let s=c.trim(),a=s.indexOf(Il);if(a!==-1){let t=s.slice(0,a),e=s.slice(a+1,c.length);(0,Nl.validateKey)(t)&&(0,Nl.validateValue)(e)&&o.set(t,e)}return o},new Map),this._internalState.size>Rl&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Rl))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let r=new i;return r._internalState=new Map(this._internalState),r}};Pn.TraceState=Is});var wl=d(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.W3CTraceContextPropagator=te.parseTraceParent=te.TRACE_STATE_HEADER=te.TRACE_PARENT_HEADER=void 0;var Nn=(y(),E(_)),uy=br(),ay=Ls();te.TRACE_PARENT_HEADER="traceparent";te.TRACE_STATE_HEADER="tracestate";var cy="00",ly="(?!ff)[\\da-f]{2}",py="(?![0]{32})[\\da-f]{32}",fy="(?![0]{16})[\\da-f]{16}",dy="[\\da-f]{2}",hy=new RegExp(`^\\s?(${ly})-(${py})-(${fy})-(${dy})(-.*)?\\s?$`);function Ll(i){let r=hy.exec(i);return!r||r[1]==="00"&&r[5]?null:{traceId:r[2],spanId:r[3],traceFlags:parseInt(r[4],16)}}te.parseTraceParent=Ll;var ws=class{inject(r,o,c){let s=Nn.trace.getSpanContext(r);if(!s||(0,uy.isTracingSuppressed)(r)||!(0,Nn.isSpanContextValid)(s))return;let a=`${cy}-${s.traceId}-${s.spanId}-0${Number(s.traceFlags||Nn.TraceFlags.NONE).toString(16)}`;c.set(o,te.TRACE_PARENT_HEADER,a),s.traceState&&c.set(o,te.TRACE_STATE_HEADER,s.traceState.serialize())}extract(r,o,c){let s=c.get(o,te.TRACE_PARENT_HEADER);if(!s)return r;let a=Array.isArray(s)?s[0]:s;if(typeof a!="string")return r;let t=Ll(a);if(!t)return r;t.isRemote=!0;let e=c.get(o,te.TRACE_STATE_HEADER);if(e){let n=Array.isArray(e)?e.join(","):e;t.traceState=new ay.TraceState(typeof n=="string"?n:void 0)}return Nn.trace.setSpanContext(r,t)}fields(){return[te.TRACE_PARENT_HEADER,te.TRACE_STATE_HEADER]}};te.W3CTraceContextPropagator=ws});var Cl=d(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0})});var Ul=d(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.getRPCMetadata=Ee.deleteRPCMetadata=Ee.setRPCMetadata=Ee.RPCType=void 0;var my=(y(),E(_)),Ms=(0,my.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),_y;(function(i){i.HTTP="http"})(_y=Ee.RPCType||(Ee.RPCType={}));function yy(i,r){return i.setValue(Ms,r)}Ee.setRPCMetadata=yy;function Ey(i){return i.deleteValue(Ms)}Ee.deleteRPCMetadata=Ey;function gy(i){return i.getValue(Ms)}Ee.getRPCMetadata=gy});var Us=d(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.AlwaysOffSampler=void 0;var vy=(y(),E(_)),Cs=class{shouldSample(){return{decision:vy.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Rn.AlwaysOffSampler=Cs});var Bs=d(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.AlwaysOnSampler=void 0;var Ty=(y(),E(_)),Ds=class{shouldSample(){return{decision:Ty.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};xn.AlwaysOnSampler=Ds});var Bl=d(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.ParentBasedSampler=void 0;var In=(y(),E(_)),Sy=gs(),Dl=Us(),Vs=Bs(),ks=class{constructor(r){var o,c,s,a;this._root=r.root,this._root||((0,Sy.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Vs.AlwaysOnSampler),this._remoteParentSampled=(o=r.remoteParentSampled)!==null&&o!==void 0?o:new Vs.AlwaysOnSampler,this._remoteParentNotSampled=(c=r.remoteParentNotSampled)!==null&&c!==void 0?c:new Dl.AlwaysOffSampler,this._localParentSampled=(s=r.localParentSampled)!==null&&s!==void 0?s:new Vs.AlwaysOnSampler,this._localParentNotSampled=(a=r.localParentNotSampled)!==null&&a!==void 0?a:new Dl.AlwaysOffSampler}shouldSample(r,o,c,s,a,t){let e=In.trace.getSpanContext(r);return!e||!(0,In.isSpanContextValid)(e)?this._root.shouldSample(r,o,c,s,a,t):e.isRemote?e.traceFlags&In.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(r,o,c,s,a,t):this._remoteParentNotSampled.shouldSample(r,o,c,s,a,t):e.traceFlags&In.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(r,o,c,s,a,t):this._localParentNotSampled.shouldSample(r,o,c,s,a,t)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};Ln.ParentBasedSampler=ks});var Vl=d(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.TraceIdRatioBasedSampler=void 0;var qs=(y(),E(_)),js=class{constructor(r=0){this._ratio=r,this._ratio=this._normalize(r),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(r,o){return{decision:(0,qs.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?qs.SamplingDecision.RECORD_AND_SAMPLED:qs.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(r){return typeof r!="number"||isNaN(r)?0:r>=1?1:r<=0?0:r}_accumulate(r){let o=0;for(let c=0;c<r.length/8;c++){let s=c*8,a=parseInt(r.slice(s,s+8),16);o=(o^a)>>>0}return o}};wn.TraceIdRatioBasedSampler=js});var Hl=d(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.isPlainObject=void 0;var by="[object Object]",Oy="[object Null]",Ay="[object Undefined]",Py=Function.prototype,kl=Py.toString,Ny=kl.call(Object),Ry=xy(Object.getPrototypeOf,Object),ql=Object.prototype,jl=ql.hasOwnProperty,nt=Symbol?Symbol.toStringTag:void 0,Gl=ql.toString;function xy(i,r){return function(o){return i(r(o))}}function Iy(i){if(!Ly(i)||wy(i)!==by)return!1;let r=Ry(i);if(r===null)return!0;let o=jl.call(r,"constructor")&&r.constructor;return typeof o=="function"&&o instanceof o&&kl.call(o)===Ny}Mn.isPlainObject=Iy;function Ly(i){return i!=null&&typeof i=="object"}function wy(i){return i==null?i===void 0?Ay:Oy:nt&&nt in Object(i)?My(i):Cy(i)}function My(i){let r=jl.call(i,nt),o=i[nt],c=!1;try{i[nt]=void 0,c=!0}catch{}let s=Gl.call(i);return c&&(r?i[nt]=o:delete i[nt]),s}function Cy(i){return Gl.call(i)}});var $l=d(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.merge=void 0;var Fl=Hl(),Uy=20;function Dy(...i){let r=i.shift(),o=new WeakMap;for(;i.length>0;)r=Xl(r,i.shift(),0,o);return r}Dn.merge=Dy;function Gs(i){return Un(i)?i.slice():i}function Xl(i,r,o=0,c){let s;if(!(o>Uy)){if(o++,Cn(i)||Cn(r)||zl(r))s=Gs(r);else if(Un(i)){if(s=i.slice(),Un(r))for(let a=0,t=r.length;a<t;a++)s.push(Gs(r[a]));else if(Rr(r)){let a=Object.keys(r);for(let t=0,e=a.length;t<e;t++){let n=a[t];s[n]=Gs(r[n])}}}else if(Rr(i))if(Rr(r)){if(!By(i,r))return r;s=Object.assign({},i);let a=Object.keys(r);for(let t=0,e=a.length;t<e;t++){let n=a[t],u=r[n];if(Cn(u))typeof u>"u"?delete s[n]:s[n]=u;else{let l=s[n],h=u;if(Kl(i,n,c)||Kl(r,n,c))delete s[n];else{if(Rr(l)&&Rr(h)){let T=c.get(l)||[],D=c.get(h)||[];T.push({obj:i,key:n}),D.push({obj:r,key:n}),c.set(l,T),c.set(h,D)}s[n]=Xl(s[n],u,o,c)}}}}else s=r;return s}}function Kl(i,r,o){let c=o.get(i[r])||[];for(let s=0,a=c.length;s<a;s++){let t=c[s];if(t.key===r&&t.obj===i)return!0}return!1}function Un(i){return Array.isArray(i)}function zl(i){return typeof i=="function"}function Rr(i){return!Cn(i)&&!Un(i)&&!zl(i)&&typeof i=="object"}function Cn(i){return typeof i=="string"||typeof i=="number"||typeof i=="boolean"||typeof i>"u"||i instanceof Date||i instanceof RegExp||i===null}function By(i,r){return!(!(0,Fl.isPlainObject)(i)||!(0,Fl.isPlainObject)(r))}});var Yl=d(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.callWithTimeout=Pt.TimeoutError=void 0;var Bn=class i extends Error{constructor(r){super(r),Object.setPrototypeOf(this,i.prototype)}};Pt.TimeoutError=Bn;function Vy(i,r){let o,c=new Promise(function(a,t){o=setTimeout(function(){t(new Bn("Operation timed out."))},r)});return Promise.race([i,c]).then(s=>(clearTimeout(o),s),s=>{throw clearTimeout(o),s})}Pt.callWithTimeout=Vy});var Jl=d(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.isUrlIgnored=Nt.urlMatches=void 0;function Wl(i,r){return typeof r=="string"?i===r:!!i.match(r)}Nt.urlMatches=Wl;function ky(i,r){if(!r)return!1;for(let o of r)if(Wl(i,o))return!0;return!1}Nt.isUrlIgnored=ky});var Ql=d(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.isWrapped=void 0;function qy(i){return typeof i=="function"&&typeof i.__original=="function"&&typeof i.__unwrap=="function"&&i.__wrapped===!0}Vn.isWrapped=qy});var Zl=d(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.Deferred=void 0;var Hs=class{constructor(){this._promise=new Promise((r,o)=>{this._resolve=r,this._reject=o})}get promise(){return this._promise}resolve(r){this._resolve(r)}reject(r){this._reject(r)}};kn.Deferred=Hs});var ep=d(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.BindOnceFuture=void 0;var jy=Zl(),Fs=class{constructor(r,o){this._callback=r,this._that=o,this._isCalled=!1,this._deferred=new jy.Deferred}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...r){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...r)).then(o=>this._deferred.resolve(o),o=>this._deferred.reject(o))}catch(o){this._deferred.reject(o)}}return this._deferred.promise}};qn.BindOnceFuture=Fs});var rp=d(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn._export=void 0;var tp=(y(),E(_)),Gy=br();function Hy(i,r){return new Promise(o=>{tp.context.with((0,Gy.suppressTracing)(tp.context.active()),()=>{i.export(r,c=>{o(c)})})})}jn._export=Hy});var N=d(P=>{"use strict";var Fy=P&&P.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),w=P&&P.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Fy(r,i,o)};Object.defineProperty(P,"__esModule",{value:!0});P.internal=P.baggageUtils=void 0;w(Kc(),P);w(Xc(),P);w(Jc(),P);w(gs(),P);w(Es(),P);w(vl(),P);w(Sl(),P);w(bl(),P);P.baggageUtils=ds();w(Os(),P);w(Al(),P);w(wl(),P);w(Cl(),P);w(Ul(),P);w(Us(),P);w(Bs(),P);w(Bl(),P);w(Vl(),P);w(br(),P);w(Ls(),P);w(hn(),P);w($l(),P);w(vs(),P);w(Yl(),P);w(Jl(),P);w(Ql(),P);w(ep(),P);w(bs(),P);var Ky=rp();P.internal={_export:Ky._export}});var np=d(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.ExceptionEventName=void 0;Gn.ExceptionEventName="exception"});var Xs=d(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.Span=void 0;var Ae=(y(),E(_)),re=N(),ot=fe(),Xy=np(),Ks=class{constructor(r,o,c,s,a,t,e=[],n,u,l){this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:Ae.SpanStatusCode.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=c,this._spanContext=s,this.parentSpanId=t,this.kind=a,this.links=e;let h=Date.now();this._performanceStartTime=re.otperformance.now(),this._performanceOffset=h-(this._performanceStartTime+(0,re.getTimeOrigin)()),this._startTimeProvided=n!=null,this.startTime=this._getTime(n??h),this.resource=r.resource,this.instrumentationLibrary=r.instrumentationLibrary,this._spanLimits=r.getSpanLimits(),l!=null&&this.setAttributes(l),this._spanProcessor=r.getActiveSpanProcessor(),this._spanProcessor.onStart(this,o),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0}spanContext(){return this._spanContext}setAttribute(r,o){return o==null||this._isSpanEnded()?this:r.length===0?(Ae.diag.warn(`Invalid attribute key: ${r}`),this):(0,re.isAttributeValue)(o)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,r)?(this._droppedAttributesCount++,this):(this.attributes[r]=this._truncateToSize(o),this):(Ae.diag.warn(`Invalid attribute value set for key: ${r}`),this)}setAttributes(r){for(let[o,c]of Object.entries(r))this.setAttribute(o,c);return this}addEvent(r,o,c){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return Ae.diag.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(Ae.diag.warn("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),(0,re.isTimeInput)(o)&&((0,re.isTimeInput)(c)||(c=o),o=void 0);let s=(0,re.sanitizeAttributes)(o);return this.events.push({name:r,attributes:s,time:this._getTime(c),droppedAttributesCount:0}),this}setStatus(r){return this._isSpanEnded()?this:(this.status=r,this)}updateName(r){return this._isSpanEnded()?this:(this.name=r,this)}end(r){if(this._isSpanEnded()){Ae.diag.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);return}this._ended=!0,this.endTime=this._getTime(r),this._duration=(0,re.hrTimeDuration)(this.startTime,this.endTime),this._duration[0]<0&&(Ae.diag.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._spanProcessor.onEnd(this)}_getTime(r){if(typeof r=="number"&&r<re.otperformance.now())return(0,re.hrTime)(r+this._performanceOffset);if(typeof r=="number")return(0,re.millisToHrTime)(r);if(r instanceof Date)return(0,re.millisToHrTime)(r.getTime());if((0,re.isTimeInputHrTime)(r))return r;if(this._startTimeProvided)return(0,re.millisToHrTime)(Date.now());let o=re.otperformance.now()-this._performanceStartTime;return(0,re.addHrTimes)(this.startTime,(0,re.millisToHrTime)(o))}isRecording(){return this._ended===!1}recordException(r,o){let c={};typeof r=="string"?c[ot.SemanticAttributes.EXCEPTION_MESSAGE]=r:r&&(r.code?c[ot.SemanticAttributes.EXCEPTION_TYPE]=r.code.toString():r.name&&(c[ot.SemanticAttributes.EXCEPTION_TYPE]=r.name),r.message&&(c[ot.SemanticAttributes.EXCEPTION_MESSAGE]=r.message),r.stack&&(c[ot.SemanticAttributes.EXCEPTION_STACKTRACE]=r.stack)),c[ot.SemanticAttributes.EXCEPTION_TYPE]||c[ot.SemanticAttributes.EXCEPTION_MESSAGE]?this.addEvent(Xy.ExceptionEventName,c,o):Ae.diag.warn(`Failed to record an exception ${r}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){return this._ended&&Ae.diag.warn(`Can not execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`),this._ended}_truncateToLimitUtil(r,o){return r.length<=o?r:r.substr(0,o)}_truncateToSize(r){let o=this._attributeValueLengthLimit;return o<=0?(Ae.diag.warn(`Attribute value limit must be positive, got ${o}`),r):typeof r=="string"?this._truncateToLimitUtil(r,o):Array.isArray(r)?r.map(c=>typeof c=="string"?this._truncateToLimitUtil(c,o):c):r}};Hn.Span=Ks});var Ir=d(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.SamplingDecision=void 0;var zy;(function(i){i[i.NOT_RECORD=0]="NOT_RECORD",i[i.RECORD=1]="RECORD",i[i.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(zy=xr.SamplingDecision||(xr.SamplingDecision={}))});var Kn=d(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.AlwaysOffSampler=void 0;var $y=Ir(),zs=class{shouldSample(){return{decision:$y.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Fn.AlwaysOffSampler=zs});var zn=d(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.AlwaysOnSampler=void 0;var Yy=Ir(),$s=class{shouldSample(){return{decision:Yy.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};Xn.AlwaysOnSampler=$s});var Js=d(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.ParentBasedSampler=void 0;var $n=(y(),E(_)),Wy=N(),op=Kn(),Ys=zn(),Ws=class{constructor(r){var o,c,s,a;this._root=r.root,this._root||((0,Wy.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Ys.AlwaysOnSampler),this._remoteParentSampled=(o=r.remoteParentSampled)!==null&&o!==void 0?o:new Ys.AlwaysOnSampler,this._remoteParentNotSampled=(c=r.remoteParentNotSampled)!==null&&c!==void 0?c:new op.AlwaysOffSampler,this._localParentSampled=(s=r.localParentSampled)!==null&&s!==void 0?s:new Ys.AlwaysOnSampler,this._localParentNotSampled=(a=r.localParentNotSampled)!==null&&a!==void 0?a:new op.AlwaysOffSampler}shouldSample(r,o,c,s,a,t){let e=$n.trace.getSpanContext(r);return!e||!(0,$n.isSpanContextValid)(e)?this._root.shouldSample(r,o,c,s,a,t):e.isRemote?e.traceFlags&$n.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(r,o,c,s,a,t):this._remoteParentNotSampled.shouldSample(r,o,c,s,a,t):e.traceFlags&$n.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(r,o,c,s,a,t):this._localParentNotSampled.shouldSample(r,o,c,s,a,t)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};Yn.ParentBasedSampler=Ws});var Zs=d(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.TraceIdRatioBasedSampler=void 0;var Jy=(y(),E(_)),ip=Ir(),Qs=class{constructor(r=0){this._ratio=r,this._ratio=this._normalize(r),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(r,o){return{decision:(0,Jy.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?ip.SamplingDecision.RECORD_AND_SAMPLED:ip.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(r){return typeof r!="number"||isNaN(r)?0:r>=1?1:r<=0?0:r}_accumulate(r){let o=0;for(let c=0;c<r.length/8;c++){let s=c*8,a=parseInt(r.slice(s,s+8),16);o=(o^a)>>>0}return o}};Wn.TraceIdRatioBasedSampler=Qs});var ru=d(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.buildSamplerFromEnv=xt.loadDefaultConfig=void 0;var Jn=(y(),E(_)),W=N(),sp=Kn(),eu=zn(),tu=Js(),up=Zs(),Qy=(0,W.getEnv)(),Zy=W.TracesSamplerValues.AlwaysOn,Rt=1;function eE(){return{sampler:cp(Qy),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,W.getEnv)().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,W.getEnv)().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:(0,W.getEnv)().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,W.getEnv)().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:(0,W.getEnv)().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:(0,W.getEnv)().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:(0,W.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:(0,W.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}xt.loadDefaultConfig=eE;function cp(i=(0,W.getEnv)()){switch(i.OTEL_TRACES_SAMPLER){case W.TracesSamplerValues.AlwaysOn:return new eu.AlwaysOnSampler;case W.TracesSamplerValues.AlwaysOff:return new sp.AlwaysOffSampler;case W.TracesSamplerValues.ParentBasedAlwaysOn:return new tu.ParentBasedSampler({root:new eu.AlwaysOnSampler});case W.TracesSamplerValues.ParentBasedAlwaysOff:return new tu.ParentBasedSampler({root:new sp.AlwaysOffSampler});case W.TracesSamplerValues.TraceIdRatio:return new up.TraceIdRatioBasedSampler(ap(i));case W.TracesSamplerValues.ParentBasedTraceIdRatio:return new tu.ParentBasedSampler({root:new up.TraceIdRatioBasedSampler(ap(i))});default:return Jn.diag.error(`OTEL_TRACES_SAMPLER value "${i.OTEL_TRACES_SAMPLER} invalid, defaulting to ${Zy}".`),new eu.AlwaysOnSampler}}xt.buildSamplerFromEnv=cp;function ap(i){if(i.OTEL_TRACES_SAMPLER_ARG===void 0||i.OTEL_TRACES_SAMPLER_ARG==="")return Jn.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${Rt}.`),Rt;let r=Number(i.OTEL_TRACES_SAMPLER_ARG);return isNaN(r)?(Jn.diag.error(`OTEL_TRACES_SAMPLER_ARG=${i.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${Rt}.`),Rt):r<0||r>1?(Jn.diag.error(`OTEL_TRACES_SAMPLER_ARG=${i.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${Rt}.`),Rt):r}});var ou=d(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.reconfigureLimits=It.mergeConfig=void 0;var lp=ru(),nu=N();function tE(i){let r={sampler:(0,lp.buildSamplerFromEnv)()},o=(0,lp.loadDefaultConfig)(),c=Object.assign({},o,r,i);return c.generalLimits=Object.assign({},o.generalLimits,i.generalLimits||{}),c.spanLimits=Object.assign({},o.spanLimits,i.spanLimits||{}),c}It.mergeConfig=tE;function rE(i){var r,o,c,s,a,t,e,n,u,l,h,T;let D=Object.assign({},i.spanLimits),L=(0,nu.getEnvWithoutDefaults)();return D.attributeCountLimit=(t=(a=(s=(o=(r=i.spanLimits)===null||r===void 0?void 0:r.attributeCountLimit)!==null&&o!==void 0?o:(c=i.generalLimits)===null||c===void 0?void 0:c.attributeCountLimit)!==null&&s!==void 0?s:L.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&a!==void 0?a:L.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&t!==void 0?t:nu.DEFAULT_ATTRIBUTE_COUNT_LIMIT,D.attributeValueLengthLimit=(T=(h=(l=(n=(e=i.spanLimits)===null||e===void 0?void 0:e.attributeValueLengthLimit)!==null&&n!==void 0?n:(u=i.generalLimits)===null||u===void 0?void 0:u.attributeValueLengthLimit)!==null&&l!==void 0?l:L.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&h!==void 0?h:L.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&T!==void 0?T:nu.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},i,{spanLimits:D})}It.reconfigureLimits=rE});var pp=d(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.BatchSpanProcessorBase=void 0;var Lt=(y(),E(_)),it=N(),iu=class{constructor(r,o){this._exporter=r,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;let c=(0,it.getEnv)();this._maxExportBatchSize=typeof o?.maxExportBatchSize=="number"?o.maxExportBatchSize:c.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof o?.maxQueueSize=="number"?o.maxQueueSize:c.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof o?.scheduledDelayMillis=="number"?o.scheduledDelayMillis:c.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof o?.exportTimeoutMillis=="number"?o.exportTimeoutMillis:c.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new it.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(Lt.diag.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}onStart(r,o){}onEnd(r){this._shutdownOnce.isCalled||r.spanContext().traceFlags&Lt.TraceFlags.SAMPLED&&this._addToBuffer(r)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>this._exporter.shutdown())}_addToBuffer(r){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&Lt.diag.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(Lt.diag.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(r),this._maybeStartTimer()}_flushAll(){return new Promise((r,o)=>{let c=[],s=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let a=0,t=s;a<t;a++)c.push(this._flushOneBatch());Promise.all(c).then(()=>{r()}).catch(o)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((r,o)=>{let c=setTimeout(()=>{o(new Error("Timeout"))},this._exportTimeoutMillis);Lt.context.with((0,it.suppressTracing)(Lt.context.active()),()=>{let s=this._finishedSpans.splice(0,this._maxExportBatchSize),a=()=>this._exporter.export(s,e=>{var n;clearTimeout(c),e.code===it.ExportResultCode.SUCCESS?r():o((n=e.error)!==null&&n!==void 0?n:new Error("BatchSpanProcessor: span export failed"))}),t=s.map(e=>e.resource).filter(e=>e.asyncAttributesPending);t.length===0?a():Promise.all(t.map(e=>{var n;return(n=e.waitForAsyncAttributes)===null||n===void 0?void 0:n.call(e)})).then(a,e=>{(0,it.globalErrorHandler)(e),o(e)})})})}_maybeStartTimer(){if(this._isExporting)return;let r=()=>{this._isExporting=!0,this._flushOneBatch().then(()=>{this._isExporting=!1,this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(o=>{this._isExporting=!1,(0,it.globalErrorHandler)(o)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return r();this._timer===void 0&&(this._timer=setTimeout(()=>r(),this._scheduledDelayMillis),(0,it.unrefTimer)(this._timer))}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}};Qn.BatchSpanProcessorBase=iu});var fp=d(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.BatchSpanProcessor=void 0;var nE=pp(),su=class extends nE.BatchSpanProcessorBase{onShutdown(){}};Zn.BatchSpanProcessor=su});var mp=d(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.RandomIdGenerator=void 0;var oE=8,hp=16,uu=class{constructor(){this.generateTraceId=dp(hp),this.generateSpanId=dp(oE)}};to.RandomIdGenerator=uu;var eo=Buffer.allocUnsafe(hp);function dp(i){return function(){for(let o=0;o<i/4;o++)eo.writeUInt32BE(Math.random()*2**32>>>0,o*4);for(let o=0;o<i&&!(eo[o]>0);o++)o===i-1&&(eo[i-1]=1);return eo.toString("hex",0,i)}}});var yp=d(qe=>{"use strict";var iE=qe&&qe.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),_p=qe&&qe.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&iE(r,i,o)};Object.defineProperty(qe,"__esModule",{value:!0});_p(fp(),qe);_p(mp(),qe)});var ro=d(st=>{"use strict";var sE=st&&st.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),uE=st&&st.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&sE(r,i,o)};Object.defineProperty(st,"__esModule",{value:!0});uE(yp(),st)});var Ep=d(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.Tracer=void 0;var J=(y(),E(_)),no=N(),aE=Xs(),cE=ou(),lE=ro(),au=class{constructor(r,o,c){this._tracerProvider=c;let s=(0,cE.mergeConfig)(o);this._sampler=s.sampler,this._generalLimits=s.generalLimits,this._spanLimits=s.spanLimits,this._idGenerator=o.idGenerator||new lE.RandomIdGenerator,this.resource=c.resource,this.instrumentationLibrary=r}startSpan(r,o={},c=J.context.active()){var s,a,t;o.root&&(c=J.trace.deleteSpan(c));let e=J.trace.getSpan(c);if((0,no.isTracingSuppressed)(c))return J.diag.debug("Instrumentation suppressed, returning Noop Span"),J.trace.wrapSpanContext(J.INVALID_SPAN_CONTEXT);let n=e?.spanContext(),u=this._idGenerator.generateSpanId(),l,h,T;!n||!J.trace.isSpanContextValid(n)?l=this._idGenerator.generateTraceId():(l=n.traceId,h=n.traceState,T=n.spanId);let D=(s=o.kind)!==null&&s!==void 0?s:J.SpanKind.INTERNAL,L=((a=o.links)!==null&&a!==void 0?a:[]).map(St=>({context:St.context,attributes:(0,no.sanitizeAttributes)(St.attributes)})),x=(0,no.sanitizeAttributes)(o.attributes),B=this._sampler.shouldSample(c,l,r,D,x,L);h=(t=B.traceState)!==null&&t!==void 0?t:h;let b=B.decision===J.SamplingDecision.RECORD_AND_SAMPLED?J.TraceFlags.SAMPLED:J.TraceFlags.NONE,S={traceId:l,spanId:u,traceFlags:b,traceState:h};if(B.decision===J.SamplingDecision.NOT_RECORD)return J.diag.debug("Recording is off, propagating context in a non-recording span"),J.trace.wrapSpanContext(S);let K=(0,no.sanitizeAttributes)(Object.assign(x,B.attributes));return new aE.Span(this,c,r,S,D,T,L,o.startTime,void 0,K)}startActiveSpan(r,o,c,s){let a,t,e;if(arguments.length<2)return;arguments.length===2?e=o:arguments.length===3?(a=o,e=c):(a=o,t=c,e=s);let n=t??J.context.active(),u=this.startSpan(r,a,n),l=J.trace.setSpan(n,u);return J.context.with(l,e,void 0,u)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}getActiveSpanProcessor(){return this._tracerProvider.getActiveSpanProcessor()}};oo.Tracer=au});var gp=d(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.defaultServiceName=void 0;function pE(){return`unknown_service:${process.argv0}`}io.defaultServiceName=pE});var cu=d(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.normalizeType=wt.normalizeArch=void 0;var fE=i=>{switch(i){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return i}};wt.normalizeArch=fE;var dE=i=>{switch(i){case"sunos":return"solaris";case"win32":return"windows";default:return i}};wt.normalizeType=dE});var uo=d(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.execAsync=void 0;var hE=X("child_process"),mE=X("util");so.execAsync=mE.promisify(hE.exec)});var vp=d(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.getMachineId=void 0;var _E=uo(),yE=(y(),E(_));async function EE(){try{let r=(await(0,_E.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"')).stdout.split(`
|
|
8
|
-
`).find(c=>c.includes("IOPlatformUUID"));if(!r)return"";let o=r.split('" = "');if(o.length===2)return o[1].slice(0,-1)}catch(i){yE.diag.debug(`error reading machine id: ${i}`)}return""}ao.getMachineId=EE});var Tp=d(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.getMachineId=void 0;var gE=X("fs"),vE=(y(),E(_));async function TE(){let i=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let r of i)try{return(await gE.promises.readFile(r,{encoding:"utf8"})).trim()}catch(o){vE.diag.debug(`error reading machine id: ${o}`)}return""}co.getMachineId=TE});var bp=d(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.getMachineId=void 0;var SE=X("fs"),bE=uo(),Sp=(y(),E(_));async function OE(){try{return(await SE.promises.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(i){Sp.diag.debug(`error reading machine id: ${i}`)}try{return(await(0,bE.execAsync)("kenv -q smbios.system.uuid")).stdout.trim()}catch(i){Sp.diag.debug(`error reading machine id: ${i}`)}return""}lo.getMachineId=OE});var Ap=d(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.getMachineId=void 0;var Op=X("process"),AE=uo(),PE=(y(),E(_));async function NE(){let i="QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",r="%windir%\\System32\\REG.exe";Op.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in Op.env&&(r="%windir%\\sysnative\\cmd.exe /c "+r);try{let c=(await(0,AE.execAsync)(`${r} ${i}`)).stdout.split("REG_SZ");if(c.length===2)return c[1].trim()}catch(o){PE.diag.debug(`error reading machine id: ${o}`)}return""}po.getMachineId=NE});var Pp=d(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.getMachineId=void 0;var RE=(y(),E(_));async function xE(){return RE.diag.debug("could not read machine-id: unsupported platform"),""}fo.getMachineId=xE});var Np=d(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.getMachineId=void 0;var IE=X("process"),Mt;Ie.getMachineId=Mt;switch(IE.platform){case"darwin":Ie.getMachineId=Mt=vp().getMachineId;break;case"linux":Ie.getMachineId=Mt=Tp().getMachineId;break;case"freebsd":Ie.getMachineId=Mt=bp().getMachineId;break;case"win32":Ie.getMachineId=Mt=Ap().getMachineId;break;default:Ie.getMachineId=Mt=Pp().getMachineId}});var fu=d(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.hostDetectorSync=void 0;var lu=fe(),LE=ut(),Rp=X("os"),wE=cu(),ME=Np(),pu=class{detect(r){let o={[lu.SemanticResourceAttributes.HOST_NAME]:(0,Rp.hostname)(),[lu.SemanticResourceAttributes.HOST_ARCH]:(0,wE.normalizeArch)((0,Rp.arch)())};return new LE.Resource(o,this._getAsyncAttributes())}_getAsyncAttributes(){return(0,ME.getMachineId)().then(r=>{let o={};return r&&(o[lu.SemanticResourceAttributes.HOST_ID]=r),o})}};ho.hostDetectorSync=new pu});var xp=d(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.hostDetector=void 0;var CE=fu(),du=class{detect(r){return Promise.resolve(CE.hostDetectorSync.detect(r))}};mo.hostDetector=new du});var mu=d(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.osDetectorSync=void 0;var Ip=fe(),UE=ut(),Lp=X("os"),DE=cu(),hu=class{detect(r){let o={[Ip.SemanticResourceAttributes.OS_TYPE]:(0,DE.normalizeType)((0,Lp.platform)()),[Ip.SemanticResourceAttributes.OS_VERSION]:(0,Lp.release)()};return new UE.Resource(o)}};_o.osDetectorSync=new hu});var wp=d(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.osDetector=void 0;var BE=mu(),_u=class{detect(r){return Promise.resolve(BE.osDetectorSync.detect(r))}};yo.osDetector=new _u});var Eu=d(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});Eo.processDetectorSync=void 0;var VE=(y(),E(_)),Le=fe(),kE=ut(),qE=X("os"),yu=class{detect(r){let o={[Le.SemanticResourceAttributes.PROCESS_PID]:process.pid,[Le.SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME]:process.title,[Le.SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH]:process.execPath,[Le.SemanticResourceAttributes.PROCESS_COMMAND_ARGS]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[Le.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]:process.versions.node,[Le.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"nodejs",[Le.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]:"Node.js"};process.argv.length>1&&(o[Le.SemanticResourceAttributes.PROCESS_COMMAND]=process.argv[1]);try{let c=qE.userInfo();o[Le.SemanticResourceAttributes.PROCESS_OWNER]=c.username}catch(c){VE.diag.debug(`error obtaining process owner: ${c}`)}return new kE.Resource(o)}};Eo.processDetectorSync=new yu});var Mp=d(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.processDetector=void 0;var jE=Eu(),gu=class{detect(r){return Promise.resolve(jE.processDetectorSync.detect(r))}};go.processDetector=new gu});var Cp=d(ce=>{"use strict";var GE=ce&&ce.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),at=ce&&ce.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&GE(r,i,o)};Object.defineProperty(ce,"__esModule",{value:!0});at(gp(),ce);at(xp(),ce);at(wp(),ce);at(fu(),ce);at(mu(),ce);at(Mp(),ce);at(Eu(),ce)});var vu=d(ct=>{"use strict";var HE=ct&&ct.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),FE=ct&&ct.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&HE(r,i,o)};Object.defineProperty(ct,"__esModule",{value:!0});FE(Cp(),ct)});var ut=d(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.Resource=void 0;var Up=(y(),E(_)),lt=fe(),Tu=N(),KE=vu(),Lr=class i{constructor(r,o){var c;this._attributes=r,this.asyncAttributesPending=o!=null,this._syncAttributes=(c=this._attributes)!==null&&c!==void 0?c:{},this._asyncAttributesPromise=o?.then(s=>(this._attributes=Object.assign({},this._attributes,s),this.asyncAttributesPending=!1,s),s=>(Up.diag.debug("a resource's async attributes promise rejected: %s",s),this.asyncAttributesPending=!1,{}))}static empty(){return i.EMPTY}static default(){return new i({[lt.SemanticResourceAttributes.SERVICE_NAME]:(0,KE.defaultServiceName)(),[lt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:Tu.SDK_INFO[lt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE],[lt.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:Tu.SDK_INFO[lt.SemanticResourceAttributes.TELEMETRY_SDK_NAME],[lt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:Tu.SDK_INFO[lt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]})}get attributes(){var r;return this.asyncAttributesPending&&Up.diag.error("Accessing resource attributes before async attributes settled"),(r=this._attributes)!==null&&r!==void 0?r:{}}async waitForAsyncAttributes(){this.asyncAttributesPending&&await this._asyncAttributesPromise}merge(r){var o;if(!r)return this;let c=Object.assign(Object.assign({},this._syncAttributes),(o=r._syncAttributes)!==null&&o!==void 0?o:r.attributes);if(!this._asyncAttributesPromise&&!r._asyncAttributesPromise)return new i(c);let s=Promise.all([this._asyncAttributesPromise,r._asyncAttributesPromise]).then(([a,t])=>{var e;return Object.assign(Object.assign(Object.assign(Object.assign({},this._syncAttributes),a),(e=r._syncAttributes)!==null&&e!==void 0?e:r.attributes),t)});return new i(c,s)}};vo.Resource=Lr;Lr.EMPTY=new Lr({})});var Bp=d(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0})});var kp=d(Vp=>{"use strict";Object.defineProperty(Vp,"__esModule",{value:!0})});var jp=d(qp=>{"use strict";Object.defineProperty(qp,"__esModule",{value:!0})});var Gp=d(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.browserDetector=void 0;var XE=pt(),Su=class{detect(r){return Promise.resolve(XE.browserDetectorSync.detect(r))}};To.browserDetector=new Su});var Ou=d(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.envDetectorSync=void 0;var zE=(y(),E(_)),$E=N(),YE=fe(),WE=ut(),bu=class{constructor(){this._MAX_LENGTH=255,this._COMMA_SEPARATOR=",",this._LABEL_KEY_VALUE_SPLITTER="=",this._ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.",this._ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters."}detect(r){let o={},c=(0,$E.getEnv)(),s=c.OTEL_RESOURCE_ATTRIBUTES,a=c.OTEL_SERVICE_NAME;if(s)try{let t=this._parseResourceAttributes(s);Object.assign(o,t)}catch(t){zE.diag.debug(`EnvDetector failed: ${t.message}`)}return a&&(o[YE.SemanticResourceAttributes.SERVICE_NAME]=a),new WE.Resource(o)}_parseResourceAttributes(r){if(!r)return{};let o={},c=r.split(this._COMMA_SEPARATOR,-1);for(let s of c){let a=s.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(a.length!==2)continue;let[t,e]=a;if(t=t.trim(),e=e.trim().split(/^"|"$/).join(""),!this._isValidAndNotEmpty(t))throw new Error(`Attribute key ${this._ERROR_MESSAGE_INVALID_CHARS}`);if(!this._isValid(e))throw new Error(`Attribute value ${this._ERROR_MESSAGE_INVALID_VALUE}`);o[t]=decodeURIComponent(e)}return o}_isValid(r){return r.length<=this._MAX_LENGTH&&this._isBaggageOctetString(r)}_isBaggageOctetString(r){for(let o=0;o<r.length;o++){let c=r.charCodeAt(o);if(c<33||c===44||c===59||c===92||c>126)return!1}return!0}_isValidAndNotEmpty(r){return r.length>0&&this._isValid(r)}};So.envDetectorSync=new bu});var Hp=d(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.envDetector=void 0;var JE=Ou(),Au=class{detect(r){return Promise.resolve(JE.envDetectorSync.detect(r))}};bo.envDetector=new Au});var Fp=d(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.browserDetectorSync=void 0;var Oo=fe(),Pu=pt(),QE=(y(),E(_)),Nu=class{detect(r){if(!(typeof navigator<"u"))return Pu.Resource.empty();let c={[Oo.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"browser",[Oo.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]:"Web Browser",[Oo.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]:navigator.userAgent};return this._getResourceAttributes(c,r)}_getResourceAttributes(r,o){return r[Oo.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]===""?(QE.diag.debug("BrowserDetector failed: Unable to find required browser resources. "),Pu.Resource.empty()):new Pu.Resource(Object.assign({},r))}};Ao.browserDetectorSync=new Nu});var Kp=d(Pe=>{"use strict";var ZE=Pe&&Pe.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),Po=Pe&&Pe.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&ZE(r,i,o)};Object.defineProperty(Pe,"__esModule",{value:!0});Po(Gp(),Pe);Po(Hp(),Pe);Po(Fp(),Pe);Po(Ou(),Pe)});var Xp=d(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.isPromiseLike=void 0;var eg=i=>i!==null&&typeof i=="object"&&typeof i.then=="function";No.isPromiseLike=eg});var $p=d(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.detectResourcesSync=Ut.detectResources=void 0;var wr=ut(),Ct=(y(),E(_)),tg=Xp(),rg=async(i={})=>{let r=await Promise.all((i.detectors||[]).map(async o=>{try{let c=await o.detect(i);return Ct.diag.debug(`${o.constructor.name} found resource.`,c),c}catch(c){return Ct.diag.debug(`${o.constructor.name} failed: ${c.message}`),wr.Resource.empty()}}));return zp(r),r.reduce((o,c)=>o.merge(c),wr.Resource.empty())};Ut.detectResources=rg;var ng=(i={})=>{var r;let o=((r=i.detectors)!==null&&r!==void 0?r:[]).map(s=>{try{let a=s.detect(i),t;if((0,tg.isPromiseLike)(a)){let e=async()=>(await a).attributes;t=new wr.Resource({},e())}else t=a;return t.waitForAsyncAttributes?t.waitForAsyncAttributes().then(()=>Ct.diag.debug(`${s.constructor.name} found resource.`,t)):Ct.diag.debug(`${s.constructor.name} found resource.`,t),t}catch(a){return Ct.diag.error(`${s.constructor.name} failed: ${a.message}`),wr.Resource.empty()}}),c=o.reduce((s,a)=>s.merge(a),wr.Resource.empty());return c.waitForAsyncAttributes&&c.waitForAsyncAttributes().then(()=>{zp(o)}),c};Ut.detectResourcesSync=ng;var zp=i=>{i.forEach(r=>{if(Object.keys(r.attributes).length>0){let o=JSON.stringify(r.attributes,null,4);Ct.diag.verbose(o)}})}});var pt=d(le=>{"use strict";var og=le&&le.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),ft=le&&le.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&og(r,i,o)};Object.defineProperty(le,"__esModule",{value:!0});ft(ut(),le);ft(Bp(),le);ft(vu(),le);ft(kp(),le);ft(jp(),le);ft(Kp(),le);ft($p(),le)});var Yp=d(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.MultiSpanProcessor=void 0;var ig=N(),Ru=class{constructor(r){this._spanProcessors=r}forceFlush(){let r=[];for(let o of this._spanProcessors)r.push(o.forceFlush());return new Promise(o=>{Promise.all(r).then(()=>{o()}).catch(c=>{(0,ig.globalErrorHandler)(c||new Error("MultiSpanProcessor: forceFlush failed")),o()})})}onStart(r,o){for(let c of this._spanProcessors)c.onStart(r,o)}onEnd(r){for(let o of this._spanProcessors)o.onEnd(r)}shutdown(){let r=[];for(let o of this._spanProcessors)r.push(o.shutdown());return new Promise((o,c)=>{Promise.all(r).then(()=>{o()},c)})}};Ro.MultiSpanProcessor=Ru});var Iu=d(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.NoopSpanProcessor=void 0;var xu=class{onStart(r,o){}onEnd(r){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}};xo.NoopSpanProcessor=xu});var Jp=d(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.BasicTracerProvider=dt.ForceFlushState=void 0;var Dt=(y(),E(_)),Vt=N(),Wp=pt(),sg=Lu(),ug=ru(),ag=Yp(),cg=Iu(),lg=ro(),pg=ou(),Bt;(function(i){i[i.resolved=0]="resolved",i[i.timeout=1]="timeout",i[i.error=2]="error",i[i.unresolved=3]="unresolved"})(Bt=dt.ForceFlushState||(dt.ForceFlushState={}));var Mr=class{constructor(r={}){var o;this._registeredSpanProcessors=[],this._tracers=new Map;let c=(0,Vt.merge)({},(0,ug.loadDefaultConfig)(),(0,pg.reconfigureLimits)(r));this.resource=(o=c.resource)!==null&&o!==void 0?o:Wp.Resource.empty(),this.resource=Wp.Resource.default().merge(this.resource),this._config=Object.assign({},c,{resource:this.resource});let s=this._buildExporterFromEnv();if(s!==void 0){let a=new lg.BatchSpanProcessor(s);this.activeSpanProcessor=a}else this.activeSpanProcessor=new cg.NoopSpanProcessor}getTracer(r,o,c){let s=`${r}@${o||""}:${c?.schemaUrl||""}`;return this._tracers.has(s)||this._tracers.set(s,new sg.Tracer({name:r,version:o,schemaUrl:c?.schemaUrl},this._config,this)),this._tracers.get(s)}addSpanProcessor(r){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(o=>Dt.diag.error("Error while trying to shutdown current span processor",o)),this._registeredSpanProcessors.push(r),this.activeSpanProcessor=new ag.MultiSpanProcessor(this._registeredSpanProcessors)}getActiveSpanProcessor(){return this.activeSpanProcessor}register(r={}){Dt.trace.setGlobalTracerProvider(this),r.propagator===void 0&&(r.propagator=this._buildPropagatorFromEnv()),r.contextManager&&Dt.context.setGlobalContextManager(r.contextManager),r.propagator&&Dt.propagation.setGlobalPropagator(r.propagator)}forceFlush(){let r=this._config.forceFlushTimeoutMillis,o=this._registeredSpanProcessors.map(c=>new Promise(s=>{let a,t=setTimeout(()=>{s(new Error(`Span processor did not completed within timeout period of ${r} ms`)),a=Bt.timeout},r);c.forceFlush().then(()=>{clearTimeout(t),a!==Bt.timeout&&(a=Bt.resolved,s(a))}).catch(e=>{clearTimeout(t),a=Bt.error,s(e)})}));return new Promise((c,s)=>{Promise.all(o).then(a=>{let t=a.filter(e=>e!==Bt.resolved);t.length>0?s(t):c()}).catch(a=>s([a]))})}shutdown(){return this.activeSpanProcessor.shutdown()}_getPropagator(r){var o;return(o=this.constructor._registeredPropagators.get(r))===null||o===void 0?void 0:o()}_getSpanExporter(r){var o;return(o=this.constructor._registeredExporters.get(r))===null||o===void 0?void 0:o()}_buildPropagatorFromEnv(){let r=Array.from(new Set((0,Vt.getEnv)().OTEL_PROPAGATORS)),c=r.map(s=>{let a=this._getPropagator(s);return a||Dt.diag.warn(`Propagator "${s}" requested through environment variable is unavailable.`),a}).reduce((s,a)=>(a&&s.push(a),s),[]);if(c.length!==0)return r.length===1?c[0]:new Vt.CompositePropagator({propagators:c})}_buildExporterFromEnv(){let r=(0,Vt.getEnv)().OTEL_TRACES_EXPORTER;if(r==="none"||r==="")return;let o=this._getSpanExporter(r);return o||Dt.diag.error(`Exporter "${r}" requested through environment variable is unavailable.`),o}};dt.BasicTracerProvider=Mr;Mr._registeredPropagators=new Map([["tracecontext",()=>new Vt.W3CTraceContextPropagator],["baggage",()=>new Vt.W3CBaggagePropagator]]);Mr._registeredExporters=new Map});var Qp=d(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.ConsoleSpanExporter=void 0;var wu=N(),Mu=class{export(r,o){return this._sendSpans(r,o)}shutdown(){return this._sendSpans([]),this.forceFlush()}forceFlush(){return Promise.resolve()}_exportInfo(r){var o;return{traceId:r.spanContext().traceId,parentId:r.parentSpanId,traceState:(o=r.spanContext().traceState)===null||o===void 0?void 0:o.serialize(),name:r.name,id:r.spanContext().spanId,kind:r.kind,timestamp:(0,wu.hrTimeToMicroseconds)(r.startTime),duration:(0,wu.hrTimeToMicroseconds)(r.duration),attributes:r.attributes,status:r.status,events:r.events,links:r.links}}_sendSpans(r,o){for(let c of r)console.dir(this._exportInfo(c),{depth:3});if(o)return o({code:wu.ExportResultCode.SUCCESS})}};Io.ConsoleSpanExporter=Mu});var ef=d(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.InMemorySpanExporter=void 0;var Zp=N(),Cu=class{constructor(){this._finishedSpans=[],this._stopped=!1}export(r,o){if(this._stopped)return o({code:Zp.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedSpans.push(...r),setTimeout(()=>o({code:Zp.ExportResultCode.SUCCESS}),0)}shutdown(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()}forceFlush(){return Promise.resolve()}reset(){this._finishedSpans=[]}getFinishedSpans(){return this._finishedSpans}};Lo.InMemorySpanExporter=Cu});var rf=d(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0})});var nf=d(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.SimpleSpanProcessor=void 0;var fg=(y(),E(_)),kt=N(),Uu=class{constructor(r){this._exporter=r,this._shutdownOnce=new kt.BindOnceFuture(this._shutdown,this),this._unresolvedExports=new Set}async forceFlush(){await Promise.all(Array.from(this._unresolvedExports)),this._exporter.forceFlush&&await this._exporter.forceFlush()}onStart(r,o){}onEnd(r){var o,c;if(this._shutdownOnce.isCalled||!(r.spanContext().traceFlags&fg.TraceFlags.SAMPLED))return;let s=()=>kt.internal._export(this._exporter,[r]).then(a=>{var t;a.code!==kt.ExportResultCode.SUCCESS&&(0,kt.globalErrorHandler)((t=a.error)!==null&&t!==void 0?t:new Error(`SimpleSpanProcessor: span export failed (status ${a})`))}).catch(a=>{(0,kt.globalErrorHandler)(a)});if(r.resource.asyncAttributesPending){let a=(c=(o=r.resource).waitForAsyncAttributes)===null||c===void 0?void 0:c.call(o).then(()=>(a!=null&&this._unresolvedExports.delete(a),s()),t=>(0,kt.globalErrorHandler)(t));a!=null&&this._unresolvedExports.add(a)}else s()}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}};wo.SimpleSpanProcessor=Uu});var sf=d(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0})});var af=d(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0})});var lf=d(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0})});var ff=d(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0})});var hf=d(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0})});var Lu=d(U=>{"use strict";var dg=U&&U.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),F=U&&U.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&dg(r,i,o)};Object.defineProperty(U,"__esModule",{value:!0});F(Ep(),U);F(Jp(),U);F(ro(),U);F(Qp(),U);F(ef(),U);F(rf(),U);F(nf(),U);F(sf(),U);F(Iu(),U);F(Kn(),U);F(zn(),U);F(Js(),U);F(Zs(),U);F(Ir(),U);F(Xs(),U);F(af(),U);F(lf(),U);F(ff(),U);F(hf(),U)});var ht={};import*as bA from"@opentelemetry/api-logs";var Du=Hc(()=>{bt(ht,bA)});var _f=d(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.disableInstrumentations=je.enableInstrumentations=je.parseInstrumentationOptions=void 0;function mf(i=[]){let r=[];for(let o=0,c=i.length;o<c;o++){let s=i[o];if(Array.isArray(s)){let a=mf(s);r=r.concat(a.instrumentations)}else typeof s=="function"?r.push(new s):s.instrumentationName&&r.push(s)}return{instrumentations:r}}je.parseInstrumentationOptions=mf;function hg(i,r,o){for(let c=0,s=i.length;c<s;c++){let a=i[c];r&&a.setTracerProvider(r),o&&a.setMeterProvider(o),a.getConfig().enabled||a.enable()}}je.enableInstrumentations=hg;function mg(i){i.forEach(r=>r.disable())}je.disableInstrumentations=mg});var Ef=d(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.registerInstrumentations=void 0;var yf=(y(),E(_)),Bu=_f();function _g(i){let{instrumentations:r}=(0,Bu.parseInstrumentationOptions)(i.instrumentations),o=i.tracerProvider||yf.trace.getTracerProvider(),c=i.meterProvider||yf.metrics.getMeterProvider();return(0,Bu.enableInstrumentations)(r,o,c),()=>{(0,Bu.disableInstrumentations)(r)}}Mo.registerInstrumentations=_g});var ku=d(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});Uo.LogRecord=void 0;var yg=(y(),E(_)),Cr=(y(),E(_)),Co=N(),Vu=class{constructor(r,o,c){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;let{timestamp:s,observedTimestamp:a,severityNumber:t,severityText:e,body:n,attributes:u={},context:l}=c,h=Date.now();if(this.hrTime=(0,Co.timeInputToHrTime)(s??h),this.hrTimeObserved=(0,Co.timeInputToHrTime)(a??h),l){let T=Cr.trace.getSpanContext(l);T&&Cr.isSpanContextValid(T)&&(this.spanContext=T)}this.severityNumber=t,this.severityText=e,this.body=n,this.resource=r.resource,this.instrumentationScope=o,this._logRecordLimits=r.logRecordLimits,this.setAttributes(u)}set severityText(r){this._isLogRecordReadonly()||(this._severityText=r)}get severityText(){return this._severityText}set severityNumber(r){this._isLogRecordReadonly()||(this._severityNumber=r)}get severityNumber(){return this._severityNumber}set body(r){this._isLogRecordReadonly()||(this._body=r)}get body(){return this._body}get droppedAttributesCount(){return this.totalAttributesCount-Object.keys(this.attributes).length}setAttribute(r,o){return this._isLogRecordReadonly()?this:o===null?this:r.length===0?(Cr.diag.warn(`Invalid attribute key: ${r}`),this):!(0,Co.isAttributeValue)(o)&&!(typeof o=="object"&&!Array.isArray(o)&&Object.keys(o).length>0)?(Cr.diag.warn(`Invalid attribute value set for key: ${r}`),this):(this.totalAttributesCount+=1,Object.keys(this.attributes).length>=this._logRecordLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,r)?this:((0,Co.isAttributeValue)(o)?this.attributes[r]=this._truncateToSize(o):this.attributes[r]=o,this))}setAttributes(r){for(let[o,c]of Object.entries(r))this.setAttribute(o,c);return this}setBody(r){return this.body=r,this}setSeverityNumber(r){return this.severityNumber=r,this}setSeverityText(r){return this.severityText=r,this}_makeReadonly(){this._isReadonly=!0}_truncateToSize(r){let o=this._logRecordLimits.attributeValueLengthLimit;return o<=0?(Cr.diag.warn(`Attribute value limit must be positive, got ${o}`),r):typeof r=="string"?this._truncateToLimitUtil(r,o):Array.isArray(r)?r.map(c=>typeof c=="string"?this._truncateToLimitUtil(c,o):c):r}_truncateToLimitUtil(r,o){return r.length<=o?r:r.substring(0,o)}_isLogRecordReadonly(){return this._isReadonly&&yg.diag.warn("Can not execute the operation on emitted log record"),this._isReadonly}};Uo.LogRecord=Vu});var gf=d(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.Logger=void 0;var Eg=(y(),E(_)),gg=ku(),qu=class{constructor(r,o){this.instrumentationScope=r,this._sharedState=o}emit(r){let o=r.context||Eg.context.active(),c=new gg.LogRecord(this._sharedState,this.instrumentationScope,Object.assign({context:o},r));this._sharedState.activeProcessor.onEmit(c,o),c._makeReadonly()}};Do.Logger=qu});var vf=d(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.reconfigureLimits=qt.loadDefaultConfig=void 0;var Ur=N();function vg(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:(0,Ur.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,Ur.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT},includeTraceContext:!0}}qt.loadDefaultConfig=vg;function Tg(i){var r,o,c,s,a,t;let e=(0,Ur.getEnvWithoutDefaults)();return{attributeCountLimit:(c=(o=(r=i.attributeCountLimit)!==null&&r!==void 0?r:e.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:e.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&c!==void 0?c:Ur.DEFAULT_ATTRIBUTE_COUNT_LIMIT,attributeValueLengthLimit:(t=(a=(s=i.attributeValueLengthLimit)!==null&&s!==void 0?s:e.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&a!==void 0?a:e.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&t!==void 0?t:Ur.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT}}qt.reconfigureLimits=Tg});var Tf=d(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});Bo.MultiLogRecordProcessor=void 0;var Sg=N(),ju=class{constructor(r,o){this.processors=r,this.forceFlushTimeoutMillis=o}async forceFlush(){let r=this.forceFlushTimeoutMillis;await Promise.all(this.processors.map(o=>(0,Sg.callWithTimeout)(o.forceFlush(),r)))}onEmit(r,o){this.processors.forEach(c=>c.onEmit(r,o))}async shutdown(){await Promise.all(this.processors.map(r=>r.shutdown()))}};Bo.MultiLogRecordProcessor=ju});var Hu=d(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.NoopLogRecordProcessor=void 0;var Gu=class{forceFlush(){return Promise.resolve()}onEmit(r,o){}shutdown(){return Promise.resolve()}};Vo.NoopLogRecordProcessor=Gu});var Sf=d(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.LoggerProviderSharedState=void 0;var bg=Hu(),Fu=class{constructor(r,o,c){this.resource=r,this.forceFlushTimeoutMillis=o,this.logRecordLimits=c,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new bg.NoopLogRecordProcessor}};ko.LoggerProviderSharedState=Fu});var Af=d(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.LoggerProvider=mt.DEFAULT_LOGGER_NAME=void 0;var Dr=(y(),E(_)),Og=(Du(),E(ht)),Ag=pt(),bf=N(),Pg=gf(),Of=vf(),Ng=Tf(),Rg=Sf();mt.DEFAULT_LOGGER_NAME="unknown";var Ku=class{constructor(r={}){let{resource:o=Ag.Resource.default(),logRecordLimits:c,forceFlushTimeoutMillis:s}=(0,bf.merge)({},(0,Of.loadDefaultConfig)(),r);this._sharedState=new Rg.LoggerProviderSharedState(o,s,(0,Of.reconfigureLimits)(c)),this._shutdownOnce=new bf.BindOnceFuture(this._shutdown,this)}getLogger(r,o,c){if(this._shutdownOnce.isCalled)return Dr.diag.warn("A shutdown LoggerProvider cannot provide a Logger"),Og.NOOP_LOGGER;r||Dr.diag.warn("Logger requested without instrumentation scope name.");let s=r||mt.DEFAULT_LOGGER_NAME,a=`${s}@${o||""}:${c?.schemaUrl||""}`;return this._sharedState.loggers.has(a)||this._sharedState.loggers.set(a,new Pg.Logger({name:s,version:o,schemaUrl:c?.schemaUrl},this._sharedState)),this._sharedState.loggers.get(a)}addLogRecordProcessor(r){this._sharedState.registeredLogRecordProcessors.length===0&&this._sharedState.activeProcessor.shutdown().catch(o=>Dr.diag.error("Error while trying to shutdown current log record processor",o)),this._sharedState.registeredLogRecordProcessors.push(r),this._sharedState.activeProcessor=new Ng.MultiLogRecordProcessor(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)}forceFlush(){return this._shutdownOnce.isCalled?(Dr.diag.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()}shutdown(){return this._shutdownOnce.isCalled?(Dr.diag.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()}_shutdown(){return this._sharedState.activeProcessor.shutdown()}};mt.LoggerProvider=Ku});var Pf=d(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});qo.ConsoleLogRecordExporter=void 0;var xg=N(),Ig=N(),Xu=class{export(r,o){this._sendLogRecords(r,o)}shutdown(){return Promise.resolve()}_exportInfo(r){var o,c,s;return{timestamp:(0,xg.hrTimeToMicroseconds)(r.hrTime),traceId:(o=r.spanContext)===null||o===void 0?void 0:o.traceId,spanId:(c=r.spanContext)===null||c===void 0?void 0:c.spanId,traceFlags:(s=r.spanContext)===null||s===void 0?void 0:s.traceFlags,severityText:r.severityText,severityNumber:r.severityNumber,body:r.body,attributes:r.attributes}}_sendLogRecords(r,o){for(let c of r)console.dir(this._exportInfo(c),{depth:3});o?.({code:Ig.ExportResultCode.SUCCESS})}};qo.ConsoleLogRecordExporter=Xu});var Nf=d(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});jo.SimpleLogRecordProcessor=void 0;var zu=N(),$u=class{constructor(r){this._exporter=r,this._shutdownOnce=new zu.BindOnceFuture(this._shutdown,this)}onEmit(r){this._shutdownOnce.isCalled||this._exporter.export([r],o=>{var c;if(o.code!==zu.ExportResultCode.SUCCESS){(0,zu.globalErrorHandler)((c=o.error)!==null&&c!==void 0?c:new Error(`SimpleLogRecordProcessor: log record export failed (status ${o})`));return}})}forceFlush(){return Promise.resolve()}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}};jo.SimpleLogRecordProcessor=$u});var xf=d(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.InMemoryLogRecordExporter=void 0;var Rf=N(),Yu=class{constructor(){this._finishedLogRecords=[],this._stopped=!1}export(r,o){if(this._stopped)return o({code:Rf.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedLogRecords.push(...r),o({code:Rf.ExportResultCode.SUCCESS})}shutdown(){return this._stopped=!0,this.reset(),Promise.resolve()}getFinishedLogRecords(){return this._finishedLogRecords}reset(){this._finishedLogRecords=[]}};Go.InMemoryLogRecordExporter=Yu});var If=d(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.BatchLogRecordProcessorBase=void 0;var Lg=(y(),E(_)),jt=N(),Wu=class{constructor(r,o){var c,s,a,t;this._exporter=r,this._finishedLogRecords=[];let e=(0,jt.getEnv)();this._maxExportBatchSize=(c=o?.maxExportBatchSize)!==null&&c!==void 0?c:e.OTEL_BLRP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=(s=o?.maxQueueSize)!==null&&s!==void 0?s:e.OTEL_BLRP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=(a=o?.scheduledDelayMillis)!==null&&a!==void 0?a:e.OTEL_BLRP_SCHEDULE_DELAY,this._exportTimeoutMillis=(t=o?.exportTimeoutMillis)!==null&&t!==void 0?t:e.OTEL_BLRP_EXPORT_TIMEOUT,this._shutdownOnce=new jt.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(Lg.diag.warn("BatchLogRecordProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}onEmit(r){this._shutdownOnce.isCalled||this._addToBuffer(r)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}shutdown(){return this._shutdownOnce.call()}async _shutdown(){this.onShutdown(),await this._flushAll(),await this._exporter.shutdown()}_addToBuffer(r){this._finishedLogRecords.length>=this._maxQueueSize||(this._finishedLogRecords.push(r),this._maybeStartTimer())}_flushAll(){return new Promise((r,o)=>{let c=[],s=Math.ceil(this._finishedLogRecords.length/this._maxExportBatchSize);for(let a=0;a<s;a++)c.push(this._flushOneBatch());Promise.all(c).then(()=>{r()}).catch(o)})}_flushOneBatch(){return this._clearTimer(),this._finishedLogRecords.length===0?Promise.resolve():new Promise((r,o)=>{(0,jt.callWithTimeout)(this._export(this._finishedLogRecords.splice(0,this._maxExportBatchSize)),this._exportTimeoutMillis).then(()=>r()).catch(o)})}_maybeStartTimer(){this._timer===void 0&&(this._timer=setTimeout(()=>{this._flushOneBatch().then(()=>{this._finishedLogRecords.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(r=>{(0,jt.globalErrorHandler)(r)})},this._scheduledDelayMillis),(0,jt.unrefTimer)(this._timer))}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}_export(r){return new Promise((o,c)=>{this._exporter.export(r,s=>{var a;if(s.code!==jt.ExportResultCode.SUCCESS){c((a=s.error)!==null&&a!==void 0?a:new Error(`BatchLogRecordProcessorBase: log record export failed (status ${s})`));return}o(s)})})}};Ho.BatchLogRecordProcessorBase=Wu});var Lf=d(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.BatchLogRecordProcessor=void 0;var wg=If(),Ju=class extends wg.BatchLogRecordProcessorBase{onShutdown(){}};Fo.BatchLogRecordProcessor=Ju});var wf=d(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});Ko.BatchLogRecordProcessor=void 0;var Mg=Lf();Object.defineProperty(Ko,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return Mg.BatchLogRecordProcessor}})});var Mf=d(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.BatchLogRecordProcessor=void 0;var Cg=wf();Object.defineProperty(Xo,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return Cg.BatchLogRecordProcessor}})});var Cf=d(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.BatchLogRecordProcessor=ne.InMemoryLogRecordExporter=ne.SimpleLogRecordProcessor=ne.ConsoleLogRecordExporter=ne.NoopLogRecordProcessor=ne.LogRecord=ne.LoggerProvider=void 0;var Ug=Af();Object.defineProperty(ne,"LoggerProvider",{enumerable:!0,get:function(){return Ug.LoggerProvider}});var Dg=ku();Object.defineProperty(ne,"LogRecord",{enumerable:!0,get:function(){return Dg.LogRecord}});var Bg=Hu();Object.defineProperty(ne,"NoopLogRecordProcessor",{enumerable:!0,get:function(){return Bg.NoopLogRecordProcessor}});var Vg=Pf();Object.defineProperty(ne,"ConsoleLogRecordExporter",{enumerable:!0,get:function(){return Vg.ConsoleLogRecordExporter}});var kg=Nf();Object.defineProperty(ne,"SimpleLogRecordProcessor",{enumerable:!0,get:function(){return kg.SimpleLogRecordProcessor}});var qg=xf();Object.defineProperty(ne,"InMemoryLogRecordExporter",{enumerable:!0,get:function(){return qg.InMemoryLogRecordExporter}});var jg=Mf();Object.defineProperty(ne,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return jg.BatchLogRecordProcessor}})});var zo=d(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.AggregationTemporality=void 0;var Gg;(function(i){i[i.DELTA=0]="DELTA",i[i.CUMULATIVE=1]="CUMULATIVE"})(Gg=Br.AggregationTemporality||(Br.AggregationTemporality={}))});var Gt=d(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.DataPointType=void 0;var Hg;(function(i){i[i.HISTOGRAM=0]="HISTOGRAM",i[i.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",i[i.GAUGE=2]="GAUGE",i[i.SUM=3]="SUM"})(Hg=Vr.DataPointType||(Vr.DataPointType={}))});var Ne=d(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.equalsCaseInsensitive=V.binarySearchLB=V.setEquals=V.FlatMap=V.isPromiseAllSettledRejectionResult=V.PromiseAllSettled=V.callWithTimeout=V.TimeoutError=V.instrumentationScopeId=V.hashAttributes=V.isNotNullish=void 0;function Fg(i){return i!=null}V.isNotNullish=Fg;function Kg(i){let r=Object.keys(i);return r.length===0?"":(r=r.sort(),JSON.stringify(r.map(o=>[o,i[o]])))}V.hashAttributes=Kg;function Xg(i){var r,o;return`${i.name}:${(r=i.version)!==null&&r!==void 0?r:""}:${(o=i.schemaUrl)!==null&&o!==void 0?o:""}`}V.instrumentationScopeId=Xg;var $o=class i extends Error{constructor(r){super(r),Object.setPrototypeOf(this,i.prototype)}};V.TimeoutError=$o;function zg(i,r){let o,c=new Promise(function(a,t){o=setTimeout(function(){t(new $o("Operation timed out."))},r)});return Promise.race([i,c]).then(s=>(clearTimeout(o),s),s=>{throw clearTimeout(o),s})}V.callWithTimeout=zg;async function $g(i){return Promise.all(i.map(async r=>{try{return{status:"fulfilled",value:await r}}catch(o){return{status:"rejected",reason:o}}}))}V.PromiseAllSettled=$g;function Yg(i){return i.status==="rejected"}V.isPromiseAllSettledRejectionResult=Yg;function Wg(i,r){let o=[];return i.forEach(c=>{o.push(...r(c))}),o}V.FlatMap=Wg;function Jg(i,r){if(i.size!==r.size)return!1;for(let o of i)if(!r.has(o))return!1;return!0}V.setEquals=Jg;function Qg(i,r){let o=0,c=i.length-1;for(;c-o>1;){let s=Math.trunc((c+o)/2);i[s]<=r?o=s:c=s-1}return i[c]<=r?c:i[o]<=r?o:-1}V.binarySearchLB=Qg;function Zg(i,r){return i.toLowerCase()===r.toLowerCase()}V.equalsCaseInsensitive=Zg});var Ht=d(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.AggregatorKind=void 0;var ev;(function(i){i[i.DROP=0]="DROP",i[i.SUM=1]="SUM",i[i.LAST_VALUE=2]="LAST_VALUE",i[i.HISTOGRAM=3]="HISTOGRAM",i[i.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(ev=kr.AggregatorKind||(kr.AggregatorKind={}))});var Uf=d(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.DropAggregator=void 0;var tv=Ht(),Qu=class{constructor(){this.kind=tv.AggregatorKind.DROP}createAccumulation(){}merge(r,o){}diff(r,o){}toMetricData(r,o,c,s){}};Yo.DropAggregator=Qu});var we=d(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.isValidName=pe.isDescriptorCompatibleWith=pe.createInstrumentDescriptorWithView=pe.createInstrumentDescriptor=pe.InstrumentType=void 0;var Df=(y(),E(_)),rv=Ne(),nv;(function(i){i.COUNTER="COUNTER",i.HISTOGRAM="HISTOGRAM",i.UP_DOWN_COUNTER="UP_DOWN_COUNTER",i.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",i.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",i.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(nv=pe.InstrumentType||(pe.InstrumentType={}));function ov(i,r,o){var c,s,a,t;return Bf(i)||Df.diag.warn(`Invalid metric name: "${i}". The metric name should be a ASCII string with a length no greater than 255 characters.`),{name:i,type:r,description:(c=o?.description)!==null&&c!==void 0?c:"",unit:(s=o?.unit)!==null&&s!==void 0?s:"",valueType:(a=o?.valueType)!==null&&a!==void 0?a:Df.ValueType.DOUBLE,advice:(t=o?.advice)!==null&&t!==void 0?t:{}}}pe.createInstrumentDescriptor=ov;function iv(i,r){var o,c;return{name:(o=i.name)!==null&&o!==void 0?o:r.name,description:(c=i.description)!==null&&c!==void 0?c:r.description,type:r.type,unit:r.unit,valueType:r.valueType,advice:r.advice}}pe.createInstrumentDescriptorWithView=iv;function sv(i,r){return(0,rv.equalsCaseInsensitive)(i.name,r.name)&&i.unit===r.unit&&i.type===r.type&&i.valueType===r.valueType}pe.isDescriptorCompatibleWith=sv;var uv=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Bf(i){return i.match(uv)!=null}pe.isValidName=Bf});var Vf=d(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.HistogramAggregator=Kt.HistogramAccumulation=void 0;var av=Ht(),cv=Gt(),Zu=we(),lv=Ne();function pv(i){let r=i.map(()=>0);return r.push(0),{buckets:{boundaries:i,counts:r},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var Ft=class{constructor(r,o,c=!0,s=pv(o)){this.startTime=r,this._boundaries=o,this._recordMinMax=c,this._current=s}record(r){this._current.count+=1,this._current.sum+=r,this._recordMinMax&&(this._current.min=Math.min(r,this._current.min),this._current.max=Math.max(r,this._current.max),this._current.hasMinMax=!0);let o=(0,lv.binarySearchLB)(this._boundaries,r);this._current.buckets.counts[o+1]+=1}setStartTime(r){this.startTime=r}toPointValue(){return this._current}};Kt.HistogramAccumulation=Ft;var ea=class{constructor(r,o){this._boundaries=r,this._recordMinMax=o,this.kind=av.AggregatorKind.HISTOGRAM}createAccumulation(r){return new Ft(r,this._boundaries,this._recordMinMax)}merge(r,o){let c=r.toPointValue(),s=o.toPointValue(),a=c.buckets.counts,t=s.buckets.counts,e=new Array(a.length);for(let l=0;l<a.length;l++)e[l]=a[l]+t[l];let n=1/0,u=-1/0;return this._recordMinMax&&(c.hasMinMax&&s.hasMinMax?(n=Math.min(c.min,s.min),u=Math.max(c.max,s.max)):c.hasMinMax?(n=c.min,u=c.max):s.hasMinMax&&(n=s.min,u=s.max)),new Ft(r.startTime,c.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:c.buckets.boundaries,counts:e},count:c.count+s.count,sum:c.sum+s.sum,hasMinMax:this._recordMinMax&&(c.hasMinMax||s.hasMinMax),min:n,max:u})}diff(r,o){let c=r.toPointValue(),s=o.toPointValue(),a=c.buckets.counts,t=s.buckets.counts,e=new Array(a.length);for(let n=0;n<a.length;n++)e[n]=t[n]-a[n];return new Ft(o.startTime,c.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:c.buckets.boundaries,counts:e},count:s.count-c.count,sum:s.sum-c.sum,hasMinMax:!1,min:1/0,max:-1/0})}toMetricData(r,o,c,s){return{descriptor:r,aggregationTemporality:o,dataPointType:cv.DataPointType.HISTOGRAM,dataPoints:c.map(([a,t])=>{let e=t.toPointValue(),n=r.type===Zu.InstrumentType.UP_DOWN_COUNTER||r.type===Zu.InstrumentType.OBSERVABLE_GAUGE||r.type===Zu.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:t.startTime,endTime:s,value:{min:e.hasMinMax?e.min:void 0,max:e.hasMinMax?e.max:void 0,sum:n?void 0:e.sum,buckets:e.buckets,count:e.count}}})}}};Kt.HistogramAggregator=ea});var kf=d(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.Buckets=void 0;var ta=class i{constructor(r=new ra,o=0,c=0,s=0){this.backing=r,this.indexBase=o,this.indexStart=c,this.indexEnd=s}get offset(){return this.indexStart}get length(){return this.backing.length===0||this.indexEnd===this.indexStart&&this.at(0)===0?0:this.indexEnd-this.indexStart+1}counts(){return Array.from({length:this.length},(r,o)=>this.at(o))}at(r){let o=this.indexBase-this.indexStart;return r<o&&(r+=this.backing.length),r-=o,this.backing.countAt(r)}incrementBucket(r,o){this.backing.increment(r,o)}decrementBucket(r,o){this.backing.decrement(r,o)}trim(){for(let r=0;r<this.length;r++)if(this.at(r)!==0){this.indexStart+=r;break}else if(r===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(let r=this.length-1;r>=0;r--)if(this.at(r)!==0){this.indexEnd-=this.length-r-1;break}this._rotate()}downscale(r){this._rotate();let o=1+this.indexEnd-this.indexStart,c=1<<r,s=0,a=0;for(let t=this.indexStart;t<=this.indexEnd;){let e=t%c;e<0&&(e+=c);for(let n=e;n<c&&s<o;n++)this._relocateBucket(a,s),s++,t++;a++}this.indexStart>>=r,this.indexEnd>>=r,this.indexBase=this.indexStart}clone(){return new i(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)}_rotate(){let r=this.indexBase-this.indexStart;r!==0&&(r>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,r),this.backing.reverse(r,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+r)),this.indexBase=this.indexStart)}_relocateBucket(r,o){r!==o&&this.incrementBucket(r,this.backing.emptyBucket(o))}};Wo.Buckets=ta;var ra=class i{constructor(r=[0]){this._counts=r}get length(){return this._counts.length}countAt(r){return this._counts[r]}growTo(r,o,c){let s=new Array(r).fill(0);s.splice(c,this._counts.length-o,...this._counts.slice(o)),s.splice(0,o,...this._counts.slice(0,o)),this._counts=s}reverse(r,o){let c=Math.floor((r+o)/2)-r;for(let s=0;s<c;s++){let a=this._counts[r+s];this._counts[r+s]=this._counts[o-s-1],this._counts[o-s-1]=a}}emptyBucket(r){let o=this._counts[r];return this._counts[r]=0,o}increment(r,o){this._counts[r]+=o}decrement(r,o){this._counts[r]>=o?this._counts[r]-=o:this._counts[r]=0}clone(){return new i([...this._counts])}}});var oa=d(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.getSignificand=ie.getNormalBase2=ie.MIN_VALUE=ie.MAX_NORMAL_EXPONENT=ie.MIN_NORMAL_EXPONENT=ie.SIGNIFICAND_WIDTH=void 0;ie.SIGNIFICAND_WIDTH=52;var fv=2146435072,dv=1048575,na=1023;ie.MIN_NORMAL_EXPONENT=-na+1;ie.MAX_NORMAL_EXPONENT=na;ie.MIN_VALUE=Math.pow(2,-1022);function hv(i){let r=new DataView(new ArrayBuffer(8));return r.setFloat64(0,i),((r.getUint32(0)&fv)>>20)-na}ie.getNormalBase2=hv;function mv(i){let r=new DataView(new ArrayBuffer(8));r.setFloat64(0,i);let o=r.getUint32(0),c=r.getUint32(4);return(o&dv)*Math.pow(2,32)+c}ie.getSignificand=mv});var Jo=d(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.nextGreaterSquare=Xt.ldexp=void 0;function _v(i,r){return i===0||i===Number.POSITIVE_INFINITY||i===Number.NEGATIVE_INFINITY||Number.isNaN(i)?i:i*Math.pow(2,r)}Xt.ldexp=_v;function yv(i){return i--,i|=i>>1,i|=i>>2,i|=i>>4,i|=i>>8,i|=i>>16,i++,i}Xt.nextGreaterSquare=yv});var Zo=d(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.MappingError=void 0;var ia=class extends Error{};Qo.MappingError=ia});var jf=d(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.ExponentMapping=void 0;var zt=oa(),Ev=Jo(),qf=Zo(),sa=class{constructor(r){this._shift=-r}mapToIndex(r){if(r<zt.MIN_VALUE)return this._minNormalLowerBoundaryIndex();let o=zt.getNormalBase2(r),c=this._rightShift(zt.getSignificand(r)-1,zt.SIGNIFICAND_WIDTH);return o+c>>this._shift}lowerBoundary(r){let o=this._minNormalLowerBoundaryIndex();if(r<o)throw new qf.MappingError(`underflow: ${r} is < minimum lower boundary: ${o}`);let c=this._maxNormalLowerBoundaryIndex();if(r>c)throw new qf.MappingError(`overflow: ${r} is > maximum lower boundary: ${c}`);return Ev.ldexp(1,r<<this._shift)}get scale(){return this._shift===0?0:-this._shift}_minNormalLowerBoundaryIndex(){let r=zt.MIN_NORMAL_EXPONENT>>this._shift;return this._shift<2&&r--,r}_maxNormalLowerBoundaryIndex(){return zt.MAX_NORMAL_EXPONENT>>this._shift}_rightShift(r,o){return Math.floor(r*Math.pow(2,-o))}};ei.ExponentMapping=sa});var Ff=d(ti=>{"use strict";Object.defineProperty(ti,"__esModule",{value:!0});ti.LogarithmMapping=void 0;var $t=oa(),Gf=Jo(),Hf=Zo(),ua=class{constructor(r){this._scale=r,this._scaleFactor=Gf.ldexp(Math.LOG2E,r),this._inverseFactor=Gf.ldexp(Math.LN2,-r)}mapToIndex(r){if(r<=$t.MIN_VALUE)return this._minNormalLowerBoundaryIndex()-1;if($t.getSignificand(r)===0)return($t.getNormalBase2(r)<<this._scale)-1;let o=Math.floor(Math.log(r)*this._scaleFactor),c=this._maxNormalLowerBoundaryIndex();return o>=c?c:o}lowerBoundary(r){let o=this._maxNormalLowerBoundaryIndex();if(r>=o){if(r===o)return 2*Math.exp((r-(1<<this._scale))/this._scaleFactor);throw new Hf.MappingError(`overflow: ${r} is > maximum lower boundary: ${o}`)}let c=this._minNormalLowerBoundaryIndex();if(r<=c){if(r===c)return $t.MIN_VALUE;if(r===c-1)return Math.exp((r+(1<<this._scale))/this._scaleFactor)/2;throw new Hf.MappingError(`overflow: ${r} is < minimum lower boundary: ${c}`)}return Math.exp(r*this._inverseFactor)}get scale(){return this._scale}_minNormalLowerBoundaryIndex(){return $t.MIN_NORMAL_EXPONENT<<this._scale}_maxNormalLowerBoundaryIndex(){return($t.MAX_NORMAL_EXPONENT+1<<this._scale)-1}};ti.LogarithmMapping=ua});var zf=d(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});ri.getMapping=void 0;var gv=jf(),vv=Ff(),Tv=Zo(),Kf=-10,Xf=20,Sv=Array.from({length:31},(i,r)=>r>10?new vv.LogarithmMapping(r-10):new gv.ExponentMapping(r-10));function bv(i){if(i>Xf||i<Kf)throw new Tv.MappingError(`expected scale >= ${Kf} && <= ${Xf}, got: ${i}`);return Sv[i+10]}ri.getMapping=bv});var Wf=d(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.ExponentialHistogramAggregator=Wt.ExponentialHistogramAccumulation=void 0;var Ov=Ht(),Av=Gt(),Pv=(y(),E(_)),aa=we(),$f=kf(),Yf=zf(),Nv=Jo(),Yt=class i{constructor(r,o){this.low=r,this.high=o}static combine(r,o){return new i(Math.min(r.low,o.low),Math.max(r.high,o.high))}},Rv=20,xv=160,ca=2,ni=class i{constructor(r=r,o=xv,c=!0,s=0,a=0,t=0,e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,u=new $f.Buckets,l=new $f.Buckets,h=(0,Yf.getMapping)(Rv)){this.startTime=r,this._maxSize=o,this._recordMinMax=c,this._sum=s,this._count=a,this._zeroCount=t,this._min=e,this._max=n,this._positive=u,this._negative=l,this._mapping=h,this._maxSize<ca&&(Pv.diag.warn(`Exponential Histogram Max Size set to ${this._maxSize}, changing to the minimum size of: ${ca}`),this._maxSize=ca)}record(r){this.updateByIncrement(r,1)}setStartTime(r){this.startTime=r}toPointValue(){return{hasMinMax:this._recordMinMax,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}}get sum(){return this._sum}get min(){return this._min}get max(){return this._max}get count(){return this._count}get zeroCount(){return this._zeroCount}get scale(){return this._count===this._zeroCount?0:this._mapping.scale}get positive(){return this._positive}get negative(){return this._negative}updateByIncrement(r,o){if(r>this._max&&(this._max=r),r<this._min&&(this._min=r),this._count+=o,r===0){this._zeroCount+=o;return}this._sum+=r*o,r>0?this._updateBuckets(this._positive,r,o):this._updateBuckets(this._negative,-r,o)}merge(r){this._count===0?(this._min=r.min,this._max=r.max):r.count!==0&&(r.min<this.min&&(this._min=r.min),r.max>this.max&&(this._max=r.max)),this.startTime=r.startTime,this._sum+=r.sum,this._count+=r.count,this._zeroCount+=r.zeroCount;let o=this._minScale(r);this._downscale(this.scale-o),this._mergeBuckets(this.positive,r,r.positive,o),this._mergeBuckets(this.negative,r,r.negative,o)}diff(r){this._min=1/0,this._max=-1/0,this._sum-=r.sum,this._count-=r.count,this._zeroCount-=r.zeroCount;let o=this._minScale(r);this._downscale(this.scale-o),this._diffBuckets(this.positive,r,r.positive,o),this._diffBuckets(this.negative,r,r.negative,o)}clone(){return new i(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)}_updateBuckets(r,o,c){let s=this._mapping.mapToIndex(o),a=!1,t=0,e=0;if(r.length===0?(r.indexStart=s,r.indexEnd=r.indexStart,r.indexBase=r.indexStart):s<r.indexStart&&r.indexEnd-s>=this._maxSize?(a=!0,e=s,t=r.indexEnd):s>r.indexEnd&&s-r.indexStart>=this._maxSize&&(a=!0,e=r.indexStart,t=s),a){let n=this._changeScale(t,e);this._downscale(n),s=this._mapping.mapToIndex(o)}this._incrementIndexBy(r,s,c)}_incrementIndexBy(r,o,c){if(c===0)return;if(o<r.indexStart){let a=r.indexEnd-o;a>=r.backing.length&&this._grow(r,a+1),r.indexStart=o}else if(o>r.indexEnd){let a=o-r.indexStart;a>=r.backing.length&&this._grow(r,a+1),r.indexEnd=o}let s=o-r.indexBase;s<0&&(s+=r.backing.length),r.incrementBucket(s,c)}_grow(r,o){let c=r.backing.length,s=r.indexBase-r.indexStart,a=c-s,t=(0,Nv.nextGreaterSquare)(o);t>this._maxSize&&(t=this._maxSize);let e=t-s;r.backing.growTo(t,a,e)}_changeScale(r,o){let c=0;for(;r-o>=this._maxSize;)r>>=1,o>>=1,c++;return c}_downscale(r){if(r===0)return;if(r<0)throw new Error(`impossible change of scale: ${this.scale}`);let o=this._mapping.scale-r;this._positive.downscale(r),this._negative.downscale(r),this._mapping=(0,Yf.getMapping)(o)}_minScale(r){let o=Math.min(this.scale,r.scale),c=Yt.combine(this._highLowAtScale(this.positive,this.scale,o),this._highLowAtScale(r.positive,r.scale,o)),s=Yt.combine(this._highLowAtScale(this.negative,this.scale,o),this._highLowAtScale(r.negative,r.scale,o));return Math.min(o-this._changeScale(c.high,c.low),o-this._changeScale(s.high,s.low))}_highLowAtScale(r,o,c){if(r.length===0)return new Yt(0,-1);let s=o-c;return new Yt(r.indexStart>>s,r.indexEnd>>s)}_mergeBuckets(r,o,c,s){let a=c.offset,t=o.scale-s;for(let e=0;e<c.length;e++)this._incrementIndexBy(r,a+e>>t,c.at(e))}_diffBuckets(r,o,c,s){let a=c.offset,t=o.scale-s;for(let e=0;e<c.length;e++){let u=(a+e>>t)-r.indexBase;u<0&&(u+=r.backing.length),r.decrementBucket(u,c.at(e))}r.trim()}};Wt.ExponentialHistogramAccumulation=ni;var la=class{constructor(r,o){this._maxSize=r,this._recordMinMax=o,this.kind=Ov.AggregatorKind.EXPONENTIAL_HISTOGRAM}createAccumulation(r){return new ni(r,this._maxSize,this._recordMinMax)}merge(r,o){let c=o.clone();return c.merge(r),c}diff(r,o){let c=o.clone();return c.diff(r),c}toMetricData(r,o,c,s){return{descriptor:r,aggregationTemporality:o,dataPointType:Av.DataPointType.EXPONENTIAL_HISTOGRAM,dataPoints:c.map(([a,t])=>{let e=t.toPointValue(),n=r.type===aa.InstrumentType.UP_DOWN_COUNTER||r.type===aa.InstrumentType.OBSERVABLE_GAUGE||r.type===aa.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:t.startTime,endTime:s,value:{min:e.hasMinMax?e.min:void 0,max:e.hasMinMax?e.max:void 0,sum:n?void 0:e.sum,positive:{offset:e.positive.offset,bucketCounts:e.positive.bucketCounts},negative:{offset:e.negative.offset,bucketCounts:e.negative.bucketCounts},count:e.count,scale:e.scale,zeroCount:e.zeroCount}}})}}};Wt.ExponentialHistogramAggregator=la});var Jf=d(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.LastValueAggregator=Qt.LastValueAccumulation=void 0;var Iv=Ht(),qr=N(),Lv=Gt(),Jt=class{constructor(r,o=0,c=[0,0]){this.startTime=r,this._current=o,this.sampleTime=c}record(r){this._current=r,this.sampleTime=(0,qr.millisToHrTime)(Date.now())}setStartTime(r){this.startTime=r}toPointValue(){return this._current}};Qt.LastValueAccumulation=Jt;var pa=class{constructor(){this.kind=Iv.AggregatorKind.LAST_VALUE}createAccumulation(r){return new Jt(r)}merge(r,o){let c=(0,qr.hrTimeToMicroseconds)(o.sampleTime)>=(0,qr.hrTimeToMicroseconds)(r.sampleTime)?o:r;return new Jt(r.startTime,c.toPointValue(),c.sampleTime)}diff(r,o){let c=(0,qr.hrTimeToMicroseconds)(o.sampleTime)>=(0,qr.hrTimeToMicroseconds)(r.sampleTime)?o:r;return new Jt(o.startTime,c.toPointValue(),c.sampleTime)}toMetricData(r,o,c,s){return{descriptor:r,aggregationTemporality:o,dataPointType:Lv.DataPointType.GAUGE,dataPoints:c.map(([a,t])=>({attributes:a,startTime:t.startTime,endTime:s,value:t.toPointValue()}))}}};Qt.LastValueAggregator=pa});var Qf=d(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.SumAggregator=Zt.SumAccumulation=void 0;var wv=Ht(),Mv=Gt(),Ge=class{constructor(r,o,c=0,s=!1){this.startTime=r,this.monotonic=o,this._current=c,this.reset=s}record(r){this.monotonic&&r<0||(this._current+=r)}setStartTime(r){this.startTime=r}toPointValue(){return this._current}};Zt.SumAccumulation=Ge;var fa=class{constructor(r){this.monotonic=r,this.kind=wv.AggregatorKind.SUM}createAccumulation(r){return new Ge(r,this.monotonic)}merge(r,o){let c=r.toPointValue(),s=o.toPointValue();return o.reset?new Ge(o.startTime,this.monotonic,s,o.reset):new Ge(r.startTime,this.monotonic,c+s)}diff(r,o){let c=r.toPointValue(),s=o.toPointValue();return this.monotonic&&c>s?new Ge(o.startTime,this.monotonic,s,!0):new Ge(o.startTime,this.monotonic,s-c)}toMetricData(r,o,c,s){return{descriptor:r,aggregationTemporality:o,dataPointType:Mv.DataPointType.SUM,dataPoints:c.map(([a,t])=>({attributes:a,startTime:t.startTime,endTime:s,value:t.toPointValue()})),isMonotonic:this.monotonic}}};Zt.SumAggregator=fa});var Zf=d(ge=>{"use strict";var Cv=ge&&ge.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),jr=ge&&ge.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Cv(r,i,o)};Object.defineProperty(ge,"__esModule",{value:!0});jr(Uf(),ge);jr(Vf(),ge);jr(Wf(),ge);jr(Jf(),ge);jr(Qf(),ge)});var ui=d(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.DefaultAggregation=z.ExponentialHistogramAggregation=z.ExplicitBucketHistogramAggregation=z.HistogramAggregation=z.LastValueAggregation=z.SumAggregation=z.DropAggregation=z.Aggregation=void 0;var Uv=(y(),E(_)),_t=Zf(),Me=we(),Re=class{static Drop(){return ed}static Sum(){return td}static LastValue(){return rd}static Histogram(){return nd}static ExponentialHistogram(){return Dv}static Default(){return Bv}};z.Aggregation=Re;var Gr=class i extends Re{createAggregator(r){return i.DEFAULT_INSTANCE}};z.DropAggregation=Gr;Gr.DEFAULT_INSTANCE=new _t.DropAggregator;var er=class i extends Re{createAggregator(r){switch(r.type){case Me.InstrumentType.COUNTER:case Me.InstrumentType.OBSERVABLE_COUNTER:case Me.InstrumentType.HISTOGRAM:return i.MONOTONIC_INSTANCE;default:return i.NON_MONOTONIC_INSTANCE}}};z.SumAggregation=er;er.MONOTONIC_INSTANCE=new _t.SumAggregator(!0);er.NON_MONOTONIC_INSTANCE=new _t.SumAggregator(!1);var Hr=class i extends Re{createAggregator(r){return i.DEFAULT_INSTANCE}};z.LastValueAggregation=Hr;Hr.DEFAULT_INSTANCE=new _t.LastValueAggregator;var Fr=class i extends Re{createAggregator(r){return i.DEFAULT_INSTANCE}};z.HistogramAggregation=Fr;Fr.DEFAULT_INSTANCE=new _t.HistogramAggregator([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0);var oi=class extends Re{constructor(r,o=!0){if(super(),this._recordMinMax=o,r===void 0||r.length===0)throw new Error("HistogramAggregator should be created with boundaries.");r=r.concat(),r=r.sort((a,t)=>a-t);let c=r.lastIndexOf(-1/0),s=r.indexOf(1/0);s===-1&&(s=void 0),this._boundaries=r.slice(c+1,s)}createAggregator(r){return new _t.HistogramAggregator(this._boundaries,this._recordMinMax)}};z.ExplicitBucketHistogramAggregation=oi;var ii=class extends Re{constructor(r=160,o=!0){super(),this._maxSize=r,this._recordMinMax=o}createAggregator(r){return new _t.ExponentialHistogramAggregator(this._maxSize,this._recordMinMax)}};z.ExponentialHistogramAggregation=ii;var si=class extends Re{_resolve(r){switch(r.type){case Me.InstrumentType.COUNTER:case Me.InstrumentType.UP_DOWN_COUNTER:case Me.InstrumentType.OBSERVABLE_COUNTER:case Me.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:return td;case Me.InstrumentType.OBSERVABLE_GAUGE:return rd;case Me.InstrumentType.HISTOGRAM:return r.advice.explicitBucketBoundaries?new oi(r.advice.explicitBucketBoundaries):nd}return Uv.diag.warn(`Unable to recognize instrument type: ${r.type}`),ed}createAggregator(r){return this._resolve(r).createAggregator(r)}};z.DefaultAggregation=si;var ed=new Gr,td=new er,rd=new Hr,nd=new Fr,Dv=new ii,Bv=new si});var da=d(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=tr.DEFAULT_AGGREGATION_SELECTOR=void 0;var Vv=ui(),kv=zo(),qv=i=>Vv.Aggregation.Default();tr.DEFAULT_AGGREGATION_SELECTOR=qv;var jv=i=>kv.AggregationTemporality.CUMULATIVE;tr.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=jv});var ma=d(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.MetricReader=void 0;var od=(y(),E(_)),ai=Ne(),id=da(),ha=class{constructor(r){var o,c,s;this._shutdown=!1,this._aggregationSelector=(o=r?.aggregationSelector)!==null&&o!==void 0?o:id.DEFAULT_AGGREGATION_SELECTOR,this._aggregationTemporalitySelector=(c=r?.aggregationTemporalitySelector)!==null&&c!==void 0?c:id.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR,this._metricProducers=(s=r?.metricProducers)!==null&&s!==void 0?s:[]}setMetricProducer(r){if(this._sdkMetricProducer)throw new Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=r,this.onInitialized()}selectAggregation(r){return this._aggregationSelector(r)}selectAggregationTemporality(r){return this._aggregationTemporalitySelector(r)}onInitialized(){}async collect(r){if(this._sdkMetricProducer===void 0)throw new Error("MetricReader is not bound to a MetricProducer");if(this._shutdown)throw new Error("MetricReader is shutdown");let[o,...c]=await Promise.all([this._sdkMetricProducer.collect({timeoutMillis:r?.timeoutMillis}),...this._metricProducers.map(e=>e.collect({timeoutMillis:r?.timeoutMillis}))]),s=o.errors.concat((0,ai.FlatMap)(c,e=>e.errors)),a=o.resourceMetrics.resource,t=o.resourceMetrics.scopeMetrics.concat((0,ai.FlatMap)(c,e=>e.resourceMetrics.scopeMetrics));return{resourceMetrics:{resource:a,scopeMetrics:t},errors:s}}async shutdown(r){if(this._shutdown){od.diag.error("Cannot call shutdown twice.");return}r?.timeoutMillis==null?await this.onShutdown():await(0,ai.callWithTimeout)(this.onShutdown(),r.timeoutMillis),this._shutdown=!0}async forceFlush(r){if(this._shutdown){od.diag.warn("Cannot forceFlush on already shutdown MetricReader.");return}if(r?.timeoutMillis==null){await this.onForceFlush();return}await(0,ai.callWithTimeout)(this.onForceFlush(),r.timeoutMillis)}};ci.MetricReader=ha});var ad=d(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.PeriodicExportingMetricReader=void 0;var sd=(y(),E(_)),li=N(),Gv=ma(),ud=Ne(),Hv=(y(),E(_)),_a=class extends Gv.MetricReader{constructor(r){var o,c,s,a;if(super({aggregationSelector:(o=r.exporter.selectAggregation)===null||o===void 0?void 0:o.bind(r.exporter),aggregationTemporalitySelector:(c=r.exporter.selectAggregationTemporality)===null||c===void 0?void 0:c.bind(r.exporter),metricProducers:r.metricProducers}),r.exportIntervalMillis!==void 0&&r.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(r.exportTimeoutMillis!==void 0&&r.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(r.exportTimeoutMillis!==void 0&&r.exportIntervalMillis!==void 0&&r.exportIntervalMillis<r.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");this._exportInterval=(s=r.exportIntervalMillis)!==null&&s!==void 0?s:6e4,this._exportTimeout=(a=r.exportTimeoutMillis)!==null&&a!==void 0?a:3e4,this._exporter=r.exporter}async _runOnce(){try{await(0,ud.callWithTimeout)(this._doRun(),this._exportTimeout)}catch(r){if(r instanceof ud.TimeoutError){sd.diag.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout);return}(0,li.globalErrorHandler)(r)}}async _doRun(){var r,o;let{resourceMetrics:c,errors:s}=await this.collect({timeoutMillis:this._exportTimeout});s.length>0&&sd.diag.error("PeriodicExportingMetricReader: metrics collection errors",...s);let a=async()=>{let t=await li.internal._export(this._exporter,c);if(t.code!==li.ExportResultCode.SUCCESS)throw new Error(`PeriodicExportingMetricReader: metrics export failed (error ${t.error})`)};c.resource.asyncAttributesPending?(o=(r=c.resource).waitForAsyncAttributes)===null||o===void 0||o.call(r).then(a,t=>Hv.diag.debug("Error while resolving async portion of resource: ",t)):await a()}onInitialized(){this._interval=setInterval(()=>{this._runOnce()},this._exportInterval),(0,li.unrefTimer)(this._interval)}async onForceFlush(){await this._runOnce(),await this._exporter.forceFlush()}async onShutdown(){this._interval&&clearInterval(this._interval),await this._exporter.shutdown()}};pi.PeriodicExportingMetricReader=_a});var ld=d(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.InMemoryMetricExporter=void 0;var cd=N(),ya=class{constructor(r){this._shutdown=!1,this._metrics=[],this._aggregationTemporality=r}export(r,o){if(this._shutdown){setTimeout(()=>o({code:cd.ExportResultCode.FAILED}),0);return}this._metrics.push(r),setTimeout(()=>o({code:cd.ExportResultCode.SUCCESS}),0)}getMetrics(){return this._metrics}forceFlush(){return Promise.resolve()}reset(){this._metrics=[]}selectAggregationTemporality(r){return this._aggregationTemporality}shutdown(){return this._shutdown=!0,Promise.resolve()}};fi.InMemoryMetricExporter=ya});var fd=d(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.ConsoleMetricExporter=void 0;var pd=N(),Fv=da(),Ea=class i{constructor(r){var o;this._shutdown=!1,this._temporalitySelector=(o=r?.temporalitySelector)!==null&&o!==void 0?o:Fv.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR}export(r,o){if(this._shutdown){setImmediate(o,{code:pd.ExportResultCode.FAILED});return}return i._sendMetrics(r,o)}forceFlush(){return Promise.resolve()}selectAggregationTemporality(r){return this._temporalitySelector(r)}shutdown(){return this._shutdown=!0,Promise.resolve()}static _sendMetrics(r,o){for(let c of r.scopeMetrics)for(let s of c.metrics)console.dir({descriptor:s.descriptor,dataPointType:s.dataPointType,dataPoints:s.dataPoints});o({code:pd.ExportResultCode.SUCCESS})}};di.ConsoleMetricExporter=Ea});var dd=d(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.ViewRegistry=void 0;var ga=class{constructor(){this._registeredViews=[]}addView(r){this._registeredViews.push(r)}findViews(r,o){return this._registeredViews.filter(s=>this._matchInstrument(s.instrumentSelector,r)&&this._matchMeter(s.meterSelector,o))}_matchInstrument(r,o){return(r.getType()===void 0||o.type===r.getType())&&r.getNameFilter().match(o.name)&&r.getUnitFilter().match(o.unit)}_matchMeter(r,o){return r.getNameFilter().match(o.name)&&(o.version===void 0||r.getVersionFilter().match(o.version))&&(o.schemaUrl===void 0||r.getSchemaUrlFilter().match(o.schemaUrl))}};hi.ViewRegistry=ga});var mi=d(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.isObservableInstrument=H.ObservableUpDownCounterInstrument=H.ObservableGaugeInstrument=H.ObservableCounterInstrument=H.ObservableInstrument=H.HistogramInstrument=H.CounterInstrument=H.UpDownCounterInstrument=H.SyncInstrument=void 0;var rr=(y(),E(_)),Kv=N(),nr=class{constructor(r,o){this._writableMetricStorage=r,this._descriptor=o}_record(r,o={},c=rr.context.active()){if(typeof r!="number"){rr.diag.warn(`non-number value provided to metric ${this._descriptor.name}: ${r}`);return}this._descriptor.valueType===rr.ValueType.INT&&!Number.isInteger(r)&&(rr.diag.warn(`INT value type cannot accept a floating-point value for ${this._descriptor.name}, ignoring the fractional digits.`),r=Math.trunc(r),!Number.isInteger(r))||this._writableMetricStorage.record(r,o,c,(0,Kv.millisToHrTime)(Date.now()))}};H.SyncInstrument=nr;var va=class extends nr{add(r,o,c){this._record(r,o,c)}};H.UpDownCounterInstrument=va;var Ta=class extends nr{add(r,o,c){if(r<0){rr.diag.warn(`negative value provided to counter ${this._descriptor.name}: ${r}`);return}this._record(r,o,c)}};H.CounterInstrument=Ta;var Sa=class extends nr{record(r,o,c){if(r<0){rr.diag.warn(`negative value provided to histogram ${this._descriptor.name}: ${r}`);return}this._record(r,o,c)}};H.HistogramInstrument=Sa;var yt=class{constructor(r,o,c){this._observableRegistry=c,this._descriptor=r,this._metricStorages=o}addCallback(r){this._observableRegistry.addCallback(r,this)}removeCallback(r){this._observableRegistry.removeCallback(r,this)}};H.ObservableInstrument=yt;var ba=class extends yt{};H.ObservableCounterInstrument=ba;var Oa=class extends yt{};H.ObservableGaugeInstrument=Oa;var Aa=class extends yt{};H.ObservableUpDownCounterInstrument=Aa;function Xv(i){return i instanceof yt}H.isObservableInstrument=Xv});var hd=d(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.Meter=void 0;var de=we(),or=mi(),Pa=class{constructor(r){this._meterSharedState=r}createHistogram(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.HISTOGRAM,o),s=this._meterSharedState.registerMetricStorage(c);return new or.HistogramInstrument(s,c)}createCounter(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.COUNTER,o),s=this._meterSharedState.registerMetricStorage(c);return new or.CounterInstrument(s,c)}createUpDownCounter(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.UP_DOWN_COUNTER,o),s=this._meterSharedState.registerMetricStorage(c);return new or.UpDownCounterInstrument(s,c)}createObservableGauge(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.OBSERVABLE_GAUGE,o),s=this._meterSharedState.registerAsyncMetricStorage(c);return new or.ObservableGaugeInstrument(c,s,this._meterSharedState.observableRegistry)}createObservableCounter(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.OBSERVABLE_COUNTER,o),s=this._meterSharedState.registerAsyncMetricStorage(c);return new or.ObservableCounterInstrument(c,s,this._meterSharedState.observableRegistry)}createObservableUpDownCounter(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER,o),s=this._meterSharedState.registerAsyncMetricStorage(c);return new or.ObservableUpDownCounterInstrument(c,s,this._meterSharedState.observableRegistry)}addBatchObservableCallback(r,o){this._meterSharedState.observableRegistry.addBatchCallback(r,o)}removeBatchObservableCallback(r,o){this._meterSharedState.observableRegistry.removeBatchCallback(r,o)}};_i.Meter=Pa});var Ra=d(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.MetricStorage=void 0;var zv=we(),Na=class{constructor(r){this._instrumentDescriptor=r}getInstrumentDescriptor(){return this._instrumentDescriptor}updateDescription(r){this._instrumentDescriptor=(0,zv.createInstrumentDescriptor)(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:r,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})}};yi.MetricStorage=Na});var Kr=d(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.AttributeHashMap=ir.HashMap=void 0;var $v=Ne(),Ei=class{constructor(r){this._hash=r,this._valueMap=new Map,this._keyMap=new Map}get(r,o){return o??(o=this._hash(r)),this._valueMap.get(o)}getOrDefault(r,o){let c=this._hash(r);if(this._valueMap.has(c))return this._valueMap.get(c);let s=o();return this._keyMap.has(c)||this._keyMap.set(c,r),this._valueMap.set(c,s),s}set(r,o,c){c??(c=this._hash(r)),this._keyMap.has(c)||this._keyMap.set(c,r),this._valueMap.set(c,o)}has(r,o){return o??(o=this._hash(r)),this._valueMap.has(o)}*keys(){let r=this._keyMap.entries(),o=r.next();for(;o.done!==!0;)yield[o.value[1],o.value[0]],o=r.next()}*entries(){let r=this._valueMap.entries(),o=r.next();for(;o.done!==!0;)yield[this._keyMap.get(o.value[0]),o.value[1],o.value[0]],o=r.next()}get size(){return this._valueMap.size}};ir.HashMap=Ei;var xa=class extends Ei{constructor(){super($v.hashAttributes)}};ir.AttributeHashMap=xa});var wa=d(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.DeltaMetricProcessor=void 0;var Ia=Kr(),La=class{constructor(r){this._aggregator=r,this._activeCollectionStorage=new Ia.AttributeHashMap,this._cumulativeMemoStorage=new Ia.AttributeHashMap}record(r,o,c,s){let a=this._activeCollectionStorage.getOrDefault(o,()=>this._aggregator.createAccumulation(s));a?.record(r)}batchCumulate(r,o){Array.from(r.entries()).forEach(([c,s,a])=>{let t=this._aggregator.createAccumulation(o);t?.record(s);let e=t;if(this._cumulativeMemoStorage.has(c,a)){let n=this._cumulativeMemoStorage.get(c,a);e=this._aggregator.diff(n,t)}if(this._activeCollectionStorage.has(c,a)){let n=this._activeCollectionStorage.get(c,a);e=this._aggregator.merge(n,e)}this._cumulativeMemoStorage.set(c,t,a),this._activeCollectionStorage.set(c,e,a)})}collect(){let r=this._activeCollectionStorage;return this._activeCollectionStorage=new Ia.AttributeHashMap,r}};gi.DeltaMetricProcessor=La});var Ca=d(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.TemporalMetricProcessor=void 0;var Yv=zo(),Wv=Kr(),Ma=class i{constructor(r,o){this._aggregator=r,this._unreportedAccumulations=new Map,this._reportHistory=new Map,o.forEach(c=>{this._unreportedAccumulations.set(c,[])})}buildMetrics(r,o,c,s){this._stashAccumulations(c);let a=this._getMergedUnreportedAccumulations(r),t=a,e;if(this._reportHistory.has(r)){let u=this._reportHistory.get(r),l=u.collectionTime;e=u.aggregationTemporality,e===Yv.AggregationTemporality.CUMULATIVE?t=i.merge(u.accumulations,a,this._aggregator):t=i.calibrateStartTime(u.accumulations,a,l)}else e=r.selectAggregationTemporality(o.type);this._reportHistory.set(r,{accumulations:t,collectionTime:s,aggregationTemporality:e});let n=Jv(t);if(n.length!==0)return this._aggregator.toMetricData(o,e,n,s)}_stashAccumulations(r){let o=this._unreportedAccumulations.keys();for(let c of o){let s=this._unreportedAccumulations.get(c);s===void 0&&(s=[],this._unreportedAccumulations.set(c,s)),s.push(r)}}_getMergedUnreportedAccumulations(r){let o=new Wv.AttributeHashMap,c=this._unreportedAccumulations.get(r);if(this._unreportedAccumulations.set(r,[]),c===void 0)return o;for(let s of c)o=i.merge(o,s,this._aggregator);return o}static merge(r,o,c){let s=r,a=o.entries(),t=a.next();for(;t.done!==!0;){let[e,n,u]=t.value;if(r.has(e,u)){let l=r.get(e,u),h=c.merge(l,n);s.set(e,h,u)}else s.set(e,n,u);t=a.next()}return s}static calibrateStartTime(r,o,c){for(let[s,a]of r.keys()){let t=o.get(s,a);t?.setStartTime(c)}return o}};vi.TemporalMetricProcessor=Ma;function Jv(i){return Array.from(i.entries())}});var md=d(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.AsyncMetricStorage=void 0;var Qv=Ra(),Zv=wa(),eT=Ca(),tT=Kr(),Ua=class extends Qv.MetricStorage{constructor(r,o,c,s){super(r),this._attributesProcessor=c,this._deltaMetricStorage=new Zv.DeltaMetricProcessor(o),this._temporalMetricStorage=new eT.TemporalMetricProcessor(o,s)}record(r,o){let c=new tT.AttributeHashMap;Array.from(r.entries()).forEach(([s,a])=>{c.set(this._attributesProcessor.process(s),a)}),this._deltaMetricStorage.batchCumulate(c,o)}collect(r,o){let c=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,c,o)}};Ti.AsyncMetricStorage=Ua});var vd=d(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.getConflictResolutionRecipe=se.getDescriptionResolutionRecipe=se.getTypeConflictResolutionRecipe=se.getUnitConflictResolutionRecipe=se.getValueTypeConflictResolutionRecipe=se.getIncompatibilityDetails=void 0;function rT(i,r){let o="";return i.unit!==r.unit&&(o+=` - Unit '${i.unit}' does not match '${r.unit}'
|
|
7
|
+
var Gm=Object.create;var ls=Object.defineProperty;var Hm=Object.getOwnPropertyDescriptor;var Fm=Object.getOwnPropertyNames;var Km=Object.getPrototypeOf,Xm=Object.prototype.hasOwnProperty;var z=(i=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(i,{get:(r,o)=>(typeof require<"u"?require:r)[o]}):i)(function(i){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+i+'" is not supported')});var Fc=(i,r)=>()=>(i&&(r=i(i=0)),r);var d=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports);var cn=(i,r,o,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of Fm(r))!Xm.call(i,s)&&s!==o&&ls(i,s,{get:()=>r[s],enumerable:!(c=Hm(r,s))||c.enumerable});return i},Ot=(i,r,o)=>(cn(i,r,"default"),o&&cn(o,r,"default")),Q=(i,r,o)=>(o=i!=null?Gm(Km(i)):{},cn(r||!i||!i.__esModule?ls(o,"default",{value:i,enumerable:!0}):o,i)),E=i=>cn(ls({},"__esModule",{value:!0}),i);var _={};import*as Pb from"@opentelemetry/api";var y=Fc(()=>{Ot(_,Pb)});var Or=d(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.isTracingSuppressed=De.unsuppressTracing=De.suppressTracing=void 0;var zm=(y(),E(_)),ps=(0,zm.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function $m(i){return i.setValue(ps,!0)}De.suppressTracing=$m;function Ym(i){return i.deleteValue(ps)}De.unsuppressTracing=Ym;function Wm(i){return i.getValue(ps)===!0}De.isTracingSuppressed=Wm});var fs=d(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.BAGGAGE_MAX_TOTAL_LENGTH=Z.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=Z.BAGGAGE_MAX_NAME_VALUE_PAIRS=Z.BAGGAGE_HEADER=Z.BAGGAGE_ITEMS_SEPARATOR=Z.BAGGAGE_PROPERTIES_SEPARATOR=Z.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;Z.BAGGAGE_KEY_PAIR_SEPARATOR="=";Z.BAGGAGE_PROPERTIES_SEPARATOR=";";Z.BAGGAGE_ITEMS_SEPARATOR=",";Z.BAGGAGE_HEADER="baggage";Z.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;Z.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;Z.BAGGAGE_MAX_TOTAL_LENGTH=8192});var ds=d(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.parseKeyPairsIntoRecord=Oe.parsePairKeyValue=Oe.getKeyPairs=Oe.serializeKeyPairs=void 0;var Jm=(y(),E(_)),Je=fs();function Qm(i){return i.reduce((r,o)=>{let c=`${r}${r!==""?Je.BAGGAGE_ITEMS_SEPARATOR:""}${o}`;return c.length>Je.BAGGAGE_MAX_TOTAL_LENGTH?r:c},"")}Oe.serializeKeyPairs=Qm;function Zm(i){return i.getAllEntries().map(([r,o])=>{let c=`${encodeURIComponent(r)}=${encodeURIComponent(o.value)}`;return o.metadata!==void 0&&(c+=Je.BAGGAGE_PROPERTIES_SEPARATOR+o.metadata.toString()),c})}Oe.getKeyPairs=Zm;function Kc(i){let r=i.split(Je.BAGGAGE_PROPERTIES_SEPARATOR);if(r.length<=0)return;let o=r.shift();if(!o)return;let c=o.indexOf(Je.BAGGAGE_KEY_PAIR_SEPARATOR);if(c<=0)return;let s=decodeURIComponent(o.substring(0,c).trim()),a=decodeURIComponent(o.substring(c+1).trim()),t;return r.length>0&&(t=(0,Jm.baggageEntryMetadataFromString)(r.join(Je.BAGGAGE_PROPERTIES_SEPARATOR))),{key:s,value:a,metadata:t}}Oe.parsePairKeyValue=Kc;function e_(i){return typeof i!="string"||i.length===0?{}:i.split(Je.BAGGAGE_ITEMS_SEPARATOR).map(r=>Kc(r)).filter(r=>r!==void 0&&r.value.length>0).reduce((r,o)=>(r[o.key]=o.value,r),{})}Oe.parseKeyPairsIntoRecord=e_});var Xc=d(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.W3CBaggagePropagator=void 0;var hs=(y(),E(_)),t_=Or(),Qe=fs(),ms=ds(),_s=class{inject(r,o,c){let s=hs.propagation.getBaggage(r);if(!s||(0,t_.isTracingSuppressed)(r))return;let a=(0,ms.getKeyPairs)(s).filter(e=>e.length<=Qe.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,Qe.BAGGAGE_MAX_NAME_VALUE_PAIRS),t=(0,ms.serializeKeyPairs)(a);t.length>0&&c.set(o,Qe.BAGGAGE_HEADER,t)}extract(r,o,c){let s=c.get(o,Qe.BAGGAGE_HEADER),a=Array.isArray(s)?s.join(Qe.BAGGAGE_ITEMS_SEPARATOR):s;if(!a)return r;let t={};return a.length===0||(a.split(Qe.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let u=(0,ms.parsePairKeyValue)(n);if(u){let l={value:u.value};u.metadata&&(l.metadata=u.metadata),t[u.key]=l}}),Object.entries(t).length===0)?r:hs.propagation.setBaggage(r,hs.propagation.createBaggage(t))}fields(){return[Qe.BAGGAGE_HEADER]}};ln.W3CBaggagePropagator=_s});var zc=d(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.AnchoredClock=void 0;var ys=class{constructor(r,o){this._monotonicClock=o,this._epochMillis=r.now(),this._performanceMillis=o.now()}now(){let r=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+r}};pn.AnchoredClock=ys});var Qc=d(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.isAttributeValue=Be.isAttributeKey=Be.sanitizeAttributes=void 0;var $c=(y(),E(_));function r_(i){let r={};if(typeof i!="object"||i==null)return r;for(let[o,c]of Object.entries(i)){if(!Yc(o)){$c.diag.warn(`Invalid attribute key: ${o}`);continue}if(!Wc(c)){$c.diag.warn(`Invalid attribute value set for key: ${o}`);continue}Array.isArray(c)?r[o]=c.slice():r[o]=c}return r}Be.sanitizeAttributes=r_;function Yc(i){return typeof i=="string"&&i.length>0}Be.isAttributeKey=Yc;function Wc(i){return i==null?!0:Array.isArray(i)?n_(i):Jc(i)}Be.isAttributeValue=Wc;function n_(i){let r;for(let o of i)if(o!=null){if(!r){if(Jc(o)){r=typeof o;continue}return!1}if(typeof o!==r)return!1}return!0}function Jc(i){switch(typeof i){case"number":case"boolean":case"string":return!0}return!1}});var Es=d(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.loggingErrorHandler=void 0;var o_=(y(),E(_));function i_(){return i=>{o_.diag.error(s_(i))}}fn.loggingErrorHandler=i_;function s_(i){return typeof i=="string"?i:JSON.stringify(u_(i))}function u_(i){let r={},o=i;for(;o!==null;)Object.getOwnPropertyNames(o).forEach(c=>{if(r[c])return;let s=o[c];s&&(r[c]=String(s))}),o=Object.getPrototypeOf(o);return r}});var gs=d(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.globalErrorHandler=At.setGlobalErrorHandler=void 0;var a_=Es(),Zc=(0,a_.loggingErrorHandler)();function c_(i){Zc=i}At.setGlobalErrorHandler=c_;function l_(i){try{Zc(i)}catch{}}At.globalErrorHandler=l_});var vs=d(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.TracesSamplerValues=void 0;var p_;(function(i){i.AlwaysOff="always_off",i.AlwaysOn="always_on",i.ParentBasedAlwaysOff="parentbased_always_off",i.ParentBasedAlwaysOn="parentbased_always_on",i.ParentBasedTraceIdRatio="parentbased_traceidratio",i.TraceIdRatio="traceidratio"})(p_=Ar.TracesSamplerValues||(Ar.TracesSamplerValues={}))});var el=d(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn._globalThis=void 0;dn._globalThis=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});var hn=d(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.getEnvWithoutDefaults=C.parseEnvironment=C.DEFAULT_ENVIRONMENT=C.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=C.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=C.DEFAULT_ATTRIBUTE_COUNT_LIMIT=C.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=void 0;var Ve=(y(),E(_)),f_=vs(),d_=el(),h_=",",m_=["OTEL_SDK_DISABLED"];function __(i){return m_.indexOf(i)>-1}var y_=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function E_(i){return y_.indexOf(i)>-1}var g_=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function v_(i){return g_.indexOf(i)>-1}C.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=1/0;C.DEFAULT_ATTRIBUTE_COUNT_LIMIT=128;C.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=128;C.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=128;C.DEFAULT_ENVIRONMENT={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:Ve.DiagLogLevel.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:C.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_ATTRIBUTE_COUNT_LIMIT:C.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:C.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:C.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:C.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:C.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:C.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:C.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:f_.TracesSamplerValues.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};function T_(i,r,o){if(typeof o[i]>"u")return;let c=String(o[i]);r[i]=c.toLowerCase()==="true"}function S_(i,r,o,c=-1/0,s=1/0){if(typeof o[i]<"u"){let a=Number(o[i]);isNaN(a)||(a<c?r[i]=c:a>s?r[i]=s:r[i]=a)}}function b_(i,r,o,c=h_){let s=o[i];typeof s=="string"&&(r[i]=s.split(c).map(a=>a.trim()))}var O_={ALL:Ve.DiagLogLevel.ALL,VERBOSE:Ve.DiagLogLevel.VERBOSE,DEBUG:Ve.DiagLogLevel.DEBUG,INFO:Ve.DiagLogLevel.INFO,WARN:Ve.DiagLogLevel.WARN,ERROR:Ve.DiagLogLevel.ERROR,NONE:Ve.DiagLogLevel.NONE};function A_(i,r,o){let c=o[i];if(typeof c=="string"){let s=O_[c.toUpperCase()];s!=null&&(r[i]=s)}}function Ts(i){let r={};for(let o in C.DEFAULT_ENVIRONMENT){let c=o;switch(c){case"OTEL_LOG_LEVEL":A_(c,r,i);break;default:if(__(c))T_(c,r,i);else if(E_(c))S_(c,r,i);else if(v_(c))b_(c,r,i);else{let s=i[c];typeof s<"u"&&s!==null&&(r[c]=String(s))}}}return r}C.parseEnvironment=Ts;function P_(){return typeof process<"u"&&process&&process.env?Ts(process.env):Ts(d_._globalThis)}C.getEnvWithoutDefaults=P_});var rl=d(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.getEnv=void 0;var N_=z("os"),tl=hn();function R_(){let i=(0,tl.parseEnvironment)(process.env);return Object.assign({HOSTNAME:N_.hostname()},tl.DEFAULT_ENVIRONMENT,i)}mn.getEnv=R_});var nl=d(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n._globalThis=void 0;_n._globalThis=typeof globalThis=="object"?globalThis:global});var il=d(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.hexToBase64=void 0;function ol(i){return i>=48&&i<=57?i-48:i>=97&&i<=102?i-87:i-55}var x_=Buffer.alloc(8),I_=Buffer.alloc(16);function L_(i){let r;i.length===16?r=x_:i.length===32?r=I_:r=Buffer.alloc(i.length/2);let o=0;for(let c=0;c<i.length;c+=2){let s=ol(i.charCodeAt(c)),a=ol(i.charCodeAt(c+1));r.writeUInt8(s<<4|a,o++)}return r.toString("base64")}yn.hexToBase64=L_});var al=d(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.RandomIdGenerator=void 0;var w_=8,ul=16,Ss=class{constructor(){this.generateTraceId=sl(ul),this.generateSpanId=sl(w_)}};gn.RandomIdGenerator=Ss;var En=Buffer.allocUnsafe(ul);function sl(i){return function(){for(let o=0;o<i/4;o++)En.writeUInt32BE(Math.random()*2**32>>>0,o*4);for(let o=0;o<i&&!(En[o]>0);o++)o===i-1&&(En[i-1]=1);return En.toString("hex",0,i)}}});var cl=d(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.otperformance=void 0;var M_=z("perf_hooks");vn.otperformance=M_.performance});var bs=d(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.VERSION=void 0;Tn.VERSION="1.19.0"});var ll=d(I=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0});I.MessageTypeValues=I.RpcGrpcStatusCodeValues=I.MessagingOperationValues=I.MessagingDestinationKindValues=I.HttpFlavorValues=I.NetHostConnectionSubtypeValues=I.NetHostConnectionTypeValues=I.NetTransportValues=I.FaasInvokedProviderValues=I.FaasDocumentOperationValues=I.FaasTriggerValues=I.DbCassandraConsistencyLevelValues=I.DbSystemValues=I.SemanticAttributes=void 0;I.SemanticAttributes={AWS_LAMBDA_INVOKED_ARN:"aws.lambda.invoked_arn",DB_SYSTEM:"db.system",DB_CONNECTION_STRING:"db.connection_string",DB_USER:"db.user",DB_JDBC_DRIVER_CLASSNAME:"db.jdbc.driver_classname",DB_NAME:"db.name",DB_STATEMENT:"db.statement",DB_OPERATION:"db.operation",DB_MSSQL_INSTANCE_NAME:"db.mssql.instance_name",DB_CASSANDRA_KEYSPACE:"db.cassandra.keyspace",DB_CASSANDRA_PAGE_SIZE:"db.cassandra.page_size",DB_CASSANDRA_CONSISTENCY_LEVEL:"db.cassandra.consistency_level",DB_CASSANDRA_TABLE:"db.cassandra.table",DB_CASSANDRA_IDEMPOTENCE:"db.cassandra.idempotence",DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:"db.cassandra.speculative_execution_count",DB_CASSANDRA_COORDINATOR_ID:"db.cassandra.coordinator.id",DB_CASSANDRA_COORDINATOR_DC:"db.cassandra.coordinator.dc",DB_HBASE_NAMESPACE:"db.hbase.namespace",DB_REDIS_DATABASE_INDEX:"db.redis.database_index",DB_MONGODB_COLLECTION:"db.mongodb.collection",DB_SQL_TABLE:"db.sql.table",EXCEPTION_TYPE:"exception.type",EXCEPTION_MESSAGE:"exception.message",EXCEPTION_STACKTRACE:"exception.stacktrace",EXCEPTION_ESCAPED:"exception.escaped",FAAS_TRIGGER:"faas.trigger",FAAS_EXECUTION:"faas.execution",FAAS_DOCUMENT_COLLECTION:"faas.document.collection",FAAS_DOCUMENT_OPERATION:"faas.document.operation",FAAS_DOCUMENT_TIME:"faas.document.time",FAAS_DOCUMENT_NAME:"faas.document.name",FAAS_TIME:"faas.time",FAAS_CRON:"faas.cron",FAAS_COLDSTART:"faas.coldstart",FAAS_INVOKED_NAME:"faas.invoked_name",FAAS_INVOKED_PROVIDER:"faas.invoked_provider",FAAS_INVOKED_REGION:"faas.invoked_region",NET_TRANSPORT:"net.transport",NET_PEER_IP:"net.peer.ip",NET_PEER_PORT:"net.peer.port",NET_PEER_NAME:"net.peer.name",NET_HOST_IP:"net.host.ip",NET_HOST_PORT:"net.host.port",NET_HOST_NAME:"net.host.name",NET_HOST_CONNECTION_TYPE:"net.host.connection.type",NET_HOST_CONNECTION_SUBTYPE:"net.host.connection.subtype",NET_HOST_CARRIER_NAME:"net.host.carrier.name",NET_HOST_CARRIER_MCC:"net.host.carrier.mcc",NET_HOST_CARRIER_MNC:"net.host.carrier.mnc",NET_HOST_CARRIER_ICC:"net.host.carrier.icc",PEER_SERVICE:"peer.service",ENDUSER_ID:"enduser.id",ENDUSER_ROLE:"enduser.role",ENDUSER_SCOPE:"enduser.scope",THREAD_ID:"thread.id",THREAD_NAME:"thread.name",CODE_FUNCTION:"code.function",CODE_NAMESPACE:"code.namespace",CODE_FILEPATH:"code.filepath",CODE_LINENO:"code.lineno",HTTP_METHOD:"http.method",HTTP_URL:"http.url",HTTP_TARGET:"http.target",HTTP_HOST:"http.host",HTTP_SCHEME:"http.scheme",HTTP_STATUS_CODE:"http.status_code",HTTP_FLAVOR:"http.flavor",HTTP_USER_AGENT:"http.user_agent",HTTP_REQUEST_CONTENT_LENGTH:"http.request_content_length",HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:"http.request_content_length_uncompressed",HTTP_RESPONSE_CONTENT_LENGTH:"http.response_content_length",HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:"http.response_content_length_uncompressed",HTTP_SERVER_NAME:"http.server_name",HTTP_ROUTE:"http.route",HTTP_CLIENT_IP:"http.client_ip",AWS_DYNAMODB_TABLE_NAMES:"aws.dynamodb.table_names",AWS_DYNAMODB_CONSUMED_CAPACITY:"aws.dynamodb.consumed_capacity",AWS_DYNAMODB_ITEM_COLLECTION_METRICS:"aws.dynamodb.item_collection_metrics",AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:"aws.dynamodb.provisioned_read_capacity",AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:"aws.dynamodb.provisioned_write_capacity",AWS_DYNAMODB_CONSISTENT_READ:"aws.dynamodb.consistent_read",AWS_DYNAMODB_PROJECTION:"aws.dynamodb.projection",AWS_DYNAMODB_LIMIT:"aws.dynamodb.limit",AWS_DYNAMODB_ATTRIBUTES_TO_GET:"aws.dynamodb.attributes_to_get",AWS_DYNAMODB_INDEX_NAME:"aws.dynamodb.index_name",AWS_DYNAMODB_SELECT:"aws.dynamodb.select",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:"aws.dynamodb.global_secondary_indexes",AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:"aws.dynamodb.local_secondary_indexes",AWS_DYNAMODB_EXCLUSIVE_START_TABLE:"aws.dynamodb.exclusive_start_table",AWS_DYNAMODB_TABLE_COUNT:"aws.dynamodb.table_count",AWS_DYNAMODB_SCAN_FORWARD:"aws.dynamodb.scan_forward",AWS_DYNAMODB_SEGMENT:"aws.dynamodb.segment",AWS_DYNAMODB_TOTAL_SEGMENTS:"aws.dynamodb.total_segments",AWS_DYNAMODB_COUNT:"aws.dynamodb.count",AWS_DYNAMODB_SCANNED_COUNT:"aws.dynamodb.scanned_count",AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:"aws.dynamodb.attribute_definitions",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:"aws.dynamodb.global_secondary_index_updates",MESSAGING_SYSTEM:"messaging.system",MESSAGING_DESTINATION:"messaging.destination",MESSAGING_DESTINATION_KIND:"messaging.destination_kind",MESSAGING_TEMP_DESTINATION:"messaging.temp_destination",MESSAGING_PROTOCOL:"messaging.protocol",MESSAGING_PROTOCOL_VERSION:"messaging.protocol_version",MESSAGING_URL:"messaging.url",MESSAGING_MESSAGE_ID:"messaging.message_id",MESSAGING_CONVERSATION_ID:"messaging.conversation_id",MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:"messaging.message_payload_size_bytes",MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:"messaging.message_payload_compressed_size_bytes",MESSAGING_OPERATION:"messaging.operation",MESSAGING_CONSUMER_ID:"messaging.consumer_id",MESSAGING_RABBITMQ_ROUTING_KEY:"messaging.rabbitmq.routing_key",MESSAGING_KAFKA_MESSAGE_KEY:"messaging.kafka.message_key",MESSAGING_KAFKA_CONSUMER_GROUP:"messaging.kafka.consumer_group",MESSAGING_KAFKA_CLIENT_ID:"messaging.kafka.client_id",MESSAGING_KAFKA_PARTITION:"messaging.kafka.partition",MESSAGING_KAFKA_TOMBSTONE:"messaging.kafka.tombstone",RPC_SYSTEM:"rpc.system",RPC_SERVICE:"rpc.service",RPC_METHOD:"rpc.method",RPC_GRPC_STATUS_CODE:"rpc.grpc.status_code",RPC_JSONRPC_VERSION:"rpc.jsonrpc.version",RPC_JSONRPC_REQUEST_ID:"rpc.jsonrpc.request_id",RPC_JSONRPC_ERROR_CODE:"rpc.jsonrpc.error_code",RPC_JSONRPC_ERROR_MESSAGE:"rpc.jsonrpc.error_message",MESSAGE_TYPE:"message.type",MESSAGE_ID:"message.id",MESSAGE_COMPRESSED_SIZE:"message.compressed_size",MESSAGE_UNCOMPRESSED_SIZE:"message.uncompressed_size"};I.DbSystemValues={OTHER_SQL:"other_sql",MSSQL:"mssql",MYSQL:"mysql",ORACLE:"oracle",DB2:"db2",POSTGRESQL:"postgresql",REDSHIFT:"redshift",HIVE:"hive",CLOUDSCAPE:"cloudscape",HSQLDB:"hsqldb",PROGRESS:"progress",MAXDB:"maxdb",HANADB:"hanadb",INGRES:"ingres",FIRSTSQL:"firstsql",EDB:"edb",CACHE:"cache",ADABAS:"adabas",FIREBIRD:"firebird",DERBY:"derby",FILEMAKER:"filemaker",INFORMIX:"informix",INSTANTDB:"instantdb",INTERBASE:"interbase",MARIADB:"mariadb",NETEZZA:"netezza",PERVASIVE:"pervasive",POINTBASE:"pointbase",SQLITE:"sqlite",SYBASE:"sybase",TERADATA:"teradata",VERTICA:"vertica",H2:"h2",COLDFUSION:"coldfusion",CASSANDRA:"cassandra",HBASE:"hbase",MONGODB:"mongodb",REDIS:"redis",COUCHBASE:"couchbase",COUCHDB:"couchdb",COSMOSDB:"cosmosdb",DYNAMODB:"dynamodb",NEO4J:"neo4j",GEODE:"geode",ELASTICSEARCH:"elasticsearch",MEMCACHED:"memcached",COCKROACHDB:"cockroachdb"};I.DbCassandraConsistencyLevelValues={ALL:"all",EACH_QUORUM:"each_quorum",QUORUM:"quorum",LOCAL_QUORUM:"local_quorum",ONE:"one",TWO:"two",THREE:"three",LOCAL_ONE:"local_one",ANY:"any",SERIAL:"serial",LOCAL_SERIAL:"local_serial"};I.FaasTriggerValues={DATASOURCE:"datasource",HTTP:"http",PUBSUB:"pubsub",TIMER:"timer",OTHER:"other"};I.FaasDocumentOperationValues={INSERT:"insert",EDIT:"edit",DELETE:"delete"};I.FaasInvokedProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};I.NetTransportValues={IP_TCP:"ip_tcp",IP_UDP:"ip_udp",IP:"ip",UNIX:"unix",PIPE:"pipe",INPROC:"inproc",OTHER:"other"};I.NetHostConnectionTypeValues={WIFI:"wifi",WIRED:"wired",CELL:"cell",UNAVAILABLE:"unavailable",UNKNOWN:"unknown"};I.NetHostConnectionSubtypeValues={GPRS:"gprs",EDGE:"edge",UMTS:"umts",CDMA:"cdma",EVDO_0:"evdo_0",EVDO_A:"evdo_a",CDMA2000_1XRTT:"cdma2000_1xrtt",HSDPA:"hsdpa",HSUPA:"hsupa",HSPA:"hspa",IDEN:"iden",EVDO_B:"evdo_b",LTE:"lte",EHRPD:"ehrpd",HSPAP:"hspap",GSM:"gsm",TD_SCDMA:"td_scdma",IWLAN:"iwlan",NR:"nr",NRNSA:"nrnsa",LTE_CA:"lte_ca"};I.HttpFlavorValues={HTTP_1_0:"1.0",HTTP_1_1:"1.1",HTTP_2_0:"2.0",SPDY:"SPDY",QUIC:"QUIC"};I.MessagingDestinationKindValues={QUEUE:"queue",TOPIC:"topic"};I.MessagingOperationValues={RECEIVE:"receive",PROCESS:"process"};I.RpcGrpcStatusCodeValues={OK:0,CANCELLED:1,UNKNOWN:2,INVALID_ARGUMENT:3,DEADLINE_EXCEEDED:4,NOT_FOUND:5,ALREADY_EXISTS:6,PERMISSION_DENIED:7,RESOURCE_EXHAUSTED:8,FAILED_PRECONDITION:9,ABORTED:10,OUT_OF_RANGE:11,UNIMPLEMENTED:12,INTERNAL:13,UNAVAILABLE:14,DATA_LOSS:15,UNAUTHENTICATED:16};I.MessageTypeValues={SENT:"SENT",RECEIVED:"RECEIVED"}});var pl=d(Ze=>{"use strict";var C_=Ze&&Ze.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),U_=Ze&&Ze.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&C_(r,i,o)};Object.defineProperty(Ze,"__esModule",{value:!0});U_(ll(),Ze)});var fl=d(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.TelemetrySdkLanguageValues=ee.OsTypeValues=ee.HostArchValues=ee.AwsEcsLaunchtypeValues=ee.CloudPlatformValues=ee.CloudProviderValues=ee.SemanticResourceAttributes=void 0;ee.SemanticResourceAttributes={CLOUD_PROVIDER:"cloud.provider",CLOUD_ACCOUNT_ID:"cloud.account.id",CLOUD_REGION:"cloud.region",CLOUD_AVAILABILITY_ZONE:"cloud.availability_zone",CLOUD_PLATFORM:"cloud.platform",AWS_ECS_CONTAINER_ARN:"aws.ecs.container.arn",AWS_ECS_CLUSTER_ARN:"aws.ecs.cluster.arn",AWS_ECS_LAUNCHTYPE:"aws.ecs.launchtype",AWS_ECS_TASK_ARN:"aws.ecs.task.arn",AWS_ECS_TASK_FAMILY:"aws.ecs.task.family",AWS_ECS_TASK_REVISION:"aws.ecs.task.revision",AWS_EKS_CLUSTER_ARN:"aws.eks.cluster.arn",AWS_LOG_GROUP_NAMES:"aws.log.group.names",AWS_LOG_GROUP_ARNS:"aws.log.group.arns",AWS_LOG_STREAM_NAMES:"aws.log.stream.names",AWS_LOG_STREAM_ARNS:"aws.log.stream.arns",CONTAINER_NAME:"container.name",CONTAINER_ID:"container.id",CONTAINER_RUNTIME:"container.runtime",CONTAINER_IMAGE_NAME:"container.image.name",CONTAINER_IMAGE_TAG:"container.image.tag",DEPLOYMENT_ENVIRONMENT:"deployment.environment",DEVICE_ID:"device.id",DEVICE_MODEL_IDENTIFIER:"device.model.identifier",DEVICE_MODEL_NAME:"device.model.name",FAAS_NAME:"faas.name",FAAS_ID:"faas.id",FAAS_VERSION:"faas.version",FAAS_INSTANCE:"faas.instance",FAAS_MAX_MEMORY:"faas.max_memory",HOST_ID:"host.id",HOST_NAME:"host.name",HOST_TYPE:"host.type",HOST_ARCH:"host.arch",HOST_IMAGE_NAME:"host.image.name",HOST_IMAGE_ID:"host.image.id",HOST_IMAGE_VERSION:"host.image.version",K8S_CLUSTER_NAME:"k8s.cluster.name",K8S_NODE_NAME:"k8s.node.name",K8S_NODE_UID:"k8s.node.uid",K8S_NAMESPACE_NAME:"k8s.namespace.name",K8S_POD_UID:"k8s.pod.uid",K8S_POD_NAME:"k8s.pod.name",K8S_CONTAINER_NAME:"k8s.container.name",K8S_REPLICASET_UID:"k8s.replicaset.uid",K8S_REPLICASET_NAME:"k8s.replicaset.name",K8S_DEPLOYMENT_UID:"k8s.deployment.uid",K8S_DEPLOYMENT_NAME:"k8s.deployment.name",K8S_STATEFULSET_UID:"k8s.statefulset.uid",K8S_STATEFULSET_NAME:"k8s.statefulset.name",K8S_DAEMONSET_UID:"k8s.daemonset.uid",K8S_DAEMONSET_NAME:"k8s.daemonset.name",K8S_JOB_UID:"k8s.job.uid",K8S_JOB_NAME:"k8s.job.name",K8S_CRONJOB_UID:"k8s.cronjob.uid",K8S_CRONJOB_NAME:"k8s.cronjob.name",OS_TYPE:"os.type",OS_DESCRIPTION:"os.description",OS_NAME:"os.name",OS_VERSION:"os.version",PROCESS_PID:"process.pid",PROCESS_EXECUTABLE_NAME:"process.executable.name",PROCESS_EXECUTABLE_PATH:"process.executable.path",PROCESS_COMMAND:"process.command",PROCESS_COMMAND_LINE:"process.command_line",PROCESS_COMMAND_ARGS:"process.command_args",PROCESS_OWNER:"process.owner",PROCESS_RUNTIME_NAME:"process.runtime.name",PROCESS_RUNTIME_VERSION:"process.runtime.version",PROCESS_RUNTIME_DESCRIPTION:"process.runtime.description",SERVICE_NAME:"service.name",SERVICE_NAMESPACE:"service.namespace",SERVICE_INSTANCE_ID:"service.instance.id",SERVICE_VERSION:"service.version",TELEMETRY_SDK_NAME:"telemetry.sdk.name",TELEMETRY_SDK_LANGUAGE:"telemetry.sdk.language",TELEMETRY_SDK_VERSION:"telemetry.sdk.version",TELEMETRY_AUTO_VERSION:"telemetry.auto.version",WEBENGINE_NAME:"webengine.name",WEBENGINE_VERSION:"webengine.version",WEBENGINE_DESCRIPTION:"webengine.description"};ee.CloudProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};ee.CloudPlatformValues={ALIBABA_CLOUD_ECS:"alibaba_cloud_ecs",ALIBABA_CLOUD_FC:"alibaba_cloud_fc",AWS_EC2:"aws_ec2",AWS_ECS:"aws_ecs",AWS_EKS:"aws_eks",AWS_LAMBDA:"aws_lambda",AWS_ELASTIC_BEANSTALK:"aws_elastic_beanstalk",AZURE_VM:"azure_vm",AZURE_CONTAINER_INSTANCES:"azure_container_instances",AZURE_AKS:"azure_aks",AZURE_FUNCTIONS:"azure_functions",AZURE_APP_SERVICE:"azure_app_service",GCP_COMPUTE_ENGINE:"gcp_compute_engine",GCP_CLOUD_RUN:"gcp_cloud_run",GCP_KUBERNETES_ENGINE:"gcp_kubernetes_engine",GCP_CLOUD_FUNCTIONS:"gcp_cloud_functions",GCP_APP_ENGINE:"gcp_app_engine"};ee.AwsEcsLaunchtypeValues={EC2:"ec2",FARGATE:"fargate"};ee.HostArchValues={AMD64:"amd64",ARM32:"arm32",ARM64:"arm64",IA64:"ia64",PPC32:"ppc32",PPC64:"ppc64",X86:"x86"};ee.OsTypeValues={WINDOWS:"windows",LINUX:"linux",DARWIN:"darwin",FREEBSD:"freebsd",NETBSD:"netbsd",OPENBSD:"openbsd",DRAGONFLYBSD:"dragonflybsd",HPUX:"hpux",AIX:"aix",SOLARIS:"solaris",Z_OS:"z_os"};ee.TelemetrySdkLanguageValues={CPP:"cpp",DOTNET:"dotnet",ERLANG:"erlang",GO:"go",JAVA:"java",NODEJS:"nodejs",PHP:"php",PYTHON:"python",RUBY:"ruby",WEBJS:"webjs"}});var dl=d(et=>{"use strict";var D_=et&&et.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),B_=et&&et.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&D_(r,i,o)};Object.defineProperty(et,"__esModule",{value:!0});B_(fl(),et)});var fe=d(ke=>{"use strict";var V_=ke&&ke.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),hl=ke&&ke.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&V_(r,i,o)};Object.defineProperty(ke,"__esModule",{value:!0});hl(pl(),ke);hl(dl(),ke)});var ml=d(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.SDK_INFO=void 0;var k_=bs(),Pr=fe();Sn.SDK_INFO={[Pr.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:"opentelemetry",[Pr.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"node",[Pr.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:Pr.TelemetrySdkLanguageValues.NODEJS,[Pr.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:k_.VERSION}});var _l=d(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.unrefTimer=void 0;function q_(i){i.unref()}bn.unrefTimer=q_});var yl=d(ae=>{"use strict";var j_=ae&&ae.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),tt=ae&&ae.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&j_(r,i,o)};Object.defineProperty(ae,"__esModule",{value:!0});tt(rl(),ae);tt(nl(),ae);tt(il(),ae);tt(al(),ae);tt(cl(),ae);tt(ml(),ae);tt(_l(),ae)});var Os=d(rt=>{"use strict";var G_=rt&&rt.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),H_=rt&&rt.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&G_(r,i,o)};Object.defineProperty(rt,"__esModule",{value:!0});H_(yl(),rt)});var Tl=d(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.addHrTimes=M.isTimeInput=M.isTimeInputHrTime=M.hrTimeToMicroseconds=M.hrTimeToMilliseconds=M.hrTimeToNanoseconds=M.hrTimeToTimeStamp=M.hrTimeDuration=M.timeInputToHrTime=M.hrTime=M.getTimeOrigin=M.millisToHrTime=void 0;var As=Os(),El=9,F_=6,K_=Math.pow(10,F_),On=Math.pow(10,El);function Nr(i){let r=i/1e3,o=Math.trunc(r),c=Math.round(i%1e3*K_);return[o,c]}M.millisToHrTime=Nr;function Ps(){let i=As.otperformance.timeOrigin;if(typeof i!="number"){let r=As.otperformance;i=r.timing&&r.timing.fetchStart}return i}M.getTimeOrigin=Ps;function gl(i){let r=Nr(Ps()),o=Nr(typeof i=="number"?i:As.otperformance.now());return vl(r,o)}M.hrTime=gl;function X_(i){if(Ns(i))return i;if(typeof i=="number")return i<Ps()?gl(i):Nr(i);if(i instanceof Date)return Nr(i.getTime());throw TypeError("Invalid input type")}M.timeInputToHrTime=X_;function z_(i,r){let o=r[0]-i[0],c=r[1]-i[1];return c<0&&(o-=1,c+=On),[o,c]}M.hrTimeDuration=z_;function $_(i){let r=El,o=`${"0".repeat(r)}${i[1]}Z`,c=o.substr(o.length-r-1);return new Date(i[0]*1e3).toISOString().replace("000Z",c)}M.hrTimeToTimeStamp=$_;function Y_(i){return i[0]*On+i[1]}M.hrTimeToNanoseconds=Y_;function W_(i){return i[0]*1e3+i[1]/1e6}M.hrTimeToMilliseconds=W_;function J_(i){return i[0]*1e6+i[1]/1e3}M.hrTimeToMicroseconds=J_;function Ns(i){return Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"}M.isTimeInputHrTime=Ns;function Q_(i){return Ns(i)||typeof i=="number"||i instanceof Date}M.isTimeInput=Q_;function vl(i,r){let o=[i[0]+r[0],i[1]+r[1]];return o[1]>=On&&(o[1]-=On,o[0]+=1),o}M.addHrTimes=vl});var bl=d(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0})});var Ol=d(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.ExportResultCode=void 0;var Z_;(function(i){i[i.SUCCESS=0]="SUCCESS",i[i.FAILED=1]="FAILED"})(Z_=Rr.ExportResultCode||(Rr.ExportResultCode={}))});var Pl=d(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.CompositePropagator=void 0;var Al=(y(),E(_)),Rs=class{constructor(r={}){var o;this._propagators=(o=r.propagators)!==null&&o!==void 0?o:[],this._fields=Array.from(new Set(this._propagators.map(c=>typeof c.fields=="function"?c.fields():[]).reduce((c,s)=>c.concat(s),[])))}inject(r,o,c){for(let s of this._propagators)try{s.inject(r,o,c)}catch(a){Al.diag.warn(`Failed to inject with ${s.constructor.name}. Err: ${a.message}`)}}extract(r,o,c){return this._propagators.reduce((s,a)=>{try{return a.extract(s,o,c)}catch(t){Al.diag.warn(`Failed to inject with ${a.constructor.name}. Err: ${t.message}`)}return s},r)}fields(){return this._fields.slice()}};An.CompositePropagator=Rs});var Nl=d(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.validateValue=Pt.validateKey=void 0;var xs="[_0-9a-z-*/]",ey=`[a-z]${xs}{0,255}`,ty=`[a-z0-9]${xs}{0,240}@[a-z]${xs}{0,13}`,ry=new RegExp(`^(?:${ey}|${ty})$`),ny=/^[ -~]{0,255}[!-~]$/,oy=/,|=/;function iy(i){return ry.test(i)}Pt.validateKey=iy;function sy(i){return ny.test(i)&&!oy.test(i)}Pt.validateValue=sy});var Ls=d(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.TraceState=void 0;var Rl=Nl(),xl=32,uy=512,Il=",",Ll="=",Is=class i{constructor(r){this._internalState=new Map,r&&this._parse(r)}set(r,o){let c=this._clone();return c._internalState.has(r)&&c._internalState.delete(r),c._internalState.set(r,o),c}unset(r){let o=this._clone();return o._internalState.delete(r),o}get(r){return this._internalState.get(r)}serialize(){return this._keys().reduce((r,o)=>(r.push(o+Ll+this.get(o)),r),[]).join(Il)}_parse(r){r.length>uy||(this._internalState=r.split(Il).reverse().reduce((o,c)=>{let s=c.trim(),a=s.indexOf(Ll);if(a!==-1){let t=s.slice(0,a),e=s.slice(a+1,c.length);(0,Rl.validateKey)(t)&&(0,Rl.validateValue)(e)&&o.set(t,e)}return o},new Map),this._internalState.size>xl&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,xl))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let r=new i;return r._internalState=new Map(this._internalState),r}};Pn.TraceState=Is});var Ml=d(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.W3CTraceContextPropagator=te.parseTraceParent=te.TRACE_STATE_HEADER=te.TRACE_PARENT_HEADER=void 0;var Nn=(y(),E(_)),ay=Or(),cy=Ls();te.TRACE_PARENT_HEADER="traceparent";te.TRACE_STATE_HEADER="tracestate";var ly="00",py="(?!ff)[\\da-f]{2}",fy="(?![0]{32})[\\da-f]{32}",dy="(?![0]{16})[\\da-f]{16}",hy="[\\da-f]{2}",my=new RegExp(`^\\s?(${py})-(${fy})-(${dy})-(${hy})(-.*)?\\s?$`);function wl(i){let r=my.exec(i);return!r||r[1]==="00"&&r[5]?null:{traceId:r[2],spanId:r[3],traceFlags:parseInt(r[4],16)}}te.parseTraceParent=wl;var ws=class{inject(r,o,c){let s=Nn.trace.getSpanContext(r);if(!s||(0,ay.isTracingSuppressed)(r)||!(0,Nn.isSpanContextValid)(s))return;let a=`${ly}-${s.traceId}-${s.spanId}-0${Number(s.traceFlags||Nn.TraceFlags.NONE).toString(16)}`;c.set(o,te.TRACE_PARENT_HEADER,a),s.traceState&&c.set(o,te.TRACE_STATE_HEADER,s.traceState.serialize())}extract(r,o,c){let s=c.get(o,te.TRACE_PARENT_HEADER);if(!s)return r;let a=Array.isArray(s)?s[0]:s;if(typeof a!="string")return r;let t=wl(a);if(!t)return r;t.isRemote=!0;let e=c.get(o,te.TRACE_STATE_HEADER);if(e){let n=Array.isArray(e)?e.join(","):e;t.traceState=new cy.TraceState(typeof n=="string"?n:void 0)}return Nn.trace.setSpanContext(r,t)}fields(){return[te.TRACE_PARENT_HEADER,te.TRACE_STATE_HEADER]}};te.W3CTraceContextPropagator=ws});var Ul=d(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0})});var Dl=d(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.getRPCMetadata=Ee.deleteRPCMetadata=Ee.setRPCMetadata=Ee.RPCType=void 0;var _y=(y(),E(_)),Ms=(0,_y.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),yy;(function(i){i.HTTP="http"})(yy=Ee.RPCType||(Ee.RPCType={}));function Ey(i,r){return i.setValue(Ms,r)}Ee.setRPCMetadata=Ey;function gy(i){return i.deleteValue(Ms)}Ee.deleteRPCMetadata=gy;function vy(i){return i.getValue(Ms)}Ee.getRPCMetadata=vy});var Us=d(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.AlwaysOffSampler=void 0;var Ty=(y(),E(_)),Cs=class{shouldSample(){return{decision:Ty.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Rn.AlwaysOffSampler=Cs});var Bs=d(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.AlwaysOnSampler=void 0;var Sy=(y(),E(_)),Ds=class{shouldSample(){return{decision:Sy.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};xn.AlwaysOnSampler=Ds});var Vl=d(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.ParentBasedSampler=void 0;var In=(y(),E(_)),by=gs(),Bl=Us(),Vs=Bs(),ks=class{constructor(r){var o,c,s,a;this._root=r.root,this._root||((0,by.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Vs.AlwaysOnSampler),this._remoteParentSampled=(o=r.remoteParentSampled)!==null&&o!==void 0?o:new Vs.AlwaysOnSampler,this._remoteParentNotSampled=(c=r.remoteParentNotSampled)!==null&&c!==void 0?c:new Bl.AlwaysOffSampler,this._localParentSampled=(s=r.localParentSampled)!==null&&s!==void 0?s:new Vs.AlwaysOnSampler,this._localParentNotSampled=(a=r.localParentNotSampled)!==null&&a!==void 0?a:new Bl.AlwaysOffSampler}shouldSample(r,o,c,s,a,t){let e=In.trace.getSpanContext(r);return!e||!(0,In.isSpanContextValid)(e)?this._root.shouldSample(r,o,c,s,a,t):e.isRemote?e.traceFlags&In.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(r,o,c,s,a,t):this._remoteParentNotSampled.shouldSample(r,o,c,s,a,t):e.traceFlags&In.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(r,o,c,s,a,t):this._localParentNotSampled.shouldSample(r,o,c,s,a,t)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};Ln.ParentBasedSampler=ks});var kl=d(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.TraceIdRatioBasedSampler=void 0;var qs=(y(),E(_)),js=class{constructor(r=0){this._ratio=r,this._ratio=this._normalize(r),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(r,o){return{decision:(0,qs.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?qs.SamplingDecision.RECORD_AND_SAMPLED:qs.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(r){return typeof r!="number"||isNaN(r)?0:r>=1?1:r<=0?0:r}_accumulate(r){let o=0;for(let c=0;c<r.length/8;c++){let s=c*8,a=parseInt(r.slice(s,s+8),16);o=(o^a)>>>0}return o}};wn.TraceIdRatioBasedSampler=js});var Fl=d(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.isPlainObject=void 0;var Oy="[object Object]",Ay="[object Null]",Py="[object Undefined]",Ny=Function.prototype,ql=Ny.toString,Ry=ql.call(Object),xy=Iy(Object.getPrototypeOf,Object),jl=Object.prototype,Gl=jl.hasOwnProperty,nt=Symbol?Symbol.toStringTag:void 0,Hl=jl.toString;function Iy(i,r){return function(o){return i(r(o))}}function Ly(i){if(!wy(i)||My(i)!==Oy)return!1;let r=xy(i);if(r===null)return!0;let o=Gl.call(r,"constructor")&&r.constructor;return typeof o=="function"&&o instanceof o&&ql.call(o)===Ry}Mn.isPlainObject=Ly;function wy(i){return i!=null&&typeof i=="object"}function My(i){return i==null?i===void 0?Py:Ay:nt&&nt in Object(i)?Cy(i):Uy(i)}function Cy(i){let r=Gl.call(i,nt),o=i[nt],c=!1;try{i[nt]=void 0,c=!0}catch{}let s=Hl.call(i);return c&&(r?i[nt]=o:delete i[nt]),s}function Uy(i){return Hl.call(i)}});var Yl=d(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.merge=void 0;var Kl=Fl(),Dy=20;function By(...i){let r=i.shift(),o=new WeakMap;for(;i.length>0;)r=zl(r,i.shift(),0,o);return r}Dn.merge=By;function Gs(i){return Un(i)?i.slice():i}function zl(i,r,o=0,c){let s;if(!(o>Dy)){if(o++,Cn(i)||Cn(r)||$l(r))s=Gs(r);else if(Un(i)){if(s=i.slice(),Un(r))for(let a=0,t=r.length;a<t;a++)s.push(Gs(r[a]));else if(xr(r)){let a=Object.keys(r);for(let t=0,e=a.length;t<e;t++){let n=a[t];s[n]=Gs(r[n])}}}else if(xr(i))if(xr(r)){if(!Vy(i,r))return r;s=Object.assign({},i);let a=Object.keys(r);for(let t=0,e=a.length;t<e;t++){let n=a[t],u=r[n];if(Cn(u))typeof u>"u"?delete s[n]:s[n]=u;else{let l=s[n],h=u;if(Xl(i,n,c)||Xl(r,n,c))delete s[n];else{if(xr(l)&&xr(h)){let T=c.get(l)||[],D=c.get(h)||[];T.push({obj:i,key:n}),D.push({obj:r,key:n}),c.set(l,T),c.set(h,D)}s[n]=zl(s[n],u,o,c)}}}}else s=r;return s}}function Xl(i,r,o){let c=o.get(i[r])||[];for(let s=0,a=c.length;s<a;s++){let t=c[s];if(t.key===r&&t.obj===i)return!0}return!1}function Un(i){return Array.isArray(i)}function $l(i){return typeof i=="function"}function xr(i){return!Cn(i)&&!Un(i)&&!$l(i)&&typeof i=="object"}function Cn(i){return typeof i=="string"||typeof i=="number"||typeof i=="boolean"||typeof i>"u"||i instanceof Date||i instanceof RegExp||i===null}function Vy(i,r){return!(!(0,Kl.isPlainObject)(i)||!(0,Kl.isPlainObject)(r))}});var Wl=d(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.callWithTimeout=Nt.TimeoutError=void 0;var Bn=class i extends Error{constructor(r){super(r),Object.setPrototypeOf(this,i.prototype)}};Nt.TimeoutError=Bn;function ky(i,r){let o,c=new Promise(function(a,t){o=setTimeout(function(){t(new Bn("Operation timed out."))},r)});return Promise.race([i,c]).then(s=>(clearTimeout(o),s),s=>{throw clearTimeout(o),s})}Nt.callWithTimeout=ky});var Ql=d(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.isUrlIgnored=Rt.urlMatches=void 0;function Jl(i,r){return typeof r=="string"?i===r:!!i.match(r)}Rt.urlMatches=Jl;function qy(i,r){if(!r)return!1;for(let o of r)if(Jl(i,o))return!0;return!1}Rt.isUrlIgnored=qy});var Zl=d(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.isWrapped=void 0;function jy(i){return typeof i=="function"&&typeof i.__original=="function"&&typeof i.__unwrap=="function"&&i.__wrapped===!0}Vn.isWrapped=jy});var ep=d(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.Deferred=void 0;var Hs=class{constructor(){this._promise=new Promise((r,o)=>{this._resolve=r,this._reject=o})}get promise(){return this._promise}resolve(r){this._resolve(r)}reject(r){this._reject(r)}};kn.Deferred=Hs});var tp=d(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.BindOnceFuture=void 0;var Gy=ep(),Fs=class{constructor(r,o){this._callback=r,this._that=o,this._isCalled=!1,this._deferred=new Gy.Deferred}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...r){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...r)).then(o=>this._deferred.resolve(o),o=>this._deferred.reject(o))}catch(o){this._deferred.reject(o)}}return this._deferred.promise}};qn.BindOnceFuture=Fs});var np=d(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn._export=void 0;var rp=(y(),E(_)),Hy=Or();function Fy(i,r){return new Promise(o=>{rp.context.with((0,Hy.suppressTracing)(rp.context.active()),()=>{i.export(r,c=>{o(c)})})})}jn._export=Fy});var N=d(P=>{"use strict";var Ky=P&&P.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),w=P&&P.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Ky(r,i,o)};Object.defineProperty(P,"__esModule",{value:!0});P.internal=P.baggageUtils=void 0;w(Xc(),P);w(zc(),P);w(Qc(),P);w(gs(),P);w(Es(),P);w(Tl(),P);w(bl(),P);w(Ol(),P);P.baggageUtils=ds();w(Os(),P);w(Pl(),P);w(Ml(),P);w(Ul(),P);w(Dl(),P);w(Us(),P);w(Bs(),P);w(Vl(),P);w(kl(),P);w(Or(),P);w(Ls(),P);w(hn(),P);w(Yl(),P);w(vs(),P);w(Wl(),P);w(Ql(),P);w(Zl(),P);w(tp(),P);w(bs(),P);var Xy=np();P.internal={_export:Xy._export}});var op=d(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.ExceptionEventName=void 0;Gn.ExceptionEventName="exception"});var Xs=d(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.Span=void 0;var Ae=(y(),E(_)),re=N(),ot=fe(),zy=op(),Ks=class{constructor(r,o,c,s,a,t,e=[],n,u,l){this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:Ae.SpanStatusCode.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=c,this._spanContext=s,this.parentSpanId=t,this.kind=a,this.links=e;let h=Date.now();this._performanceStartTime=re.otperformance.now(),this._performanceOffset=h-(this._performanceStartTime+(0,re.getTimeOrigin)()),this._startTimeProvided=n!=null,this.startTime=this._getTime(n??h),this.resource=r.resource,this.instrumentationLibrary=r.instrumentationLibrary,this._spanLimits=r.getSpanLimits(),l!=null&&this.setAttributes(l),this._spanProcessor=r.getActiveSpanProcessor(),this._spanProcessor.onStart(this,o),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0}spanContext(){return this._spanContext}setAttribute(r,o){return o==null||this._isSpanEnded()?this:r.length===0?(Ae.diag.warn(`Invalid attribute key: ${r}`),this):(0,re.isAttributeValue)(o)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,r)?(this._droppedAttributesCount++,this):(this.attributes[r]=this._truncateToSize(o),this):(Ae.diag.warn(`Invalid attribute value set for key: ${r}`),this)}setAttributes(r){for(let[o,c]of Object.entries(r))this.setAttribute(o,c);return this}addEvent(r,o,c){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return Ae.diag.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(Ae.diag.warn("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),(0,re.isTimeInput)(o)&&((0,re.isTimeInput)(c)||(c=o),o=void 0);let s=(0,re.sanitizeAttributes)(o);return this.events.push({name:r,attributes:s,time:this._getTime(c),droppedAttributesCount:0}),this}setStatus(r){return this._isSpanEnded()?this:(this.status=r,this)}updateName(r){return this._isSpanEnded()?this:(this.name=r,this)}end(r){if(this._isSpanEnded()){Ae.diag.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);return}this._ended=!0,this.endTime=this._getTime(r),this._duration=(0,re.hrTimeDuration)(this.startTime,this.endTime),this._duration[0]<0&&(Ae.diag.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._spanProcessor.onEnd(this)}_getTime(r){if(typeof r=="number"&&r<re.otperformance.now())return(0,re.hrTime)(r+this._performanceOffset);if(typeof r=="number")return(0,re.millisToHrTime)(r);if(r instanceof Date)return(0,re.millisToHrTime)(r.getTime());if((0,re.isTimeInputHrTime)(r))return r;if(this._startTimeProvided)return(0,re.millisToHrTime)(Date.now());let o=re.otperformance.now()-this._performanceStartTime;return(0,re.addHrTimes)(this.startTime,(0,re.millisToHrTime)(o))}isRecording(){return this._ended===!1}recordException(r,o){let c={};typeof r=="string"?c[ot.SemanticAttributes.EXCEPTION_MESSAGE]=r:r&&(r.code?c[ot.SemanticAttributes.EXCEPTION_TYPE]=r.code.toString():r.name&&(c[ot.SemanticAttributes.EXCEPTION_TYPE]=r.name),r.message&&(c[ot.SemanticAttributes.EXCEPTION_MESSAGE]=r.message),r.stack&&(c[ot.SemanticAttributes.EXCEPTION_STACKTRACE]=r.stack)),c[ot.SemanticAttributes.EXCEPTION_TYPE]||c[ot.SemanticAttributes.EXCEPTION_MESSAGE]?this.addEvent(zy.ExceptionEventName,c,o):Ae.diag.warn(`Failed to record an exception ${r}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){return this._ended&&Ae.diag.warn(`Can not execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`),this._ended}_truncateToLimitUtil(r,o){return r.length<=o?r:r.substr(0,o)}_truncateToSize(r){let o=this._attributeValueLengthLimit;return o<=0?(Ae.diag.warn(`Attribute value limit must be positive, got ${o}`),r):typeof r=="string"?this._truncateToLimitUtil(r,o):Array.isArray(r)?r.map(c=>typeof c=="string"?this._truncateToLimitUtil(c,o):c):r}};Hn.Span=Ks});var Lr=d(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.SamplingDecision=void 0;var $y;(function(i){i[i.NOT_RECORD=0]="NOT_RECORD",i[i.RECORD=1]="RECORD",i[i.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})($y=Ir.SamplingDecision||(Ir.SamplingDecision={}))});var Kn=d(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.AlwaysOffSampler=void 0;var Yy=Lr(),zs=class{shouldSample(){return{decision:Yy.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Fn.AlwaysOffSampler=zs});var zn=d(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.AlwaysOnSampler=void 0;var Wy=Lr(),$s=class{shouldSample(){return{decision:Wy.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};Xn.AlwaysOnSampler=$s});var Js=d(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.ParentBasedSampler=void 0;var $n=(y(),E(_)),Jy=N(),ip=Kn(),Ys=zn(),Ws=class{constructor(r){var o,c,s,a;this._root=r.root,this._root||((0,Jy.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Ys.AlwaysOnSampler),this._remoteParentSampled=(o=r.remoteParentSampled)!==null&&o!==void 0?o:new Ys.AlwaysOnSampler,this._remoteParentNotSampled=(c=r.remoteParentNotSampled)!==null&&c!==void 0?c:new ip.AlwaysOffSampler,this._localParentSampled=(s=r.localParentSampled)!==null&&s!==void 0?s:new Ys.AlwaysOnSampler,this._localParentNotSampled=(a=r.localParentNotSampled)!==null&&a!==void 0?a:new ip.AlwaysOffSampler}shouldSample(r,o,c,s,a,t){let e=$n.trace.getSpanContext(r);return!e||!(0,$n.isSpanContextValid)(e)?this._root.shouldSample(r,o,c,s,a,t):e.isRemote?e.traceFlags&$n.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(r,o,c,s,a,t):this._remoteParentNotSampled.shouldSample(r,o,c,s,a,t):e.traceFlags&$n.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(r,o,c,s,a,t):this._localParentNotSampled.shouldSample(r,o,c,s,a,t)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};Yn.ParentBasedSampler=Ws});var Zs=d(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.TraceIdRatioBasedSampler=void 0;var Qy=(y(),E(_)),sp=Lr(),Qs=class{constructor(r=0){this._ratio=r,this._ratio=this._normalize(r),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(r,o){return{decision:(0,Qy.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?sp.SamplingDecision.RECORD_AND_SAMPLED:sp.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(r){return typeof r!="number"||isNaN(r)?0:r>=1?1:r<=0?0:r}_accumulate(r){let o=0;for(let c=0;c<r.length/8;c++){let s=c*8,a=parseInt(r.slice(s,s+8),16);o=(o^a)>>>0}return o}};Wn.TraceIdRatioBasedSampler=Qs});var ru=d(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.buildSamplerFromEnv=It.loadDefaultConfig=void 0;var Jn=(y(),E(_)),W=N(),up=Kn(),eu=zn(),tu=Js(),ap=Zs(),Zy=(0,W.getEnv)(),eE=W.TracesSamplerValues.AlwaysOn,xt=1;function tE(){return{sampler:lp(Zy),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,W.getEnv)().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,W.getEnv)().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:(0,W.getEnv)().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,W.getEnv)().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:(0,W.getEnv)().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:(0,W.getEnv)().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:(0,W.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:(0,W.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}It.loadDefaultConfig=tE;function lp(i=(0,W.getEnv)()){switch(i.OTEL_TRACES_SAMPLER){case W.TracesSamplerValues.AlwaysOn:return new eu.AlwaysOnSampler;case W.TracesSamplerValues.AlwaysOff:return new up.AlwaysOffSampler;case W.TracesSamplerValues.ParentBasedAlwaysOn:return new tu.ParentBasedSampler({root:new eu.AlwaysOnSampler});case W.TracesSamplerValues.ParentBasedAlwaysOff:return new tu.ParentBasedSampler({root:new up.AlwaysOffSampler});case W.TracesSamplerValues.TraceIdRatio:return new ap.TraceIdRatioBasedSampler(cp(i));case W.TracesSamplerValues.ParentBasedTraceIdRatio:return new tu.ParentBasedSampler({root:new ap.TraceIdRatioBasedSampler(cp(i))});default:return Jn.diag.error(`OTEL_TRACES_SAMPLER value "${i.OTEL_TRACES_SAMPLER} invalid, defaulting to ${eE}".`),new eu.AlwaysOnSampler}}It.buildSamplerFromEnv=lp;function cp(i){if(i.OTEL_TRACES_SAMPLER_ARG===void 0||i.OTEL_TRACES_SAMPLER_ARG==="")return Jn.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${xt}.`),xt;let r=Number(i.OTEL_TRACES_SAMPLER_ARG);return isNaN(r)?(Jn.diag.error(`OTEL_TRACES_SAMPLER_ARG=${i.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${xt}.`),xt):r<0||r>1?(Jn.diag.error(`OTEL_TRACES_SAMPLER_ARG=${i.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${xt}.`),xt):r}});var ou=d(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.reconfigureLimits=Lt.mergeConfig=void 0;var pp=ru(),nu=N();function rE(i){let r={sampler:(0,pp.buildSamplerFromEnv)()},o=(0,pp.loadDefaultConfig)(),c=Object.assign({},o,r,i);return c.generalLimits=Object.assign({},o.generalLimits,i.generalLimits||{}),c.spanLimits=Object.assign({},o.spanLimits,i.spanLimits||{}),c}Lt.mergeConfig=rE;function nE(i){var r,o,c,s,a,t,e,n,u,l,h,T;let D=Object.assign({},i.spanLimits),L=(0,nu.getEnvWithoutDefaults)();return D.attributeCountLimit=(t=(a=(s=(o=(r=i.spanLimits)===null||r===void 0?void 0:r.attributeCountLimit)!==null&&o!==void 0?o:(c=i.generalLimits)===null||c===void 0?void 0:c.attributeCountLimit)!==null&&s!==void 0?s:L.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&a!==void 0?a:L.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&t!==void 0?t:nu.DEFAULT_ATTRIBUTE_COUNT_LIMIT,D.attributeValueLengthLimit=(T=(h=(l=(n=(e=i.spanLimits)===null||e===void 0?void 0:e.attributeValueLengthLimit)!==null&&n!==void 0?n:(u=i.generalLimits)===null||u===void 0?void 0:u.attributeValueLengthLimit)!==null&&l!==void 0?l:L.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&h!==void 0?h:L.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&T!==void 0?T:nu.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},i,{spanLimits:D})}Lt.reconfigureLimits=nE});var fp=d(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.BatchSpanProcessorBase=void 0;var wt=(y(),E(_)),it=N(),iu=class{constructor(r,o){this._exporter=r,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;let c=(0,it.getEnv)();this._maxExportBatchSize=typeof o?.maxExportBatchSize=="number"?o.maxExportBatchSize:c.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof o?.maxQueueSize=="number"?o.maxQueueSize:c.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof o?.scheduledDelayMillis=="number"?o.scheduledDelayMillis:c.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof o?.exportTimeoutMillis=="number"?o.exportTimeoutMillis:c.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new it.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(wt.diag.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}onStart(r,o){}onEnd(r){this._shutdownOnce.isCalled||r.spanContext().traceFlags&wt.TraceFlags.SAMPLED&&this._addToBuffer(r)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>this._exporter.shutdown())}_addToBuffer(r){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&wt.diag.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(wt.diag.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(r),this._maybeStartTimer()}_flushAll(){return new Promise((r,o)=>{let c=[],s=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let a=0,t=s;a<t;a++)c.push(this._flushOneBatch());Promise.all(c).then(()=>{r()}).catch(o)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((r,o)=>{let c=setTimeout(()=>{o(new Error("Timeout"))},this._exportTimeoutMillis);wt.context.with((0,it.suppressTracing)(wt.context.active()),()=>{let s=this._finishedSpans.splice(0,this._maxExportBatchSize),a=()=>this._exporter.export(s,e=>{var n;clearTimeout(c),e.code===it.ExportResultCode.SUCCESS?r():o((n=e.error)!==null&&n!==void 0?n:new Error("BatchSpanProcessor: span export failed"))}),t=s.map(e=>e.resource).filter(e=>e.asyncAttributesPending);t.length===0?a():Promise.all(t.map(e=>{var n;return(n=e.waitForAsyncAttributes)===null||n===void 0?void 0:n.call(e)})).then(a,e=>{(0,it.globalErrorHandler)(e),o(e)})})})}_maybeStartTimer(){if(this._isExporting)return;let r=()=>{this._isExporting=!0,this._flushOneBatch().then(()=>{this._isExporting=!1,this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(o=>{this._isExporting=!1,(0,it.globalErrorHandler)(o)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return r();this._timer===void 0&&(this._timer=setTimeout(()=>r(),this._scheduledDelayMillis),(0,it.unrefTimer)(this._timer))}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}};Qn.BatchSpanProcessorBase=iu});var dp=d(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.BatchSpanProcessor=void 0;var oE=fp(),su=class extends oE.BatchSpanProcessorBase{onShutdown(){}};Zn.BatchSpanProcessor=su});var _p=d(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.RandomIdGenerator=void 0;var iE=8,mp=16,uu=class{constructor(){this.generateTraceId=hp(mp),this.generateSpanId=hp(iE)}};to.RandomIdGenerator=uu;var eo=Buffer.allocUnsafe(mp);function hp(i){return function(){for(let o=0;o<i/4;o++)eo.writeUInt32BE(Math.random()*2**32>>>0,o*4);for(let o=0;o<i&&!(eo[o]>0);o++)o===i-1&&(eo[i-1]=1);return eo.toString("hex",0,i)}}});var Ep=d(qe=>{"use strict";var sE=qe&&qe.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),yp=qe&&qe.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&sE(r,i,o)};Object.defineProperty(qe,"__esModule",{value:!0});yp(dp(),qe);yp(_p(),qe)});var ro=d(st=>{"use strict";var uE=st&&st.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),aE=st&&st.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&uE(r,i,o)};Object.defineProperty(st,"__esModule",{value:!0});aE(Ep(),st)});var gp=d(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.Tracer=void 0;var J=(y(),E(_)),no=N(),cE=Xs(),lE=ou(),pE=ro(),au=class{constructor(r,o,c){this._tracerProvider=c;let s=(0,lE.mergeConfig)(o);this._sampler=s.sampler,this._generalLimits=s.generalLimits,this._spanLimits=s.spanLimits,this._idGenerator=o.idGenerator||new pE.RandomIdGenerator,this.resource=c.resource,this.instrumentationLibrary=r}startSpan(r,o={},c=J.context.active()){var s,a,t;o.root&&(c=J.trace.deleteSpan(c));let e=J.trace.getSpan(c);if((0,no.isTracingSuppressed)(c))return J.diag.debug("Instrumentation suppressed, returning Noop Span"),J.trace.wrapSpanContext(J.INVALID_SPAN_CONTEXT);let n=e?.spanContext(),u=this._idGenerator.generateSpanId(),l,h,T;!n||!J.trace.isSpanContextValid(n)?l=this._idGenerator.generateTraceId():(l=n.traceId,h=n.traceState,T=n.spanId);let D=(s=o.kind)!==null&&s!==void 0?s:J.SpanKind.INTERNAL,L=((a=o.links)!==null&&a!==void 0?a:[]).map(St=>({context:St.context,attributes:(0,no.sanitizeAttributes)(St.attributes)})),x=(0,no.sanitizeAttributes)(o.attributes),B=this._sampler.shouldSample(c,l,r,D,x,L);h=(t=B.traceState)!==null&&t!==void 0?t:h;let b=B.decision===J.SamplingDecision.RECORD_AND_SAMPLED?J.TraceFlags.SAMPLED:J.TraceFlags.NONE,S={traceId:l,spanId:u,traceFlags:b,traceState:h};if(B.decision===J.SamplingDecision.NOT_RECORD)return J.diag.debug("Recording is off, propagating context in a non-recording span"),J.trace.wrapSpanContext(S);let K=(0,no.sanitizeAttributes)(Object.assign(x,B.attributes));return new cE.Span(this,c,r,S,D,T,L,o.startTime,void 0,K)}startActiveSpan(r,o,c,s){let a,t,e;if(arguments.length<2)return;arguments.length===2?e=o:arguments.length===3?(a=o,e=c):(a=o,t=c,e=s);let n=t??J.context.active(),u=this.startSpan(r,a,n),l=J.trace.setSpan(n,u);return J.context.with(l,e,void 0,u)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}getActiveSpanProcessor(){return this._tracerProvider.getActiveSpanProcessor()}};oo.Tracer=au});var vp=d(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.defaultServiceName=void 0;function fE(){return`unknown_service:${process.argv0}`}io.defaultServiceName=fE});var cu=d(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.normalizeType=Mt.normalizeArch=void 0;var dE=i=>{switch(i){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return i}};Mt.normalizeArch=dE;var hE=i=>{switch(i){case"sunos":return"solaris";case"win32":return"windows";default:return i}};Mt.normalizeType=hE});var uo=d(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.execAsync=void 0;var mE=z("child_process"),_E=z("util");so.execAsync=_E.promisify(mE.exec)});var Tp=d(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.getMachineId=void 0;var yE=uo(),EE=(y(),E(_));async function gE(){try{let r=(await(0,yE.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"')).stdout.split(`
|
|
8
|
+
`).find(c=>c.includes("IOPlatformUUID"));if(!r)return"";let o=r.split('" = "');if(o.length===2)return o[1].slice(0,-1)}catch(i){EE.diag.debug(`error reading machine id: ${i}`)}return""}ao.getMachineId=gE});var Sp=d(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.getMachineId=void 0;var vE=z("fs"),TE=(y(),E(_));async function SE(){let i=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let r of i)try{return(await vE.promises.readFile(r,{encoding:"utf8"})).trim()}catch(o){TE.diag.debug(`error reading machine id: ${o}`)}return""}co.getMachineId=SE});var Op=d(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.getMachineId=void 0;var bE=z("fs"),OE=uo(),bp=(y(),E(_));async function AE(){try{return(await bE.promises.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(i){bp.diag.debug(`error reading machine id: ${i}`)}try{return(await(0,OE.execAsync)("kenv -q smbios.system.uuid")).stdout.trim()}catch(i){bp.diag.debug(`error reading machine id: ${i}`)}return""}lo.getMachineId=AE});var Pp=d(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.getMachineId=void 0;var Ap=z("process"),PE=uo(),NE=(y(),E(_));async function RE(){let i="QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",r="%windir%\\System32\\REG.exe";Ap.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in Ap.env&&(r="%windir%\\sysnative\\cmd.exe /c "+r);try{let c=(await(0,PE.execAsync)(`${r} ${i}`)).stdout.split("REG_SZ");if(c.length===2)return c[1].trim()}catch(o){NE.diag.debug(`error reading machine id: ${o}`)}return""}po.getMachineId=RE});var Np=d(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.getMachineId=void 0;var xE=(y(),E(_));async function IE(){return xE.diag.debug("could not read machine-id: unsupported platform"),""}fo.getMachineId=IE});var Rp=d(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.getMachineId=void 0;var LE=z("process"),Ct;Ie.getMachineId=Ct;switch(LE.platform){case"darwin":Ie.getMachineId=Ct=Tp().getMachineId;break;case"linux":Ie.getMachineId=Ct=Sp().getMachineId;break;case"freebsd":Ie.getMachineId=Ct=Op().getMachineId;break;case"win32":Ie.getMachineId=Ct=Pp().getMachineId;break;default:Ie.getMachineId=Ct=Np().getMachineId}});var fu=d(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.hostDetectorSync=void 0;var lu=fe(),wE=ut(),xp=z("os"),ME=cu(),CE=Rp(),pu=class{detect(r){let o={[lu.SemanticResourceAttributes.HOST_NAME]:(0,xp.hostname)(),[lu.SemanticResourceAttributes.HOST_ARCH]:(0,ME.normalizeArch)((0,xp.arch)())};return new wE.Resource(o,this._getAsyncAttributes())}_getAsyncAttributes(){return(0,CE.getMachineId)().then(r=>{let o={};return r&&(o[lu.SemanticResourceAttributes.HOST_ID]=r),o})}};ho.hostDetectorSync=new pu});var Ip=d(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.hostDetector=void 0;var UE=fu(),du=class{detect(r){return Promise.resolve(UE.hostDetectorSync.detect(r))}};mo.hostDetector=new du});var mu=d(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.osDetectorSync=void 0;var Lp=fe(),DE=ut(),wp=z("os"),BE=cu(),hu=class{detect(r){let o={[Lp.SemanticResourceAttributes.OS_TYPE]:(0,BE.normalizeType)((0,wp.platform)()),[Lp.SemanticResourceAttributes.OS_VERSION]:(0,wp.release)()};return new DE.Resource(o)}};_o.osDetectorSync=new hu});var Mp=d(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.osDetector=void 0;var VE=mu(),_u=class{detect(r){return Promise.resolve(VE.osDetectorSync.detect(r))}};yo.osDetector=new _u});var Eu=d(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});Eo.processDetectorSync=void 0;var kE=(y(),E(_)),Le=fe(),qE=ut(),jE=z("os"),yu=class{detect(r){let o={[Le.SemanticResourceAttributes.PROCESS_PID]:process.pid,[Le.SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME]:process.title,[Le.SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH]:process.execPath,[Le.SemanticResourceAttributes.PROCESS_COMMAND_ARGS]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[Le.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]:process.versions.node,[Le.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"nodejs",[Le.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]:"Node.js"};process.argv.length>1&&(o[Le.SemanticResourceAttributes.PROCESS_COMMAND]=process.argv[1]);try{let c=jE.userInfo();o[Le.SemanticResourceAttributes.PROCESS_OWNER]=c.username}catch(c){kE.diag.debug(`error obtaining process owner: ${c}`)}return new qE.Resource(o)}};Eo.processDetectorSync=new yu});var Cp=d(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.processDetector=void 0;var GE=Eu(),gu=class{detect(r){return Promise.resolve(GE.processDetectorSync.detect(r))}};go.processDetector=new gu});var Up=d(ce=>{"use strict";var HE=ce&&ce.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),at=ce&&ce.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&HE(r,i,o)};Object.defineProperty(ce,"__esModule",{value:!0});at(vp(),ce);at(Ip(),ce);at(Mp(),ce);at(fu(),ce);at(mu(),ce);at(Cp(),ce);at(Eu(),ce)});var vu=d(ct=>{"use strict";var FE=ct&&ct.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),KE=ct&&ct.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&FE(r,i,o)};Object.defineProperty(ct,"__esModule",{value:!0});KE(Up(),ct)});var ut=d(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.Resource=void 0;var Dp=(y(),E(_)),lt=fe(),Tu=N(),XE=vu(),wr=class i{constructor(r,o){var c;this._attributes=r,this.asyncAttributesPending=o!=null,this._syncAttributes=(c=this._attributes)!==null&&c!==void 0?c:{},this._asyncAttributesPromise=o?.then(s=>(this._attributes=Object.assign({},this._attributes,s),this.asyncAttributesPending=!1,s),s=>(Dp.diag.debug("a resource's async attributes promise rejected: %s",s),this.asyncAttributesPending=!1,{}))}static empty(){return i.EMPTY}static default(){return new i({[lt.SemanticResourceAttributes.SERVICE_NAME]:(0,XE.defaultServiceName)(),[lt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:Tu.SDK_INFO[lt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE],[lt.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:Tu.SDK_INFO[lt.SemanticResourceAttributes.TELEMETRY_SDK_NAME],[lt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:Tu.SDK_INFO[lt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]})}get attributes(){var r;return this.asyncAttributesPending&&Dp.diag.error("Accessing resource attributes before async attributes settled"),(r=this._attributes)!==null&&r!==void 0?r:{}}async waitForAsyncAttributes(){this.asyncAttributesPending&&await this._asyncAttributesPromise}merge(r){var o;if(!r)return this;let c=Object.assign(Object.assign({},this._syncAttributes),(o=r._syncAttributes)!==null&&o!==void 0?o:r.attributes);if(!this._asyncAttributesPromise&&!r._asyncAttributesPromise)return new i(c);let s=Promise.all([this._asyncAttributesPromise,r._asyncAttributesPromise]).then(([a,t])=>{var e;return Object.assign(Object.assign(Object.assign(Object.assign({},this._syncAttributes),a),(e=r._syncAttributes)!==null&&e!==void 0?e:r.attributes),t)});return new i(c,s)}};vo.Resource=wr;wr.EMPTY=new wr({})});var Vp=d(Bp=>{"use strict";Object.defineProperty(Bp,"__esModule",{value:!0})});var qp=d(kp=>{"use strict";Object.defineProperty(kp,"__esModule",{value:!0})});var Gp=d(jp=>{"use strict";Object.defineProperty(jp,"__esModule",{value:!0})});var Hp=d(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.browserDetector=void 0;var zE=pt(),Su=class{detect(r){return Promise.resolve(zE.browserDetectorSync.detect(r))}};To.browserDetector=new Su});var Ou=d(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.envDetectorSync=void 0;var $E=(y(),E(_)),YE=N(),WE=fe(),JE=ut(),bu=class{constructor(){this._MAX_LENGTH=255,this._COMMA_SEPARATOR=",",this._LABEL_KEY_VALUE_SPLITTER="=",this._ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.",this._ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters."}detect(r){let o={},c=(0,YE.getEnv)(),s=c.OTEL_RESOURCE_ATTRIBUTES,a=c.OTEL_SERVICE_NAME;if(s)try{let t=this._parseResourceAttributes(s);Object.assign(o,t)}catch(t){$E.diag.debug(`EnvDetector failed: ${t.message}`)}return a&&(o[WE.SemanticResourceAttributes.SERVICE_NAME]=a),new JE.Resource(o)}_parseResourceAttributes(r){if(!r)return{};let o={},c=r.split(this._COMMA_SEPARATOR,-1);for(let s of c){let a=s.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(a.length!==2)continue;let[t,e]=a;if(t=t.trim(),e=e.trim().split(/^"|"$/).join(""),!this._isValidAndNotEmpty(t))throw new Error(`Attribute key ${this._ERROR_MESSAGE_INVALID_CHARS}`);if(!this._isValid(e))throw new Error(`Attribute value ${this._ERROR_MESSAGE_INVALID_VALUE}`);o[t]=decodeURIComponent(e)}return o}_isValid(r){return r.length<=this._MAX_LENGTH&&this._isBaggageOctetString(r)}_isBaggageOctetString(r){for(let o=0;o<r.length;o++){let c=r.charCodeAt(o);if(c<33||c===44||c===59||c===92||c>126)return!1}return!0}_isValidAndNotEmpty(r){return r.length>0&&this._isValid(r)}};So.envDetectorSync=new bu});var Fp=d(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.envDetector=void 0;var QE=Ou(),Au=class{detect(r){return Promise.resolve(QE.envDetectorSync.detect(r))}};bo.envDetector=new Au});var Kp=d(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.browserDetectorSync=void 0;var Oo=fe(),Pu=pt(),ZE=(y(),E(_)),Nu=class{detect(r){if(!(typeof navigator<"u"))return Pu.Resource.empty();let c={[Oo.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"browser",[Oo.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]:"Web Browser",[Oo.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]:navigator.userAgent};return this._getResourceAttributes(c,r)}_getResourceAttributes(r,o){return r[Oo.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]===""?(ZE.diag.debug("BrowserDetector failed: Unable to find required browser resources. "),Pu.Resource.empty()):new Pu.Resource(Object.assign({},r))}};Ao.browserDetectorSync=new Nu});var Xp=d(Pe=>{"use strict";var eg=Pe&&Pe.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),Po=Pe&&Pe.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&eg(r,i,o)};Object.defineProperty(Pe,"__esModule",{value:!0});Po(Hp(),Pe);Po(Fp(),Pe);Po(Kp(),Pe);Po(Ou(),Pe)});var zp=d(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.isPromiseLike=void 0;var tg=i=>i!==null&&typeof i=="object"&&typeof i.then=="function";No.isPromiseLike=tg});var Yp=d(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.detectResourcesSync=Dt.detectResources=void 0;var Mr=ut(),Ut=(y(),E(_)),rg=zp(),ng=async(i={})=>{let r=await Promise.all((i.detectors||[]).map(async o=>{try{let c=await o.detect(i);return Ut.diag.debug(`${o.constructor.name} found resource.`,c),c}catch(c){return Ut.diag.debug(`${o.constructor.name} failed: ${c.message}`),Mr.Resource.empty()}}));return $p(r),r.reduce((o,c)=>o.merge(c),Mr.Resource.empty())};Dt.detectResources=ng;var og=(i={})=>{var r;let o=((r=i.detectors)!==null&&r!==void 0?r:[]).map(s=>{try{let a=s.detect(i),t;if((0,rg.isPromiseLike)(a)){let e=async()=>(await a).attributes;t=new Mr.Resource({},e())}else t=a;return t.waitForAsyncAttributes?t.waitForAsyncAttributes().then(()=>Ut.diag.debug(`${s.constructor.name} found resource.`,t)):Ut.diag.debug(`${s.constructor.name} found resource.`,t),t}catch(a){return Ut.diag.error(`${s.constructor.name} failed: ${a.message}`),Mr.Resource.empty()}}),c=o.reduce((s,a)=>s.merge(a),Mr.Resource.empty());return c.waitForAsyncAttributes&&c.waitForAsyncAttributes().then(()=>{$p(o)}),c};Dt.detectResourcesSync=og;var $p=i=>{i.forEach(r=>{if(Object.keys(r.attributes).length>0){let o=JSON.stringify(r.attributes,null,4);Ut.diag.verbose(o)}})}});var pt=d(le=>{"use strict";var ig=le&&le.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),ft=le&&le.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&ig(r,i,o)};Object.defineProperty(le,"__esModule",{value:!0});ft(ut(),le);ft(Vp(),le);ft(vu(),le);ft(qp(),le);ft(Gp(),le);ft(Xp(),le);ft(Yp(),le)});var Wp=d(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.MultiSpanProcessor=void 0;var sg=N(),Ru=class{constructor(r){this._spanProcessors=r}forceFlush(){let r=[];for(let o of this._spanProcessors)r.push(o.forceFlush());return new Promise(o=>{Promise.all(r).then(()=>{o()}).catch(c=>{(0,sg.globalErrorHandler)(c||new Error("MultiSpanProcessor: forceFlush failed")),o()})})}onStart(r,o){for(let c of this._spanProcessors)c.onStart(r,o)}onEnd(r){for(let o of this._spanProcessors)o.onEnd(r)}shutdown(){let r=[];for(let o of this._spanProcessors)r.push(o.shutdown());return new Promise((o,c)=>{Promise.all(r).then(()=>{o()},c)})}};Ro.MultiSpanProcessor=Ru});var Iu=d(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.NoopSpanProcessor=void 0;var xu=class{onStart(r,o){}onEnd(r){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}};xo.NoopSpanProcessor=xu});var Qp=d(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.BasicTracerProvider=dt.ForceFlushState=void 0;var Bt=(y(),E(_)),kt=N(),Jp=pt(),ug=Lu(),ag=ru(),cg=Wp(),lg=Iu(),pg=ro(),fg=ou(),Vt;(function(i){i[i.resolved=0]="resolved",i[i.timeout=1]="timeout",i[i.error=2]="error",i[i.unresolved=3]="unresolved"})(Vt=dt.ForceFlushState||(dt.ForceFlushState={}));var Cr=class{constructor(r={}){var o;this._registeredSpanProcessors=[],this._tracers=new Map;let c=(0,kt.merge)({},(0,ag.loadDefaultConfig)(),(0,fg.reconfigureLimits)(r));this.resource=(o=c.resource)!==null&&o!==void 0?o:Jp.Resource.empty(),this.resource=Jp.Resource.default().merge(this.resource),this._config=Object.assign({},c,{resource:this.resource});let s=this._buildExporterFromEnv();if(s!==void 0){let a=new pg.BatchSpanProcessor(s);this.activeSpanProcessor=a}else this.activeSpanProcessor=new lg.NoopSpanProcessor}getTracer(r,o,c){let s=`${r}@${o||""}:${c?.schemaUrl||""}`;return this._tracers.has(s)||this._tracers.set(s,new ug.Tracer({name:r,version:o,schemaUrl:c?.schemaUrl},this._config,this)),this._tracers.get(s)}addSpanProcessor(r){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(o=>Bt.diag.error("Error while trying to shutdown current span processor",o)),this._registeredSpanProcessors.push(r),this.activeSpanProcessor=new cg.MultiSpanProcessor(this._registeredSpanProcessors)}getActiveSpanProcessor(){return this.activeSpanProcessor}register(r={}){Bt.trace.setGlobalTracerProvider(this),r.propagator===void 0&&(r.propagator=this._buildPropagatorFromEnv()),r.contextManager&&Bt.context.setGlobalContextManager(r.contextManager),r.propagator&&Bt.propagation.setGlobalPropagator(r.propagator)}forceFlush(){let r=this._config.forceFlushTimeoutMillis,o=this._registeredSpanProcessors.map(c=>new Promise(s=>{let a,t=setTimeout(()=>{s(new Error(`Span processor did not completed within timeout period of ${r} ms`)),a=Vt.timeout},r);c.forceFlush().then(()=>{clearTimeout(t),a!==Vt.timeout&&(a=Vt.resolved,s(a))}).catch(e=>{clearTimeout(t),a=Vt.error,s(e)})}));return new Promise((c,s)=>{Promise.all(o).then(a=>{let t=a.filter(e=>e!==Vt.resolved);t.length>0?s(t):c()}).catch(a=>s([a]))})}shutdown(){return this.activeSpanProcessor.shutdown()}_getPropagator(r){var o;return(o=this.constructor._registeredPropagators.get(r))===null||o===void 0?void 0:o()}_getSpanExporter(r){var o;return(o=this.constructor._registeredExporters.get(r))===null||o===void 0?void 0:o()}_buildPropagatorFromEnv(){let r=Array.from(new Set((0,kt.getEnv)().OTEL_PROPAGATORS)),c=r.map(s=>{let a=this._getPropagator(s);return a||Bt.diag.warn(`Propagator "${s}" requested through environment variable is unavailable.`),a}).reduce((s,a)=>(a&&s.push(a),s),[]);if(c.length!==0)return r.length===1?c[0]:new kt.CompositePropagator({propagators:c})}_buildExporterFromEnv(){let r=(0,kt.getEnv)().OTEL_TRACES_EXPORTER;if(r==="none"||r==="")return;let o=this._getSpanExporter(r);return o||Bt.diag.error(`Exporter "${r}" requested through environment variable is unavailable.`),o}};dt.BasicTracerProvider=Cr;Cr._registeredPropagators=new Map([["tracecontext",()=>new kt.W3CTraceContextPropagator],["baggage",()=>new kt.W3CBaggagePropagator]]);Cr._registeredExporters=new Map});var Zp=d(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.ConsoleSpanExporter=void 0;var wu=N(),Mu=class{export(r,o){return this._sendSpans(r,o)}shutdown(){return this._sendSpans([]),this.forceFlush()}forceFlush(){return Promise.resolve()}_exportInfo(r){var o;return{traceId:r.spanContext().traceId,parentId:r.parentSpanId,traceState:(o=r.spanContext().traceState)===null||o===void 0?void 0:o.serialize(),name:r.name,id:r.spanContext().spanId,kind:r.kind,timestamp:(0,wu.hrTimeToMicroseconds)(r.startTime),duration:(0,wu.hrTimeToMicroseconds)(r.duration),attributes:r.attributes,status:r.status,events:r.events,links:r.links}}_sendSpans(r,o){for(let c of r)console.dir(this._exportInfo(c),{depth:3});if(o)return o({code:wu.ExportResultCode.SUCCESS})}};Io.ConsoleSpanExporter=Mu});var tf=d(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.InMemorySpanExporter=void 0;var ef=N(),Cu=class{constructor(){this._finishedSpans=[],this._stopped=!1}export(r,o){if(this._stopped)return o({code:ef.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedSpans.push(...r),setTimeout(()=>o({code:ef.ExportResultCode.SUCCESS}),0)}shutdown(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()}forceFlush(){return Promise.resolve()}reset(){this._finishedSpans=[]}getFinishedSpans(){return this._finishedSpans}};Lo.InMemorySpanExporter=Cu});var nf=d(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0})});var of=d(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.SimpleSpanProcessor=void 0;var dg=(y(),E(_)),qt=N(),Uu=class{constructor(r){this._exporter=r,this._shutdownOnce=new qt.BindOnceFuture(this._shutdown,this),this._unresolvedExports=new Set}async forceFlush(){await Promise.all(Array.from(this._unresolvedExports)),this._exporter.forceFlush&&await this._exporter.forceFlush()}onStart(r,o){}onEnd(r){var o,c;if(this._shutdownOnce.isCalled||!(r.spanContext().traceFlags&dg.TraceFlags.SAMPLED))return;let s=()=>qt.internal._export(this._exporter,[r]).then(a=>{var t;a.code!==qt.ExportResultCode.SUCCESS&&(0,qt.globalErrorHandler)((t=a.error)!==null&&t!==void 0?t:new Error(`SimpleSpanProcessor: span export failed (status ${a})`))}).catch(a=>{(0,qt.globalErrorHandler)(a)});if(r.resource.asyncAttributesPending){let a=(c=(o=r.resource).waitForAsyncAttributes)===null||c===void 0?void 0:c.call(o).then(()=>(a!=null&&this._unresolvedExports.delete(a),s()),t=>(0,qt.globalErrorHandler)(t));a!=null&&this._unresolvedExports.add(a)}else s()}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}};wo.SimpleSpanProcessor=Uu});var uf=d(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0})});var cf=d(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0})});var pf=d(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0})});var df=d(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0})});var mf=d(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0})});var Lu=d(U=>{"use strict";var hg=U&&U.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),F=U&&U.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&hg(r,i,o)};Object.defineProperty(U,"__esModule",{value:!0});F(gp(),U);F(Qp(),U);F(ro(),U);F(Zp(),U);F(tf(),U);F(nf(),U);F(of(),U);F(uf(),U);F(Iu(),U);F(Kn(),U);F(zn(),U);F(Js(),U);F(Zs(),U);F(Lr(),U);F(Xs(),U);F(cf(),U);F(pf(),U);F(df(),U);F(mf(),U)});var ht={};import*as OA from"@opentelemetry/api-logs";var Du=Fc(()=>{Ot(ht,OA)});var yf=d(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.disableInstrumentations=je.enableInstrumentations=je.parseInstrumentationOptions=void 0;function _f(i=[]){let r=[];for(let o=0,c=i.length;o<c;o++){let s=i[o];if(Array.isArray(s)){let a=_f(s);r=r.concat(a.instrumentations)}else typeof s=="function"?r.push(new s):s.instrumentationName&&r.push(s)}return{instrumentations:r}}je.parseInstrumentationOptions=_f;function mg(i,r,o){for(let c=0,s=i.length;c<s;c++){let a=i[c];r&&a.setTracerProvider(r),o&&a.setMeterProvider(o),a.getConfig().enabled||a.enable()}}je.enableInstrumentations=mg;function _g(i){i.forEach(r=>r.disable())}je.disableInstrumentations=_g});var gf=d(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.registerInstrumentations=void 0;var Ef=(y(),E(_)),Bu=yf();function yg(i){let{instrumentations:r}=(0,Bu.parseInstrumentationOptions)(i.instrumentations),o=i.tracerProvider||Ef.trace.getTracerProvider(),c=i.meterProvider||Ef.metrics.getMeterProvider();return(0,Bu.enableInstrumentations)(r,o,c),()=>{(0,Bu.disableInstrumentations)(r)}}Mo.registerInstrumentations=yg});var ku=d(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});Uo.LogRecord=void 0;var Eg=(y(),E(_)),Ur=(y(),E(_)),Co=N(),Vu=class{constructor(r,o,c){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;let{timestamp:s,observedTimestamp:a,severityNumber:t,severityText:e,body:n,attributes:u={},context:l}=c,h=Date.now();if(this.hrTime=(0,Co.timeInputToHrTime)(s??h),this.hrTimeObserved=(0,Co.timeInputToHrTime)(a??h),l){let T=Ur.trace.getSpanContext(l);T&&Ur.isSpanContextValid(T)&&(this.spanContext=T)}this.severityNumber=t,this.severityText=e,this.body=n,this.resource=r.resource,this.instrumentationScope=o,this._logRecordLimits=r.logRecordLimits,this.setAttributes(u)}set severityText(r){this._isLogRecordReadonly()||(this._severityText=r)}get severityText(){return this._severityText}set severityNumber(r){this._isLogRecordReadonly()||(this._severityNumber=r)}get severityNumber(){return this._severityNumber}set body(r){this._isLogRecordReadonly()||(this._body=r)}get body(){return this._body}get droppedAttributesCount(){return this.totalAttributesCount-Object.keys(this.attributes).length}setAttribute(r,o){return this._isLogRecordReadonly()?this:o===null?this:r.length===0?(Ur.diag.warn(`Invalid attribute key: ${r}`),this):!(0,Co.isAttributeValue)(o)&&!(typeof o=="object"&&!Array.isArray(o)&&Object.keys(o).length>0)?(Ur.diag.warn(`Invalid attribute value set for key: ${r}`),this):(this.totalAttributesCount+=1,Object.keys(this.attributes).length>=this._logRecordLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,r)?this:((0,Co.isAttributeValue)(o)?this.attributes[r]=this._truncateToSize(o):this.attributes[r]=o,this))}setAttributes(r){for(let[o,c]of Object.entries(r))this.setAttribute(o,c);return this}setBody(r){return this.body=r,this}setSeverityNumber(r){return this.severityNumber=r,this}setSeverityText(r){return this.severityText=r,this}_makeReadonly(){this._isReadonly=!0}_truncateToSize(r){let o=this._logRecordLimits.attributeValueLengthLimit;return o<=0?(Ur.diag.warn(`Attribute value limit must be positive, got ${o}`),r):typeof r=="string"?this._truncateToLimitUtil(r,o):Array.isArray(r)?r.map(c=>typeof c=="string"?this._truncateToLimitUtil(c,o):c):r}_truncateToLimitUtil(r,o){return r.length<=o?r:r.substring(0,o)}_isLogRecordReadonly(){return this._isReadonly&&Eg.diag.warn("Can not execute the operation on emitted log record"),this._isReadonly}};Uo.LogRecord=Vu});var vf=d(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.Logger=void 0;var gg=(y(),E(_)),vg=ku(),qu=class{constructor(r,o){this.instrumentationScope=r,this._sharedState=o}emit(r){let o=r.context||gg.context.active(),c=new vg.LogRecord(this._sharedState,this.instrumentationScope,Object.assign({context:o},r));this._sharedState.activeProcessor.onEmit(c,o),c._makeReadonly()}};Do.Logger=qu});var Tf=d(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.reconfigureLimits=jt.loadDefaultConfig=void 0;var Dr=N();function Tg(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:(0,Dr.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,Dr.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT},includeTraceContext:!0}}jt.loadDefaultConfig=Tg;function Sg(i){var r,o,c,s,a,t;let e=(0,Dr.getEnvWithoutDefaults)();return{attributeCountLimit:(c=(o=(r=i.attributeCountLimit)!==null&&r!==void 0?r:e.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:e.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&c!==void 0?c:Dr.DEFAULT_ATTRIBUTE_COUNT_LIMIT,attributeValueLengthLimit:(t=(a=(s=i.attributeValueLengthLimit)!==null&&s!==void 0?s:e.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&a!==void 0?a:e.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&t!==void 0?t:Dr.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT}}jt.reconfigureLimits=Sg});var Sf=d(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});Bo.MultiLogRecordProcessor=void 0;var bg=N(),ju=class{constructor(r,o){this.processors=r,this.forceFlushTimeoutMillis=o}async forceFlush(){let r=this.forceFlushTimeoutMillis;await Promise.all(this.processors.map(o=>(0,bg.callWithTimeout)(o.forceFlush(),r)))}onEmit(r,o){this.processors.forEach(c=>c.onEmit(r,o))}async shutdown(){await Promise.all(this.processors.map(r=>r.shutdown()))}};Bo.MultiLogRecordProcessor=ju});var Hu=d(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.NoopLogRecordProcessor=void 0;var Gu=class{forceFlush(){return Promise.resolve()}onEmit(r,o){}shutdown(){return Promise.resolve()}};Vo.NoopLogRecordProcessor=Gu});var bf=d(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.LoggerProviderSharedState=void 0;var Og=Hu(),Fu=class{constructor(r,o,c){this.resource=r,this.forceFlushTimeoutMillis=o,this.logRecordLimits=c,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new Og.NoopLogRecordProcessor}};ko.LoggerProviderSharedState=Fu});var Pf=d(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.LoggerProvider=mt.DEFAULT_LOGGER_NAME=void 0;var Br=(y(),E(_)),Ag=(Du(),E(ht)),Pg=pt(),Of=N(),Ng=vf(),Af=Tf(),Rg=Sf(),xg=bf();mt.DEFAULT_LOGGER_NAME="unknown";var Ku=class{constructor(r={}){let{resource:o=Pg.Resource.default(),logRecordLimits:c,forceFlushTimeoutMillis:s}=(0,Of.merge)({},(0,Af.loadDefaultConfig)(),r);this._sharedState=new xg.LoggerProviderSharedState(o,s,(0,Af.reconfigureLimits)(c)),this._shutdownOnce=new Of.BindOnceFuture(this._shutdown,this)}getLogger(r,o,c){if(this._shutdownOnce.isCalled)return Br.diag.warn("A shutdown LoggerProvider cannot provide a Logger"),Ag.NOOP_LOGGER;r||Br.diag.warn("Logger requested without instrumentation scope name.");let s=r||mt.DEFAULT_LOGGER_NAME,a=`${s}@${o||""}:${c?.schemaUrl||""}`;return this._sharedState.loggers.has(a)||this._sharedState.loggers.set(a,new Ng.Logger({name:s,version:o,schemaUrl:c?.schemaUrl},this._sharedState)),this._sharedState.loggers.get(a)}addLogRecordProcessor(r){this._sharedState.registeredLogRecordProcessors.length===0&&this._sharedState.activeProcessor.shutdown().catch(o=>Br.diag.error("Error while trying to shutdown current log record processor",o)),this._sharedState.registeredLogRecordProcessors.push(r),this._sharedState.activeProcessor=new Rg.MultiLogRecordProcessor(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)}forceFlush(){return this._shutdownOnce.isCalled?(Br.diag.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()}shutdown(){return this._shutdownOnce.isCalled?(Br.diag.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()}_shutdown(){return this._sharedState.activeProcessor.shutdown()}};mt.LoggerProvider=Ku});var Nf=d(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});qo.ConsoleLogRecordExporter=void 0;var Ig=N(),Lg=N(),Xu=class{export(r,o){this._sendLogRecords(r,o)}shutdown(){return Promise.resolve()}_exportInfo(r){var o,c,s;return{timestamp:(0,Ig.hrTimeToMicroseconds)(r.hrTime),traceId:(o=r.spanContext)===null||o===void 0?void 0:o.traceId,spanId:(c=r.spanContext)===null||c===void 0?void 0:c.spanId,traceFlags:(s=r.spanContext)===null||s===void 0?void 0:s.traceFlags,severityText:r.severityText,severityNumber:r.severityNumber,body:r.body,attributes:r.attributes}}_sendLogRecords(r,o){for(let c of r)console.dir(this._exportInfo(c),{depth:3});o?.({code:Lg.ExportResultCode.SUCCESS})}};qo.ConsoleLogRecordExporter=Xu});var Rf=d(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});jo.SimpleLogRecordProcessor=void 0;var zu=N(),$u=class{constructor(r){this._exporter=r,this._shutdownOnce=new zu.BindOnceFuture(this._shutdown,this)}onEmit(r){this._shutdownOnce.isCalled||this._exporter.export([r],o=>{var c;if(o.code!==zu.ExportResultCode.SUCCESS){(0,zu.globalErrorHandler)((c=o.error)!==null&&c!==void 0?c:new Error(`SimpleLogRecordProcessor: log record export failed (status ${o})`));return}})}forceFlush(){return Promise.resolve()}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}};jo.SimpleLogRecordProcessor=$u});var If=d(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.InMemoryLogRecordExporter=void 0;var xf=N(),Yu=class{constructor(){this._finishedLogRecords=[],this._stopped=!1}export(r,o){if(this._stopped)return o({code:xf.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedLogRecords.push(...r),o({code:xf.ExportResultCode.SUCCESS})}shutdown(){return this._stopped=!0,this.reset(),Promise.resolve()}getFinishedLogRecords(){return this._finishedLogRecords}reset(){this._finishedLogRecords=[]}};Go.InMemoryLogRecordExporter=Yu});var Lf=d(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.BatchLogRecordProcessorBase=void 0;var wg=(y(),E(_)),Gt=N(),Wu=class{constructor(r,o){var c,s,a,t;this._exporter=r,this._finishedLogRecords=[];let e=(0,Gt.getEnv)();this._maxExportBatchSize=(c=o?.maxExportBatchSize)!==null&&c!==void 0?c:e.OTEL_BLRP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=(s=o?.maxQueueSize)!==null&&s!==void 0?s:e.OTEL_BLRP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=(a=o?.scheduledDelayMillis)!==null&&a!==void 0?a:e.OTEL_BLRP_SCHEDULE_DELAY,this._exportTimeoutMillis=(t=o?.exportTimeoutMillis)!==null&&t!==void 0?t:e.OTEL_BLRP_EXPORT_TIMEOUT,this._shutdownOnce=new Gt.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(wg.diag.warn("BatchLogRecordProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}onEmit(r){this._shutdownOnce.isCalled||this._addToBuffer(r)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}shutdown(){return this._shutdownOnce.call()}async _shutdown(){this.onShutdown(),await this._flushAll(),await this._exporter.shutdown()}_addToBuffer(r){this._finishedLogRecords.length>=this._maxQueueSize||(this._finishedLogRecords.push(r),this._maybeStartTimer())}_flushAll(){return new Promise((r,o)=>{let c=[],s=Math.ceil(this._finishedLogRecords.length/this._maxExportBatchSize);for(let a=0;a<s;a++)c.push(this._flushOneBatch());Promise.all(c).then(()=>{r()}).catch(o)})}_flushOneBatch(){return this._clearTimer(),this._finishedLogRecords.length===0?Promise.resolve():new Promise((r,o)=>{(0,Gt.callWithTimeout)(this._export(this._finishedLogRecords.splice(0,this._maxExportBatchSize)),this._exportTimeoutMillis).then(()=>r()).catch(o)})}_maybeStartTimer(){this._timer===void 0&&(this._timer=setTimeout(()=>{this._flushOneBatch().then(()=>{this._finishedLogRecords.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(r=>{(0,Gt.globalErrorHandler)(r)})},this._scheduledDelayMillis),(0,Gt.unrefTimer)(this._timer))}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}_export(r){return new Promise((o,c)=>{this._exporter.export(r,s=>{var a;if(s.code!==Gt.ExportResultCode.SUCCESS){c((a=s.error)!==null&&a!==void 0?a:new Error(`BatchLogRecordProcessorBase: log record export failed (status ${s})`));return}o(s)})})}};Ho.BatchLogRecordProcessorBase=Wu});var wf=d(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.BatchLogRecordProcessor=void 0;var Mg=Lf(),Ju=class extends Mg.BatchLogRecordProcessorBase{onShutdown(){}};Fo.BatchLogRecordProcessor=Ju});var Mf=d(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});Ko.BatchLogRecordProcessor=void 0;var Cg=wf();Object.defineProperty(Ko,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return Cg.BatchLogRecordProcessor}})});var Cf=d(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.BatchLogRecordProcessor=void 0;var Ug=Mf();Object.defineProperty(Xo,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return Ug.BatchLogRecordProcessor}})});var Uf=d(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.BatchLogRecordProcessor=ne.InMemoryLogRecordExporter=ne.SimpleLogRecordProcessor=ne.ConsoleLogRecordExporter=ne.NoopLogRecordProcessor=ne.LogRecord=ne.LoggerProvider=void 0;var Dg=Pf();Object.defineProperty(ne,"LoggerProvider",{enumerable:!0,get:function(){return Dg.LoggerProvider}});var Bg=ku();Object.defineProperty(ne,"LogRecord",{enumerable:!0,get:function(){return Bg.LogRecord}});var Vg=Hu();Object.defineProperty(ne,"NoopLogRecordProcessor",{enumerable:!0,get:function(){return Vg.NoopLogRecordProcessor}});var kg=Nf();Object.defineProperty(ne,"ConsoleLogRecordExporter",{enumerable:!0,get:function(){return kg.ConsoleLogRecordExporter}});var qg=Rf();Object.defineProperty(ne,"SimpleLogRecordProcessor",{enumerable:!0,get:function(){return qg.SimpleLogRecordProcessor}});var jg=If();Object.defineProperty(ne,"InMemoryLogRecordExporter",{enumerable:!0,get:function(){return jg.InMemoryLogRecordExporter}});var Gg=Cf();Object.defineProperty(ne,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return Gg.BatchLogRecordProcessor}})});var zo=d(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.AggregationTemporality=void 0;var Hg;(function(i){i[i.DELTA=0]="DELTA",i[i.CUMULATIVE=1]="CUMULATIVE"})(Hg=Vr.AggregationTemporality||(Vr.AggregationTemporality={}))});var Ht=d(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.DataPointType=void 0;var Fg;(function(i){i[i.HISTOGRAM=0]="HISTOGRAM",i[i.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",i[i.GAUGE=2]="GAUGE",i[i.SUM=3]="SUM"})(Fg=kr.DataPointType||(kr.DataPointType={}))});var Ne=d(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.equalsCaseInsensitive=V.binarySearchLB=V.setEquals=V.FlatMap=V.isPromiseAllSettledRejectionResult=V.PromiseAllSettled=V.callWithTimeout=V.TimeoutError=V.instrumentationScopeId=V.hashAttributes=V.isNotNullish=void 0;function Kg(i){return i!=null}V.isNotNullish=Kg;function Xg(i){let r=Object.keys(i);return r.length===0?"":(r=r.sort(),JSON.stringify(r.map(o=>[o,i[o]])))}V.hashAttributes=Xg;function zg(i){var r,o;return`${i.name}:${(r=i.version)!==null&&r!==void 0?r:""}:${(o=i.schemaUrl)!==null&&o!==void 0?o:""}`}V.instrumentationScopeId=zg;var $o=class i extends Error{constructor(r){super(r),Object.setPrototypeOf(this,i.prototype)}};V.TimeoutError=$o;function $g(i,r){let o,c=new Promise(function(a,t){o=setTimeout(function(){t(new $o("Operation timed out."))},r)});return Promise.race([i,c]).then(s=>(clearTimeout(o),s),s=>{throw clearTimeout(o),s})}V.callWithTimeout=$g;async function Yg(i){return Promise.all(i.map(async r=>{try{return{status:"fulfilled",value:await r}}catch(o){return{status:"rejected",reason:o}}}))}V.PromiseAllSettled=Yg;function Wg(i){return i.status==="rejected"}V.isPromiseAllSettledRejectionResult=Wg;function Jg(i,r){let o=[];return i.forEach(c=>{o.push(...r(c))}),o}V.FlatMap=Jg;function Qg(i,r){if(i.size!==r.size)return!1;for(let o of i)if(!r.has(o))return!1;return!0}V.setEquals=Qg;function Zg(i,r){let o=0,c=i.length-1;for(;c-o>1;){let s=Math.trunc((c+o)/2);i[s]<=r?o=s:c=s-1}return i[c]<=r?c:i[o]<=r?o:-1}V.binarySearchLB=Zg;function ev(i,r){return i.toLowerCase()===r.toLowerCase()}V.equalsCaseInsensitive=ev});var Ft=d(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.AggregatorKind=void 0;var tv;(function(i){i[i.DROP=0]="DROP",i[i.SUM=1]="SUM",i[i.LAST_VALUE=2]="LAST_VALUE",i[i.HISTOGRAM=3]="HISTOGRAM",i[i.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(tv=qr.AggregatorKind||(qr.AggregatorKind={}))});var Df=d(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.DropAggregator=void 0;var rv=Ft(),Qu=class{constructor(){this.kind=rv.AggregatorKind.DROP}createAccumulation(){}merge(r,o){}diff(r,o){}toMetricData(r,o,c,s){}};Yo.DropAggregator=Qu});var we=d(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.isValidName=pe.isDescriptorCompatibleWith=pe.createInstrumentDescriptorWithView=pe.createInstrumentDescriptor=pe.InstrumentType=void 0;var Bf=(y(),E(_)),nv=Ne(),ov;(function(i){i.COUNTER="COUNTER",i.HISTOGRAM="HISTOGRAM",i.UP_DOWN_COUNTER="UP_DOWN_COUNTER",i.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",i.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",i.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(ov=pe.InstrumentType||(pe.InstrumentType={}));function iv(i,r,o){var c,s,a,t;return Vf(i)||Bf.diag.warn(`Invalid metric name: "${i}". The metric name should be a ASCII string with a length no greater than 255 characters.`),{name:i,type:r,description:(c=o?.description)!==null&&c!==void 0?c:"",unit:(s=o?.unit)!==null&&s!==void 0?s:"",valueType:(a=o?.valueType)!==null&&a!==void 0?a:Bf.ValueType.DOUBLE,advice:(t=o?.advice)!==null&&t!==void 0?t:{}}}pe.createInstrumentDescriptor=iv;function sv(i,r){var o,c;return{name:(o=i.name)!==null&&o!==void 0?o:r.name,description:(c=i.description)!==null&&c!==void 0?c:r.description,type:r.type,unit:r.unit,valueType:r.valueType,advice:r.advice}}pe.createInstrumentDescriptorWithView=sv;function uv(i,r){return(0,nv.equalsCaseInsensitive)(i.name,r.name)&&i.unit===r.unit&&i.type===r.type&&i.valueType===r.valueType}pe.isDescriptorCompatibleWith=uv;var av=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Vf(i){return i.match(av)!=null}pe.isValidName=Vf});var kf=d(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.HistogramAggregator=Xt.HistogramAccumulation=void 0;var cv=Ft(),lv=Ht(),Zu=we(),pv=Ne();function fv(i){let r=i.map(()=>0);return r.push(0),{buckets:{boundaries:i,counts:r},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var Kt=class{constructor(r,o,c=!0,s=fv(o)){this.startTime=r,this._boundaries=o,this._recordMinMax=c,this._current=s}record(r){this._current.count+=1,this._current.sum+=r,this._recordMinMax&&(this._current.min=Math.min(r,this._current.min),this._current.max=Math.max(r,this._current.max),this._current.hasMinMax=!0);let o=(0,pv.binarySearchLB)(this._boundaries,r);this._current.buckets.counts[o+1]+=1}setStartTime(r){this.startTime=r}toPointValue(){return this._current}};Xt.HistogramAccumulation=Kt;var ea=class{constructor(r,o){this._boundaries=r,this._recordMinMax=o,this.kind=cv.AggregatorKind.HISTOGRAM}createAccumulation(r){return new Kt(r,this._boundaries,this._recordMinMax)}merge(r,o){let c=r.toPointValue(),s=o.toPointValue(),a=c.buckets.counts,t=s.buckets.counts,e=new Array(a.length);for(let l=0;l<a.length;l++)e[l]=a[l]+t[l];let n=1/0,u=-1/0;return this._recordMinMax&&(c.hasMinMax&&s.hasMinMax?(n=Math.min(c.min,s.min),u=Math.max(c.max,s.max)):c.hasMinMax?(n=c.min,u=c.max):s.hasMinMax&&(n=s.min,u=s.max)),new Kt(r.startTime,c.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:c.buckets.boundaries,counts:e},count:c.count+s.count,sum:c.sum+s.sum,hasMinMax:this._recordMinMax&&(c.hasMinMax||s.hasMinMax),min:n,max:u})}diff(r,o){let c=r.toPointValue(),s=o.toPointValue(),a=c.buckets.counts,t=s.buckets.counts,e=new Array(a.length);for(let n=0;n<a.length;n++)e[n]=t[n]-a[n];return new Kt(o.startTime,c.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:c.buckets.boundaries,counts:e},count:s.count-c.count,sum:s.sum-c.sum,hasMinMax:!1,min:1/0,max:-1/0})}toMetricData(r,o,c,s){return{descriptor:r,aggregationTemporality:o,dataPointType:lv.DataPointType.HISTOGRAM,dataPoints:c.map(([a,t])=>{let e=t.toPointValue(),n=r.type===Zu.InstrumentType.UP_DOWN_COUNTER||r.type===Zu.InstrumentType.OBSERVABLE_GAUGE||r.type===Zu.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:t.startTime,endTime:s,value:{min:e.hasMinMax?e.min:void 0,max:e.hasMinMax?e.max:void 0,sum:n?void 0:e.sum,buckets:e.buckets,count:e.count}}})}}};Xt.HistogramAggregator=ea});var qf=d(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.Buckets=void 0;var ta=class i{constructor(r=new ra,o=0,c=0,s=0){this.backing=r,this.indexBase=o,this.indexStart=c,this.indexEnd=s}get offset(){return this.indexStart}get length(){return this.backing.length===0||this.indexEnd===this.indexStart&&this.at(0)===0?0:this.indexEnd-this.indexStart+1}counts(){return Array.from({length:this.length},(r,o)=>this.at(o))}at(r){let o=this.indexBase-this.indexStart;return r<o&&(r+=this.backing.length),r-=o,this.backing.countAt(r)}incrementBucket(r,o){this.backing.increment(r,o)}decrementBucket(r,o){this.backing.decrement(r,o)}trim(){for(let r=0;r<this.length;r++)if(this.at(r)!==0){this.indexStart+=r;break}else if(r===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(let r=this.length-1;r>=0;r--)if(this.at(r)!==0){this.indexEnd-=this.length-r-1;break}this._rotate()}downscale(r){this._rotate();let o=1+this.indexEnd-this.indexStart,c=1<<r,s=0,a=0;for(let t=this.indexStart;t<=this.indexEnd;){let e=t%c;e<0&&(e+=c);for(let n=e;n<c&&s<o;n++)this._relocateBucket(a,s),s++,t++;a++}this.indexStart>>=r,this.indexEnd>>=r,this.indexBase=this.indexStart}clone(){return new i(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)}_rotate(){let r=this.indexBase-this.indexStart;r!==0&&(r>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,r),this.backing.reverse(r,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+r)),this.indexBase=this.indexStart)}_relocateBucket(r,o){r!==o&&this.incrementBucket(r,this.backing.emptyBucket(o))}};Wo.Buckets=ta;var ra=class i{constructor(r=[0]){this._counts=r}get length(){return this._counts.length}countAt(r){return this._counts[r]}growTo(r,o,c){let s=new Array(r).fill(0);s.splice(c,this._counts.length-o,...this._counts.slice(o)),s.splice(0,o,...this._counts.slice(0,o)),this._counts=s}reverse(r,o){let c=Math.floor((r+o)/2)-r;for(let s=0;s<c;s++){let a=this._counts[r+s];this._counts[r+s]=this._counts[o-s-1],this._counts[o-s-1]=a}}emptyBucket(r){let o=this._counts[r];return this._counts[r]=0,o}increment(r,o){this._counts[r]+=o}decrement(r,o){this._counts[r]>=o?this._counts[r]-=o:this._counts[r]=0}clone(){return new i([...this._counts])}}});var oa=d(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.getSignificand=ie.getNormalBase2=ie.MIN_VALUE=ie.MAX_NORMAL_EXPONENT=ie.MIN_NORMAL_EXPONENT=ie.SIGNIFICAND_WIDTH=void 0;ie.SIGNIFICAND_WIDTH=52;var dv=2146435072,hv=1048575,na=1023;ie.MIN_NORMAL_EXPONENT=-na+1;ie.MAX_NORMAL_EXPONENT=na;ie.MIN_VALUE=Math.pow(2,-1022);function mv(i){let r=new DataView(new ArrayBuffer(8));return r.setFloat64(0,i),((r.getUint32(0)&dv)>>20)-na}ie.getNormalBase2=mv;function _v(i){let r=new DataView(new ArrayBuffer(8));r.setFloat64(0,i);let o=r.getUint32(0),c=r.getUint32(4);return(o&hv)*Math.pow(2,32)+c}ie.getSignificand=_v});var Jo=d(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.nextGreaterSquare=zt.ldexp=void 0;function yv(i,r){return i===0||i===Number.POSITIVE_INFINITY||i===Number.NEGATIVE_INFINITY||Number.isNaN(i)?i:i*Math.pow(2,r)}zt.ldexp=yv;function Ev(i){return i--,i|=i>>1,i|=i>>2,i|=i>>4,i|=i>>8,i|=i>>16,i++,i}zt.nextGreaterSquare=Ev});var Zo=d(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.MappingError=void 0;var ia=class extends Error{};Qo.MappingError=ia});var Gf=d(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.ExponentMapping=void 0;var $t=oa(),gv=Jo(),jf=Zo(),sa=class{constructor(r){this._shift=-r}mapToIndex(r){if(r<$t.MIN_VALUE)return this._minNormalLowerBoundaryIndex();let o=$t.getNormalBase2(r),c=this._rightShift($t.getSignificand(r)-1,$t.SIGNIFICAND_WIDTH);return o+c>>this._shift}lowerBoundary(r){let o=this._minNormalLowerBoundaryIndex();if(r<o)throw new jf.MappingError(`underflow: ${r} is < minimum lower boundary: ${o}`);let c=this._maxNormalLowerBoundaryIndex();if(r>c)throw new jf.MappingError(`overflow: ${r} is > maximum lower boundary: ${c}`);return gv.ldexp(1,r<<this._shift)}get scale(){return this._shift===0?0:-this._shift}_minNormalLowerBoundaryIndex(){let r=$t.MIN_NORMAL_EXPONENT>>this._shift;return this._shift<2&&r--,r}_maxNormalLowerBoundaryIndex(){return $t.MAX_NORMAL_EXPONENT>>this._shift}_rightShift(r,o){return Math.floor(r*Math.pow(2,-o))}};ei.ExponentMapping=sa});var Kf=d(ti=>{"use strict";Object.defineProperty(ti,"__esModule",{value:!0});ti.LogarithmMapping=void 0;var Yt=oa(),Hf=Jo(),Ff=Zo(),ua=class{constructor(r){this._scale=r,this._scaleFactor=Hf.ldexp(Math.LOG2E,r),this._inverseFactor=Hf.ldexp(Math.LN2,-r)}mapToIndex(r){if(r<=Yt.MIN_VALUE)return this._minNormalLowerBoundaryIndex()-1;if(Yt.getSignificand(r)===0)return(Yt.getNormalBase2(r)<<this._scale)-1;let o=Math.floor(Math.log(r)*this._scaleFactor),c=this._maxNormalLowerBoundaryIndex();return o>=c?c:o}lowerBoundary(r){let o=this._maxNormalLowerBoundaryIndex();if(r>=o){if(r===o)return 2*Math.exp((r-(1<<this._scale))/this._scaleFactor);throw new Ff.MappingError(`overflow: ${r} is > maximum lower boundary: ${o}`)}let c=this._minNormalLowerBoundaryIndex();if(r<=c){if(r===c)return Yt.MIN_VALUE;if(r===c-1)return Math.exp((r+(1<<this._scale))/this._scaleFactor)/2;throw new Ff.MappingError(`overflow: ${r} is < minimum lower boundary: ${c}`)}return Math.exp(r*this._inverseFactor)}get scale(){return this._scale}_minNormalLowerBoundaryIndex(){return Yt.MIN_NORMAL_EXPONENT<<this._scale}_maxNormalLowerBoundaryIndex(){return(Yt.MAX_NORMAL_EXPONENT+1<<this._scale)-1}};ti.LogarithmMapping=ua});var $f=d(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});ri.getMapping=void 0;var vv=Gf(),Tv=Kf(),Sv=Zo(),Xf=-10,zf=20,bv=Array.from({length:31},(i,r)=>r>10?new Tv.LogarithmMapping(r-10):new vv.ExponentMapping(r-10));function Ov(i){if(i>zf||i<Xf)throw new Sv.MappingError(`expected scale >= ${Xf} && <= ${zf}, got: ${i}`);return bv[i+10]}ri.getMapping=Ov});var Jf=d(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.ExponentialHistogramAggregator=Jt.ExponentialHistogramAccumulation=void 0;var Av=Ft(),Pv=Ht(),Nv=(y(),E(_)),aa=we(),Yf=qf(),Wf=$f(),Rv=Jo(),Wt=class i{constructor(r,o){this.low=r,this.high=o}static combine(r,o){return new i(Math.min(r.low,o.low),Math.max(r.high,o.high))}},xv=20,Iv=160,ca=2,ni=class i{constructor(r=r,o=Iv,c=!0,s=0,a=0,t=0,e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,u=new Yf.Buckets,l=new Yf.Buckets,h=(0,Wf.getMapping)(xv)){this.startTime=r,this._maxSize=o,this._recordMinMax=c,this._sum=s,this._count=a,this._zeroCount=t,this._min=e,this._max=n,this._positive=u,this._negative=l,this._mapping=h,this._maxSize<ca&&(Nv.diag.warn(`Exponential Histogram Max Size set to ${this._maxSize}, changing to the minimum size of: ${ca}`),this._maxSize=ca)}record(r){this.updateByIncrement(r,1)}setStartTime(r){this.startTime=r}toPointValue(){return{hasMinMax:this._recordMinMax,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}}get sum(){return this._sum}get min(){return this._min}get max(){return this._max}get count(){return this._count}get zeroCount(){return this._zeroCount}get scale(){return this._count===this._zeroCount?0:this._mapping.scale}get positive(){return this._positive}get negative(){return this._negative}updateByIncrement(r,o){if(r>this._max&&(this._max=r),r<this._min&&(this._min=r),this._count+=o,r===0){this._zeroCount+=o;return}this._sum+=r*o,r>0?this._updateBuckets(this._positive,r,o):this._updateBuckets(this._negative,-r,o)}merge(r){this._count===0?(this._min=r.min,this._max=r.max):r.count!==0&&(r.min<this.min&&(this._min=r.min),r.max>this.max&&(this._max=r.max)),this.startTime=r.startTime,this._sum+=r.sum,this._count+=r.count,this._zeroCount+=r.zeroCount;let o=this._minScale(r);this._downscale(this.scale-o),this._mergeBuckets(this.positive,r,r.positive,o),this._mergeBuckets(this.negative,r,r.negative,o)}diff(r){this._min=1/0,this._max=-1/0,this._sum-=r.sum,this._count-=r.count,this._zeroCount-=r.zeroCount;let o=this._minScale(r);this._downscale(this.scale-o),this._diffBuckets(this.positive,r,r.positive,o),this._diffBuckets(this.negative,r,r.negative,o)}clone(){return new i(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)}_updateBuckets(r,o,c){let s=this._mapping.mapToIndex(o),a=!1,t=0,e=0;if(r.length===0?(r.indexStart=s,r.indexEnd=r.indexStart,r.indexBase=r.indexStart):s<r.indexStart&&r.indexEnd-s>=this._maxSize?(a=!0,e=s,t=r.indexEnd):s>r.indexEnd&&s-r.indexStart>=this._maxSize&&(a=!0,e=r.indexStart,t=s),a){let n=this._changeScale(t,e);this._downscale(n),s=this._mapping.mapToIndex(o)}this._incrementIndexBy(r,s,c)}_incrementIndexBy(r,o,c){if(c===0)return;if(o<r.indexStart){let a=r.indexEnd-o;a>=r.backing.length&&this._grow(r,a+1),r.indexStart=o}else if(o>r.indexEnd){let a=o-r.indexStart;a>=r.backing.length&&this._grow(r,a+1),r.indexEnd=o}let s=o-r.indexBase;s<0&&(s+=r.backing.length),r.incrementBucket(s,c)}_grow(r,o){let c=r.backing.length,s=r.indexBase-r.indexStart,a=c-s,t=(0,Rv.nextGreaterSquare)(o);t>this._maxSize&&(t=this._maxSize);let e=t-s;r.backing.growTo(t,a,e)}_changeScale(r,o){let c=0;for(;r-o>=this._maxSize;)r>>=1,o>>=1,c++;return c}_downscale(r){if(r===0)return;if(r<0)throw new Error(`impossible change of scale: ${this.scale}`);let o=this._mapping.scale-r;this._positive.downscale(r),this._negative.downscale(r),this._mapping=(0,Wf.getMapping)(o)}_minScale(r){let o=Math.min(this.scale,r.scale),c=Wt.combine(this._highLowAtScale(this.positive,this.scale,o),this._highLowAtScale(r.positive,r.scale,o)),s=Wt.combine(this._highLowAtScale(this.negative,this.scale,o),this._highLowAtScale(r.negative,r.scale,o));return Math.min(o-this._changeScale(c.high,c.low),o-this._changeScale(s.high,s.low))}_highLowAtScale(r,o,c){if(r.length===0)return new Wt(0,-1);let s=o-c;return new Wt(r.indexStart>>s,r.indexEnd>>s)}_mergeBuckets(r,o,c,s){let a=c.offset,t=o.scale-s;for(let e=0;e<c.length;e++)this._incrementIndexBy(r,a+e>>t,c.at(e))}_diffBuckets(r,o,c,s){let a=c.offset,t=o.scale-s;for(let e=0;e<c.length;e++){let u=(a+e>>t)-r.indexBase;u<0&&(u+=r.backing.length),r.decrementBucket(u,c.at(e))}r.trim()}};Jt.ExponentialHistogramAccumulation=ni;var la=class{constructor(r,o){this._maxSize=r,this._recordMinMax=o,this.kind=Av.AggregatorKind.EXPONENTIAL_HISTOGRAM}createAccumulation(r){return new ni(r,this._maxSize,this._recordMinMax)}merge(r,o){let c=o.clone();return c.merge(r),c}diff(r,o){let c=o.clone();return c.diff(r),c}toMetricData(r,o,c,s){return{descriptor:r,aggregationTemporality:o,dataPointType:Pv.DataPointType.EXPONENTIAL_HISTOGRAM,dataPoints:c.map(([a,t])=>{let e=t.toPointValue(),n=r.type===aa.InstrumentType.UP_DOWN_COUNTER||r.type===aa.InstrumentType.OBSERVABLE_GAUGE||r.type===aa.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:t.startTime,endTime:s,value:{min:e.hasMinMax?e.min:void 0,max:e.hasMinMax?e.max:void 0,sum:n?void 0:e.sum,positive:{offset:e.positive.offset,bucketCounts:e.positive.bucketCounts},negative:{offset:e.negative.offset,bucketCounts:e.negative.bucketCounts},count:e.count,scale:e.scale,zeroCount:e.zeroCount}}})}}};Jt.ExponentialHistogramAggregator=la});var Qf=d(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.LastValueAggregator=Zt.LastValueAccumulation=void 0;var Lv=Ft(),jr=N(),wv=Ht(),Qt=class{constructor(r,o=0,c=[0,0]){this.startTime=r,this._current=o,this.sampleTime=c}record(r){this._current=r,this.sampleTime=(0,jr.millisToHrTime)(Date.now())}setStartTime(r){this.startTime=r}toPointValue(){return this._current}};Zt.LastValueAccumulation=Qt;var pa=class{constructor(){this.kind=Lv.AggregatorKind.LAST_VALUE}createAccumulation(r){return new Qt(r)}merge(r,o){let c=(0,jr.hrTimeToMicroseconds)(o.sampleTime)>=(0,jr.hrTimeToMicroseconds)(r.sampleTime)?o:r;return new Qt(r.startTime,c.toPointValue(),c.sampleTime)}diff(r,o){let c=(0,jr.hrTimeToMicroseconds)(o.sampleTime)>=(0,jr.hrTimeToMicroseconds)(r.sampleTime)?o:r;return new Qt(o.startTime,c.toPointValue(),c.sampleTime)}toMetricData(r,o,c,s){return{descriptor:r,aggregationTemporality:o,dataPointType:wv.DataPointType.GAUGE,dataPoints:c.map(([a,t])=>({attributes:a,startTime:t.startTime,endTime:s,value:t.toPointValue()}))}}};Zt.LastValueAggregator=pa});var Zf=d(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.SumAggregator=er.SumAccumulation=void 0;var Mv=Ft(),Cv=Ht(),Ge=class{constructor(r,o,c=0,s=!1){this.startTime=r,this.monotonic=o,this._current=c,this.reset=s}record(r){this.monotonic&&r<0||(this._current+=r)}setStartTime(r){this.startTime=r}toPointValue(){return this._current}};er.SumAccumulation=Ge;var fa=class{constructor(r){this.monotonic=r,this.kind=Mv.AggregatorKind.SUM}createAccumulation(r){return new Ge(r,this.monotonic)}merge(r,o){let c=r.toPointValue(),s=o.toPointValue();return o.reset?new Ge(o.startTime,this.monotonic,s,o.reset):new Ge(r.startTime,this.monotonic,c+s)}diff(r,o){let c=r.toPointValue(),s=o.toPointValue();return this.monotonic&&c>s?new Ge(o.startTime,this.monotonic,s,!0):new Ge(o.startTime,this.monotonic,s-c)}toMetricData(r,o,c,s){return{descriptor:r,aggregationTemporality:o,dataPointType:Cv.DataPointType.SUM,dataPoints:c.map(([a,t])=>({attributes:a,startTime:t.startTime,endTime:s,value:t.toPointValue()})),isMonotonic:this.monotonic}}};er.SumAggregator=fa});var ed=d(ge=>{"use strict";var Uv=ge&&ge.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),Gr=ge&&ge.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Uv(r,i,o)};Object.defineProperty(ge,"__esModule",{value:!0});Gr(Df(),ge);Gr(kf(),ge);Gr(Jf(),ge);Gr(Qf(),ge);Gr(Zf(),ge)});var ui=d($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.DefaultAggregation=$.ExponentialHistogramAggregation=$.ExplicitBucketHistogramAggregation=$.HistogramAggregation=$.LastValueAggregation=$.SumAggregation=$.DropAggregation=$.Aggregation=void 0;var Dv=(y(),E(_)),_t=ed(),Me=we(),Re=class{static Drop(){return td}static Sum(){return rd}static LastValue(){return nd}static Histogram(){return od}static ExponentialHistogram(){return Bv}static Default(){return Vv}};$.Aggregation=Re;var Hr=class i extends Re{createAggregator(r){return i.DEFAULT_INSTANCE}};$.DropAggregation=Hr;Hr.DEFAULT_INSTANCE=new _t.DropAggregator;var tr=class i extends Re{createAggregator(r){switch(r.type){case Me.InstrumentType.COUNTER:case Me.InstrumentType.OBSERVABLE_COUNTER:case Me.InstrumentType.HISTOGRAM:return i.MONOTONIC_INSTANCE;default:return i.NON_MONOTONIC_INSTANCE}}};$.SumAggregation=tr;tr.MONOTONIC_INSTANCE=new _t.SumAggregator(!0);tr.NON_MONOTONIC_INSTANCE=new _t.SumAggregator(!1);var Fr=class i extends Re{createAggregator(r){return i.DEFAULT_INSTANCE}};$.LastValueAggregation=Fr;Fr.DEFAULT_INSTANCE=new _t.LastValueAggregator;var Kr=class i extends Re{createAggregator(r){return i.DEFAULT_INSTANCE}};$.HistogramAggregation=Kr;Kr.DEFAULT_INSTANCE=new _t.HistogramAggregator([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0);var oi=class extends Re{constructor(r,o=!0){if(super(),this._recordMinMax=o,r===void 0||r.length===0)throw new Error("HistogramAggregator should be created with boundaries.");r=r.concat(),r=r.sort((a,t)=>a-t);let c=r.lastIndexOf(-1/0),s=r.indexOf(1/0);s===-1&&(s=void 0),this._boundaries=r.slice(c+1,s)}createAggregator(r){return new _t.HistogramAggregator(this._boundaries,this._recordMinMax)}};$.ExplicitBucketHistogramAggregation=oi;var ii=class extends Re{constructor(r=160,o=!0){super(),this._maxSize=r,this._recordMinMax=o}createAggregator(r){return new _t.ExponentialHistogramAggregator(this._maxSize,this._recordMinMax)}};$.ExponentialHistogramAggregation=ii;var si=class extends Re{_resolve(r){switch(r.type){case Me.InstrumentType.COUNTER:case Me.InstrumentType.UP_DOWN_COUNTER:case Me.InstrumentType.OBSERVABLE_COUNTER:case Me.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:return rd;case Me.InstrumentType.OBSERVABLE_GAUGE:return nd;case Me.InstrumentType.HISTOGRAM:return r.advice.explicitBucketBoundaries?new oi(r.advice.explicitBucketBoundaries):od}return Dv.diag.warn(`Unable to recognize instrument type: ${r.type}`),td}createAggregator(r){return this._resolve(r).createAggregator(r)}};$.DefaultAggregation=si;var td=new Hr,rd=new tr,nd=new Fr,od=new Kr,Bv=new ii,Vv=new si});var da=d(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=rr.DEFAULT_AGGREGATION_SELECTOR=void 0;var kv=ui(),qv=zo(),jv=i=>kv.Aggregation.Default();rr.DEFAULT_AGGREGATION_SELECTOR=jv;var Gv=i=>qv.AggregationTemporality.CUMULATIVE;rr.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=Gv});var ma=d(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.MetricReader=void 0;var id=(y(),E(_)),ai=Ne(),sd=da(),ha=class{constructor(r){var o,c,s;this._shutdown=!1,this._aggregationSelector=(o=r?.aggregationSelector)!==null&&o!==void 0?o:sd.DEFAULT_AGGREGATION_SELECTOR,this._aggregationTemporalitySelector=(c=r?.aggregationTemporalitySelector)!==null&&c!==void 0?c:sd.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR,this._metricProducers=(s=r?.metricProducers)!==null&&s!==void 0?s:[]}setMetricProducer(r){if(this._sdkMetricProducer)throw new Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=r,this.onInitialized()}selectAggregation(r){return this._aggregationSelector(r)}selectAggregationTemporality(r){return this._aggregationTemporalitySelector(r)}onInitialized(){}async collect(r){if(this._sdkMetricProducer===void 0)throw new Error("MetricReader is not bound to a MetricProducer");if(this._shutdown)throw new Error("MetricReader is shutdown");let[o,...c]=await Promise.all([this._sdkMetricProducer.collect({timeoutMillis:r?.timeoutMillis}),...this._metricProducers.map(e=>e.collect({timeoutMillis:r?.timeoutMillis}))]),s=o.errors.concat((0,ai.FlatMap)(c,e=>e.errors)),a=o.resourceMetrics.resource,t=o.resourceMetrics.scopeMetrics.concat((0,ai.FlatMap)(c,e=>e.resourceMetrics.scopeMetrics));return{resourceMetrics:{resource:a,scopeMetrics:t},errors:s}}async shutdown(r){if(this._shutdown){id.diag.error("Cannot call shutdown twice.");return}r?.timeoutMillis==null?await this.onShutdown():await(0,ai.callWithTimeout)(this.onShutdown(),r.timeoutMillis),this._shutdown=!0}async forceFlush(r){if(this._shutdown){id.diag.warn("Cannot forceFlush on already shutdown MetricReader.");return}if(r?.timeoutMillis==null){await this.onForceFlush();return}await(0,ai.callWithTimeout)(this.onForceFlush(),r.timeoutMillis)}};ci.MetricReader=ha});var cd=d(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.PeriodicExportingMetricReader=void 0;var ud=(y(),E(_)),li=N(),Hv=ma(),ad=Ne(),Fv=(y(),E(_)),_a=class extends Hv.MetricReader{constructor(r){var o,c,s,a;if(super({aggregationSelector:(o=r.exporter.selectAggregation)===null||o===void 0?void 0:o.bind(r.exporter),aggregationTemporalitySelector:(c=r.exporter.selectAggregationTemporality)===null||c===void 0?void 0:c.bind(r.exporter),metricProducers:r.metricProducers}),r.exportIntervalMillis!==void 0&&r.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(r.exportTimeoutMillis!==void 0&&r.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(r.exportTimeoutMillis!==void 0&&r.exportIntervalMillis!==void 0&&r.exportIntervalMillis<r.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");this._exportInterval=(s=r.exportIntervalMillis)!==null&&s!==void 0?s:6e4,this._exportTimeout=(a=r.exportTimeoutMillis)!==null&&a!==void 0?a:3e4,this._exporter=r.exporter}async _runOnce(){try{await(0,ad.callWithTimeout)(this._doRun(),this._exportTimeout)}catch(r){if(r instanceof ad.TimeoutError){ud.diag.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout);return}(0,li.globalErrorHandler)(r)}}async _doRun(){var r,o;let{resourceMetrics:c,errors:s}=await this.collect({timeoutMillis:this._exportTimeout});s.length>0&&ud.diag.error("PeriodicExportingMetricReader: metrics collection errors",...s);let a=async()=>{let t=await li.internal._export(this._exporter,c);if(t.code!==li.ExportResultCode.SUCCESS)throw new Error(`PeriodicExportingMetricReader: metrics export failed (error ${t.error})`)};c.resource.asyncAttributesPending?(o=(r=c.resource).waitForAsyncAttributes)===null||o===void 0||o.call(r).then(a,t=>Fv.diag.debug("Error while resolving async portion of resource: ",t)):await a()}onInitialized(){this._interval=setInterval(()=>{this._runOnce()},this._exportInterval),(0,li.unrefTimer)(this._interval)}async onForceFlush(){await this._runOnce(),await this._exporter.forceFlush()}async onShutdown(){this._interval&&clearInterval(this._interval),await this._exporter.shutdown()}};pi.PeriodicExportingMetricReader=_a});var pd=d(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.InMemoryMetricExporter=void 0;var ld=N(),ya=class{constructor(r){this._shutdown=!1,this._metrics=[],this._aggregationTemporality=r}export(r,o){if(this._shutdown){setTimeout(()=>o({code:ld.ExportResultCode.FAILED}),0);return}this._metrics.push(r),setTimeout(()=>o({code:ld.ExportResultCode.SUCCESS}),0)}getMetrics(){return this._metrics}forceFlush(){return Promise.resolve()}reset(){this._metrics=[]}selectAggregationTemporality(r){return this._aggregationTemporality}shutdown(){return this._shutdown=!0,Promise.resolve()}};fi.InMemoryMetricExporter=ya});var dd=d(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.ConsoleMetricExporter=void 0;var fd=N(),Kv=da(),Ea=class i{constructor(r){var o;this._shutdown=!1,this._temporalitySelector=(o=r?.temporalitySelector)!==null&&o!==void 0?o:Kv.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR}export(r,o){if(this._shutdown){setImmediate(o,{code:fd.ExportResultCode.FAILED});return}return i._sendMetrics(r,o)}forceFlush(){return Promise.resolve()}selectAggregationTemporality(r){return this._temporalitySelector(r)}shutdown(){return this._shutdown=!0,Promise.resolve()}static _sendMetrics(r,o){for(let c of r.scopeMetrics)for(let s of c.metrics)console.dir({descriptor:s.descriptor,dataPointType:s.dataPointType,dataPoints:s.dataPoints});o({code:fd.ExportResultCode.SUCCESS})}};di.ConsoleMetricExporter=Ea});var hd=d(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.ViewRegistry=void 0;var ga=class{constructor(){this._registeredViews=[]}addView(r){this._registeredViews.push(r)}findViews(r,o){return this._registeredViews.filter(s=>this._matchInstrument(s.instrumentSelector,r)&&this._matchMeter(s.meterSelector,o))}_matchInstrument(r,o){return(r.getType()===void 0||o.type===r.getType())&&r.getNameFilter().match(o.name)&&r.getUnitFilter().match(o.unit)}_matchMeter(r,o){return r.getNameFilter().match(o.name)&&(o.version===void 0||r.getVersionFilter().match(o.version))&&(o.schemaUrl===void 0||r.getSchemaUrlFilter().match(o.schemaUrl))}};hi.ViewRegistry=ga});var mi=d(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.isObservableInstrument=H.ObservableUpDownCounterInstrument=H.ObservableGaugeInstrument=H.ObservableCounterInstrument=H.ObservableInstrument=H.HistogramInstrument=H.CounterInstrument=H.UpDownCounterInstrument=H.SyncInstrument=void 0;var nr=(y(),E(_)),Xv=N(),or=class{constructor(r,o){this._writableMetricStorage=r,this._descriptor=o}_record(r,o={},c=nr.context.active()){if(typeof r!="number"){nr.diag.warn(`non-number value provided to metric ${this._descriptor.name}: ${r}`);return}this._descriptor.valueType===nr.ValueType.INT&&!Number.isInteger(r)&&(nr.diag.warn(`INT value type cannot accept a floating-point value for ${this._descriptor.name}, ignoring the fractional digits.`),r=Math.trunc(r),!Number.isInteger(r))||this._writableMetricStorage.record(r,o,c,(0,Xv.millisToHrTime)(Date.now()))}};H.SyncInstrument=or;var va=class extends or{add(r,o,c){this._record(r,o,c)}};H.UpDownCounterInstrument=va;var Ta=class extends or{add(r,o,c){if(r<0){nr.diag.warn(`negative value provided to counter ${this._descriptor.name}: ${r}`);return}this._record(r,o,c)}};H.CounterInstrument=Ta;var Sa=class extends or{record(r,o,c){if(r<0){nr.diag.warn(`negative value provided to histogram ${this._descriptor.name}: ${r}`);return}this._record(r,o,c)}};H.HistogramInstrument=Sa;var yt=class{constructor(r,o,c){this._observableRegistry=c,this._descriptor=r,this._metricStorages=o}addCallback(r){this._observableRegistry.addCallback(r,this)}removeCallback(r){this._observableRegistry.removeCallback(r,this)}};H.ObservableInstrument=yt;var ba=class extends yt{};H.ObservableCounterInstrument=ba;var Oa=class extends yt{};H.ObservableGaugeInstrument=Oa;var Aa=class extends yt{};H.ObservableUpDownCounterInstrument=Aa;function zv(i){return i instanceof yt}H.isObservableInstrument=zv});var md=d(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.Meter=void 0;var de=we(),ir=mi(),Pa=class{constructor(r){this._meterSharedState=r}createHistogram(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.HISTOGRAM,o),s=this._meterSharedState.registerMetricStorage(c);return new ir.HistogramInstrument(s,c)}createCounter(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.COUNTER,o),s=this._meterSharedState.registerMetricStorage(c);return new ir.CounterInstrument(s,c)}createUpDownCounter(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.UP_DOWN_COUNTER,o),s=this._meterSharedState.registerMetricStorage(c);return new ir.UpDownCounterInstrument(s,c)}createObservableGauge(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.OBSERVABLE_GAUGE,o),s=this._meterSharedState.registerAsyncMetricStorage(c);return new ir.ObservableGaugeInstrument(c,s,this._meterSharedState.observableRegistry)}createObservableCounter(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.OBSERVABLE_COUNTER,o),s=this._meterSharedState.registerAsyncMetricStorage(c);return new ir.ObservableCounterInstrument(c,s,this._meterSharedState.observableRegistry)}createObservableUpDownCounter(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER,o),s=this._meterSharedState.registerAsyncMetricStorage(c);return new ir.ObservableUpDownCounterInstrument(c,s,this._meterSharedState.observableRegistry)}addBatchObservableCallback(r,o){this._meterSharedState.observableRegistry.addBatchCallback(r,o)}removeBatchObservableCallback(r,o){this._meterSharedState.observableRegistry.removeBatchCallback(r,o)}};_i.Meter=Pa});var Ra=d(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.MetricStorage=void 0;var $v=we(),Na=class{constructor(r){this._instrumentDescriptor=r}getInstrumentDescriptor(){return this._instrumentDescriptor}updateDescription(r){this._instrumentDescriptor=(0,$v.createInstrumentDescriptor)(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:r,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})}};yi.MetricStorage=Na});var Xr=d(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.AttributeHashMap=sr.HashMap=void 0;var Yv=Ne(),Ei=class{constructor(r){this._hash=r,this._valueMap=new Map,this._keyMap=new Map}get(r,o){return o??(o=this._hash(r)),this._valueMap.get(o)}getOrDefault(r,o){let c=this._hash(r);if(this._valueMap.has(c))return this._valueMap.get(c);let s=o();return this._keyMap.has(c)||this._keyMap.set(c,r),this._valueMap.set(c,s),s}set(r,o,c){c??(c=this._hash(r)),this._keyMap.has(c)||this._keyMap.set(c,r),this._valueMap.set(c,o)}has(r,o){return o??(o=this._hash(r)),this._valueMap.has(o)}*keys(){let r=this._keyMap.entries(),o=r.next();for(;o.done!==!0;)yield[o.value[1],o.value[0]],o=r.next()}*entries(){let r=this._valueMap.entries(),o=r.next();for(;o.done!==!0;)yield[this._keyMap.get(o.value[0]),o.value[1],o.value[0]],o=r.next()}get size(){return this._valueMap.size}};sr.HashMap=Ei;var xa=class extends Ei{constructor(){super(Yv.hashAttributes)}};sr.AttributeHashMap=xa});var wa=d(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.DeltaMetricProcessor=void 0;var Ia=Xr(),La=class{constructor(r){this._aggregator=r,this._activeCollectionStorage=new Ia.AttributeHashMap,this._cumulativeMemoStorage=new Ia.AttributeHashMap}record(r,o,c,s){let a=this._activeCollectionStorage.getOrDefault(o,()=>this._aggregator.createAccumulation(s));a?.record(r)}batchCumulate(r,o){Array.from(r.entries()).forEach(([c,s,a])=>{let t=this._aggregator.createAccumulation(o);t?.record(s);let e=t;if(this._cumulativeMemoStorage.has(c,a)){let n=this._cumulativeMemoStorage.get(c,a);e=this._aggregator.diff(n,t)}if(this._activeCollectionStorage.has(c,a)){let n=this._activeCollectionStorage.get(c,a);e=this._aggregator.merge(n,e)}this._cumulativeMemoStorage.set(c,t,a),this._activeCollectionStorage.set(c,e,a)})}collect(){let r=this._activeCollectionStorage;return this._activeCollectionStorage=new Ia.AttributeHashMap,r}};gi.DeltaMetricProcessor=La});var Ca=d(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.TemporalMetricProcessor=void 0;var Wv=zo(),Jv=Xr(),Ma=class i{constructor(r,o){this._aggregator=r,this._unreportedAccumulations=new Map,this._reportHistory=new Map,o.forEach(c=>{this._unreportedAccumulations.set(c,[])})}buildMetrics(r,o,c,s){this._stashAccumulations(c);let a=this._getMergedUnreportedAccumulations(r),t=a,e;if(this._reportHistory.has(r)){let u=this._reportHistory.get(r),l=u.collectionTime;e=u.aggregationTemporality,e===Wv.AggregationTemporality.CUMULATIVE?t=i.merge(u.accumulations,a,this._aggregator):t=i.calibrateStartTime(u.accumulations,a,l)}else e=r.selectAggregationTemporality(o.type);this._reportHistory.set(r,{accumulations:t,collectionTime:s,aggregationTemporality:e});let n=Qv(t);if(n.length!==0)return this._aggregator.toMetricData(o,e,n,s)}_stashAccumulations(r){let o=this._unreportedAccumulations.keys();for(let c of o){let s=this._unreportedAccumulations.get(c);s===void 0&&(s=[],this._unreportedAccumulations.set(c,s)),s.push(r)}}_getMergedUnreportedAccumulations(r){let o=new Jv.AttributeHashMap,c=this._unreportedAccumulations.get(r);if(this._unreportedAccumulations.set(r,[]),c===void 0)return o;for(let s of c)o=i.merge(o,s,this._aggregator);return o}static merge(r,o,c){let s=r,a=o.entries(),t=a.next();for(;t.done!==!0;){let[e,n,u]=t.value;if(r.has(e,u)){let l=r.get(e,u),h=c.merge(l,n);s.set(e,h,u)}else s.set(e,n,u);t=a.next()}return s}static calibrateStartTime(r,o,c){for(let[s,a]of r.keys()){let t=o.get(s,a);t?.setStartTime(c)}return o}};vi.TemporalMetricProcessor=Ma;function Qv(i){return Array.from(i.entries())}});var _d=d(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.AsyncMetricStorage=void 0;var Zv=Ra(),eT=wa(),tT=Ca(),rT=Xr(),Ua=class extends Zv.MetricStorage{constructor(r,o,c,s){super(r),this._attributesProcessor=c,this._deltaMetricStorage=new eT.DeltaMetricProcessor(o),this._temporalMetricStorage=new tT.TemporalMetricProcessor(o,s)}record(r,o){let c=new rT.AttributeHashMap;Array.from(r.entries()).forEach(([s,a])=>{c.set(this._attributesProcessor.process(s),a)}),this._deltaMetricStorage.batchCumulate(c,o)}collect(r,o){let c=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,c,o)}};Ti.AsyncMetricStorage=Ua});var Td=d(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.getConflictResolutionRecipe=se.getDescriptionResolutionRecipe=se.getTypeConflictResolutionRecipe=se.getUnitConflictResolutionRecipe=se.getValueTypeConflictResolutionRecipe=se.getIncompatibilityDetails=void 0;function nT(i,r){let o="";return i.unit!==r.unit&&(o+=` - Unit '${i.unit}' does not match '${r.unit}'
|
|
9
9
|
`),i.type!==r.type&&(o+=` - Type '${i.type}' does not match '${r.type}'
|
|
10
10
|
`),i.valueType!==r.valueType&&(o+=` - Value Type '${i.valueType}' does not match '${r.valueType}'
|
|
11
11
|
`),i.description!==r.description&&(o+=` - Description '${i.description}' does not match '${r.description}'
|
|
12
|
-
`),o}se.getIncompatibilityDetails=
|
|
12
|
+
`),o}se.getIncompatibilityDetails=nT;function yd(i,r){return` - use valueType '${i.valueType}' on instrument creation or use an instrument name other than '${r.name}'`}se.getValueTypeConflictResolutionRecipe=yd;function Ed(i,r){return` - use unit '${i.unit}' on instrument creation or use an instrument name other than '${r.name}'`}se.getUnitConflictResolutionRecipe=Ed;function gd(i,r){let o={name:r.name,type:r.type,unit:r.unit},c=JSON.stringify(o);return` - create a new view with a name other than '${i.name}' and InstrumentSelector '${c}'`}se.getTypeConflictResolutionRecipe=gd;function vd(i,r){let o={name:r.name,type:r.type,unit:r.unit},c=JSON.stringify(o);return` - create a new view with a name other than '${i.name}' and InstrumentSelector '${c}'
|
|
13
13
|
- OR - create a new view with the name ${i.name} and description '${i.description}' and InstrumentSelector ${c}
|
|
14
|
-
- OR - create a new view with the name ${r.name} and description '${i.description}' and InstrumentSelector ${c}`}se.getDescriptionResolutionRecipe=
|
|
14
|
+
- OR - create a new view with the name ${r.name} and description '${i.description}' and InstrumentSelector ${c}`}se.getDescriptionResolutionRecipe=vd;function oT(i,r){return i.valueType!==r.valueType?yd(i,r):i.unit!==r.unit?Ed(i,r):i.type!==r.type?gd(i,r):i.description!==r.description?vd(i,r):""}se.getConflictResolutionRecipe=oT});var bd=d(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.MetricStorageRegistry=void 0;var iT=we(),Sd=(y(),E(_)),Si=Td(),Da=class i{constructor(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}static create(){return new i}getStorages(r){let o=[];for(let s of this._sharedRegistry.values())o=o.concat(s);let c=this._perCollectorRegistry.get(r);if(c!=null)for(let s of c.values())o=o.concat(s);return o}register(r){this._registerStorage(r,this._sharedRegistry)}registerForCollector(r,o){let c=this._perCollectorRegistry.get(r);c==null&&(c=new Map,this._perCollectorRegistry.set(r,c)),this._registerStorage(o,c)}findOrUpdateCompatibleStorage(r){let o=this._sharedRegistry.get(r.name);return o===void 0?null:this._findOrUpdateCompatibleStorage(r,o)}findOrUpdateCompatibleCollectorStorage(r,o){let c=this._perCollectorRegistry.get(r);if(c===void 0)return null;let s=c.get(o.name);return s===void 0?null:this._findOrUpdateCompatibleStorage(o,s)}_registerStorage(r,o){let c=r.getInstrumentDescriptor(),s=o.get(c.name);if(s===void 0){o.set(c.name,[r]);return}s.push(r)}_findOrUpdateCompatibleStorage(r,o){let c=null;for(let s of o){let a=s.getInstrumentDescriptor();(0,iT.isDescriptorCompatibleWith)(a,r)?(a.description!==r.description&&(r.description.length>a.description.length&&s.updateDescription(r.description),Sd.diag.warn("A view or instrument with the name ",r.name,` has already been registered, but has a different description and is incompatible with another registered view.
|
|
15
15
|
`,`Details:
|
|
16
16
|
`,(0,Si.getIncompatibilityDetails)(a,r),`The longer description will be used.
|
|
17
|
-
To resolve the conflict:`,(0,Si.getConflictResolutionRecipe)(a,r))),c=s):
|
|
17
|
+
To resolve the conflict:`,(0,Si.getConflictResolutionRecipe)(a,r))),c=s):Sd.diag.warn("A view or instrument with the name ",r.name,` has already been registered and is incompatible with another registered view.
|
|
18
18
|
`,`Details:
|
|
19
19
|
`,(0,Si.getIncompatibilityDetails)(a,r),`To resolve the conflict:
|
|
20
|
-
`,(0,Si.getConflictResolutionRecipe)(a,r))}return c}};bi.MetricStorageRegistry=Da});var bd=d(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.MultiMetricStorage=void 0;var Ba=class{constructor(r){this._backingStorages=r}record(r,o,c,s){this._backingStorages.forEach(a=>{a.record(r,o,c,s)})}};Oi.MultiMetricStorage=Ba});var Ad=d(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.BatchObservableResultImpl=ur.ObservableResultImpl=void 0;var sr=(y(),E(_)),Od=Kr(),iT=mi(),Va=class{constructor(r,o){this._instrumentName=r,this._valueType=o,this._buffer=new Od.AttributeHashMap}observe(r,o={}){if(typeof r!="number"){sr.diag.warn(`non-number value provided to metric ${this._instrumentName}: ${r}`);return}this._valueType===sr.ValueType.INT&&!Number.isInteger(r)&&(sr.diag.warn(`INT value type cannot accept a floating-point value for ${this._instrumentName}, ignoring the fractional digits.`),r=Math.trunc(r),!Number.isInteger(r))||this._buffer.set(o,r)}};ur.ObservableResultImpl=Va;var ka=class{constructor(){this._buffer=new Map}observe(r,o,c={}){if(!(0,iT.isObservableInstrument)(r))return;let s=this._buffer.get(r);if(s==null&&(s=new Od.AttributeHashMap,this._buffer.set(r,s)),typeof o!="number"){sr.diag.warn(`non-number value provided to metric ${r._descriptor.name}: ${o}`);return}r._descriptor.valueType===sr.ValueType.INT&&!Number.isInteger(o)&&(sr.diag.warn(`INT value type cannot accept a floating-point value for ${r._descriptor.name}, ignoring the fractional digits.`),o=Math.trunc(o),!Number.isInteger(o))||s.set(c,o)}};ur.BatchObservableResultImpl=ka});var Rd=d(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.ObservableRegistry=void 0;var sT=(y(),E(_)),Pd=mi(),Nd=Ad(),Xr=Ne(),qa=class{constructor(){this._callbacks=[],this._batchCallbacks=[]}addCallback(r,o){this._findCallback(r,o)>=0||this._callbacks.push({callback:r,instrument:o})}removeCallback(r,o){let c=this._findCallback(r,o);c<0||this._callbacks.splice(c,1)}addBatchCallback(r,o){let c=new Set(o.filter(Pd.isObservableInstrument));if(c.size===0){sT.diag.error("BatchObservableCallback is not associated with valid instruments",o);return}this._findBatchCallback(r,c)>=0||this._batchCallbacks.push({callback:r,instruments:c})}removeBatchCallback(r,o){let c=new Set(o.filter(Pd.isObservableInstrument)),s=this._findBatchCallback(r,c);s<0||this._batchCallbacks.splice(s,1)}async observe(r,o){let c=this._observeCallbacks(r,o),s=this._observeBatchCallbacks(r,o);return(await(0,Xr.PromiseAllSettled)([...c,...s])).filter(Xr.isPromiseAllSettledRejectionResult).map(e=>e.reason)}_observeCallbacks(r,o){return this._callbacks.map(async({callback:c,instrument:s})=>{let a=new Nd.ObservableResultImpl(s._descriptor.name,s._descriptor.valueType),t=Promise.resolve(c(a));o!=null&&(t=(0,Xr.callWithTimeout)(t,o)),await t,s._metricStorages.forEach(e=>{e.record(a._buffer,r)})})}_observeBatchCallbacks(r,o){return this._batchCallbacks.map(async({callback:c,instruments:s})=>{let a=new Nd.BatchObservableResultImpl,t=Promise.resolve(c(a));o!=null&&(t=(0,Xr.callWithTimeout)(t,o)),await t,s.forEach(e=>{let n=a._buffer.get(e);n!=null&&e._metricStorages.forEach(u=>{u.record(n,r)})})})}_findCallback(r,o){return this._callbacks.findIndex(c=>c.callback===r&&c.instrument===o)}_findBatchCallback(r,o){return this._batchCallbacks.findIndex(c=>c.callback===r&&(0,Xr.setEquals)(c.instruments,o))}};Ai.ObservableRegistry=qa});var xd=d(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.SyncMetricStorage=void 0;var uT=Ra(),aT=wa(),cT=Ca(),ja=class extends uT.MetricStorage{constructor(r,o,c,s){super(r),this._attributesProcessor=c,this._deltaMetricStorage=new aT.DeltaMetricProcessor(o),this._temporalMetricStorage=new cT.TemporalMetricProcessor(o,s)}record(r,o,c,s){o=this._attributesProcessor.process(o,c),this._deltaMetricStorage.record(r,o,c,s)}collect(r,o){let c=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,c,o)}};Pi.SyncMetricStorage=ja});var Ha=d(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.FilteringAttributesProcessor=He.NoopAttributesProcessor=He.AttributesProcessor=void 0;var zr=class{static Noop(){return lT}};He.AttributesProcessor=zr;var Ni=class extends zr{process(r,o){return r}};He.NoopAttributesProcessor=Ni;var Ga=class extends zr{constructor(r){super(),this._allowedAttributeNames=r}process(r,o){let c={};return Object.keys(r).filter(s=>this._allowedAttributeNames.includes(s)).forEach(s=>c[s]=r[s]),c}};He.FilteringAttributesProcessor=Ga;var lT=new Ni});var Id=d(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.MeterSharedState=void 0;var pT=we(),fT=hd(),dT=Ne(),hT=md(),mT=Sd(),_T=bd(),yT=Rd(),ET=xd(),gT=Ha(),Fa=class{constructor(r,o){this._meterProviderSharedState=r,this._instrumentationScope=o,this.metricStorageRegistry=new mT.MetricStorageRegistry,this.observableRegistry=new yT.ObservableRegistry,this.meter=new fT.Meter(this)}registerMetricStorage(r){let o=this._registerMetricStorage(r,ET.SyncMetricStorage);return o.length===1?o[0]:new _T.MultiMetricStorage(o)}registerAsyncMetricStorage(r){return this._registerMetricStorage(r,hT.AsyncMetricStorage)}async collect(r,o,c){let s=await this.observableRegistry.observe(o,c?.timeoutMillis),a=this.metricStorageRegistry.getStorages(r);if(a.length===0)return null;let t=a.map(e=>e.collect(r,o)).filter(dT.isNotNullish);return t.length===0?{errors:s}:{scopeMetrics:{scope:this._instrumentationScope,metrics:t},errors:s}}_registerMetricStorage(r,o){let s=this._meterProviderSharedState.viewRegistry.findViews(r,this._instrumentationScope).map(a=>{let t=(0,pT.createInstrumentDescriptorWithView)(a,r),e=this.metricStorageRegistry.findOrUpdateCompatibleStorage(t);if(e!=null)return e;let n=a.aggregation.createAggregator(t),u=new o(t,n,a.attributesProcessor,this._meterProviderSharedState.metricCollectors);return this.metricStorageRegistry.register(u),u});if(s.length===0){let t=this._meterProviderSharedState.selectAggregations(r.type).map(([e,n])=>{let u=this.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(e,r);if(u!=null)return u;let l=n.createAggregator(r),h=new o(r,l,gT.AttributesProcessor.Noop(),[e]);return this.metricStorageRegistry.registerForCollector(e,h),h});s=s.concat(t)}return s}};Ri.MeterSharedState=Fa});var Ld=d(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});xi.MeterProviderSharedState=void 0;var vT=Ne(),TT=dd(),ST=Id(),Ka=class{constructor(r){this.resource=r,this.viewRegistry=new TT.ViewRegistry,this.metricCollectors=[],this.meterSharedStates=new Map}getMeterSharedState(r){let o=(0,vT.instrumentationScopeId)(r),c=this.meterSharedStates.get(o);return c==null&&(c=new ST.MeterSharedState(this,r),this.meterSharedStates.set(o,c)),c}selectAggregations(r){let o=[];for(let c of this.metricCollectors)o.push([c,c.selectAggregation(r)]);return o}};xi.MeterProviderSharedState=Ka});var wd=d(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.MetricCollector=void 0;var bT=N(),Xa=class{constructor(r,o){this._sharedState=r,this._metricReader=o}async collect(r){let o=(0,bT.millisToHrTime)(Date.now()),c=[],s=[],a=Array.from(this._sharedState.meterSharedStates.values()).map(async t=>{let e=await t.collect(this,o,r);e?.scopeMetrics!=null&&c.push(e.scopeMetrics),e?.errors!=null&&s.push(...e.errors)});return await Promise.all(a),{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:c},errors:s}}async forceFlush(r){await this._metricReader.forceFlush(r)}async shutdown(r){await this._metricReader.shutdown(r)}selectAggregationTemporality(r){return this._metricReader.selectAggregationTemporality(r)}selectAggregation(r){return this._metricReader.selectAggregation(r)}};Ii.MetricCollector=Xa});var Cd=d(wi=>{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});wi.MeterProvider=void 0;var Li=(y(),E(_)),Md=pt(),OT=Ld(),AT=wd(),za=class{constructor(r){var o;this._shutdown=!1;let c=Md.Resource.default().merge((o=r?.resource)!==null&&o!==void 0?o:Md.Resource.empty());if(this._sharedState=new OT.MeterProviderSharedState(c),r?.views!=null&&r.views.length>0)for(let s of r.views)this._sharedState.viewRegistry.addView(s)}getMeter(r,o="",c={}){return this._shutdown?(Li.diag.warn("A shutdown MeterProvider cannot provide a Meter"),(0,Li.createNoopMeter)()):this._sharedState.getMeterSharedState({name:r,version:o,schemaUrl:c.schemaUrl}).meter}addMetricReader(r){let o=new AT.MetricCollector(this._sharedState,r);r.setMetricProducer(o),this._sharedState.metricCollectors.push(o)}async shutdown(r){if(this._shutdown){Li.diag.warn("shutdown may only be called once per MeterProvider");return}this._shutdown=!0,await Promise.all(this._sharedState.metricCollectors.map(o=>o.shutdown(r)))}async forceFlush(r){if(this._shutdown){Li.diag.warn("invalid attempt to force flush after MeterProvider shutdown");return}await Promise.all(this._sharedState.metricCollectors.map(o=>o.forceFlush(r)))}};wi.MeterProvider=za});var Mi=d(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.ExactPredicate=ar.PatternPredicate=void 0;var PT=/[\^$\\.+?()[\]{}|]/g,$a=class i{constructor(r){r==="*"?(this._matchAll=!0,this._regexp=/.*/):(this._matchAll=!1,this._regexp=new RegExp(i.escapePattern(r)))}match(r){return this._matchAll?!0:this._regexp.test(r)}static escapePattern(r){return`^${r.replace(PT,"\\$&").replace("*",".*")}$`}static hasWildcard(r){return r.includes("*")}};ar.PatternPredicate=$a;var Ya=class{constructor(r){this._matchAll=r===void 0,this._pattern=r}match(r){return!!(this._matchAll||r===this._pattern)}};ar.ExactPredicate=Ya});var Dd=d(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.InstrumentSelector=void 0;var Ud=Mi(),Wa=class{constructor(r){var o;this._nameFilter=new Ud.PatternPredicate((o=r?.name)!==null&&o!==void 0?o:"*"),this._type=r?.type,this._unitFilter=new Ud.ExactPredicate(r?.unit)}getType(){return this._type}getNameFilter(){return this._nameFilter}getUnitFilter(){return this._unitFilter}};Ci.InstrumentSelector=Wa});var Bd=d(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.MeterSelector=void 0;var Ja=Mi(),Qa=class{constructor(r){this._nameFilter=new Ja.ExactPredicate(r?.name),this._versionFilter=new Ja.ExactPredicate(r?.version),this._schemaUrlFilter=new Ja.ExactPredicate(r?.schemaUrl)}getNameFilter(){return this._nameFilter}getVersionFilter(){return this._versionFilter}getSchemaUrlFilter(){return this._schemaUrlFilter}};Ui.MeterSelector=Qa});var kd=d(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.View=void 0;var NT=Mi(),Vd=Ha(),RT=Dd(),xT=Bd(),IT=ui();function LT(i){return i.instrumentName==null&&i.instrumentType==null&&i.instrumentUnit==null&&i.meterName==null&&i.meterVersion==null&&i.meterSchemaUrl==null}var Za=class{constructor(r){var o;if(LT(r))throw new Error("Cannot create view with no selector arguments supplied");if(r.name!=null&&(r?.instrumentName==null||NT.PatternPredicate.hasWildcard(r.instrumentName)))throw new Error("Views with a specified name must be declared with an instrument selector that selects at most one instrument per meter.");r.attributeKeys!=null?this.attributesProcessor=new Vd.FilteringAttributesProcessor(r.attributeKeys):this.attributesProcessor=Vd.AttributesProcessor.Noop(),this.name=r.name,this.description=r.description,this.aggregation=(o=r.aggregation)!==null&&o!==void 0?o:IT.Aggregation.Default(),this.instrumentSelector=new RT.InstrumentSelector({name:r.instrumentName,type:r.instrumentType,unit:r.instrumentUnit}),this.meterSelector=new xT.MeterSelector({name:r.meterName,version:r.meterVersion,schemaUrl:r.meterSchemaUrl})}};Di.View=Za});var qd=d(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});A.TimeoutError=A.View=A.Aggregation=A.SumAggregation=A.LastValueAggregation=A.HistogramAggregation=A.DropAggregation=A.ExponentialHistogramAggregation=A.ExplicitBucketHistogramAggregation=A.DefaultAggregation=A.MeterProvider=A.InstrumentType=A.ConsoleMetricExporter=A.InMemoryMetricExporter=A.PeriodicExportingMetricReader=A.MetricReader=A.DataPointType=A.AggregationTemporality=void 0;var wT=zo();Object.defineProperty(A,"AggregationTemporality",{enumerable:!0,get:function(){return wT.AggregationTemporality}});var MT=Gt();Object.defineProperty(A,"DataPointType",{enumerable:!0,get:function(){return MT.DataPointType}});var CT=ma();Object.defineProperty(A,"MetricReader",{enumerable:!0,get:function(){return CT.MetricReader}});var UT=ad();Object.defineProperty(A,"PeriodicExportingMetricReader",{enumerable:!0,get:function(){return UT.PeriodicExportingMetricReader}});var DT=ld();Object.defineProperty(A,"InMemoryMetricExporter",{enumerable:!0,get:function(){return DT.InMemoryMetricExporter}});var BT=fd();Object.defineProperty(A,"ConsoleMetricExporter",{enumerable:!0,get:function(){return BT.ConsoleMetricExporter}});var VT=we();Object.defineProperty(A,"InstrumentType",{enumerable:!0,get:function(){return VT.InstrumentType}});var kT=Cd();Object.defineProperty(A,"MeterProvider",{enumerable:!0,get:function(){return kT.MeterProvider}});var Fe=ui();Object.defineProperty(A,"DefaultAggregation",{enumerable:!0,get:function(){return Fe.DefaultAggregation}});Object.defineProperty(A,"ExplicitBucketHistogramAggregation",{enumerable:!0,get:function(){return Fe.ExplicitBucketHistogramAggregation}});Object.defineProperty(A,"ExponentialHistogramAggregation",{enumerable:!0,get:function(){return Fe.ExponentialHistogramAggregation}});Object.defineProperty(A,"DropAggregation",{enumerable:!0,get:function(){return Fe.DropAggregation}});Object.defineProperty(A,"HistogramAggregation",{enumerable:!0,get:function(){return Fe.HistogramAggregation}});Object.defineProperty(A,"LastValueAggregation",{enumerable:!0,get:function(){return Fe.LastValueAggregation}});Object.defineProperty(A,"SumAggregation",{enumerable:!0,get:function(){return Fe.SumAggregation}});Object.defineProperty(A,"Aggregation",{enumerable:!0,get:function(){return Fe.Aggregation}});var qT=kd();Object.defineProperty(A,"View",{enumerable:!0,get:function(){return qT.View}});var jT=Ne();Object.defineProperty(A,"TimeoutError",{enumerable:!0,get:function(){return jT.TimeoutError}})});var jd=d(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.AbstractAsyncHooksContextManager=void 0;var GT=X("events"),HT=["addListener","on","once","prependListener","prependOnceListener"],ec=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(r,o){return o instanceof GT.EventEmitter?this._bindEventEmitter(r,o):typeof o=="function"?this._bindFunction(r,o):o}_bindFunction(r,o){let c=this,s=function(...a){return c.with(r,()=>o.apply(this,a))};return Object.defineProperty(s,"length",{enumerable:!1,configurable:!0,writable:!1,value:o.length}),s}_bindEventEmitter(r,o){return this._getPatchMap(o)!==void 0||(this._createPatchMap(o),HT.forEach(s=>{o[s]!==void 0&&(o[s]=this._patchAddListener(o,o[s],r))}),typeof o.removeListener=="function"&&(o.removeListener=this._patchRemoveListener(o,o.removeListener)),typeof o.off=="function"&&(o.off=this._patchRemoveListener(o,o.off)),typeof o.removeAllListeners=="function"&&(o.removeAllListeners=this._patchRemoveAllListeners(o,o.removeAllListeners))),o}_patchRemoveListener(r,o){let c=this;return function(s,a){var t;let e=(t=c._getPatchMap(r))===null||t===void 0?void 0:t[s];if(e===void 0)return o.call(this,s,a);let n=e.get(a);return o.call(this,s,n||a)}}_patchRemoveAllListeners(r,o){let c=this;return function(s){let a=c._getPatchMap(r);return a!==void 0&&(arguments.length===0?c._createPatchMap(r):a[s]!==void 0&&delete a[s]),o.apply(this,arguments)}}_patchAddListener(r,o,c){let s=this;return function(a,t){if(s._wrapped)return o.call(this,a,t);let e=s._getPatchMap(r);e===void 0&&(e=s._createPatchMap(r));let n=e[a];n===void 0&&(n=new WeakMap,e[a]=n);let u=s.bind(c,t);n.set(t,u),s._wrapped=!0;try{return o.call(this,a,u)}finally{s._wrapped=!1}}}_createPatchMap(r){let o=Object.create(null);return r[this._kOtListeners]=o,o}_getPatchMap(r){return r[this._kOtListeners]}};Bi.AbstractAsyncHooksContextManager=ec});var Gd=d(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});Vi.AsyncLocalStorageContextManager=void 0;var FT=(y(),E(_)),KT=X("async_hooks"),XT=jd(),tc=class extends XT.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new KT.AsyncLocalStorage}active(){var r;return(r=this._asyncLocalStorage.getStore())!==null&&r!==void 0?r:FT.ROOT_CONTEXT}with(r,o,c,...s){let a=c==null?o:o.bind(c);return this._asyncLocalStorage.run(r,a,...s)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};Vi.AsyncLocalStorageContextManager=tc});var ic=d(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.toAnyValue=Ke.toKeyValue=Ke.toAttributes=void 0;function QT(i){return Object.keys(i).map(r=>nc(r,i[r]))}Ke.toAttributes=QT;function nc(i,r){return{key:i,value:oc(r)}}Ke.toKeyValue=nc;function oc(i){let r=typeof i;return r==="string"?{stringValue:i}:r==="number"?Number.isInteger(i)?{intValue:i}:{doubleValue:i}:r==="boolean"?{boolValue:i}:i instanceof Uint8Array?{bytesValue:i}:Array.isArray(i)?{arrayValue:{values:i.map(oc)}}:r==="object"&&i!=null?{kvlistValue:{values:Object.entries(i).map(([o,c])=>nc(o,c))}}:{}}Ke.toAnyValue=oc});var $d=d(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.toOtlpSpanEvent=Xe.toOtlpLink=Xe.sdkSpanToOtlpSpan=void 0;var sc=ic();function ZT(i,r){var o;let c=i.spanContext(),s=i.status;return{traceId:r.encodeSpanContext(c.traceId),spanId:r.encodeSpanContext(c.spanId),parentSpanId:r.encodeOptionalSpanContext(i.parentSpanId),traceState:(o=c.traceState)===null||o===void 0?void 0:o.serialize(),name:i.name,kind:i.kind==null?0:i.kind+1,startTimeUnixNano:r.encodeHrTime(i.startTime),endTimeUnixNano:r.encodeHrTime(i.endTime),attributes:(0,sc.toAttributes)(i.attributes),droppedAttributesCount:i.droppedAttributesCount,events:i.events.map(a=>zd(a,r)),droppedEventsCount:i.droppedEventsCount,status:{code:s.code,message:s.message},links:i.links.map(a=>Xd(a,r)),droppedLinksCount:i.droppedLinksCount}}Xe.sdkSpanToOtlpSpan=ZT;function Xd(i,r){var o;return{attributes:i.attributes?(0,sc.toAttributes)(i.attributes):[],spanId:r.encodeSpanContext(i.context.spanId),traceId:r.encodeSpanContext(i.context.traceId),traceState:(o=i.context.traceState)===null||o===void 0?void 0:o.serialize(),droppedAttributesCount:i.droppedAttributesCount||0}}Xe.toOtlpLink=Xd;function zd(i,r){return{attributes:i.attributes?(0,sc.toAttributes)(i.attributes):[],name:i.name,timeUnixNano:r.encodeHrTime(i.time),droppedAttributesCount:i.droppedAttributesCount||0}}Xe.toOtlpSpanEvent=zd});var Zd=d(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.getOtlpEncoder=he.encodeAsString=he.encodeAsLongBits=he.toLongBits=he.hrTimeToNanos=void 0;var ji=N(),eS=BigInt(1e9);function uc(i){return BigInt(i[0])*eS+BigInt(i[1])}he.hrTimeToNanos=uc;function Wd(i){let r=Number(BigInt.asUintN(32,i)),o=Number(BigInt.asUintN(32,i>>BigInt(32)));return{low:r,high:o}}he.toLongBits=Wd;function ac(i){let r=uc(i);return Wd(r)}he.encodeAsLongBits=ac;function Jd(i){return uc(i).toString()}he.encodeAsString=Jd;var tS=typeof BigInt<"u"?Jd:ji.hrTimeToNanoseconds;function Yd(i){return i}function Qd(i){if(i!==void 0)return(0,ji.hexToBase64)(i)}var rS={encodeHrTime:ac,encodeSpanContext:ji.hexToBase64,encodeOptionalSpanContext:Qd};function nS(i){var r,o;if(i===void 0)return rS;let c=(r=i.useLongBits)!==null&&r!==void 0?r:!0,s=(o=i.useHex)!==null&&o!==void 0?o:!1;return{encodeHrTime:c?ac:tS,encodeSpanContext:s?Yd:ji.hexToBase64,encodeOptionalSpanContext:s?Yd:Qd}}he.getOtlpEncoder=nS});var cc=d(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.createExportTraceServiceRequest=void 0;var oS=ic(),iS=$d(),sS=Zd();function uS(i,r){let o=(0,sS.getOtlpEncoder)(r);return{resourceSpans:cS(i,o)}}Gi.createExportTraceServiceRequest=uS;function aS(i){let r=new Map;for(let o of i){let c=r.get(o.resource);c||(c=new Map,r.set(o.resource,c));let s=`${o.instrumentationLibrary.name}@${o.instrumentationLibrary.version||""}:${o.instrumentationLibrary.schemaUrl||""}`,a=c.get(s);a||(a=[],c.set(s,a)),a.push(o)}return r}function cS(i,r){let o=aS(i),c=[],s=o.entries(),a=s.next();for(;!a.done;){let[t,e]=a.value,n=[],u=e.values(),l=u.next();for(;!l.done;){let T=l.value;if(T.length>0){let{name:D,version:L,schemaUrl:x}=T[0].instrumentationLibrary,B=T.map(b=>(0,iS.sdkSpanToOtlpSpan)(b,r));n.push({scope:{name:D,version:L},spans:B,schemaUrl:x})}l=u.next()}let h={resource:{attributes:(0,oS.toAttributes)(t.attributes),droppedAttributesCount:0},scopeSpans:n,schemaUrl:void 0};c.push(h),a=s.next()}return c}});var Et=d(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.parseRetryAfterToMills=k.isExportRetryable=k.invalidTimeout=k.configureExporterTimeout=k.appendRootPathToUrlIfNeeded=k.appendResourcePathToUrl=k.parseHeaders=k.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=k.DEFAULT_EXPORT_MAX_BACKOFF=k.DEFAULT_EXPORT_INITIAL_BACKOFF=k.DEFAULT_EXPORT_MAX_ATTEMPTS=void 0;var lc=(y(),E(_)),eh=N(),th=1e4;k.DEFAULT_EXPORT_MAX_ATTEMPTS=5;k.DEFAULT_EXPORT_INITIAL_BACKOFF=1e3;k.DEFAULT_EXPORT_MAX_BACKOFF=5e3;k.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=1.5;function lS(i={}){let r={};return Object.entries(i).forEach(([o,c])=>{typeof c<"u"?r[o]=String(c):lc.diag.warn(`Header "${o}" has wrong value and will be ignored`)}),r}k.parseHeaders=lS;function pS(i,r){return i.endsWith("/")||(i=i+"/"),i+r}k.appendResourcePathToUrl=pS;function fS(i){try{let r=new URL(i);return r.pathname===""&&(r.pathname=r.pathname+"/"),r.toString()}catch{return lc.diag.warn(`Could not parse export URL: '${i}'`),i}}k.appendRootPathToUrlIfNeeded=fS;function dS(i){return typeof i=="number"?i<=0?pc(i,th):i:hS()}k.configureExporterTimeout=dS;function hS(){var i;let r=Number((i=(0,eh.getEnv)().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)!==null&&i!==void 0?i:(0,eh.getEnv)().OTEL_EXPORTER_OTLP_TIMEOUT);return r<=0?pc(r,th):r}function pc(i,r){return lc.diag.warn("Timeout must be greater than 0",i),r}k.invalidTimeout=pc;function mS(i){return[429,502,503,504].includes(i)}k.isExportRetryable=mS;function _S(i){if(i==null)return-1;let r=Number.parseInt(i,10);if(Number.isInteger(r))return r>0?r*1e3:-1;let o=new Date(i).getTime()-Date.now();return o>=0?o:0}k.parseRetryAfterToMills=_S});var Wr=d(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.OTLPExporterBase=void 0;var rh=(y(),E(_)),Yr=N(),yS=Et(),fc=class{constructor(r={}){this._sendingPromises=[],this.url=this.getDefaultUrl(r),typeof r.hostname=="string"&&(this.hostname=r.hostname),this.shutdown=this.shutdown.bind(this),this._shutdownOnce=new Yr.BindOnceFuture(this._shutdown,this),this._concurrencyLimit=typeof r.concurrencyLimit=="number"?r.concurrencyLimit:30,this.timeoutMillis=(0,yS.configureExporterTimeout)(r.timeoutMillis),this.onInit(r)}export(r,o){if(this._shutdownOnce.isCalled){o({code:Yr.ExportResultCode.FAILED,error:new Error("Exporter has been shutdown")});return}if(this._sendingPromises.length>=this._concurrencyLimit){o({code:Yr.ExportResultCode.FAILED,error:new Error("Concurrent export limit reached")});return}this._export(r).then(()=>{o({code:Yr.ExportResultCode.SUCCESS})}).catch(c=>{o({code:Yr.ExportResultCode.FAILED,error:c})})}_export(r){return new Promise((o,c)=>{try{rh.diag.debug("items to be sent",r),this.send(r,o,c)}catch(s){c(s)}})}shutdown(){return this._shutdownOnce.call()}forceFlush(){return Promise.all(this._sendingPromises).then(()=>{})}_shutdown(){return rh.diag.debug("shutdown started"),this.onShutdown(),this.forceFlush()}};Hi.OTLPExporterBase=fc});var hc=d(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.CompressionAlgorithm=void 0;var vS;(function(i){i.NONE="none",i.GZIP="gzip"})(vS=Jr.CompressionAlgorithm||(Jr.CompressionAlgorithm={}))});var Xi=d(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.OTLPExporterError=void 0;var mc=class extends Error{constructor(r,o,c){super(r),this.name="OTLPExporterError",this.data=c,this.code=o}};Ki.OTLPExporterError=mc});var yc=d(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.configureCompression=ze.createHttpAgent=ze.sendWithHttp=void 0;var sh=X("url"),uh=X("http"),ah=X("https"),TS=X("zlib"),SS=X("stream"),_c=(y(),E(_)),zi=hc(),ih=N(),Qr=Xi(),fr=Et();function bS(i,r,o,c,s){let a=i.timeoutMillis,t=new sh.URL(i.url),e=Number(process.versions.node.split(".")[0]),n,u,l=!1,h=setTimeout(()=>{if(clearTimeout(n),l=!0,u.destroyed){let x=new Qr.OTLPExporterError("Request Timeout");s(x)}else e>=14?u.destroy():u.abort()},a),T={hostname:t.hostname,port:t.port,path:t.pathname,method:"POST",headers:Object.assign({"Content-Type":o},i.headers),agent:i.agent},D=t.protocol==="http:"?uh.request:ah.request,L=(x=fr.DEFAULT_EXPORT_MAX_ATTEMPTS,B=fr.DEFAULT_EXPORT_INITIAL_BACKOFF)=>{switch(u=D(T,b=>{let S="";b.on("data",K=>S+=K),b.on("aborted",()=>{if(l){let K=new Qr.OTLPExporterError("Request Timeout");s(K)}}),b.on("end",()=>{if(l===!1)if(b.statusCode&&b.statusCode<299)_c.diag.debug(`statusCode: ${b.statusCode}`,S),c(),clearTimeout(h),clearTimeout(n);else if(b.statusCode&&(0,fr.isExportRetryable)(b.statusCode)&&x>0){let K;B=fr.DEFAULT_EXPORT_BACKOFF_MULTIPLIER*B,b.headers["retry-after"]?K=(0,fr.parseRetryAfterToMills)(b.headers["retry-after"]):K=Math.round(Math.random()*(fr.DEFAULT_EXPORT_MAX_BACKOFF-B)+B),n=setTimeout(()=>{L(x-1,B)},K)}else{let K=new Qr.OTLPExporterError(b.statusMessage,b.statusCode,S);s(K),clearTimeout(h),clearTimeout(n)}})}),u.on("error",b=>{if(l){let S=new Qr.OTLPExporterError("Request Timeout",b.code);s(S)}else s(b);clearTimeout(h),clearTimeout(n)}),u.on("abort",()=>{if(l){let b=new Qr.OTLPExporterError("Request Timeout");s(b)}clearTimeout(h),clearTimeout(n)}),i.compression){case zi.CompressionAlgorithm.GZIP:{u.setHeader("Content-Encoding","gzip"),OS(r).on("error",s).pipe(TS.createGzip()).on("error",s).pipe(u);break}default:u.end(r);break}};L()}ze.sendWithHttp=bS;function OS(i){let r=new SS.Readable;return r.push(i),r.push(null),r}function AS(i){if(i.httpAgentOptions&&i.keepAlive===!1){_c.diag.warn("httpAgentOptions is used only when keepAlive is true");return}if(!(i.keepAlive===!1||!i.url))try{let o=new sh.URL(i.url).protocol==="http:"?uh.Agent:ah.Agent;return new o(Object.assign({keepAlive:!0},i.httpAgentOptions))}catch(r){_c.diag.error(`collector exporter failed to create http agent. err: ${r.message}`);return}}ze.createHttpAgent=AS;function PS(i){return i||(((0,ih.getEnv)().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION||(0,ih.getEnv)().OTEL_EXPORTER_OTLP_COMPRESSION)===zi.CompressionAlgorithm.GZIP?zi.CompressionAlgorithm.GZIP:zi.CompressionAlgorithm.NONE)}ze.configureCompression=PS});var ph=d($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.OTLPExporterNodeBase=void 0;var NS=Wr(),RS=Et(),Ec=yc(),ch=(y(),E(_)),lh=N(),gc=class extends NS.OTLPExporterBase{constructor(r={}){super(r),this.DEFAULT_HEADERS={},r.metadata&&ch.diag.warn("Metadata cannot be set when using http"),this.headers=Object.assign(this.DEFAULT_HEADERS,(0,RS.parseHeaders)(r.headers),lh.baggageUtils.parseKeyPairsIntoRecord((0,lh.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)),this.agent=(0,Ec.createHttpAgent)(r),this.compression=(0,Ec.configureCompression)(r.compression)}onInit(r){}send(r,o,c){if(this._shutdownOnce.isCalled){ch.diag.debug("Shutdown already started. Cannot send objects");return}let s=this.convert(r),a=new Promise((e,n)=>{(0,Ec.sendWithHttp)(this,JSON.stringify(s),"application/json",e,n)}).then(o,c);this._sendingPromises.push(a);let t=()=>{let e=this._sendingPromises.indexOf(a);this._sendingPromises.splice(e,1)};a.then(t,t)}onShutdown(){}};$i.OTLPExporterNodeBase=gc});var fh=d(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.CompressionAlgorithm=me.configureCompression=me.createHttpAgent=me.sendWithHttp=me.OTLPExporterNodeBase=void 0;var xS=ph();Object.defineProperty(me,"OTLPExporterNodeBase",{enumerable:!0,get:function(){return xS.OTLPExporterNodeBase}});var vc=yc();Object.defineProperty(me,"sendWithHttp",{enumerable:!0,get:function(){return vc.sendWithHttp}});Object.defineProperty(me,"createHttpAgent",{enumerable:!0,get:function(){return vc.createHttpAgent}});Object.defineProperty(me,"configureCompression",{enumerable:!0,get:function(){return vc.configureCompression}});var IS=hc();Object.defineProperty(me,"CompressionAlgorithm",{enumerable:!0,get:function(){return IS.CompressionAlgorithm}})});var Tc=d(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.sendWithXhr=hr.sendWithBeacon=void 0;var dh=(y(),E(_)),Zr=Xi(),dr=Et();function LS(i,r,o,c,s){if(navigator.sendBeacon(r,new Blob([i],o)))dh.diag.debug("sendBeacon - can send",i),c();else{let a=new Zr.OTLPExporterError(`sendBeacon - cannot send ${i}`);s(a)}}hr.sendWithBeacon=LS;function wS(i,r,o,c,s,a){let t,e,n=!1,u=setTimeout(()=>{if(clearTimeout(t),n=!0,e.readyState===XMLHttpRequest.DONE){let h=new Zr.OTLPExporterError("Request Timeout");a(h)}else e.abort()},c),l=(h=dr.DEFAULT_EXPORT_MAX_ATTEMPTS,T=dr.DEFAULT_EXPORT_INITIAL_BACKOFF)=>{e=new XMLHttpRequest,e.open("POST",r),Object.entries(Object.assign(Object.assign({},{Accept:"application/json","Content-Type":"application/json"}),o)).forEach(([L,x])=>{e.setRequestHeader(L,x)}),e.send(i),e.onreadystatechange=()=>{if(e.readyState===XMLHttpRequest.DONE&&n===!1)if(e.status>=200&&e.status<=299)dh.diag.debug("xhr success",i),s(),clearTimeout(u),clearTimeout(t);else if(e.status&&(0,dr.isExportRetryable)(e.status)&&h>0){let L;T=dr.DEFAULT_EXPORT_BACKOFF_MULTIPLIER*T,e.getResponseHeader("Retry-After")?L=(0,dr.parseRetryAfterToMills)(e.getResponseHeader("Retry-After")):L=Math.round(Math.random()*(dr.DEFAULT_EXPORT_MAX_BACKOFF-T)+T),t=setTimeout(()=>{l(h-1,T)},L)}else{let L=new Zr.OTLPExporterError(`Failed to export with XHR (status: ${e.status})`,e.status);a(L),clearTimeout(u),clearTimeout(t)}},e.onabort=()=>{if(n){let L=new Zr.OTLPExporterError("Request Timeout");a(L)}clearTimeout(u),clearTimeout(t)},e.onerror=()=>{if(n){let L=new Zr.OTLPExporterError("Request Timeout");a(L)}clearTimeout(u),clearTimeout(t)}};l()}hr.sendWithXhr=wS});var mh=d(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});Wi.OTLPExporterBrowserBase=void 0;var MS=Wr(),CS=Et(),hh=Tc(),US=(y(),E(_)),Yi=N(),Sc=class extends MS.OTLPExporterBase{constructor(r={}){super(r),this._useXHR=!1,this._useXHR=!!r.headers||typeof navigator.sendBeacon!="function",this._useXHR?this._headers=Object.assign({},(0,CS.parseHeaders)(r.headers),Yi.baggageUtils.parseKeyPairsIntoRecord((0,Yi.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)):this._headers={}}onInit(){Yi._globalThis.addEventListener("unload",this.shutdown)}onShutdown(){Yi._globalThis.removeEventListener("unload",this.shutdown)}send(r,o,c){if(this._shutdownOnce.isCalled){US.diag.debug("Shutdown already started. Cannot send objects");return}let s=this.convert(r),a=JSON.stringify(s),t=new Promise((n,u)=>{this._useXHR?(0,hh.sendWithXhr)(a,this.url,this._headers,this.timeoutMillis,n,u):(0,hh.sendWithBeacon)(a,this.url,{type:"application/json"},n,u)}).then(o,c);this._sendingPromises.push(t);let e=()=>{let n=this._sendingPromises.indexOf(t);this._sendingPromises.splice(n,1)};t.then(e,e)}};Wi.OTLPExporterBrowserBase=Sc});var _h=d(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.sendWithXhr=mr.OTLPExporterBrowserBase=void 0;var DS=mh();Object.defineProperty(mr,"OTLPExporterBrowserBase",{enumerable:!0,get:function(){return DS.OTLPExporterBrowserBase}});var BS=Tc();Object.defineProperty(mr,"sendWithXhr",{enumerable:!0,get:function(){return BS.sendWithXhr}})});var Eh=d(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.sendWithXhr=oe.OTLPExporterBrowserBase=oe.CompressionAlgorithm=oe.configureCompression=oe.createHttpAgent=oe.sendWithHttp=oe.OTLPExporterNodeBase=void 0;var en=fh();Object.defineProperty(oe,"OTLPExporterNodeBase",{enumerable:!0,get:function(){return en.OTLPExporterNodeBase}});Object.defineProperty(oe,"sendWithHttp",{enumerable:!0,get:function(){return en.sendWithHttp}});Object.defineProperty(oe,"createHttpAgent",{enumerable:!0,get:function(){return en.createHttpAgent}});Object.defineProperty(oe,"configureCompression",{enumerable:!0,get:function(){return en.configureCompression}});Object.defineProperty(oe,"CompressionAlgorithm",{enumerable:!0,get:function(){return en.CompressionAlgorithm}});var yh=_h();Object.defineProperty(oe,"OTLPExporterBrowserBase",{enumerable:!0,get:function(){return yh.OTLPExporterBrowserBase}});Object.defineProperty(oe,"sendWithXhr",{enumerable:!0,get:function(){return yh.sendWithXhr}})});var Ji=d(j=>{"use strict";var VS=j&&j.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),kS=j&&j.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&VS(r,i,o)};Object.defineProperty(j,"__esModule",{value:!0});j.invalidTimeout=j.configureExporterTimeout=j.appendRootPathToUrlIfNeeded=j.appendResourcePathToUrl=j.parseHeaders=j.OTLPExporterError=j.OTLPExporterBase=void 0;kS(Eh(),j);var qS=Wr();Object.defineProperty(j,"OTLPExporterBase",{enumerable:!0,get:function(){return qS.OTLPExporterBase}});var jS=Xi();Object.defineProperty(j,"OTLPExporterError",{enumerable:!0,get:function(){return jS.OTLPExporterError}});var tn=Et();Object.defineProperty(j,"parseHeaders",{enumerable:!0,get:function(){return tn.parseHeaders}});Object.defineProperty(j,"appendResourcePathToUrl",{enumerable:!0,get:function(){return tn.appendResourcePathToUrl}});Object.defineProperty(j,"appendRootPathToUrlIfNeeded",{enumerable:!0,get:function(){return tn.appendRootPathToUrlIfNeeded}});Object.defineProperty(j,"configureExporterTimeout",{enumerable:!0,get:function(){return tn.configureExporterTimeout}});Object.defineProperty(j,"invalidTimeout",{enumerable:!0,get:function(){return tn.invalidTimeout}})});var vh=d((gN,gh)=>{"use strict";gh.exports=GS;function GS(i,r){for(var o=new Array(arguments.length-1),c=0,s=2,a=!0;s<arguments.length;)o[c++]=arguments[s++];return new Promise(function(e,n){o[c]=function(l){if(a)if(a=!1,l)n(l);else{for(var h=new Array(arguments.length-1),T=0;T<h.length;)h[T++]=arguments[T];e.apply(null,h)}};try{i.apply(r||null,o)}catch(u){a&&(a=!1,n(u))}})}});var Oh=d(bh=>{"use strict";var Qi=bh;Qi.length=function(r){var o=r.length;if(!o)return 0;for(var c=0;--o%4>1&&r.charAt(o)==="=";)++c;return Math.ceil(r.length*3)/4-c};var _r=new Array(64),Sh=new Array(123);for(ve=0;ve<64;)Sh[_r[ve]=ve<26?ve+65:ve<52?ve+71:ve<62?ve-4:ve-59|43]=ve++;var ve;Qi.encode=function(r,o,c){for(var s=null,a=[],t=0,e=0,n;o<c;){var u=r[o++];switch(e){case 0:a[t++]=_r[u>>2],n=(u&3)<<4,e=1;break;case 1:a[t++]=_r[n|u>>4],n=(u&15)<<2,e=2;break;case 2:a[t++]=_r[n|u>>6],a[t++]=_r[u&63],e=0;break}t>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,a)),t=0)}return e&&(a[t++]=_r[n],a[t++]=61,e===1&&(a[t++]=61)),s?(t&&s.push(String.fromCharCode.apply(String,a.slice(0,t))),s.join("")):String.fromCharCode.apply(String,a.slice(0,t))};var Th="invalid encoding";Qi.decode=function(r,o,c){for(var s=c,a=0,t,e=0;e<r.length;){var n=r.charCodeAt(e++);if(n===61&&a>1)break;if((n=Sh[n])===void 0)throw Error(Th);switch(a){case 0:t=n,a=1;break;case 1:o[c++]=t<<2|(n&48)>>4,t=n,a=2;break;case 2:o[c++]=(t&15)<<4|(n&60)>>2,t=n,a=3;break;case 3:o[c++]=(t&3)<<6|n,a=0;break}}if(a===1)throw Error(Th);return c-s};Qi.test=function(r){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r)}});var Ph=d((TN,Ah)=>{"use strict";Ah.exports=Zi;function Zi(){this._listeners={}}Zi.prototype.on=function(r,o,c){return(this._listeners[r]||(this._listeners[r]=[])).push({fn:o,ctx:c||this}),this};Zi.prototype.off=function(r,o){if(r===void 0)this._listeners={};else if(o===void 0)this._listeners[r]=[];else for(var c=this._listeners[r],s=0;s<c.length;)c[s].fn===o?c.splice(s,1):++s;return this};Zi.prototype.emit=function(r){var o=this._listeners[r];if(o){for(var c=[],s=1;s<arguments.length;)c.push(arguments[s++]);for(s=0;s<o.length;)o[s].fn.apply(o[s++].ctx,c)}return this}});var Mh=d((SN,wh)=>{"use strict";wh.exports=Nh(Nh);function Nh(i){return typeof Float32Array<"u"?function(){var r=new Float32Array([-0]),o=new Uint8Array(r.buffer),c=o[3]===128;function s(n,u,l){r[0]=n,u[l]=o[0],u[l+1]=o[1],u[l+2]=o[2],u[l+3]=o[3]}function a(n,u,l){r[0]=n,u[l]=o[3],u[l+1]=o[2],u[l+2]=o[1],u[l+3]=o[0]}i.writeFloatLE=c?s:a,i.writeFloatBE=c?a:s;function t(n,u){return o[0]=n[u],o[1]=n[u+1],o[2]=n[u+2],o[3]=n[u+3],r[0]}function e(n,u){return o[3]=n[u],o[2]=n[u+1],o[1]=n[u+2],o[0]=n[u+3],r[0]}i.readFloatLE=c?t:e,i.readFloatBE=c?e:t}():function(){function r(c,s,a,t){var e=s<0?1:0;if(e&&(s=-s),s===0)c(1/s>0?0:2147483648,a,t);else if(isNaN(s))c(2143289344,a,t);else if(s>34028234663852886e22)c((e<<31|2139095040)>>>0,a,t);else if(s<11754943508222875e-54)c((e<<31|Math.round(s/1401298464324817e-60))>>>0,a,t);else{var n=Math.floor(Math.log(s)/Math.LN2),u=Math.round(s*Math.pow(2,-n)*8388608)&8388607;c((e<<31|n+127<<23|u)>>>0,a,t)}}i.writeFloatLE=r.bind(null,Rh),i.writeFloatBE=r.bind(null,xh);function o(c,s,a){var t=c(s,a),e=(t>>31)*2+1,n=t>>>23&255,u=t&8388607;return n===255?u?NaN:e*(1/0):n===0?e*1401298464324817e-60*u:e*Math.pow(2,n-150)*(u+8388608)}i.readFloatLE=o.bind(null,Ih),i.readFloatBE=o.bind(null,Lh)}(),typeof Float64Array<"u"?function(){var r=new Float64Array([-0]),o=new Uint8Array(r.buffer),c=o[7]===128;function s(n,u,l){r[0]=n,u[l]=o[0],u[l+1]=o[1],u[l+2]=o[2],u[l+3]=o[3],u[l+4]=o[4],u[l+5]=o[5],u[l+6]=o[6],u[l+7]=o[7]}function a(n,u,l){r[0]=n,u[l]=o[7],u[l+1]=o[6],u[l+2]=o[5],u[l+3]=o[4],u[l+4]=o[3],u[l+5]=o[2],u[l+6]=o[1],u[l+7]=o[0]}i.writeDoubleLE=c?s:a,i.writeDoubleBE=c?a:s;function t(n,u){return o[0]=n[u],o[1]=n[u+1],o[2]=n[u+2],o[3]=n[u+3],o[4]=n[u+4],o[5]=n[u+5],o[6]=n[u+6],o[7]=n[u+7],r[0]}function e(n,u){return o[7]=n[u],o[6]=n[u+1],o[5]=n[u+2],o[4]=n[u+3],o[3]=n[u+4],o[2]=n[u+5],o[1]=n[u+6],o[0]=n[u+7],r[0]}i.readDoubleLE=c?t:e,i.readDoubleBE=c?e:t}():function(){function r(c,s,a,t,e,n){var u=t<0?1:0;if(u&&(t=-t),t===0)c(0,e,n+s),c(1/t>0?0:2147483648,e,n+a);else if(isNaN(t))c(0,e,n+s),c(2146959360,e,n+a);else if(t>17976931348623157e292)c(0,e,n+s),c((u<<31|2146435072)>>>0,e,n+a);else{var l;if(t<22250738585072014e-324)l=t/5e-324,c(l>>>0,e,n+s),c((u<<31|l/4294967296)>>>0,e,n+a);else{var h=Math.floor(Math.log(t)/Math.LN2);h===1024&&(h=1023),l=t*Math.pow(2,-h),c(l*4503599627370496>>>0,e,n+s),c((u<<31|h+1023<<20|l*1048576&1048575)>>>0,e,n+a)}}}i.writeDoubleLE=r.bind(null,Rh,0,4),i.writeDoubleBE=r.bind(null,xh,4,0);function o(c,s,a,t,e){var n=c(t,e+s),u=c(t,e+a),l=(u>>31)*2+1,h=u>>>20&2047,T=4294967296*(u&1048575)+n;return h===2047?T?NaN:l*(1/0):h===0?l*5e-324*T:l*Math.pow(2,h-1075)*(T+4503599627370496)}i.readDoubleLE=o.bind(null,Ih,0,4),i.readDoubleBE=o.bind(null,Lh,4,0)}(),i}function Rh(i,r,o){r[o]=i&255,r[o+1]=i>>>8&255,r[o+2]=i>>>16&255,r[o+3]=i>>>24}function xh(i,r,o){r[o]=i>>>24,r[o+1]=i>>>16&255,r[o+2]=i>>>8&255,r[o+3]=i&255}function Ih(i,r){return(i[r]|i[r+1]<<8|i[r+2]<<16|i[r+3]<<24)>>>0}function Lh(i,r){return(i[r]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3])>>>0}});var Ch=d((exports,module)=>{"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(i){}return null}});var Dh=d(Uh=>{"use strict";var bc=Uh;bc.length=function(r){for(var o=0,c=0,s=0;s<r.length;++s)c=r.charCodeAt(s),c<128?o+=1:c<2048?o+=2:(c&64512)===55296&&(r.charCodeAt(s+1)&64512)===56320?(++s,o+=4):o+=3;return o};bc.read=function(r,o,c){var s=c-o;if(s<1)return"";for(var a=null,t=[],e=0,n;o<c;)n=r[o++],n<128?t[e++]=n:n>191&&n<224?t[e++]=(n&31)<<6|r[o++]&63:n>239&&n<365?(n=((n&7)<<18|(r[o++]&63)<<12|(r[o++]&63)<<6|r[o++]&63)-65536,t[e++]=55296+(n>>10),t[e++]=56320+(n&1023)):t[e++]=(n&15)<<12|(r[o++]&63)<<6|r[o++]&63,e>8191&&((a||(a=[])).push(String.fromCharCode.apply(String,t)),e=0);return a?(e&&a.push(String.fromCharCode.apply(String,t.slice(0,e))),a.join("")):String.fromCharCode.apply(String,t.slice(0,e))};bc.write=function(r,o,c){for(var s=c,a,t,e=0;e<r.length;++e)a=r.charCodeAt(e),a<128?o[c++]=a:a<2048?(o[c++]=a>>6|192,o[c++]=a&63|128):(a&64512)===55296&&((t=r.charCodeAt(e+1))&64512)===56320?(a=65536+((a&1023)<<10)+(t&1023),++e,o[c++]=a>>18|240,o[c++]=a>>12&63|128,o[c++]=a>>6&63|128,o[c++]=a&63|128):(o[c++]=a>>12|224,o[c++]=a>>6&63|128,o[c++]=a&63|128);return c-s}});var Vh=d((ON,Bh)=>{"use strict";Bh.exports=HS;function HS(i,r,o){var c=o||8192,s=c>>>1,a=null,t=c;return function(n){if(n<1||n>s)return i(n);t+n>c&&(a=i(c),t=0);var u=r.call(a,t,t+=n);return t&7&&(t=(t|7)+1),u}}});var qh=d((AN,kh)=>{"use strict";kh.exports=$;var rn=Ye();function $(i,r){this.lo=i>>>0,this.hi=r>>>0}var gt=$.zero=new $(0,0);gt.toNumber=function(){return 0};gt.zzEncode=gt.zzDecode=function(){return this};gt.length=function(){return 1};var FS=$.zeroHash="\0\0\0\0\0\0\0\0";$.fromNumber=function(r){if(r===0)return gt;var o=r<0;o&&(r=-r);var c=r>>>0,s=(r-c)/4294967296>>>0;return o&&(s=~s>>>0,c=~c>>>0,++c>4294967295&&(c=0,++s>4294967295&&(s=0))),new $(c,s)};$.from=function(r){if(typeof r=="number")return $.fromNumber(r);if(rn.isString(r))if(rn.Long)r=rn.Long.fromString(r);else return $.fromNumber(parseInt(r,10));return r.low||r.high?new $(r.low>>>0,r.high>>>0):gt};$.prototype.toNumber=function(r){if(!r&&this.hi>>>31){var o=~this.lo+1>>>0,c=~this.hi>>>0;return o||(c=c+1>>>0),-(o+c*4294967296)}return this.lo+this.hi*4294967296};$.prototype.toLong=function(r){return rn.Long?new rn.Long(this.lo|0,this.hi|0,!!r):{low:this.lo|0,high:this.hi|0,unsigned:!!r}};var $e=String.prototype.charCodeAt;$.fromHash=function(r){return r===FS?gt:new $(($e.call(r,0)|$e.call(r,1)<<8|$e.call(r,2)<<16|$e.call(r,3)<<24)>>>0,($e.call(r,4)|$e.call(r,5)<<8|$e.call(r,6)<<16|$e.call(r,7)<<24)>>>0)};$.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};$.prototype.zzEncode=function(){var r=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^r)>>>0,this.lo=(this.lo<<1^r)>>>0,this};$.prototype.zzDecode=function(){var r=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^r)>>>0,this.hi=(this.hi>>>1^r)>>>0,this};$.prototype.length=function(){var r=this.lo,o=(this.lo>>>28|this.hi<<4)>>>0,c=this.hi>>>24;return c===0?o===0?r<16384?r<128?1:2:r<2097152?3:4:o<16384?o<128?5:6:o<2097152?7:8:c<128?9:10}});var Ye=d(Oc=>{"use strict";var g=Oc;g.asPromise=vh();g.base64=Oh();g.EventEmitter=Ph();g.float=Mh();g.inquire=Ch();g.utf8=Dh();g.pool=Vh();g.LongBits=qh();g.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);g.global=g.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||Oc;g.emptyArray=Object.freeze?Object.freeze([]):[];g.emptyObject=Object.freeze?Object.freeze({}):{};g.isInteger=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r};g.isString=function(r){return typeof r=="string"||r instanceof String};g.isObject=function(r){return r&&typeof r=="object"};g.isset=g.isSet=function(r,o){var c=r[o];return c!=null&&r.hasOwnProperty(o)?typeof c!="object"||(Array.isArray(c)?c.length:Object.keys(c).length)>0:!1};g.Buffer=function(){try{var i=g.inquire("buffer").Buffer;return i.prototype.utf8Write?i:null}catch{return null}}();g._Buffer_from=null;g._Buffer_allocUnsafe=null;g.newBuffer=function(r){return typeof r=="number"?g.Buffer?g._Buffer_allocUnsafe(r):new g.Array(r):g.Buffer?g._Buffer_from(r):typeof Uint8Array>"u"?r:new Uint8Array(r)};g.Array=typeof Uint8Array<"u"?Uint8Array:Array;g.Long=g.global.dcodeIO&&g.global.dcodeIO.Long||g.global.Long||g.inquire("long");g.key2Re=/^true|false|0|1$/;g.key32Re=/^-?(?:0|[1-9][0-9]*)$/;g.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;g.longToHash=function(r){return r?g.LongBits.from(r).toHash():g.LongBits.zeroHash};g.longFromHash=function(r,o){var c=g.LongBits.fromHash(r);return g.Long?g.Long.fromBits(c.lo,c.hi,o):c.toNumber(!!o)};function jh(i,r,o){for(var c=Object.keys(r),s=0;s<c.length;++s)(i[c[s]]===void 0||!o)&&(i[c[s]]=r[c[s]]);return i}g.merge=jh;g.lcFirst=function(r){return r.charAt(0).toLowerCase()+r.substring(1)};function Gh(i){function r(o,c){if(!(this instanceof r))return new r(o,c);Object.defineProperty(this,"message",{get:function(){return o}}),Error.captureStackTrace?Error.captureStackTrace(this,r):Object.defineProperty(this,"stack",{value:new Error().stack||""}),c&&jh(this,c)}return r.prototype=Object.create(Error.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return i},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),r}g.newError=Gh;g.ProtocolError=Gh("ProtocolError");g.oneOfGetter=function(r){for(var o={},c=0;c<r.length;++c)o[r[c]]=1;return function(){for(var s=Object.keys(this),a=s.length-1;a>-1;--a)if(o[s[a]]===1&&this[s[a]]!==void 0&&this[s[a]]!==null)return s[a]}};g.oneOfSetter=function(r){return function(o){for(var c=0;c<r.length;++c)r[c]!==o&&delete this[r[c]]}};g.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};g._configure=function(){var i=g.Buffer;if(!i){g._Buffer_from=g._Buffer_allocUnsafe=null;return}g._Buffer_from=i.from!==Uint8Array.from&&i.from||function(o,c){return new i(o,c)},g._Buffer_allocUnsafe=i.allocUnsafe||function(o){return new i(o)}}});var Lc=d((NN,Xh)=>{"use strict";Xh.exports=R;var _e=Ye(),Ac,es=_e.LongBits,Hh=_e.base64,Fh=_e.utf8;function nn(i,r,o){this.fn=i,this.len=r,this.next=void 0,this.val=o}function Nc(){}function KS(i){this.head=i.head,this.tail=i.tail,this.len=i.len,this.next=i.states}function R(){this.len=0,this.head=new nn(Nc,0,0),this.tail=this.head,this.states=null}var Kh=function(){return _e.Buffer?function(){return(R.create=function(){return new Ac})()}:function(){return new R}};R.create=Kh();R.alloc=function(r){return new _e.Array(r)};_e.Array!==Array&&(R.alloc=_e.pool(R.alloc,_e.Array.prototype.subarray));R.prototype._push=function(r,o,c){return this.tail=this.tail.next=new nn(r,o,c),this.len+=o,this};function Rc(i,r,o){r[o]=i&255}function XS(i,r,o){for(;i>127;)r[o++]=i&127|128,i>>>=7;r[o]=i}function xc(i,r){this.len=i,this.next=void 0,this.val=r}xc.prototype=Object.create(nn.prototype);xc.prototype.fn=XS;R.prototype.uint32=function(r){return this.len+=(this.tail=this.tail.next=new xc((r=r>>>0)<128?1:r<16384?2:r<2097152?3:r<268435456?4:5,r)).len,this};R.prototype.int32=function(r){return r<0?this._push(Ic,10,es.fromNumber(r)):this.uint32(r)};R.prototype.sint32=function(r){return this.uint32((r<<1^r>>31)>>>0)};function Ic(i,r,o){for(;i.hi;)r[o++]=i.lo&127|128,i.lo=(i.lo>>>7|i.hi<<25)>>>0,i.hi>>>=7;for(;i.lo>127;)r[o++]=i.lo&127|128,i.lo=i.lo>>>7;r[o++]=i.lo}R.prototype.uint64=function(r){var o=es.from(r);return this._push(Ic,o.length(),o)};R.prototype.int64=R.prototype.uint64;R.prototype.sint64=function(r){var o=es.from(r).zzEncode();return this._push(Ic,o.length(),o)};R.prototype.bool=function(r){return this._push(Rc,1,r?1:0)};function Pc(i,r,o){r[o]=i&255,r[o+1]=i>>>8&255,r[o+2]=i>>>16&255,r[o+3]=i>>>24}R.prototype.fixed32=function(r){return this._push(Pc,4,r>>>0)};R.prototype.sfixed32=R.prototype.fixed32;R.prototype.fixed64=function(r){var o=es.from(r);return this._push(Pc,4,o.lo)._push(Pc,4,o.hi)};R.prototype.sfixed64=R.prototype.fixed64;R.prototype.float=function(r){return this._push(_e.float.writeFloatLE,4,r)};R.prototype.double=function(r){return this._push(_e.float.writeDoubleLE,8,r)};var zS=_e.Array.prototype.set?function(r,o,c){o.set(r,c)}:function(r,o,c){for(var s=0;s<r.length;++s)o[c+s]=r[s]};R.prototype.bytes=function(r){var o=r.length>>>0;if(!o)return this._push(Rc,1,0);if(_e.isString(r)){var c=R.alloc(o=Hh.length(r));Hh.decode(r,c,0),r=c}return this.uint32(o)._push(zS,o,r)};R.prototype.string=function(r){var o=Fh.length(r);return o?this.uint32(o)._push(Fh.write,o,r):this._push(Rc,1,0)};R.prototype.fork=function(){return this.states=new KS(this),this.head=this.tail=new nn(Nc,0,0),this.len=0,this};R.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new nn(Nc,0,0),this.len=0),this};R.prototype.ldelim=function(){var r=this.head,o=this.tail,c=this.len;return this.reset().uint32(c),c&&(this.tail.next=r.next,this.tail=o,this.len+=c),this};R.prototype.finish=function(){for(var r=this.head.next,o=this.constructor.alloc(this.len),c=0;r;)r.fn(r.val,o,c),c+=r.len,r=r.next;return o};R._configure=function(i){Ac=i,R.create=Kh(),Ac._configure()}});var Yh=d((RN,$h)=>{"use strict";$h.exports=xe;var zh=Lc();(xe.prototype=Object.create(zh.prototype)).constructor=xe;var We=Ye();function xe(){zh.call(this)}xe._configure=function(){xe.alloc=We._Buffer_allocUnsafe,xe.writeBytesBuffer=We.Buffer&&We.Buffer.prototype instanceof Uint8Array&&We.Buffer.prototype.set.name==="set"?function(r,o,c){o.set(r,c)}:function(r,o,c){if(r.copy)r.copy(o,c,0,r.length);else for(var s=0;s<r.length;)o[c++]=r[s++]}};xe.prototype.bytes=function(r){We.isString(r)&&(r=We._Buffer_from(r,"base64"));var o=r.length>>>0;return this.uint32(o),o&&this._push(xe.writeBytesBuffer,o,r),this};function $S(i,r,o){i.length<40?We.utf8.write(i,r,o):r.utf8Write?r.utf8Write(i,o):r.write(i,o)}xe.prototype.string=function(r){var o=We.Buffer.byteLength(r);return this.uint32(o),o&&this._push($S,o,r),this};xe._configure()});var Cc=d((xN,em)=>{"use strict";em.exports=G;var Te=Ye(),Mc,Qh=Te.LongBits,YS=Te.utf8;function Se(i,r){return RangeError("index out of range: "+i.pos+" + "+(r||1)+" > "+i.len)}function G(i){this.buf=i,this.pos=0,this.len=i.length}var Wh=typeof Uint8Array<"u"?function(r){if(r instanceof Uint8Array||Array.isArray(r))return new G(r);throw Error("illegal buffer")}:function(r){if(Array.isArray(r))return new G(r);throw Error("illegal buffer")},Zh=function(){return Te.Buffer?function(o){return(G.create=function(s){return Te.Buffer.isBuffer(s)?new Mc(s):Wh(s)})(o)}:Wh};G.create=Zh();G.prototype._slice=Te.Array.prototype.subarray||Te.Array.prototype.slice;G.prototype.uint32=function(){var r=4294967295;return function(){if(r=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(r=(r|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return r;if((this.pos+=5)>this.len)throw this.pos=this.len,Se(this,10);return r}}();G.prototype.int32=function(){return this.uint32()|0};G.prototype.sint32=function(){var r=this.uint32();return r>>>1^-(r&1)|0};function wc(){var i=new Qh(0,0),r=0;if(this.len-this.pos>4){for(;r<4;++r)if(i.lo=(i.lo|(this.buf[this.pos]&127)<<r*7)>>>0,this.buf[this.pos++]<128)return i;if(i.lo=(i.lo|(this.buf[this.pos]&127)<<28)>>>0,i.hi=(i.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return i;r=0}else{for(;r<3;++r){if(this.pos>=this.len)throw Se(this);if(i.lo=(i.lo|(this.buf[this.pos]&127)<<r*7)>>>0,this.buf[this.pos++]<128)return i}return i.lo=(i.lo|(this.buf[this.pos++]&127)<<r*7)>>>0,i}if(this.len-this.pos>4){for(;r<5;++r)if(i.hi=(i.hi|(this.buf[this.pos]&127)<<r*7+3)>>>0,this.buf[this.pos++]<128)return i}else for(;r<5;++r){if(this.pos>=this.len)throw Se(this);if(i.hi=(i.hi|(this.buf[this.pos]&127)<<r*7+3)>>>0,this.buf[this.pos++]<128)return i}throw Error("invalid varint encoding")}G.prototype.bool=function(){return this.uint32()!==0};function ts(i,r){return(i[r-4]|i[r-3]<<8|i[r-2]<<16|i[r-1]<<24)>>>0}G.prototype.fixed32=function(){if(this.pos+4>this.len)throw Se(this,4);return ts(this.buf,this.pos+=4)};G.prototype.sfixed32=function(){if(this.pos+4>this.len)throw Se(this,4);return ts(this.buf,this.pos+=4)|0};function Jh(){if(this.pos+8>this.len)throw Se(this,8);return new Qh(ts(this.buf,this.pos+=4),ts(this.buf,this.pos+=4))}G.prototype.float=function(){if(this.pos+4>this.len)throw Se(this,4);var r=Te.float.readFloatLE(this.buf,this.pos);return this.pos+=4,r};G.prototype.double=function(){if(this.pos+8>this.len)throw Se(this,4);var r=Te.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,r};G.prototype.bytes=function(){var r=this.uint32(),o=this.pos,c=this.pos+r;if(c>this.len)throw Se(this,r);if(this.pos+=r,Array.isArray(this.buf))return this.buf.slice(o,c);if(o===c){var s=Te.Buffer;return s?s.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,o,c)};G.prototype.string=function(){var r=this.bytes();return YS.read(r,0,r.length)};G.prototype.skip=function(r){if(typeof r=="number"){if(this.pos+r>this.len)throw Se(this,r);this.pos+=r}else do if(this.pos>=this.len)throw Se(this);while(this.buf[this.pos++]&128);return this};G.prototype.skipType=function(i){switch(i){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(i=this.uint32()&7)!==4;)this.skipType(i);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+i+" at offset "+this.pos)}return this};G._configure=function(i){Mc=i,G.create=Zh(),Mc._configure();var r=Te.Long?"toLong":"toNumber";Te.merge(G.prototype,{int64:function(){return wc.call(this)[r](!1)},uint64:function(){return wc.call(this)[r](!0)},sint64:function(){return wc.call(this).zzDecode()[r](!1)},fixed64:function(){return Jh.call(this)[r](!0)},sfixed64:function(){return Jh.call(this)[r](!1)}})}});var om=d((IN,nm)=>{"use strict";nm.exports=vt;var rm=Cc();(vt.prototype=Object.create(rm.prototype)).constructor=vt;var tm=Ye();function vt(i){rm.call(this,i)}vt._configure=function(){tm.Buffer&&(vt.prototype._slice=tm.Buffer.prototype.slice)};vt.prototype.string=function(){var r=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+r,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+r,this.len))};vt._configure()});var sm=d((LN,im)=>{"use strict";im.exports=on;var Uc=Ye();(on.prototype=Object.create(Uc.EventEmitter.prototype)).constructor=on;function on(i,r,o){if(typeof i!="function")throw TypeError("rpcImpl must be a function");Uc.EventEmitter.call(this),this.rpcImpl=i,this.requestDelimited=!!r,this.responseDelimited=!!o}on.prototype.rpcCall=function i(r,o,c,s,a){if(!s)throw TypeError("request must be specified");var t=this;if(!a)return Uc.asPromise(i,t,r,o,c,s);if(!t.rpcImpl){setTimeout(function(){a(Error("already ended"))},0);return}try{return t.rpcImpl(r,o[t.requestDelimited?"encodeDelimited":"encode"](s).finish(),function(n,u){if(n)return t.emit("error",n,r),a(n);if(u===null){t.end(!0);return}if(!(u instanceof c))try{u=c[t.responseDelimited?"decodeDelimited":"decode"](u)}catch(l){return t.emit("error",l,r),a(l)}return t.emit("data",u,r),a(null,u)})}catch(e){t.emit("error",e,r),setTimeout(function(){a(e)},0);return}};on.prototype.end=function(r){return this.rpcImpl&&(r||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var am=d(um=>{"use strict";var WS=um;WS.Service=sm()});var lm=d((MN,cm)=>{"use strict";cm.exports={}});var dm=d(fm=>{"use strict";var ue=fm;ue.build="minimal";ue.Writer=Lc();ue.BufferWriter=Yh();ue.Reader=Cc();ue.BufferReader=om();ue.util=Ye();ue.rpc=am();ue.roots=lm();ue.configure=pm;function pm(){ue.util._configure(),ue.Writer._configure(ue.BufferWriter),ue.Reader._configure(ue.BufferReader)}pm()});var mm=d((UN,hm)=>{"use strict";hm.exports=dm()});var ym=d((DN,_m)=>{"use strict";var v=mm(),m=v.Reader,O=v.Writer,f=v.util,p=v.roots.default||(v.roots.default={});p.opentelemetry=function(){var i={};return i.proto=function(){var r={};return r.common=function(){var o={};return o.v1=function(){var c={};return c.AnyValue=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}s.prototype.stringValue=null,s.prototype.boolValue=null,s.prototype.intValue=null,s.prototype.doubleValue=null,s.prototype.arrayValue=null,s.prototype.kvlistValue=null,s.prototype.bytesValue=null;var a;return Object.defineProperty(s.prototype,"value",{get:f.oneOfGetter(a=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"]),set:f.oneOfSetter(a)}),s.create=function(e){return new s(e)},s.encode=function(e,n){return n||(n=O.create()),e.stringValue!=null&&Object.hasOwnProperty.call(e,"stringValue")&&n.uint32(10).string(e.stringValue),e.boolValue!=null&&Object.hasOwnProperty.call(e,"boolValue")&&n.uint32(16).bool(e.boolValue),e.intValue!=null&&Object.hasOwnProperty.call(e,"intValue")&&n.uint32(24).int64(e.intValue),e.doubleValue!=null&&Object.hasOwnProperty.call(e,"doubleValue")&&n.uint32(33).double(e.doubleValue),e.arrayValue!=null&&Object.hasOwnProperty.call(e,"arrayValue")&&p.opentelemetry.proto.common.v1.ArrayValue.encode(e.arrayValue,n.uint32(42).fork()).ldelim(),e.kvlistValue!=null&&Object.hasOwnProperty.call(e,"kvlistValue")&&p.opentelemetry.proto.common.v1.KeyValueList.encode(e.kvlistValue,n.uint32(50).fork()).ldelim(),e.bytesValue!=null&&Object.hasOwnProperty.call(e,"bytesValue")&&n.uint32(58).bytes(e.bytesValue),n},s.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},s.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.common.v1.AnyValue;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.stringValue=e.string();break}case 2:{l.boolValue=e.bool();break}case 3:{l.intValue=e.int64();break}case 4:{l.doubleValue=e.double();break}case 5:{l.arrayValue=p.opentelemetry.proto.common.v1.ArrayValue.decode(e,e.uint32());break}case 6:{l.kvlistValue=p.opentelemetry.proto.common.v1.KeyValueList.decode(e,e.uint32());break}case 7:{l.bytesValue=e.bytes();break}default:e.skipType(h&7);break}}return l},s.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.stringValue!=null&&e.hasOwnProperty("stringValue")&&(n.value=1,!f.isString(e.stringValue)))return"stringValue: string expected";if(e.boolValue!=null&&e.hasOwnProperty("boolValue")){if(n.value===1)return"value: multiple values";if(n.value=1,typeof e.boolValue!="boolean")return"boolValue: boolean expected"}if(e.intValue!=null&&e.hasOwnProperty("intValue")){if(n.value===1)return"value: multiple values";if(n.value=1,!f.isInteger(e.intValue)&&!(e.intValue&&f.isInteger(e.intValue.low)&&f.isInteger(e.intValue.high)))return"intValue: integer|Long expected"}if(e.doubleValue!=null&&e.hasOwnProperty("doubleValue")){if(n.value===1)return"value: multiple values";if(n.value=1,typeof e.doubleValue!="number")return"doubleValue: number expected"}if(e.arrayValue!=null&&e.hasOwnProperty("arrayValue")){if(n.value===1)return"value: multiple values";n.value=1;{var u=p.opentelemetry.proto.common.v1.ArrayValue.verify(e.arrayValue);if(u)return"arrayValue."+u}}if(e.kvlistValue!=null&&e.hasOwnProperty("kvlistValue")){if(n.value===1)return"value: multiple values";n.value=1;{var u=p.opentelemetry.proto.common.v1.KeyValueList.verify(e.kvlistValue);if(u)return"kvlistValue."+u}}if(e.bytesValue!=null&&e.hasOwnProperty("bytesValue")){if(n.value===1)return"value: multiple values";if(n.value=1,!(e.bytesValue&&typeof e.bytesValue.length=="number"||f.isString(e.bytesValue)))return"bytesValue: buffer expected"}return null},s.fromObject=function(e){if(e instanceof p.opentelemetry.proto.common.v1.AnyValue)return e;var n=new p.opentelemetry.proto.common.v1.AnyValue;if(e.stringValue!=null&&(n.stringValue=String(e.stringValue)),e.boolValue!=null&&(n.boolValue=!!e.boolValue),e.intValue!=null&&(f.Long?(n.intValue=f.Long.fromValue(e.intValue)).unsigned=!1:typeof e.intValue=="string"?n.intValue=parseInt(e.intValue,10):typeof e.intValue=="number"?n.intValue=e.intValue:typeof e.intValue=="object"&&(n.intValue=new f.LongBits(e.intValue.low>>>0,e.intValue.high>>>0).toNumber())),e.doubleValue!=null&&(n.doubleValue=Number(e.doubleValue)),e.arrayValue!=null){if(typeof e.arrayValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected");n.arrayValue=p.opentelemetry.proto.common.v1.ArrayValue.fromObject(e.arrayValue)}if(e.kvlistValue!=null){if(typeof e.kvlistValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected");n.kvlistValue=p.opentelemetry.proto.common.v1.KeyValueList.fromObject(e.kvlistValue)}return e.bytesValue!=null&&(typeof e.bytesValue=="string"?f.base64.decode(e.bytesValue,n.bytesValue=f.newBuffer(f.base64.length(e.bytesValue)),0):e.bytesValue.length>=0&&(n.bytesValue=e.bytesValue)),n},s.toObject=function(e,n){n||(n={});var u={};return e.stringValue!=null&&e.hasOwnProperty("stringValue")&&(u.stringValue=e.stringValue,n.oneofs&&(u.value="stringValue")),e.boolValue!=null&&e.hasOwnProperty("boolValue")&&(u.boolValue=e.boolValue,n.oneofs&&(u.value="boolValue")),e.intValue!=null&&e.hasOwnProperty("intValue")&&(typeof e.intValue=="number"?u.intValue=n.longs===String?String(e.intValue):e.intValue:u.intValue=n.longs===String?f.Long.prototype.toString.call(e.intValue):n.longs===Number?new f.LongBits(e.intValue.low>>>0,e.intValue.high>>>0).toNumber():e.intValue,n.oneofs&&(u.value="intValue")),e.doubleValue!=null&&e.hasOwnProperty("doubleValue")&&(u.doubleValue=n.json&&!isFinite(e.doubleValue)?String(e.doubleValue):e.doubleValue,n.oneofs&&(u.value="doubleValue")),e.arrayValue!=null&&e.hasOwnProperty("arrayValue")&&(u.arrayValue=p.opentelemetry.proto.common.v1.ArrayValue.toObject(e.arrayValue,n),n.oneofs&&(u.value="arrayValue")),e.kvlistValue!=null&&e.hasOwnProperty("kvlistValue")&&(u.kvlistValue=p.opentelemetry.proto.common.v1.KeyValueList.toObject(e.kvlistValue,n),n.oneofs&&(u.value="kvlistValue")),e.bytesValue!=null&&e.hasOwnProperty("bytesValue")&&(u.bytesValue=n.bytes===String?f.base64.encode(e.bytesValue,0,e.bytesValue.length):n.bytes===Array?Array.prototype.slice.call(e.bytesValue):e.bytesValue,n.oneofs&&(u.value="bytesValue")),u},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.AnyValue"},s}(),c.ArrayValue=function(){function s(a){if(this.values=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.values=f.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.values!=null&&t.values.length)for(var n=0;n<t.values.length;++n)p.opentelemetry.proto.common.v1.AnyValue.encode(t.values[n],e.uint32(10).fork()).ldelim();return e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.common.v1.ArrayValue;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.values&&u.values.length||(u.values=[]),u.values.push(p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.values!=null&&t.hasOwnProperty("values")){if(!Array.isArray(t.values))return"values: array expected";for(var e=0;e<t.values.length;++e){var n=p.opentelemetry.proto.common.v1.AnyValue.verify(t.values[e]);if(n)return"values."+n}}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.common.v1.ArrayValue)return t;var e=new p.opentelemetry.proto.common.v1.ArrayValue;if(t.values){if(!Array.isArray(t.values))throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: array expected");e.values=[];for(var n=0;n<t.values.length;++n){if(typeof t.values[n]!="object")throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: object expected");e.values[n]=p.opentelemetry.proto.common.v1.AnyValue.fromObject(t.values[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.values=[]),t.values&&t.values.length){n.values=[];for(var u=0;u<t.values.length;++u)n.values[u]=p.opentelemetry.proto.common.v1.AnyValue.toObject(t.values[u],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.ArrayValue"},s}(),c.KeyValueList=function(){function s(a){if(this.values=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.values=f.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.values!=null&&t.values.length)for(var n=0;n<t.values.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.values[n],e.uint32(10).fork()).ldelim();return e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.common.v1.KeyValueList;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.values&&u.values.length||(u.values=[]),u.values.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.values!=null&&t.hasOwnProperty("values")){if(!Array.isArray(t.values))return"values: array expected";for(var e=0;e<t.values.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.values[e]);if(n)return"values."+n}}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.common.v1.KeyValueList)return t;var e=new p.opentelemetry.proto.common.v1.KeyValueList;if(t.values){if(!Array.isArray(t.values))throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: array expected");e.values=[];for(var n=0;n<t.values.length;++n){if(typeof t.values[n]!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: object expected");e.values[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.values[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.values=[]),t.values&&t.values.length){n.values=[];for(var u=0;u<t.values.length;++u)n.values[u]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.values[u],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.KeyValueList"},s}(),c.KeyValue=function(){function s(a){if(a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.key=null,s.prototype.value=null,s.create=function(t){return new s(t)},s.encode=function(t,e){return e||(e=O.create()),t.key!=null&&Object.hasOwnProperty.call(t,"key")&&e.uint32(10).string(t.key),t.value!=null&&Object.hasOwnProperty.call(t,"value")&&p.opentelemetry.proto.common.v1.AnyValue.encode(t.value,e.uint32(18).fork()).ldelim(),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.common.v1.KeyValue;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.key=t.string();break}case 2:{u.value=p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32());break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.key!=null&&t.hasOwnProperty("key")&&!f.isString(t.key))return"key: string expected";if(t.value!=null&&t.hasOwnProperty("value")){var e=p.opentelemetry.proto.common.v1.AnyValue.verify(t.value);if(e)return"value."+e}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.common.v1.KeyValue)return t;var e=new p.opentelemetry.proto.common.v1.KeyValue;if(t.key!=null&&(e.key=String(t.key)),t.value!=null){if(typeof t.value!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected");e.value=p.opentelemetry.proto.common.v1.AnyValue.fromObject(t.value)}return e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.key="",n.value=null),t.key!=null&&t.hasOwnProperty("key")&&(n.key=t.key),t.value!=null&&t.hasOwnProperty("value")&&(n.value=p.opentelemetry.proto.common.v1.AnyValue.toObject(t.value,e)),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.KeyValue"},s}(),c.InstrumentationScope=function(){function s(a){if(this.attributes=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.name=null,s.prototype.version=null,s.prototype.attributes=f.emptyArray,s.prototype.droppedAttributesCount=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.name!=null&&Object.hasOwnProperty.call(t,"name")&&e.uint32(10).string(t.name),t.version!=null&&Object.hasOwnProperty.call(t,"version")&&e.uint32(18).string(t.version),t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(26).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&e.uint32(32).uint32(t.droppedAttributesCount),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.common.v1.InstrumentationScope;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.name=t.string();break}case 2:{u.version=t.string();break}case 3:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 4:{u.droppedAttributesCount=t.uint32();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.name!=null&&t.hasOwnProperty("name")&&!f.isString(t.name))return"name: string expected";if(t.version!=null&&t.hasOwnProperty("version")&&!f.isString(t.version))return"version: string expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(n)return"attributes."+n}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.common.v1.InstrumentationScope)return t;var e=new p.opentelemetry.proto.common.v1.InstrumentationScope;if(t.name!=null&&(e.name=String(t.name)),t.version!=null&&(e.version=String(t.version)),t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}return t.droppedAttributesCount!=null&&(e.droppedAttributesCount=t.droppedAttributesCount>>>0),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),e.defaults&&(n.name="",n.version="",n.droppedAttributesCount=0),t.name!=null&&t.hasOwnProperty("name")&&(n.name=t.name),t.version!=null&&t.hasOwnProperty("version")&&(n.version=t.version),t.attributes&&t.attributes.length){n.attributes=[];for(var u=0;u<t.attributes.length;++u)n.attributes[u]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[u],e)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.InstrumentationScope"},s}(),c}(),o}(),r.resource=function(){var o={};return o.v1=function(){var c={};return c.Resource=function(){function s(a){if(this.attributes=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.attributes=f.emptyArray,s.prototype.droppedAttributesCount=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(10).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&e.uint32(16).uint32(t.droppedAttributesCount),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.resource.v1.Resource;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{u.droppedAttributesCount=t.uint32();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(n)return"attributes."+n}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.resource.v1.Resource)return t;var e=new p.opentelemetry.proto.resource.v1.Resource;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}return t.droppedAttributesCount!=null&&(e.droppedAttributesCount=t.droppedAttributesCount>>>0),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),e.defaults&&(n.droppedAttributesCount=0),t.attributes&&t.attributes.length){n.attributes=[];for(var u=0;u<t.attributes.length;++u)n.attributes[u]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[u],e)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.resource.v1.Resource"},s}(),c}(),o}(),r.trace=function(){var o={};return o.v1=function(){var c={};return c.TracesData=function(){function s(a){if(this.resourceSpans=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.resourceSpans=f.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.resourceSpans!=null&&t.resourceSpans.length)for(var n=0;n<t.resourceSpans.length;++n)p.opentelemetry.proto.trace.v1.ResourceSpans.encode(t.resourceSpans[n],e.uint32(10).fork()).ldelim();return e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.trace.v1.TracesData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.resourceSpans&&u.resourceSpans.length||(u.resourceSpans=[]),u.resourceSpans.push(p.opentelemetry.proto.trace.v1.ResourceSpans.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resourceSpans!=null&&t.hasOwnProperty("resourceSpans")){if(!Array.isArray(t.resourceSpans))return"resourceSpans: array expected";for(var e=0;e<t.resourceSpans.length;++e){var n=p.opentelemetry.proto.trace.v1.ResourceSpans.verify(t.resourceSpans[e]);if(n)return"resourceSpans."+n}}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.TracesData)return t;var e=new p.opentelemetry.proto.trace.v1.TracesData;if(t.resourceSpans){if(!Array.isArray(t.resourceSpans))throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: array expected");e.resourceSpans=[];for(var n=0;n<t.resourceSpans.length;++n){if(typeof t.resourceSpans[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: object expected");e.resourceSpans[n]=p.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(t.resourceSpans[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.resourceSpans=[]),t.resourceSpans&&t.resourceSpans.length){n.resourceSpans=[];for(var u=0;u<t.resourceSpans.length;++u)n.resourceSpans[u]=p.opentelemetry.proto.trace.v1.ResourceSpans.toObject(t.resourceSpans[u],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.TracesData"},s}(),c.ResourceSpans=function(){function s(a){if(this.scopeSpans=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.resource=null,s.prototype.scopeSpans=f.emptyArray,s.prototype.schemaUrl=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.resource!=null&&Object.hasOwnProperty.call(t,"resource")&&p.opentelemetry.proto.resource.v1.Resource.encode(t.resource,e.uint32(10).fork()).ldelim(),t.scopeSpans!=null&&t.scopeSpans.length)for(var n=0;n<t.scopeSpans.length;++n)p.opentelemetry.proto.trace.v1.ScopeSpans.encode(t.scopeSpans[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.trace.v1.ResourceSpans;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{u.scopeSpans&&u.scopeSpans.length||(u.scopeSpans=[]),u.scopeSpans.push(p.opentelemetry.proto.trace.v1.ScopeSpans.decode(t,t.uint32()));break}case 3:{u.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resource!=null&&t.hasOwnProperty("resource")){var e=p.opentelemetry.proto.resource.v1.Resource.verify(t.resource);if(e)return"resource."+e}if(t.scopeSpans!=null&&t.hasOwnProperty("scopeSpans")){if(!Array.isArray(t.scopeSpans))return"scopeSpans: array expected";for(var n=0;n<t.scopeSpans.length;++n){var e=p.opentelemetry.proto.trace.v1.ScopeSpans.verify(t.scopeSpans[n]);if(e)return"scopeSpans."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!f.isString(t.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.ResourceSpans)return t;var e=new p.opentelemetry.proto.trace.v1.ResourceSpans;if(t.resource!=null){if(typeof t.resource!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.resource: object expected");e.resource=p.opentelemetry.proto.resource.v1.Resource.fromObject(t.resource)}if(t.scopeSpans){if(!Array.isArray(t.scopeSpans))throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: array expected");e.scopeSpans=[];for(var n=0;n<t.scopeSpans.length;++n){if(typeof t.scopeSpans[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: object expected");e.scopeSpans[n]=p.opentelemetry.proto.trace.v1.ScopeSpans.fromObject(t.scopeSpans[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.scopeSpans=[]),e.defaults&&(n.resource=null,n.schemaUrl=""),t.resource!=null&&t.hasOwnProperty("resource")&&(n.resource=p.opentelemetry.proto.resource.v1.Resource.toObject(t.resource,e)),t.scopeSpans&&t.scopeSpans.length){n.scopeSpans=[];for(var u=0;u<t.scopeSpans.length;++u)n.scopeSpans[u]=p.opentelemetry.proto.trace.v1.ScopeSpans.toObject(t.scopeSpans[u],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.ResourceSpans"},s}(),c.ScopeSpans=function(){function s(a){if(this.spans=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.scope=null,s.prototype.spans=f.emptyArray,s.prototype.schemaUrl=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.scope!=null&&Object.hasOwnProperty.call(t,"scope")&&p.opentelemetry.proto.common.v1.InstrumentationScope.encode(t.scope,e.uint32(10).fork()).ldelim(),t.spans!=null&&t.spans.length)for(var n=0;n<t.spans.length;++n)p.opentelemetry.proto.trace.v1.Span.encode(t.spans[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.trace.v1.ScopeSpans;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{u.spans&&u.spans.length||(u.spans=[]),u.spans.push(p.opentelemetry.proto.trace.v1.Span.decode(t,t.uint32()));break}case 3:{u.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.scope!=null&&t.hasOwnProperty("scope")){var e=p.opentelemetry.proto.common.v1.InstrumentationScope.verify(t.scope);if(e)return"scope."+e}if(t.spans!=null&&t.hasOwnProperty("spans")){if(!Array.isArray(t.spans))return"spans: array expected";for(var n=0;n<t.spans.length;++n){var e=p.opentelemetry.proto.trace.v1.Span.verify(t.spans[n]);if(e)return"spans."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!f.isString(t.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.ScopeSpans)return t;var e=new p.opentelemetry.proto.trace.v1.ScopeSpans;if(t.scope!=null){if(typeof t.scope!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.scope: object expected");e.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(t.scope)}if(t.spans){if(!Array.isArray(t.spans))throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: array expected");e.spans=[];for(var n=0;n<t.spans.length;++n){if(typeof t.spans[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: object expected");e.spans[n]=p.opentelemetry.proto.trace.v1.Span.fromObject(t.spans[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.spans=[]),e.defaults&&(n.scope=null,n.schemaUrl=""),t.scope!=null&&t.hasOwnProperty("scope")&&(n.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.toObject(t.scope,e)),t.spans&&t.spans.length){n.spans=[];for(var u=0;u<t.spans.length;++u)n.spans[u]=p.opentelemetry.proto.trace.v1.Span.toObject(t.spans[u],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.ScopeSpans"},s}(),c.Span=function(){function s(a){if(this.attributes=[],this.events=[],this.links=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.traceId=null,s.prototype.spanId=null,s.prototype.traceState=null,s.prototype.parentSpanId=null,s.prototype.name=null,s.prototype.kind=null,s.prototype.startTimeUnixNano=null,s.prototype.endTimeUnixNano=null,s.prototype.attributes=f.emptyArray,s.prototype.droppedAttributesCount=null,s.prototype.events=f.emptyArray,s.prototype.droppedEventsCount=null,s.prototype.links=f.emptyArray,s.prototype.droppedLinksCount=null,s.prototype.status=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId")&&e.uint32(10).bytes(t.traceId),t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId")&&e.uint32(18).bytes(t.spanId),t.traceState!=null&&Object.hasOwnProperty.call(t,"traceState")&&e.uint32(26).string(t.traceState),t.parentSpanId!=null&&Object.hasOwnProperty.call(t,"parentSpanId")&&e.uint32(34).bytes(t.parentSpanId),t.name!=null&&Object.hasOwnProperty.call(t,"name")&&e.uint32(42).string(t.name),t.kind!=null&&Object.hasOwnProperty.call(t,"kind")&&e.uint32(48).int32(t.kind),t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&e.uint32(57).fixed64(t.startTimeUnixNano),t.endTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"endTimeUnixNano")&&e.uint32(65).fixed64(t.endTimeUnixNano),t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(74).fork()).ldelim();if(t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&e.uint32(80).uint32(t.droppedAttributesCount),t.events!=null&&t.events.length)for(var n=0;n<t.events.length;++n)p.opentelemetry.proto.trace.v1.Span.Event.encode(t.events[n],e.uint32(90).fork()).ldelim();if(t.droppedEventsCount!=null&&Object.hasOwnProperty.call(t,"droppedEventsCount")&&e.uint32(96).uint32(t.droppedEventsCount),t.links!=null&&t.links.length)for(var n=0;n<t.links.length;++n)p.opentelemetry.proto.trace.v1.Span.Link.encode(t.links[n],e.uint32(106).fork()).ldelim();return t.droppedLinksCount!=null&&Object.hasOwnProperty.call(t,"droppedLinksCount")&&e.uint32(112).uint32(t.droppedLinksCount),t.status!=null&&Object.hasOwnProperty.call(t,"status")&&p.opentelemetry.proto.trace.v1.Status.encode(t.status,e.uint32(122).fork()).ldelim(),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.trace.v1.Span;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.traceId=t.bytes();break}case 2:{u.spanId=t.bytes();break}case 3:{u.traceState=t.string();break}case 4:{u.parentSpanId=t.bytes();break}case 5:{u.name=t.string();break}case 6:{u.kind=t.int32();break}case 7:{u.startTimeUnixNano=t.fixed64();break}case 8:{u.endTimeUnixNano=t.fixed64();break}case 9:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 10:{u.droppedAttributesCount=t.uint32();break}case 11:{u.events&&u.events.length||(u.events=[]),u.events.push(p.opentelemetry.proto.trace.v1.Span.Event.decode(t,t.uint32()));break}case 12:{u.droppedEventsCount=t.uint32();break}case 13:{u.links&&u.links.length||(u.links=[]),u.links.push(p.opentelemetry.proto.trace.v1.Span.Link.decode(t,t.uint32()));break}case 14:{u.droppedLinksCount=t.uint32();break}case 15:{u.status=p.opentelemetry.proto.trace.v1.Status.decode(t,t.uint32());break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.traceId!=null&&t.hasOwnProperty("traceId")&&!(t.traceId&&typeof t.traceId.length=="number"||f.isString(t.traceId)))return"traceId: buffer expected";if(t.spanId!=null&&t.hasOwnProperty("spanId")&&!(t.spanId&&typeof t.spanId.length=="number"||f.isString(t.spanId)))return"spanId: buffer expected";if(t.traceState!=null&&t.hasOwnProperty("traceState")&&!f.isString(t.traceState))return"traceState: string expected";if(t.parentSpanId!=null&&t.hasOwnProperty("parentSpanId")&&!(t.parentSpanId&&typeof t.parentSpanId.length=="number"||f.isString(t.parentSpanId)))return"parentSpanId: buffer expected";if(t.name!=null&&t.hasOwnProperty("name")&&!f.isString(t.name))return"name: string expected";if(t.kind!=null&&t.hasOwnProperty("kind"))switch(t.kind){default:return"kind: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!f.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&f.isInteger(t.startTimeUnixNano.low)&&f.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.endTimeUnixNano!=null&&t.hasOwnProperty("endTimeUnixNano")&&!f.isInteger(t.endTimeUnixNano)&&!(t.endTimeUnixNano&&f.isInteger(t.endTimeUnixNano.low)&&f.isInteger(t.endTimeUnixNano.high)))return"endTimeUnixNano: integer|Long expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(n)return"attributes."+n}}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(t.droppedAttributesCount))return"droppedAttributesCount: integer expected";if(t.events!=null&&t.hasOwnProperty("events")){if(!Array.isArray(t.events))return"events: array expected";for(var e=0;e<t.events.length;++e){var n=p.opentelemetry.proto.trace.v1.Span.Event.verify(t.events[e]);if(n)return"events."+n}}if(t.droppedEventsCount!=null&&t.hasOwnProperty("droppedEventsCount")&&!f.isInteger(t.droppedEventsCount))return"droppedEventsCount: integer expected";if(t.links!=null&&t.hasOwnProperty("links")){if(!Array.isArray(t.links))return"links: array expected";for(var e=0;e<t.links.length;++e){var n=p.opentelemetry.proto.trace.v1.Span.Link.verify(t.links[e]);if(n)return"links."+n}}if(t.droppedLinksCount!=null&&t.hasOwnProperty("droppedLinksCount")&&!f.isInteger(t.droppedLinksCount))return"droppedLinksCount: integer expected";if(t.status!=null&&t.hasOwnProperty("status")){var n=p.opentelemetry.proto.trace.v1.Status.verify(t.status);if(n)return"status."+n}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.Span)return t;var e=new p.opentelemetry.proto.trace.v1.Span;switch(t.traceId!=null&&(typeof t.traceId=="string"?f.base64.decode(t.traceId,e.traceId=f.newBuffer(f.base64.length(t.traceId)),0):t.traceId.length>=0&&(e.traceId=t.traceId)),t.spanId!=null&&(typeof t.spanId=="string"?f.base64.decode(t.spanId,e.spanId=f.newBuffer(f.base64.length(t.spanId)),0):t.spanId.length>=0&&(e.spanId=t.spanId)),t.traceState!=null&&(e.traceState=String(t.traceState)),t.parentSpanId!=null&&(typeof t.parentSpanId=="string"?f.base64.decode(t.parentSpanId,e.parentSpanId=f.newBuffer(f.base64.length(t.parentSpanId)),0):t.parentSpanId.length>=0&&(e.parentSpanId=t.parentSpanId)),t.name!=null&&(e.name=String(t.name)),t.kind){default:if(typeof t.kind=="number"){e.kind=t.kind;break}break;case"SPAN_KIND_UNSPECIFIED":case 0:e.kind=0;break;case"SPAN_KIND_INTERNAL":case 1:e.kind=1;break;case"SPAN_KIND_SERVER":case 2:e.kind=2;break;case"SPAN_KIND_CLIENT":case 3:e.kind=3;break;case"SPAN_KIND_PRODUCER":case 4:e.kind=4;break;case"SPAN_KIND_CONSUMER":case 5:e.kind=5;break}if(t.startTimeUnixNano!=null&&(f.Long?(e.startTimeUnixNano=f.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?e.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?e.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(e.startTimeUnixNano=new f.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.endTimeUnixNano!=null&&(f.Long?(e.endTimeUnixNano=f.Long.fromValue(t.endTimeUnixNano)).unsigned=!1:typeof t.endTimeUnixNano=="string"?e.endTimeUnixNano=parseInt(t.endTimeUnixNano,10):typeof t.endTimeUnixNano=="number"?e.endTimeUnixNano=t.endTimeUnixNano:typeof t.endTimeUnixNano=="object"&&(e.endTimeUnixNano=new f.LongBits(t.endTimeUnixNano.low>>>0,t.endTimeUnixNano.high>>>0).toNumber())),t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}if(t.droppedAttributesCount!=null&&(e.droppedAttributesCount=t.droppedAttributesCount>>>0),t.events){if(!Array.isArray(t.events))throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected");e.events=[];for(var n=0;n<t.events.length;++n){if(typeof t.events[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.events: object expected");e.events[n]=p.opentelemetry.proto.trace.v1.Span.Event.fromObject(t.events[n])}}if(t.droppedEventsCount!=null&&(e.droppedEventsCount=t.droppedEventsCount>>>0),t.links){if(!Array.isArray(t.links))throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected");e.links=[];for(var n=0;n<t.links.length;++n){if(typeof t.links[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.links: object expected");e.links[n]=p.opentelemetry.proto.trace.v1.Span.Link.fromObject(t.links[n])}}if(t.droppedLinksCount!=null&&(e.droppedLinksCount=t.droppedLinksCount>>>0),t.status!=null){if(typeof t.status!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected");e.status=p.opentelemetry.proto.trace.v1.Status.fromObject(t.status)}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[],n.events=[],n.links=[]),e.defaults){if(e.bytes===String?n.traceId="":(n.traceId=[],e.bytes!==Array&&(n.traceId=f.newBuffer(n.traceId))),e.bytes===String?n.spanId="":(n.spanId=[],e.bytes!==Array&&(n.spanId=f.newBuffer(n.spanId))),n.traceState="",e.bytes===String?n.parentSpanId="":(n.parentSpanId=[],e.bytes!==Array&&(n.parentSpanId=f.newBuffer(n.parentSpanId))),n.name="",n.kind=e.enums===String?"SPAN_KIND_UNSPECIFIED":0,f.Long){var u=new f.Long(0,0,!1);n.startTimeUnixNano=e.longs===String?u.toString():e.longs===Number?u.toNumber():u}else n.startTimeUnixNano=e.longs===String?"0":0;if(f.Long){var u=new f.Long(0,0,!1);n.endTimeUnixNano=e.longs===String?u.toString():e.longs===Number?u.toNumber():u}else n.endTimeUnixNano=e.longs===String?"0":0;n.droppedAttributesCount=0,n.droppedEventsCount=0,n.droppedLinksCount=0,n.status=null}if(t.traceId!=null&&t.hasOwnProperty("traceId")&&(n.traceId=e.bytes===String?f.base64.encode(t.traceId,0,t.traceId.length):e.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId),t.spanId!=null&&t.hasOwnProperty("spanId")&&(n.spanId=e.bytes===String?f.base64.encode(t.spanId,0,t.spanId.length):e.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId),t.traceState!=null&&t.hasOwnProperty("traceState")&&(n.traceState=t.traceState),t.parentSpanId!=null&&t.hasOwnProperty("parentSpanId")&&(n.parentSpanId=e.bytes===String?f.base64.encode(t.parentSpanId,0,t.parentSpanId.length):e.bytes===Array?Array.prototype.slice.call(t.parentSpanId):t.parentSpanId),t.name!=null&&t.hasOwnProperty("name")&&(n.name=t.name),t.kind!=null&&t.hasOwnProperty("kind")&&(n.kind=e.enums===String?p.opentelemetry.proto.trace.v1.Span.SpanKind[t.kind]===void 0?t.kind:p.opentelemetry.proto.trace.v1.Span.SpanKind[t.kind]:t.kind),t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?n.startTimeUnixNano=e.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:n.startTimeUnixNano=e.longs===String?f.Long.prototype.toString.call(t.startTimeUnixNano):e.longs===Number?new f.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.endTimeUnixNano!=null&&t.hasOwnProperty("endTimeUnixNano")&&(typeof t.endTimeUnixNano=="number"?n.endTimeUnixNano=e.longs===String?String(t.endTimeUnixNano):t.endTimeUnixNano:n.endTimeUnixNano=e.longs===String?f.Long.prototype.toString.call(t.endTimeUnixNano):e.longs===Number?new f.LongBits(t.endTimeUnixNano.low>>>0,t.endTimeUnixNano.high>>>0).toNumber():t.endTimeUnixNano),t.attributes&&t.attributes.length){n.attributes=[];for(var l=0;l<t.attributes.length;++l)n.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[l],e)}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),t.events&&t.events.length){n.events=[];for(var l=0;l<t.events.length;++l)n.events[l]=p.opentelemetry.proto.trace.v1.Span.Event.toObject(t.events[l],e)}if(t.droppedEventsCount!=null&&t.hasOwnProperty("droppedEventsCount")&&(n.droppedEventsCount=t.droppedEventsCount),t.links&&t.links.length){n.links=[];for(var l=0;l<t.links.length;++l)n.links[l]=p.opentelemetry.proto.trace.v1.Span.Link.toObject(t.links[l],e)}return t.droppedLinksCount!=null&&t.hasOwnProperty("droppedLinksCount")&&(n.droppedLinksCount=t.droppedLinksCount),t.status!=null&&t.hasOwnProperty("status")&&(n.status=p.opentelemetry.proto.trace.v1.Status.toObject(t.status,e)),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Span"},s.SpanKind=function(){var a={},t=Object.create(a);return t[a[0]="SPAN_KIND_UNSPECIFIED"]=0,t[a[1]="SPAN_KIND_INTERNAL"]=1,t[a[2]="SPAN_KIND_SERVER"]=2,t[a[3]="SPAN_KIND_CLIENT"]=3,t[a[4]="SPAN_KIND_PRODUCER"]=4,t[a[5]="SPAN_KIND_CONSUMER"]=5,t}(),s.Event=function(){function a(t){if(this.attributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.timeUnixNano=null,a.prototype.name=null,a.prototype.attributes=f.emptyArray,a.prototype.droppedAttributesCount=null,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=O.create()),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(9).fixed64(e.timeUnixNano),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&n.uint32(18).string(e.name),e.attributes!=null&&e.attributes.length)for(var u=0;u<e.attributes.length;++u)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[u],n.uint32(26).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&n.uint32(32).uint32(e.droppedAttributesCount),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.trace.v1.Span.Event;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.timeUnixNano=e.fixed64();break}case 2:{l.name=e.string();break}case 3:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 4:{l.droppedAttributesCount=e.uint32();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!f.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&f.isInteger(e.timeUnixNano.low)&&f.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.name!=null&&e.hasOwnProperty("name")&&!f.isString(e.name))return"name: string expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var n=0;n<e.attributes.length;++n){var u=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[n]);if(u)return"attributes."+u}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.trace.v1.Span.Event)return e;var n=new p.opentelemetry.proto.trace.v1.Span.Event;if(e.timeUnixNano!=null&&(f.Long?(n.timeUnixNano=f.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.name!=null&&(n.name=String(e.name)),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");n.attributes=[];for(var u=0;u<e.attributes.length;++u){if(typeof e.attributes[u]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected");n.attributes[u]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[u])}}return e.droppedAttributesCount!=null&&(n.droppedAttributesCount=e.droppedAttributesCount>>>0),n},a.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.attributes=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.timeUnixNano=n.longs===String?"0":0;u.name="",u.droppedAttributesCount=0}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?u.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:u.timeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.name!=null&&e.hasOwnProperty("name")&&(u.name=e.name),e.attributes&&e.attributes.length){u.attributes=[];for(var h=0;h<e.attributes.length;++h)u.attributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[h],n)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(u.droppedAttributesCount=e.droppedAttributesCount),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span.Event"},a}(),s.Link=function(){function a(t){if(this.attributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.traceId=null,a.prototype.spanId=null,a.prototype.traceState=null,a.prototype.attributes=f.emptyArray,a.prototype.droppedAttributesCount=null,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=O.create()),e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId")&&n.uint32(10).bytes(e.traceId),e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId")&&n.uint32(18).bytes(e.spanId),e.traceState!=null&&Object.hasOwnProperty.call(e,"traceState")&&n.uint32(26).string(e.traceState),e.attributes!=null&&e.attributes.length)for(var u=0;u<e.attributes.length;++u)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[u],n.uint32(34).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&n.uint32(40).uint32(e.droppedAttributesCount),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.trace.v1.Span.Link;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.traceId=e.bytes();break}case 2:{l.spanId=e.bytes();break}case 3:{l.traceState=e.string();break}case 4:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 5:{l.droppedAttributesCount=e.uint32();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.traceId!=null&&e.hasOwnProperty("traceId")&&!(e.traceId&&typeof e.traceId.length=="number"||f.isString(e.traceId)))return"traceId: buffer expected";if(e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||f.isString(e.spanId)))return"spanId: buffer expected";if(e.traceState!=null&&e.hasOwnProperty("traceState")&&!f.isString(e.traceState))return"traceState: string expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var n=0;n<e.attributes.length;++n){var u=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[n]);if(u)return"attributes."+u}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.trace.v1.Span.Link)return e;var n=new p.opentelemetry.proto.trace.v1.Span.Link;if(e.traceId!=null&&(typeof e.traceId=="string"?f.base64.decode(e.traceId,n.traceId=f.newBuffer(f.base64.length(e.traceId)),0):e.traceId.length>=0&&(n.traceId=e.traceId)),e.spanId!=null&&(typeof e.spanId=="string"?f.base64.decode(e.spanId,n.spanId=f.newBuffer(f.base64.length(e.spanId)),0):e.spanId.length>=0&&(n.spanId=e.spanId)),e.traceState!=null&&(n.traceState=String(e.traceState)),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");n.attributes=[];for(var u=0;u<e.attributes.length;++u){if(typeof e.attributes[u]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected");n.attributes[u]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[u])}}return e.droppedAttributesCount!=null&&(n.droppedAttributesCount=e.droppedAttributesCount>>>0),n},a.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.attributes=[]),n.defaults&&(n.bytes===String?u.traceId="":(u.traceId=[],n.bytes!==Array&&(u.traceId=f.newBuffer(u.traceId))),n.bytes===String?u.spanId="":(u.spanId=[],n.bytes!==Array&&(u.spanId=f.newBuffer(u.spanId))),u.traceState="",u.droppedAttributesCount=0),e.traceId!=null&&e.hasOwnProperty("traceId")&&(u.traceId=n.bytes===String?f.base64.encode(e.traceId,0,e.traceId.length):n.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),e.spanId!=null&&e.hasOwnProperty("spanId")&&(u.spanId=n.bytes===String?f.base64.encode(e.spanId,0,e.spanId.length):n.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),e.traceState!=null&&e.hasOwnProperty("traceState")&&(u.traceState=e.traceState),e.attributes&&e.attributes.length){u.attributes=[];for(var l=0;l<e.attributes.length;++l)u.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[l],n)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(u.droppedAttributesCount=e.droppedAttributesCount),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span.Link"},a}(),s}(),c.Status=function(){function s(a){if(a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.message=null,s.prototype.code=null,s.create=function(t){return new s(t)},s.encode=function(t,e){return e||(e=O.create()),t.message!=null&&Object.hasOwnProperty.call(t,"message")&&e.uint32(18).string(t.message),t.code!=null&&Object.hasOwnProperty.call(t,"code")&&e.uint32(24).int32(t.code),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.trace.v1.Status;t.pos<n;){var l=t.uint32();switch(l>>>3){case 2:{u.message=t.string();break}case 3:{u.code=t.int32();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.message!=null&&t.hasOwnProperty("message")&&!f.isString(t.message))return"message: string expected";if(t.code!=null&&t.hasOwnProperty("code"))switch(t.code){default:return"code: enum value expected";case 0:case 1:case 2:break}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.Status)return t;var e=new p.opentelemetry.proto.trace.v1.Status;switch(t.message!=null&&(e.message=String(t.message)),t.code){default:if(typeof t.code=="number"){e.code=t.code;break}break;case"STATUS_CODE_UNSET":case 0:e.code=0;break;case"STATUS_CODE_OK":case 1:e.code=1;break;case"STATUS_CODE_ERROR":case 2:e.code=2;break}return e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.message="",n.code=e.enums===String?"STATUS_CODE_UNSET":0),t.message!=null&&t.hasOwnProperty("message")&&(n.message=t.message),t.code!=null&&t.hasOwnProperty("code")&&(n.code=e.enums===String?p.opentelemetry.proto.trace.v1.Status.StatusCode[t.code]===void 0?t.code:p.opentelemetry.proto.trace.v1.Status.StatusCode[t.code]:t.code),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Status"},s.StatusCode=function(){var a={},t=Object.create(a);return t[a[0]="STATUS_CODE_UNSET"]=0,t[a[1]="STATUS_CODE_OK"]=1,t[a[2]="STATUS_CODE_ERROR"]=2,t}(),s}(),c}(),o}(),r.collector=function(){var o={};return o.trace=function(){var c={};return c.v1=function(){var s={};return s.TraceService=function(){function a(t,e,n){v.rpc.Service.call(this,t,e,n)}return(a.prototype=Object.create(v.rpc.Service.prototype)).constructor=a,a.create=function(e,n,u){return new this(e,n,u)},Object.defineProperty(a.prototype.export=function t(e,n){return this.rpcCall(t,p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,e,n)},"name",{value:"Export"}),a}(),s.ExportTraceServiceRequest=function(){function a(t){if(this.resourceSpans=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.resourceSpans=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=O.create()),e.resourceSpans!=null&&e.resourceSpans.length)for(var u=0;u<e.resourceSpans.length;++u)p.opentelemetry.proto.trace.v1.ResourceSpans.encode(e.resourceSpans[u],n.uint32(10).fork()).ldelim();return n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.resourceSpans&&l.resourceSpans.length||(l.resourceSpans=[]),l.resourceSpans.push(p.opentelemetry.proto.trace.v1.ResourceSpans.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceSpans!=null&&e.hasOwnProperty("resourceSpans")){if(!Array.isArray(e.resourceSpans))return"resourceSpans: array expected";for(var n=0;n<e.resourceSpans.length;++n){var u=p.opentelemetry.proto.trace.v1.ResourceSpans.verify(e.resourceSpans[n]);if(u)return"resourceSpans."+u}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;if(e.resourceSpans){if(!Array.isArray(e.resourceSpans))throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected");n.resourceSpans=[];for(var u=0;u<e.resourceSpans.length;++u){if(typeof e.resourceSpans[u]!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected");n.resourceSpans[u]=p.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(e.resourceSpans[u])}}return n},a.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.resourceSpans=[]),e.resourceSpans&&e.resourceSpans.length){u.resourceSpans=[];for(var l=0;l<e.resourceSpans.length;++l)u.resourceSpans[l]=p.opentelemetry.proto.trace.v1.ResourceSpans.toObject(e.resourceSpans[l],n)}return u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"},a}(),s.ExportTraceServiceResponse=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.partialSuccess=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=O.create()),e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess")&&p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(e.partialSuccess,n.uint32(10).fork()).ldelim(),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(e,e.uint32());break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(e.partialSuccess)}return n},a.toObject=function(e,n){n||(n={});var u={};return n.defaults&&(u.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(u.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(e.partialSuccess,n)),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},a}(),s.ExportTracePartialSuccess=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.rejectedSpans=null,a.prototype.errorMessage=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=O.create()),e.rejectedSpans!=null&&Object.hasOwnProperty.call(e,"rejectedSpans")&&n.uint32(8).int64(e.rejectedSpans),e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage")&&n.uint32(18).string(e.errorMessage),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.rejectedSpans=e.int64();break}case 2:{l.errorMessage=e.string();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedSpans!=null&&e.hasOwnProperty("rejectedSpans")&&!f.isInteger(e.rejectedSpans)&&!(e.rejectedSpans&&f.isInteger(e.rejectedSpans.low)&&f.isInteger(e.rejectedSpans.high))?"rejectedSpans: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!f.isString(e.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;return e.rejectedSpans!=null&&(f.Long?(n.rejectedSpans=f.Long.fromValue(e.rejectedSpans)).unsigned=!1:typeof e.rejectedSpans=="string"?n.rejectedSpans=parseInt(e.rejectedSpans,10):typeof e.rejectedSpans=="number"?n.rejectedSpans=e.rejectedSpans:typeof e.rejectedSpans=="object"&&(n.rejectedSpans=new f.LongBits(e.rejectedSpans.low>>>0,e.rejectedSpans.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},a.toObject=function(e,n){n||(n={});var u={};if(n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.rejectedSpans=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.rejectedSpans=n.longs===String?"0":0;u.errorMessage=""}return e.rejectedSpans!=null&&e.hasOwnProperty("rejectedSpans")&&(typeof e.rejectedSpans=="number"?u.rejectedSpans=n.longs===String?String(e.rejectedSpans):e.rejectedSpans:u.rejectedSpans=n.longs===String?f.Long.prototype.toString.call(e.rejectedSpans):n.longs===Number?new f.LongBits(e.rejectedSpans.low>>>0,e.rejectedSpans.high>>>0).toNumber():e.rejectedSpans),e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&(u.errorMessage=e.errorMessage),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},a}(),s}(),c}(),o.metrics=function(){var c={};return c.v1=function(){var s={};return s.MetricsService=function(){function a(t,e,n){v.rpc.Service.call(this,t,e,n)}return(a.prototype=Object.create(v.rpc.Service.prototype)).constructor=a,a.create=function(e,n,u){return new this(e,n,u)},Object.defineProperty(a.prototype.export=function t(e,n){return this.rpcCall(t,p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,e,n)},"name",{value:"Export"}),a}(),s.ExportMetricsServiceRequest=function(){function a(t){if(this.resourceMetrics=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.resourceMetrics=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=O.create()),e.resourceMetrics!=null&&e.resourceMetrics.length)for(var u=0;u<e.resourceMetrics.length;++u)p.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(e.resourceMetrics[u],n.uint32(10).fork()).ldelim();return n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.resourceMetrics&&l.resourceMetrics.length||(l.resourceMetrics=[]),l.resourceMetrics.push(p.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceMetrics!=null&&e.hasOwnProperty("resourceMetrics")){if(!Array.isArray(e.resourceMetrics))return"resourceMetrics: array expected";for(var n=0;n<e.resourceMetrics.length;++n){var u=p.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(e.resourceMetrics[n]);if(u)return"resourceMetrics."+u}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;if(e.resourceMetrics){if(!Array.isArray(e.resourceMetrics))throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected");n.resourceMetrics=[];for(var u=0;u<e.resourceMetrics.length;++u){if(typeof e.resourceMetrics[u]!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected");n.resourceMetrics[u]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(e.resourceMetrics[u])}}return n},a.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.resourceMetrics=[]),e.resourceMetrics&&e.resourceMetrics.length){u.resourceMetrics=[];for(var l=0;l<e.resourceMetrics.length;++l)u.resourceMetrics[l]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(e.resourceMetrics[l],n)}return u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"},a}(),s.ExportMetricsServiceResponse=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.partialSuccess=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=O.create()),e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess")&&p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(e.partialSuccess,n.uint32(10).fork()).ldelim(),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(e,e.uint32());break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(e.partialSuccess)}return n},a.toObject=function(e,n){n||(n={});var u={};return n.defaults&&(u.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(u.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(e.partialSuccess,n)),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},a}(),s.ExportMetricsPartialSuccess=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.rejectedDataPoints=null,a.prototype.errorMessage=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=O.create()),e.rejectedDataPoints!=null&&Object.hasOwnProperty.call(e,"rejectedDataPoints")&&n.uint32(8).int64(e.rejectedDataPoints),e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage")&&n.uint32(18).string(e.errorMessage),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.rejectedDataPoints=e.int64();break}case 2:{l.errorMessage=e.string();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedDataPoints!=null&&e.hasOwnProperty("rejectedDataPoints")&&!f.isInteger(e.rejectedDataPoints)&&!(e.rejectedDataPoints&&f.isInteger(e.rejectedDataPoints.low)&&f.isInteger(e.rejectedDataPoints.high))?"rejectedDataPoints: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!f.isString(e.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;return e.rejectedDataPoints!=null&&(f.Long?(n.rejectedDataPoints=f.Long.fromValue(e.rejectedDataPoints)).unsigned=!1:typeof e.rejectedDataPoints=="string"?n.rejectedDataPoints=parseInt(e.rejectedDataPoints,10):typeof e.rejectedDataPoints=="number"?n.rejectedDataPoints=e.rejectedDataPoints:typeof e.rejectedDataPoints=="object"&&(n.rejectedDataPoints=new f.LongBits(e.rejectedDataPoints.low>>>0,e.rejectedDataPoints.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},a.toObject=function(e,n){n||(n={});var u={};if(n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.rejectedDataPoints=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.rejectedDataPoints=n.longs===String?"0":0;u.errorMessage=""}return e.rejectedDataPoints!=null&&e.hasOwnProperty("rejectedDataPoints")&&(typeof e.rejectedDataPoints=="number"?u.rejectedDataPoints=n.longs===String?String(e.rejectedDataPoints):e.rejectedDataPoints:u.rejectedDataPoints=n.longs===String?f.Long.prototype.toString.call(e.rejectedDataPoints):n.longs===Number?new f.LongBits(e.rejectedDataPoints.low>>>0,e.rejectedDataPoints.high>>>0).toNumber():e.rejectedDataPoints),e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&(u.errorMessage=e.errorMessage),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},a}(),s}(),c}(),o.logs=function(){var c={};return c.v1=function(){var s={};return s.LogsService=function(){function a(t,e,n){v.rpc.Service.call(this,t,e,n)}return(a.prototype=Object.create(v.rpc.Service.prototype)).constructor=a,a.create=function(e,n,u){return new this(e,n,u)},Object.defineProperty(a.prototype.export=function t(e,n){return this.rpcCall(t,p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,e,n)},"name",{value:"Export"}),a}(),s.ExportLogsServiceRequest=function(){function a(t){if(this.resourceLogs=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.resourceLogs=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=O.create()),e.resourceLogs!=null&&e.resourceLogs.length)for(var u=0;u<e.resourceLogs.length;++u)p.opentelemetry.proto.logs.v1.ResourceLogs.encode(e.resourceLogs[u],n.uint32(10).fork()).ldelim();return n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.resourceLogs&&l.resourceLogs.length||(l.resourceLogs=[]),l.resourceLogs.push(p.opentelemetry.proto.logs.v1.ResourceLogs.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceLogs!=null&&e.hasOwnProperty("resourceLogs")){if(!Array.isArray(e.resourceLogs))return"resourceLogs: array expected";for(var n=0;n<e.resourceLogs.length;++n){var u=p.opentelemetry.proto.logs.v1.ResourceLogs.verify(e.resourceLogs[n]);if(u)return"resourceLogs."+u}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;if(e.resourceLogs){if(!Array.isArray(e.resourceLogs))throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected");n.resourceLogs=[];for(var u=0;u<e.resourceLogs.length;++u){if(typeof e.resourceLogs[u]!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected");n.resourceLogs[u]=p.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(e.resourceLogs[u])}}return n},a.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.resourceLogs=[]),e.resourceLogs&&e.resourceLogs.length){u.resourceLogs=[];for(var l=0;l<e.resourceLogs.length;++l)u.resourceLogs[l]=p.opentelemetry.proto.logs.v1.ResourceLogs.toObject(e.resourceLogs[l],n)}return u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"},a}(),s.ExportLogsServiceResponse=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.partialSuccess=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=O.create()),e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess")&&p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(e.partialSuccess,n.uint32(10).fork()).ldelim(),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(e,e.uint32());break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(e.partialSuccess)}return n},a.toObject=function(e,n){n||(n={});var u={};return n.defaults&&(u.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(u.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(e.partialSuccess,n)),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},a}(),s.ExportLogsPartialSuccess=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.rejectedLogRecords=null,a.prototype.errorMessage=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=O.create()),e.rejectedLogRecords!=null&&Object.hasOwnProperty.call(e,"rejectedLogRecords")&&n.uint32(8).int64(e.rejectedLogRecords),e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage")&&n.uint32(18).string(e.errorMessage),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.rejectedLogRecords=e.int64();break}case 2:{l.errorMessage=e.string();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedLogRecords!=null&&e.hasOwnProperty("rejectedLogRecords")&&!f.isInteger(e.rejectedLogRecords)&&!(e.rejectedLogRecords&&f.isInteger(e.rejectedLogRecords.low)&&f.isInteger(e.rejectedLogRecords.high))?"rejectedLogRecords: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!f.isString(e.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;return e.rejectedLogRecords!=null&&(f.Long?(n.rejectedLogRecords=f.Long.fromValue(e.rejectedLogRecords)).unsigned=!1:typeof e.rejectedLogRecords=="string"?n.rejectedLogRecords=parseInt(e.rejectedLogRecords,10):typeof e.rejectedLogRecords=="number"?n.rejectedLogRecords=e.rejectedLogRecords:typeof e.rejectedLogRecords=="object"&&(n.rejectedLogRecords=new f.LongBits(e.rejectedLogRecords.low>>>0,e.rejectedLogRecords.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},a.toObject=function(e,n){n||(n={});var u={};if(n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.rejectedLogRecords=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.rejectedLogRecords=n.longs===String?"0":0;u.errorMessage=""}return e.rejectedLogRecords!=null&&e.hasOwnProperty("rejectedLogRecords")&&(typeof e.rejectedLogRecords=="number"?u.rejectedLogRecords=n.longs===String?String(e.rejectedLogRecords):e.rejectedLogRecords:u.rejectedLogRecords=n.longs===String?f.Long.prototype.toString.call(e.rejectedLogRecords):n.longs===Number?new f.LongBits(e.rejectedLogRecords.low>>>0,e.rejectedLogRecords.high>>>0).toNumber():e.rejectedLogRecords),e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&(u.errorMessage=e.errorMessage),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},a}(),s}(),c}(),o}(),r.metrics=function(){var o={};return o.v1=function(){var c={};return c.MetricsData=function(){function s(a){if(this.resourceMetrics=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.resourceMetrics=f.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.resourceMetrics!=null&&t.resourceMetrics.length)for(var n=0;n<t.resourceMetrics.length;++n)p.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(t.resourceMetrics[n],e.uint32(10).fork()).ldelim();return e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.MetricsData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.resourceMetrics&&u.resourceMetrics.length||(u.resourceMetrics=[]),u.resourceMetrics.push(p.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resourceMetrics!=null&&t.hasOwnProperty("resourceMetrics")){if(!Array.isArray(t.resourceMetrics))return"resourceMetrics: array expected";for(var e=0;e<t.resourceMetrics.length;++e){var n=p.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(t.resourceMetrics[e]);if(n)return"resourceMetrics."+n}}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.MetricsData)return t;var e=new p.opentelemetry.proto.metrics.v1.MetricsData;if(t.resourceMetrics){if(!Array.isArray(t.resourceMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: array expected");e.resourceMetrics=[];for(var n=0;n<t.resourceMetrics.length;++n){if(typeof t.resourceMetrics[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: object expected");e.resourceMetrics[n]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(t.resourceMetrics[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.resourceMetrics=[]),t.resourceMetrics&&t.resourceMetrics.length){n.resourceMetrics=[];for(var u=0;u<t.resourceMetrics.length;++u)n.resourceMetrics[u]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(t.resourceMetrics[u],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.MetricsData"},s}(),c.ResourceMetrics=function(){function s(a){if(this.scopeMetrics=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.resource=null,s.prototype.scopeMetrics=f.emptyArray,s.prototype.schemaUrl=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.resource!=null&&Object.hasOwnProperty.call(t,"resource")&&p.opentelemetry.proto.resource.v1.Resource.encode(t.resource,e.uint32(10).fork()).ldelim(),t.scopeMetrics!=null&&t.scopeMetrics.length)for(var n=0;n<t.scopeMetrics.length;++n)p.opentelemetry.proto.metrics.v1.ScopeMetrics.encode(t.scopeMetrics[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.ResourceMetrics;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{u.scopeMetrics&&u.scopeMetrics.length||(u.scopeMetrics=[]),u.scopeMetrics.push(p.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(t,t.uint32()));break}case 3:{u.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resource!=null&&t.hasOwnProperty("resource")){var e=p.opentelemetry.proto.resource.v1.Resource.verify(t.resource);if(e)return"resource."+e}if(t.scopeMetrics!=null&&t.hasOwnProperty("scopeMetrics")){if(!Array.isArray(t.scopeMetrics))return"scopeMetrics: array expected";for(var n=0;n<t.scopeMetrics.length;++n){var e=p.opentelemetry.proto.metrics.v1.ScopeMetrics.verify(t.scopeMetrics[n]);if(e)return"scopeMetrics."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!f.isString(t.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.ResourceMetrics)return t;var e=new p.opentelemetry.proto.metrics.v1.ResourceMetrics;if(t.resource!=null){if(typeof t.resource!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.resource: object expected");e.resource=p.opentelemetry.proto.resource.v1.Resource.fromObject(t.resource)}if(t.scopeMetrics){if(!Array.isArray(t.scopeMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: array expected");e.scopeMetrics=[];for(var n=0;n<t.scopeMetrics.length;++n){if(typeof t.scopeMetrics[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: object expected");e.scopeMetrics[n]=p.opentelemetry.proto.metrics.v1.ScopeMetrics.fromObject(t.scopeMetrics[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.scopeMetrics=[]),e.defaults&&(n.resource=null,n.schemaUrl=""),t.resource!=null&&t.hasOwnProperty("resource")&&(n.resource=p.opentelemetry.proto.resource.v1.Resource.toObject(t.resource,e)),t.scopeMetrics&&t.scopeMetrics.length){n.scopeMetrics=[];for(var u=0;u<t.scopeMetrics.length;++u)n.scopeMetrics[u]=p.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(t.scopeMetrics[u],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ResourceMetrics"},s}(),c.ScopeMetrics=function(){function s(a){if(this.metrics=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.scope=null,s.prototype.metrics=f.emptyArray,s.prototype.schemaUrl=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.scope!=null&&Object.hasOwnProperty.call(t,"scope")&&p.opentelemetry.proto.common.v1.InstrumentationScope.encode(t.scope,e.uint32(10).fork()).ldelim(),t.metrics!=null&&t.metrics.length)for(var n=0;n<t.metrics.length;++n)p.opentelemetry.proto.metrics.v1.Metric.encode(t.metrics[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.ScopeMetrics;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{u.metrics&&u.metrics.length||(u.metrics=[]),u.metrics.push(p.opentelemetry.proto.metrics.v1.Metric.decode(t,t.uint32()));break}case 3:{u.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.scope!=null&&t.hasOwnProperty("scope")){var e=p.opentelemetry.proto.common.v1.InstrumentationScope.verify(t.scope);if(e)return"scope."+e}if(t.metrics!=null&&t.hasOwnProperty("metrics")){if(!Array.isArray(t.metrics))return"metrics: array expected";for(var n=0;n<t.metrics.length;++n){var e=p.opentelemetry.proto.metrics.v1.Metric.verify(t.metrics[n]);if(e)return"metrics."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!f.isString(t.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.ScopeMetrics)return t;var e=new p.opentelemetry.proto.metrics.v1.ScopeMetrics;if(t.scope!=null){if(typeof t.scope!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.scope: object expected");e.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(t.scope)}if(t.metrics){if(!Array.isArray(t.metrics))throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: array expected");e.metrics=[];for(var n=0;n<t.metrics.length;++n){if(typeof t.metrics[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: object expected");e.metrics[n]=p.opentelemetry.proto.metrics.v1.Metric.fromObject(t.metrics[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.metrics=[]),e.defaults&&(n.scope=null,n.schemaUrl=""),t.scope!=null&&t.hasOwnProperty("scope")&&(n.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.toObject(t.scope,e)),t.metrics&&t.metrics.length){n.metrics=[];for(var u=0;u<t.metrics.length;++u)n.metrics[u]=p.opentelemetry.proto.metrics.v1.Metric.toObject(t.metrics[u],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ScopeMetrics"},s}(),c.Metric=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}s.prototype.name=null,s.prototype.description=null,s.prototype.unit=null,s.prototype.gauge=null,s.prototype.sum=null,s.prototype.histogram=null,s.prototype.exponentialHistogram=null,s.prototype.summary=null;var a;return Object.defineProperty(s.prototype,"data",{get:f.oneOfGetter(a=["gauge","sum","histogram","exponentialHistogram","summary"]),set:f.oneOfSetter(a)}),s.create=function(e){return new s(e)},s.encode=function(e,n){return n||(n=O.create()),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&n.uint32(10).string(e.name),e.description!=null&&Object.hasOwnProperty.call(e,"description")&&n.uint32(18).string(e.description),e.unit!=null&&Object.hasOwnProperty.call(e,"unit")&&n.uint32(26).string(e.unit),e.gauge!=null&&Object.hasOwnProperty.call(e,"gauge")&&p.opentelemetry.proto.metrics.v1.Gauge.encode(e.gauge,n.uint32(42).fork()).ldelim(),e.sum!=null&&Object.hasOwnProperty.call(e,"sum")&&p.opentelemetry.proto.metrics.v1.Sum.encode(e.sum,n.uint32(58).fork()).ldelim(),e.histogram!=null&&Object.hasOwnProperty.call(e,"histogram")&&p.opentelemetry.proto.metrics.v1.Histogram.encode(e.histogram,n.uint32(74).fork()).ldelim(),e.exponentialHistogram!=null&&Object.hasOwnProperty.call(e,"exponentialHistogram")&&p.opentelemetry.proto.metrics.v1.ExponentialHistogram.encode(e.exponentialHistogram,n.uint32(82).fork()).ldelim(),e.summary!=null&&Object.hasOwnProperty.call(e,"summary")&&p.opentelemetry.proto.metrics.v1.Summary.encode(e.summary,n.uint32(90).fork()).ldelim(),n},s.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},s.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.Metric;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.name=e.string();break}case 2:{l.description=e.string();break}case 3:{l.unit=e.string();break}case 5:{l.gauge=p.opentelemetry.proto.metrics.v1.Gauge.decode(e,e.uint32());break}case 7:{l.sum=p.opentelemetry.proto.metrics.v1.Sum.decode(e,e.uint32());break}case 9:{l.histogram=p.opentelemetry.proto.metrics.v1.Histogram.decode(e,e.uint32());break}case 10:{l.exponentialHistogram=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(e,e.uint32());break}case 11:{l.summary=p.opentelemetry.proto.metrics.v1.Summary.decode(e,e.uint32());break}default:e.skipType(h&7);break}}return l},s.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.name!=null&&e.hasOwnProperty("name")&&!f.isString(e.name))return"name: string expected";if(e.description!=null&&e.hasOwnProperty("description")&&!f.isString(e.description))return"description: string expected";if(e.unit!=null&&e.hasOwnProperty("unit")&&!f.isString(e.unit))return"unit: string expected";if(e.gauge!=null&&e.hasOwnProperty("gauge")){n.data=1;{var u=p.opentelemetry.proto.metrics.v1.Gauge.verify(e.gauge);if(u)return"gauge."+u}}if(e.sum!=null&&e.hasOwnProperty("sum")){if(n.data===1)return"data: multiple values";n.data=1;{var u=p.opentelemetry.proto.metrics.v1.Sum.verify(e.sum);if(u)return"sum."+u}}if(e.histogram!=null&&e.hasOwnProperty("histogram")){if(n.data===1)return"data: multiple values";n.data=1;{var u=p.opentelemetry.proto.metrics.v1.Histogram.verify(e.histogram);if(u)return"histogram."+u}}if(e.exponentialHistogram!=null&&e.hasOwnProperty("exponentialHistogram")){if(n.data===1)return"data: multiple values";n.data=1;{var u=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(e.exponentialHistogram);if(u)return"exponentialHistogram."+u}}if(e.summary!=null&&e.hasOwnProperty("summary")){if(n.data===1)return"data: multiple values";n.data=1;{var u=p.opentelemetry.proto.metrics.v1.Summary.verify(e.summary);if(u)return"summary."+u}}return null},s.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.Metric)return e;var n=new p.opentelemetry.proto.metrics.v1.Metric;if(e.name!=null&&(n.name=String(e.name)),e.description!=null&&(n.description=String(e.description)),e.unit!=null&&(n.unit=String(e.unit)),e.gauge!=null){if(typeof e.gauge!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected");n.gauge=p.opentelemetry.proto.metrics.v1.Gauge.fromObject(e.gauge)}if(e.sum!=null){if(typeof e.sum!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.sum: object expected");n.sum=p.opentelemetry.proto.metrics.v1.Sum.fromObject(e.sum)}if(e.histogram!=null){if(typeof e.histogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.histogram: object expected");n.histogram=p.opentelemetry.proto.metrics.v1.Histogram.fromObject(e.histogram)}if(e.exponentialHistogram!=null){if(typeof e.exponentialHistogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected");n.exponentialHistogram=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(e.exponentialHistogram)}if(e.summary!=null){if(typeof e.summary!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.summary: object expected");n.summary=p.opentelemetry.proto.metrics.v1.Summary.fromObject(e.summary)}return n},s.toObject=function(e,n){n||(n={});var u={};return n.defaults&&(u.name="",u.description="",u.unit=""),e.name!=null&&e.hasOwnProperty("name")&&(u.name=e.name),e.description!=null&&e.hasOwnProperty("description")&&(u.description=e.description),e.unit!=null&&e.hasOwnProperty("unit")&&(u.unit=e.unit),e.gauge!=null&&e.hasOwnProperty("gauge")&&(u.gauge=p.opentelemetry.proto.metrics.v1.Gauge.toObject(e.gauge,n),n.oneofs&&(u.data="gauge")),e.sum!=null&&e.hasOwnProperty("sum")&&(u.sum=p.opentelemetry.proto.metrics.v1.Sum.toObject(e.sum,n),n.oneofs&&(u.data="sum")),e.histogram!=null&&e.hasOwnProperty("histogram")&&(u.histogram=p.opentelemetry.proto.metrics.v1.Histogram.toObject(e.histogram,n),n.oneofs&&(u.data="histogram")),e.exponentialHistogram!=null&&e.hasOwnProperty("exponentialHistogram")&&(u.exponentialHistogram=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(e.exponentialHistogram,n),n.oneofs&&(u.data="exponentialHistogram")),e.summary!=null&&e.hasOwnProperty("summary")&&(u.summary=p.opentelemetry.proto.metrics.v1.Summary.toObject(e.summary,n),n.oneofs&&(u.data="summary")),u},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Metric"},s}(),c.Gauge=function(){function s(a){if(this.dataPoints=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.dataPoints=f.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.Gauge;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.dataPoints&&u.dataPoints.length||(u.dataPoints=[]),u.dataPoints.push(p.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.Gauge)return t;var e=new p.opentelemetry.proto.metrics.v1.Gauge;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(t.dataPoints[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var u=0;u<t.dataPoints.length;++u)n.dataPoints[u]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(t.dataPoints[u],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Gauge"},s}(),c.Sum=function(){function s(a){if(this.dataPoints=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.dataPoints=f.emptyArray,s.prototype.aggregationTemporality=null,s.prototype.isMonotonic=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return t.aggregationTemporality!=null&&Object.hasOwnProperty.call(t,"aggregationTemporality")&&e.uint32(16).int32(t.aggregationTemporality),t.isMonotonic!=null&&Object.hasOwnProperty.call(t,"isMonotonic")&&e.uint32(24).bool(t.isMonotonic),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.Sum;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.dataPoints&&u.dataPoints.length||(u.dataPoints=[]),u.dataPoints.push(p.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(t,t.uint32()));break}case 2:{u.aggregationTemporality=t.int32();break}case 3:{u.isMonotonic=t.bool();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))switch(t.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return t.isMonotonic!=null&&t.hasOwnProperty("isMonotonic")&&typeof t.isMonotonic!="boolean"?"isMonotonic: boolean expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.Sum)return t;var e=new p.opentelemetry.proto.metrics.v1.Sum;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(t.dataPoints[n])}}switch(t.aggregationTemporality){default:if(typeof t.aggregationTemporality=="number"){e.aggregationTemporality=t.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:e.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:e.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:e.aggregationTemporality=2;break}return t.isMonotonic!=null&&(e.isMonotonic=!!t.isMonotonic),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),e.defaults&&(n.aggregationTemporality=e.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0,n.isMonotonic=!1),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var u=0;u<t.dataPoints.length;++u)n.dataPoints[u]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(t.dataPoints[u],e)}return t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality")&&(n.aggregationTemporality=e.enums===String?p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]===void 0?t.aggregationTemporality:p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]:t.aggregationTemporality),t.isMonotonic!=null&&t.hasOwnProperty("isMonotonic")&&(n.isMonotonic=t.isMonotonic),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Sum"},s}(),c.Histogram=function(){function s(a){if(this.dataPoints=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.dataPoints=f.emptyArray,s.prototype.aggregationTemporality=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.HistogramDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return t.aggregationTemporality!=null&&Object.hasOwnProperty.call(t,"aggregationTemporality")&&e.uint32(16).int32(t.aggregationTemporality),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.Histogram;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.dataPoints&&u.dataPoints.length||(u.dataPoints=[]),u.dataPoints.push(p.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(t,t.uint32()));break}case 2:{u.aggregationTemporality=t.int32();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.HistogramDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))switch(t.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.Histogram)return t;var e=new p.opentelemetry.proto.metrics.v1.Histogram;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.HistogramDataPoint.fromObject(t.dataPoints[n])}}switch(t.aggregationTemporality){default:if(typeof t.aggregationTemporality=="number"){e.aggregationTemporality=t.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:e.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:e.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:e.aggregationTemporality=2;break}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),e.defaults&&(n.aggregationTemporality=e.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var u=0;u<t.dataPoints.length;++u)n.dataPoints[u]=p.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(t.dataPoints[u],e)}return t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality")&&(n.aggregationTemporality=e.enums===String?p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]===void 0?t.aggregationTemporality:p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]:t.aggregationTemporality),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Histogram"},s}(),c.ExponentialHistogram=function(){function s(a){if(this.dataPoints=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.dataPoints=f.emptyArray,s.prototype.aggregationTemporality=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return t.aggregationTemporality!=null&&Object.hasOwnProperty.call(t,"aggregationTemporality")&&e.uint32(16).int32(t.aggregationTemporality),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.ExponentialHistogram;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.dataPoints&&u.dataPoints.length||(u.dataPoints=[]),u.dataPoints.push(p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(t,t.uint32()));break}case 2:{u.aggregationTemporality=t.int32();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))switch(t.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.ExponentialHistogram)return t;var e=new p.opentelemetry.proto.metrics.v1.ExponentialHistogram;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.fromObject(t.dataPoints[n])}}switch(t.aggregationTemporality){default:if(typeof t.aggregationTemporality=="number"){e.aggregationTemporality=t.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:e.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:e.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:e.aggregationTemporality=2;break}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),e.defaults&&(n.aggregationTemporality=e.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var u=0;u<t.dataPoints.length;++u)n.dataPoints[u]=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(t.dataPoints[u],e)}return t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality")&&(n.aggregationTemporality=e.enums===String?p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]===void 0?t.aggregationTemporality:p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]:t.aggregationTemporality),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ExponentialHistogram"},s}(),c.Summary=function(){function s(a){if(this.dataPoints=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.dataPoints=f.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.SummaryDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.Summary;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.dataPoints&&u.dataPoints.length||(u.dataPoints=[]),u.dataPoints.push(p.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.Summary)return t;var e=new p.opentelemetry.proto.metrics.v1.Summary;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.fromObject(t.dataPoints[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var u=0;u<t.dataPoints.length;++u)n.dataPoints[u]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(t.dataPoints[u],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Summary"},s}(),c.AggregationTemporality=function(){var s={},a=Object.create(s);return a[s[0]="AGGREGATION_TEMPORALITY_UNSPECIFIED"]=0,a[s[1]="AGGREGATION_TEMPORALITY_DELTA"]=1,a[s[2]="AGGREGATION_TEMPORALITY_CUMULATIVE"]=2,a}(),c.DataPointFlags=function(){var s={},a=Object.create(s);return a[s[0]="DATA_POINT_FLAGS_DO_NOT_USE"]=0,a[s[1]="DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"]=1,a}(),c.NumberDataPoint=function(){function s(t){if(this.attributes=[],this.exemplars=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}s.prototype.attributes=f.emptyArray,s.prototype.startTimeUnixNano=null,s.prototype.timeUnixNano=null,s.prototype.asDouble=null,s.prototype.asInt=null,s.prototype.exemplars=f.emptyArray,s.prototype.flags=null;var a;return Object.defineProperty(s.prototype,"value",{get:f.oneOfGetter(a=["asDouble","asInt"]),set:f.oneOfSetter(a)}),s.create=function(e){return new s(e)},s.encode=function(e,n){if(n||(n=O.create()),e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&n.uint32(17).fixed64(e.startTimeUnixNano),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(25).fixed64(e.timeUnixNano),e.asDouble!=null&&Object.hasOwnProperty.call(e,"asDouble")&&n.uint32(33).double(e.asDouble),e.exemplars!=null&&e.exemplars.length)for(var u=0;u<e.exemplars.length;++u)p.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[u],n.uint32(42).fork()).ldelim();if(e.asInt!=null&&Object.hasOwnProperty.call(e,"asInt")&&n.uint32(49).sfixed64(e.asInt),e.attributes!=null&&e.attributes.length)for(var u=0;u<e.attributes.length;++u)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[u],n.uint32(58).fork()).ldelim();return e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&n.uint32(64).uint32(e.flags),n},s.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},s.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.NumberDataPoint;e.pos<u;){var h=e.uint32();switch(h>>>3){case 7:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.startTimeUnixNano=e.fixed64();break}case 3:{l.timeUnixNano=e.fixed64();break}case 4:{l.asDouble=e.double();break}case 6:{l.asInt=e.sfixed64();break}case 5:{l.exemplars&&l.exemplars.length||(l.exemplars=[]),l.exemplars.push(p.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 8:{l.flags=e.uint32();break}default:e.skipType(h&7);break}}return l},s.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var u=0;u<e.attributes.length;++u){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[u]);if(l)return"attributes."+l}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!f.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&f.isInteger(e.startTimeUnixNano.low)&&f.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!f.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&f.isInteger(e.timeUnixNano.low)&&f.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.asDouble!=null&&e.hasOwnProperty("asDouble")&&(n.value=1,typeof e.asDouble!="number"))return"asDouble: number expected";if(e.asInt!=null&&e.hasOwnProperty("asInt")){if(n.value===1)return"value: multiple values";if(n.value=1,!f.isInteger(e.asInt)&&!(e.asInt&&f.isInteger(e.asInt.low)&&f.isInteger(e.asInt.high)))return"asInt: integer|Long expected"}if(e.exemplars!=null&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(var u=0;u<e.exemplars.length;++u){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[u]);if(l)return"exemplars."+l}}return e.flags!=null&&e.hasOwnProperty("flags")&&!f.isInteger(e.flags)?"flags: integer expected":null},s.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.NumberDataPoint)return e;var n=new p.opentelemetry.proto.metrics.v1.NumberDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: array expected");n.attributes=[];for(var u=0;u<e.attributes.length;++u){if(typeof e.attributes[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected");n.attributes[u]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[u])}}if(e.startTimeUnixNano!=null&&(f.Long?(n.startTimeUnixNano=f.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?n.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?n.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(n.startTimeUnixNano=new f.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.timeUnixNano!=null&&(f.Long?(n.timeUnixNano=f.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.asDouble!=null&&(n.asDouble=Number(e.asDouble)),e.asInt!=null&&(f.Long?(n.asInt=f.Long.fromValue(e.asInt)).unsigned=!1:typeof e.asInt=="string"?n.asInt=parseInt(e.asInt,10):typeof e.asInt=="number"?n.asInt=e.asInt:typeof e.asInt=="object"&&(n.asInt=new f.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber())),e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected");n.exemplars=[];for(var u=0;u<e.exemplars.length;++u){if(typeof e.exemplars[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected");n.exemplars[u]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[u])}}return e.flags!=null&&(n.flags=e.flags>>>0),n},s.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.exemplars=[],u.attributes=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.startTimeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.startTimeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);u.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.timeUnixNano=n.longs===String?"0":0;u.flags=0}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?u.startTimeUnixNano=n.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:u.startTimeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.startTimeUnixNano):n.longs===Number?new f.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?u.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:u.timeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.asDouble!=null&&e.hasOwnProperty("asDouble")&&(u.asDouble=n.json&&!isFinite(e.asDouble)?String(e.asDouble):e.asDouble,n.oneofs&&(u.value="asDouble")),e.exemplars&&e.exemplars.length){u.exemplars=[];for(var h=0;h<e.exemplars.length;++h)u.exemplars[h]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[h],n)}if(e.asInt!=null&&e.hasOwnProperty("asInt")&&(typeof e.asInt=="number"?u.asInt=n.longs===String?String(e.asInt):e.asInt:u.asInt=n.longs===String?f.Long.prototype.toString.call(e.asInt):n.longs===Number?new f.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber():e.asInt,n.oneofs&&(u.value="asInt")),e.attributes&&e.attributes.length){u.attributes=[];for(var h=0;h<e.attributes.length;++h)u.attributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[h],n)}return e.flags!=null&&e.hasOwnProperty("flags")&&(u.flags=e.flags),u},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.NumberDataPoint"},s}(),c.HistogramDataPoint=function(){function s(t){if(this.attributes=[],this.bucketCounts=[],this.explicitBounds=[],this.exemplars=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}s.prototype.attributes=f.emptyArray,s.prototype.startTimeUnixNano=null,s.prototype.timeUnixNano=null,s.prototype.count=null,s.prototype.sum=null,s.prototype.bucketCounts=f.emptyArray,s.prototype.explicitBounds=f.emptyArray,s.prototype.exemplars=f.emptyArray,s.prototype.flags=null,s.prototype.min=null,s.prototype.max=null;var a;return Object.defineProperty(s.prototype,"_sum",{get:f.oneOfGetter(a=["sum"]),set:f.oneOfSetter(a)}),Object.defineProperty(s.prototype,"_min",{get:f.oneOfGetter(a=["min"]),set:f.oneOfSetter(a)}),Object.defineProperty(s.prototype,"_max",{get:f.oneOfGetter(a=["max"]),set:f.oneOfSetter(a)}),s.create=function(e){return new s(e)},s.encode=function(e,n){if(n||(n=O.create()),e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&n.uint32(17).fixed64(e.startTimeUnixNano),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(25).fixed64(e.timeUnixNano),e.count!=null&&Object.hasOwnProperty.call(e,"count")&&n.uint32(33).fixed64(e.count),e.sum!=null&&Object.hasOwnProperty.call(e,"sum")&&n.uint32(41).double(e.sum),e.bucketCounts!=null&&e.bucketCounts.length){n.uint32(50).fork();for(var u=0;u<e.bucketCounts.length;++u)n.fixed64(e.bucketCounts[u]);n.ldelim()}if(e.explicitBounds!=null&&e.explicitBounds.length){n.uint32(58).fork();for(var u=0;u<e.explicitBounds.length;++u)n.double(e.explicitBounds[u]);n.ldelim()}if(e.exemplars!=null&&e.exemplars.length)for(var u=0;u<e.exemplars.length;++u)p.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[u],n.uint32(66).fork()).ldelim();if(e.attributes!=null&&e.attributes.length)for(var u=0;u<e.attributes.length;++u)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[u],n.uint32(74).fork()).ldelim();return e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&n.uint32(80).uint32(e.flags),e.min!=null&&Object.hasOwnProperty.call(e,"min")&&n.uint32(89).double(e.min),e.max!=null&&Object.hasOwnProperty.call(e,"max")&&n.uint32(97).double(e.max),n},s.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},s.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.HistogramDataPoint;e.pos<u;){var h=e.uint32();switch(h>>>3){case 9:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.startTimeUnixNano=e.fixed64();break}case 3:{l.timeUnixNano=e.fixed64();break}case 4:{l.count=e.fixed64();break}case 5:{l.sum=e.double();break}case 6:{if(l.bucketCounts&&l.bucketCounts.length||(l.bucketCounts=[]),(h&7)===2)for(var T=e.uint32()+e.pos;e.pos<T;)l.bucketCounts.push(e.fixed64());else l.bucketCounts.push(e.fixed64());break}case 7:{if(l.explicitBounds&&l.explicitBounds.length||(l.explicitBounds=[]),(h&7)===2)for(var T=e.uint32()+e.pos;e.pos<T;)l.explicitBounds.push(e.double());else l.explicitBounds.push(e.double());break}case 8:{l.exemplars&&l.exemplars.length||(l.exemplars=[]),l.exemplars.push(p.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 10:{l.flags=e.uint32();break}case 11:{l.min=e.double();break}case 12:{l.max=e.double();break}default:e.skipType(h&7);break}}return l},s.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var u=0;u<e.attributes.length;++u){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[u]);if(l)return"attributes."+l}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!f.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&f.isInteger(e.startTimeUnixNano.low)&&f.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!f.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&f.isInteger(e.timeUnixNano.low)&&f.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.count!=null&&e.hasOwnProperty("count")&&!f.isInteger(e.count)&&!(e.count&&f.isInteger(e.count.low)&&f.isInteger(e.count.high)))return"count: integer|Long expected";if(e.sum!=null&&e.hasOwnProperty("sum")&&(n._sum=1,typeof e.sum!="number"))return"sum: number expected";if(e.bucketCounts!=null&&e.hasOwnProperty("bucketCounts")){if(!Array.isArray(e.bucketCounts))return"bucketCounts: array expected";for(var u=0;u<e.bucketCounts.length;++u)if(!f.isInteger(e.bucketCounts[u])&&!(e.bucketCounts[u]&&f.isInteger(e.bucketCounts[u].low)&&f.isInteger(e.bucketCounts[u].high)))return"bucketCounts: integer|Long[] expected"}if(e.explicitBounds!=null&&e.hasOwnProperty("explicitBounds")){if(!Array.isArray(e.explicitBounds))return"explicitBounds: array expected";for(var u=0;u<e.explicitBounds.length;++u)if(typeof e.explicitBounds[u]!="number")return"explicitBounds: number[] expected"}if(e.exemplars!=null&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(var u=0;u<e.exemplars.length;++u){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[u]);if(l)return"exemplars."+l}}return e.flags!=null&&e.hasOwnProperty("flags")&&!f.isInteger(e.flags)?"flags: integer expected":e.min!=null&&e.hasOwnProperty("min")&&(n._min=1,typeof e.min!="number")?"min: number expected":e.max!=null&&e.hasOwnProperty("max")&&(n._max=1,typeof e.max!="number")?"max: number expected":null},s.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.HistogramDataPoint)return e;var n=new p.opentelemetry.proto.metrics.v1.HistogramDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: array expected");n.attributes=[];for(var u=0;u<e.attributes.length;++u){if(typeof e.attributes[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected");n.attributes[u]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[u])}}if(e.startTimeUnixNano!=null&&(f.Long?(n.startTimeUnixNano=f.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?n.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?n.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(n.startTimeUnixNano=new f.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.timeUnixNano!=null&&(f.Long?(n.timeUnixNano=f.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.count!=null&&(f.Long?(n.count=f.Long.fromValue(e.count)).unsigned=!1:typeof e.count=="string"?n.count=parseInt(e.count,10):typeof e.count=="number"?n.count=e.count:typeof e.count=="object"&&(n.count=new f.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber())),e.sum!=null&&(n.sum=Number(e.sum)),e.bucketCounts){if(!Array.isArray(e.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected");n.bucketCounts=[];for(var u=0;u<e.bucketCounts.length;++u)f.Long?(n.bucketCounts[u]=f.Long.fromValue(e.bucketCounts[u])).unsigned=!1:typeof e.bucketCounts[u]=="string"?n.bucketCounts[u]=parseInt(e.bucketCounts[u],10):typeof e.bucketCounts[u]=="number"?n.bucketCounts[u]=e.bucketCounts[u]:typeof e.bucketCounts[u]=="object"&&(n.bucketCounts[u]=new f.LongBits(e.bucketCounts[u].low>>>0,e.bucketCounts[u].high>>>0).toNumber())}if(e.explicitBounds){if(!Array.isArray(e.explicitBounds))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected");n.explicitBounds=[];for(var u=0;u<e.explicitBounds.length;++u)n.explicitBounds[u]=Number(e.explicitBounds[u])}if(e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected");n.exemplars=[];for(var u=0;u<e.exemplars.length;++u){if(typeof e.exemplars[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected");n.exemplars[u]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[u])}}return e.flags!=null&&(n.flags=e.flags>>>0),e.min!=null&&(n.min=Number(e.min)),e.max!=null&&(n.max=Number(e.max)),n},s.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.bucketCounts=[],u.explicitBounds=[],u.exemplars=[],u.attributes=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.startTimeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.startTimeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);u.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.timeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);u.count=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.count=n.longs===String?"0":0;u.flags=0}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?u.startTimeUnixNano=n.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:u.startTimeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.startTimeUnixNano):n.longs===Number?new f.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?u.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:u.timeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.count!=null&&e.hasOwnProperty("count")&&(typeof e.count=="number"?u.count=n.longs===String?String(e.count):e.count:u.count=n.longs===String?f.Long.prototype.toString.call(e.count):n.longs===Number?new f.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count),e.sum!=null&&e.hasOwnProperty("sum")&&(u.sum=n.json&&!isFinite(e.sum)?String(e.sum):e.sum,n.oneofs&&(u._sum="sum")),e.bucketCounts&&e.bucketCounts.length){u.bucketCounts=[];for(var h=0;h<e.bucketCounts.length;++h)typeof e.bucketCounts[h]=="number"?u.bucketCounts[h]=n.longs===String?String(e.bucketCounts[h]):e.bucketCounts[h]:u.bucketCounts[h]=n.longs===String?f.Long.prototype.toString.call(e.bucketCounts[h]):n.longs===Number?new f.LongBits(e.bucketCounts[h].low>>>0,e.bucketCounts[h].high>>>0).toNumber():e.bucketCounts[h]}if(e.explicitBounds&&e.explicitBounds.length){u.explicitBounds=[];for(var h=0;h<e.explicitBounds.length;++h)u.explicitBounds[h]=n.json&&!isFinite(e.explicitBounds[h])?String(e.explicitBounds[h]):e.explicitBounds[h]}if(e.exemplars&&e.exemplars.length){u.exemplars=[];for(var h=0;h<e.exemplars.length;++h)u.exemplars[h]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[h],n)}if(e.attributes&&e.attributes.length){u.attributes=[];for(var h=0;h<e.attributes.length;++h)u.attributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[h],n)}return e.flags!=null&&e.hasOwnProperty("flags")&&(u.flags=e.flags),e.min!=null&&e.hasOwnProperty("min")&&(u.min=n.json&&!isFinite(e.min)?String(e.min):e.min,n.oneofs&&(u._min="min")),e.max!=null&&e.hasOwnProperty("max")&&(u.max=n.json&&!isFinite(e.max)?String(e.max):e.max,n.oneofs&&(u._max="max")),u},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.HistogramDataPoint"},s}(),c.ExponentialHistogramDataPoint=function(){function s(t){if(this.attributes=[],this.exemplars=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}s.prototype.attributes=f.emptyArray,s.prototype.startTimeUnixNano=null,s.prototype.timeUnixNano=null,s.prototype.count=null,s.prototype.sum=null,s.prototype.scale=null,s.prototype.zeroCount=null,s.prototype.positive=null,s.prototype.negative=null,s.prototype.flags=null,s.prototype.exemplars=f.emptyArray,s.prototype.min=null,s.prototype.max=null,s.prototype.zeroThreshold=null;var a;return Object.defineProperty(s.prototype,"_sum",{get:f.oneOfGetter(a=["sum"]),set:f.oneOfSetter(a)}),Object.defineProperty(s.prototype,"_min",{get:f.oneOfGetter(a=["min"]),set:f.oneOfSetter(a)}),Object.defineProperty(s.prototype,"_max",{get:f.oneOfGetter(a=["max"]),set:f.oneOfSetter(a)}),s.create=function(e){return new s(e)},s.encode=function(e,n){if(n||(n=O.create()),e.attributes!=null&&e.attributes.length)for(var u=0;u<e.attributes.length;++u)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[u],n.uint32(10).fork()).ldelim();if(e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&n.uint32(17).fixed64(e.startTimeUnixNano),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(25).fixed64(e.timeUnixNano),e.count!=null&&Object.hasOwnProperty.call(e,"count")&&n.uint32(33).fixed64(e.count),e.sum!=null&&Object.hasOwnProperty.call(e,"sum")&&n.uint32(41).double(e.sum),e.scale!=null&&Object.hasOwnProperty.call(e,"scale")&&n.uint32(48).sint32(e.scale),e.zeroCount!=null&&Object.hasOwnProperty.call(e,"zeroCount")&&n.uint32(57).fixed64(e.zeroCount),e.positive!=null&&Object.hasOwnProperty.call(e,"positive")&&p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(e.positive,n.uint32(66).fork()).ldelim(),e.negative!=null&&Object.hasOwnProperty.call(e,"negative")&&p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(e.negative,n.uint32(74).fork()).ldelim(),e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&n.uint32(80).uint32(e.flags),e.exemplars!=null&&e.exemplars.length)for(var u=0;u<e.exemplars.length;++u)p.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[u],n.uint32(90).fork()).ldelim();return e.min!=null&&Object.hasOwnProperty.call(e,"min")&&n.uint32(97).double(e.min),e.max!=null&&Object.hasOwnProperty.call(e,"max")&&n.uint32(105).double(e.max),e.zeroThreshold!=null&&Object.hasOwnProperty.call(e,"zeroThreshold")&&n.uint32(113).double(e.zeroThreshold),n},s.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},s.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.startTimeUnixNano=e.fixed64();break}case 3:{l.timeUnixNano=e.fixed64();break}case 4:{l.count=e.fixed64();break}case 5:{l.sum=e.double();break}case 6:{l.scale=e.sint32();break}case 7:{l.zeroCount=e.fixed64();break}case 8:{l.positive=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(e,e.uint32());break}case 9:{l.negative=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(e,e.uint32());break}case 10:{l.flags=e.uint32();break}case 11:{l.exemplars&&l.exemplars.length||(l.exemplars=[]),l.exemplars.push(p.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 12:{l.min=e.double();break}case 13:{l.max=e.double();break}case 14:{l.zeroThreshold=e.double();break}default:e.skipType(h&7);break}}return l},s.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var u=0;u<e.attributes.length;++u){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[u]);if(l)return"attributes."+l}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!f.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&f.isInteger(e.startTimeUnixNano.low)&&f.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!f.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&f.isInteger(e.timeUnixNano.low)&&f.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.count!=null&&e.hasOwnProperty("count")&&!f.isInteger(e.count)&&!(e.count&&f.isInteger(e.count.low)&&f.isInteger(e.count.high)))return"count: integer|Long expected";if(e.sum!=null&&e.hasOwnProperty("sum")&&(n._sum=1,typeof e.sum!="number"))return"sum: number expected";if(e.scale!=null&&e.hasOwnProperty("scale")&&!f.isInteger(e.scale))return"scale: integer expected";if(e.zeroCount!=null&&e.hasOwnProperty("zeroCount")&&!f.isInteger(e.zeroCount)&&!(e.zeroCount&&f.isInteger(e.zeroCount.low)&&f.isInteger(e.zeroCount.high)))return"zeroCount: integer|Long expected";if(e.positive!=null&&e.hasOwnProperty("positive")){var l=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(e.positive);if(l)return"positive."+l}if(e.negative!=null&&e.hasOwnProperty("negative")){var l=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(e.negative);if(l)return"negative."+l}if(e.flags!=null&&e.hasOwnProperty("flags")&&!f.isInteger(e.flags))return"flags: integer expected";if(e.exemplars!=null&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(var u=0;u<e.exemplars.length;++u){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[u]);if(l)return"exemplars."+l}}return e.min!=null&&e.hasOwnProperty("min")&&(n._min=1,typeof e.min!="number")?"min: number expected":e.max!=null&&e.hasOwnProperty("max")&&(n._max=1,typeof e.max!="number")?"max: number expected":e.zeroThreshold!=null&&e.hasOwnProperty("zeroThreshold")&&typeof e.zeroThreshold!="number"?"zeroThreshold: number expected":null},s.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint)return e;var n=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: array expected");n.attributes=[];for(var u=0;u<e.attributes.length;++u){if(typeof e.attributes[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected");n.attributes[u]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[u])}}if(e.startTimeUnixNano!=null&&(f.Long?(n.startTimeUnixNano=f.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?n.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?n.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(n.startTimeUnixNano=new f.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.timeUnixNano!=null&&(f.Long?(n.timeUnixNano=f.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.count!=null&&(f.Long?(n.count=f.Long.fromValue(e.count)).unsigned=!1:typeof e.count=="string"?n.count=parseInt(e.count,10):typeof e.count=="number"?n.count=e.count:typeof e.count=="object"&&(n.count=new f.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber())),e.sum!=null&&(n.sum=Number(e.sum)),e.scale!=null&&(n.scale=e.scale|0),e.zeroCount!=null&&(f.Long?(n.zeroCount=f.Long.fromValue(e.zeroCount)).unsigned=!1:typeof e.zeroCount=="string"?n.zeroCount=parseInt(e.zeroCount,10):typeof e.zeroCount=="number"?n.zeroCount=e.zeroCount:typeof e.zeroCount=="object"&&(n.zeroCount=new f.LongBits(e.zeroCount.low>>>0,e.zeroCount.high>>>0).toNumber())),e.positive!=null){if(typeof e.positive!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected");n.positive=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(e.positive)}if(e.negative!=null){if(typeof e.negative!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected");n.negative=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(e.negative)}if(e.flags!=null&&(n.flags=e.flags>>>0),e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected");n.exemplars=[];for(var u=0;u<e.exemplars.length;++u){if(typeof e.exemplars[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected");n.exemplars[u]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[u])}}return e.min!=null&&(n.min=Number(e.min)),e.max!=null&&(n.max=Number(e.max)),e.zeroThreshold!=null&&(n.zeroThreshold=Number(e.zeroThreshold)),n},s.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.attributes=[],u.exemplars=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.startTimeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.startTimeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);u.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.timeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);u.count=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.count=n.longs===String?"0":0;if(u.scale=0,f.Long){var l=new f.Long(0,0,!1);u.zeroCount=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.zeroCount=n.longs===String?"0":0;u.positive=null,u.negative=null,u.flags=0,u.zeroThreshold=0}if(e.attributes&&e.attributes.length){u.attributes=[];for(var h=0;h<e.attributes.length;++h)u.attributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[h],n)}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?u.startTimeUnixNano=n.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:u.startTimeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.startTimeUnixNano):n.longs===Number?new f.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?u.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:u.timeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.count!=null&&e.hasOwnProperty("count")&&(typeof e.count=="number"?u.count=n.longs===String?String(e.count):e.count:u.count=n.longs===String?f.Long.prototype.toString.call(e.count):n.longs===Number?new f.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count),e.sum!=null&&e.hasOwnProperty("sum")&&(u.sum=n.json&&!isFinite(e.sum)?String(e.sum):e.sum,n.oneofs&&(u._sum="sum")),e.scale!=null&&e.hasOwnProperty("scale")&&(u.scale=e.scale),e.zeroCount!=null&&e.hasOwnProperty("zeroCount")&&(typeof e.zeroCount=="number"?u.zeroCount=n.longs===String?String(e.zeroCount):e.zeroCount:u.zeroCount=n.longs===String?f.Long.prototype.toString.call(e.zeroCount):n.longs===Number?new f.LongBits(e.zeroCount.low>>>0,e.zeroCount.high>>>0).toNumber():e.zeroCount),e.positive!=null&&e.hasOwnProperty("positive")&&(u.positive=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(e.positive,n)),e.negative!=null&&e.hasOwnProperty("negative")&&(u.negative=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(e.negative,n)),e.flags!=null&&e.hasOwnProperty("flags")&&(u.flags=e.flags),e.exemplars&&e.exemplars.length){u.exemplars=[];for(var h=0;h<e.exemplars.length;++h)u.exemplars[h]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[h],n)}return e.min!=null&&e.hasOwnProperty("min")&&(u.min=n.json&&!isFinite(e.min)?String(e.min):e.min,n.oneofs&&(u._min="min")),e.max!=null&&e.hasOwnProperty("max")&&(u.max=n.json&&!isFinite(e.max)?String(e.max):e.max,n.oneofs&&(u._max="max")),e.zeroThreshold!=null&&e.hasOwnProperty("zeroThreshold")&&(u.zeroThreshold=n.json&&!isFinite(e.zeroThreshold)?String(e.zeroThreshold):e.zeroThreshold),u},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"},s.Buckets=function(){function t(e){if(this.bucketCounts=[],e)for(var n=Object.keys(e),u=0;u<n.length;++u)e[n[u]]!=null&&(this[n[u]]=e[n[u]])}return t.prototype.offset=null,t.prototype.bucketCounts=f.emptyArray,t.create=function(n){return new t(n)},t.encode=function(n,u){if(u||(u=O.create()),n.offset!=null&&Object.hasOwnProperty.call(n,"offset")&&u.uint32(8).sint32(n.offset),n.bucketCounts!=null&&n.bucketCounts.length){u.uint32(18).fork();for(var l=0;l<n.bucketCounts.length;++l)u.uint64(n.bucketCounts[l]);u.ldelim()}return u},t.encodeDelimited=function(n,u){return this.encode(n,u).ldelim()},t.decode=function(n,u){n instanceof m||(n=m.create(n));for(var l=u===void 0?n.len:n.pos+u,h=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;n.pos<l;){var T=n.uint32();switch(T>>>3){case 1:{h.offset=n.sint32();break}case 2:{if(h.bucketCounts&&h.bucketCounts.length||(h.bucketCounts=[]),(T&7)===2)for(var D=n.uint32()+n.pos;n.pos<D;)h.bucketCounts.push(n.uint64());else h.bucketCounts.push(n.uint64());break}default:n.skipType(T&7);break}}return h},t.decodeDelimited=function(n){return n instanceof m||(n=new m(n)),this.decode(n,n.uint32())},t.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.offset!=null&&n.hasOwnProperty("offset")&&!f.isInteger(n.offset))return"offset: integer expected";if(n.bucketCounts!=null&&n.hasOwnProperty("bucketCounts")){if(!Array.isArray(n.bucketCounts))return"bucketCounts: array expected";for(var u=0;u<n.bucketCounts.length;++u)if(!f.isInteger(n.bucketCounts[u])&&!(n.bucketCounts[u]&&f.isInteger(n.bucketCounts[u].low)&&f.isInteger(n.bucketCounts[u].high)))return"bucketCounts: integer|Long[] expected"}return null},t.fromObject=function(n){if(n instanceof p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets)return n;var u=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;if(n.offset!=null&&(u.offset=n.offset|0),n.bucketCounts){if(!Array.isArray(n.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected");u.bucketCounts=[];for(var l=0;l<n.bucketCounts.length;++l)f.Long?(u.bucketCounts[l]=f.Long.fromValue(n.bucketCounts[l])).unsigned=!0:typeof n.bucketCounts[l]=="string"?u.bucketCounts[l]=parseInt(n.bucketCounts[l],10):typeof n.bucketCounts[l]=="number"?u.bucketCounts[l]=n.bucketCounts[l]:typeof n.bucketCounts[l]=="object"&&(u.bucketCounts[l]=new f.LongBits(n.bucketCounts[l].low>>>0,n.bucketCounts[l].high>>>0).toNumber(!0))}return u},t.toObject=function(n,u){u||(u={});var l={};if((u.arrays||u.defaults)&&(l.bucketCounts=[]),u.defaults&&(l.offset=0),n.offset!=null&&n.hasOwnProperty("offset")&&(l.offset=n.offset),n.bucketCounts&&n.bucketCounts.length){l.bucketCounts=[];for(var h=0;h<n.bucketCounts.length;++h)typeof n.bucketCounts[h]=="number"?l.bucketCounts[h]=u.longs===String?String(n.bucketCounts[h]):n.bucketCounts[h]:l.bucketCounts[h]=u.longs===String?f.Long.prototype.toString.call(n.bucketCounts[h]):u.longs===Number?new f.LongBits(n.bucketCounts[h].low>>>0,n.bucketCounts[h].high>>>0).toNumber(!0):n.bucketCounts[h]}return l},t.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},t.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},t}(),s}(),c.SummaryDataPoint=function(){function s(a){if(this.attributes=[],this.quantileValues=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.attributes=f.emptyArray,s.prototype.startTimeUnixNano=null,s.prototype.timeUnixNano=null,s.prototype.count=null,s.prototype.sum=null,s.prototype.quantileValues=f.emptyArray,s.prototype.flags=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&e.uint32(17).fixed64(t.startTimeUnixNano),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&e.uint32(25).fixed64(t.timeUnixNano),t.count!=null&&Object.hasOwnProperty.call(t,"count")&&e.uint32(33).fixed64(t.count),t.sum!=null&&Object.hasOwnProperty.call(t,"sum")&&e.uint32(41).double(t.sum),t.quantileValues!=null&&t.quantileValues.length)for(var n=0;n<t.quantileValues.length;++n)p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.encode(t.quantileValues[n],e.uint32(50).fork()).ldelim();if(t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(58).fork()).ldelim();return t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&e.uint32(64).uint32(t.flags),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint;t.pos<n;){var l=t.uint32();switch(l>>>3){case 7:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{u.startTimeUnixNano=t.fixed64();break}case 3:{u.timeUnixNano=t.fixed64();break}case 4:{u.count=t.fixed64();break}case 5:{u.sum=t.double();break}case 6:{u.quantileValues&&u.quantileValues.length||(u.quantileValues=[]),u.quantileValues.push(p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(t,t.uint32()));break}case 8:{u.flags=t.uint32();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(n)return"attributes."+n}}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!f.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&f.isInteger(t.startTimeUnixNano.low)&&f.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!f.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&f.isInteger(t.timeUnixNano.low)&&f.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.count!=null&&t.hasOwnProperty("count")&&!f.isInteger(t.count)&&!(t.count&&f.isInteger(t.count.low)&&f.isInteger(t.count.high)))return"count: integer|Long expected";if(t.sum!=null&&t.hasOwnProperty("sum")&&typeof t.sum!="number")return"sum: number expected";if(t.quantileValues!=null&&t.hasOwnProperty("quantileValues")){if(!Array.isArray(t.quantileValues))return"quantileValues: array expected";for(var e=0;e<t.quantileValues.length;++e){var n=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify(t.quantileValues[e]);if(n)return"quantileValues."+n}}return t.flags!=null&&t.hasOwnProperty("flags")&&!f.isInteger(t.flags)?"flags: integer expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.SummaryDataPoint)return t;var e=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}if(t.startTimeUnixNano!=null&&(f.Long?(e.startTimeUnixNano=f.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?e.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?e.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(e.startTimeUnixNano=new f.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.timeUnixNano!=null&&(f.Long?(e.timeUnixNano=f.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?e.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?e.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(e.timeUnixNano=new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.count!=null&&(f.Long?(e.count=f.Long.fromValue(t.count)).unsigned=!1:typeof t.count=="string"?e.count=parseInt(t.count,10):typeof t.count=="number"?e.count=t.count:typeof t.count=="object"&&(e.count=new f.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber())),t.sum!=null&&(e.sum=Number(t.sum)),t.quantileValues){if(!Array.isArray(t.quantileValues))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected");e.quantileValues=[];for(var n=0;n<t.quantileValues.length;++n){if(typeof t.quantileValues[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: object expected");e.quantileValues[n]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.fromObject(t.quantileValues[n])}}return t.flags!=null&&(e.flags=t.flags>>>0),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.quantileValues=[],n.attributes=[]),e.defaults){if(f.Long){var u=new f.Long(0,0,!1);n.startTimeUnixNano=e.longs===String?u.toString():e.longs===Number?u.toNumber():u}else n.startTimeUnixNano=e.longs===String?"0":0;if(f.Long){var u=new f.Long(0,0,!1);n.timeUnixNano=e.longs===String?u.toString():e.longs===Number?u.toNumber():u}else n.timeUnixNano=e.longs===String?"0":0;if(f.Long){var u=new f.Long(0,0,!1);n.count=e.longs===String?u.toString():e.longs===Number?u.toNumber():u}else n.count=e.longs===String?"0":0;n.sum=0,n.flags=0}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?n.startTimeUnixNano=e.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:n.startTimeUnixNano=e.longs===String?f.Long.prototype.toString.call(t.startTimeUnixNano):e.longs===Number?new f.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?n.timeUnixNano=e.longs===String?String(t.timeUnixNano):t.timeUnixNano:n.timeUnixNano=e.longs===String?f.Long.prototype.toString.call(t.timeUnixNano):e.longs===Number?new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.count!=null&&t.hasOwnProperty("count")&&(typeof t.count=="number"?n.count=e.longs===String?String(t.count):t.count:n.count=e.longs===String?f.Long.prototype.toString.call(t.count):e.longs===Number?new f.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber():t.count),t.sum!=null&&t.hasOwnProperty("sum")&&(n.sum=e.json&&!isFinite(t.sum)?String(t.sum):t.sum),t.quantileValues&&t.quantileValues.length){n.quantileValues=[];for(var l=0;l<t.quantileValues.length;++l)n.quantileValues[l]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(t.quantileValues[l],e)}if(t.attributes&&t.attributes.length){n.attributes=[];for(var l=0;l<t.attributes.length;++l)n.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[l],e)}return t.flags!=null&&t.hasOwnProperty("flags")&&(n.flags=t.flags),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.SummaryDataPoint"},s.ValueAtQuantile=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.quantile=null,a.prototype.value=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=O.create()),e.quantile!=null&&Object.hasOwnProperty.call(e,"quantile")&&n.uint32(9).double(e.quantile),e.value!=null&&Object.hasOwnProperty.call(e,"value")&&n.uint32(17).double(e.value),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.quantile=e.double();break}case 2:{l.value=e.double();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.quantile!=null&&e.hasOwnProperty("quantile")&&typeof e.quantile!="number"?"quantile: number expected":e.value!=null&&e.hasOwnProperty("value")&&typeof e.value!="number"?"value: number expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return e;var n=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;return e.quantile!=null&&(n.quantile=Number(e.quantile)),e.value!=null&&(n.value=Number(e.value)),n},a.toObject=function(e,n){n||(n={});var u={};return n.defaults&&(u.quantile=0,u.value=0),e.quantile!=null&&e.hasOwnProperty("quantile")&&(u.quantile=n.json&&!isFinite(e.quantile)?String(e.quantile):e.quantile),e.value!=null&&e.hasOwnProperty("value")&&(u.value=n.json&&!isFinite(e.value)?String(e.value):e.value),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},a}(),s}(),c.Exemplar=function(){function s(t){if(this.filteredAttributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}s.prototype.filteredAttributes=f.emptyArray,s.prototype.timeUnixNano=null,s.prototype.asDouble=null,s.prototype.asInt=null,s.prototype.spanId=null,s.prototype.traceId=null;var a;return Object.defineProperty(s.prototype,"value",{get:f.oneOfGetter(a=["asDouble","asInt"]),set:f.oneOfSetter(a)}),s.create=function(e){return new s(e)},s.encode=function(e,n){if(n||(n=O.create()),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(17).fixed64(e.timeUnixNano),e.asDouble!=null&&Object.hasOwnProperty.call(e,"asDouble")&&n.uint32(25).double(e.asDouble),e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId")&&n.uint32(34).bytes(e.spanId),e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId")&&n.uint32(42).bytes(e.traceId),e.asInt!=null&&Object.hasOwnProperty.call(e,"asInt")&&n.uint32(49).sfixed64(e.asInt),e.filteredAttributes!=null&&e.filteredAttributes.length)for(var u=0;u<e.filteredAttributes.length;++u)p.opentelemetry.proto.common.v1.KeyValue.encode(e.filteredAttributes[u],n.uint32(58).fork()).ldelim();return n},s.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},s.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.Exemplar;e.pos<u;){var h=e.uint32();switch(h>>>3){case 7:{l.filteredAttributes&&l.filteredAttributes.length||(l.filteredAttributes=[]),l.filteredAttributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.timeUnixNano=e.fixed64();break}case 3:{l.asDouble=e.double();break}case 6:{l.asInt=e.sfixed64();break}case 4:{l.spanId=e.bytes();break}case 5:{l.traceId=e.bytes();break}default:e.skipType(h&7);break}}return l},s.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.filteredAttributes!=null&&e.hasOwnProperty("filteredAttributes")){if(!Array.isArray(e.filteredAttributes))return"filteredAttributes: array expected";for(var u=0;u<e.filteredAttributes.length;++u){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.filteredAttributes[u]);if(l)return"filteredAttributes."+l}}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!f.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&f.isInteger(e.timeUnixNano.low)&&f.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.asDouble!=null&&e.hasOwnProperty("asDouble")&&(n.value=1,typeof e.asDouble!="number"))return"asDouble: number expected";if(e.asInt!=null&&e.hasOwnProperty("asInt")){if(n.value===1)return"value: multiple values";if(n.value=1,!f.isInteger(e.asInt)&&!(e.asInt&&f.isInteger(e.asInt.low)&&f.isInteger(e.asInt.high)))return"asInt: integer|Long expected"}return e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||f.isString(e.spanId))?"spanId: buffer expected":e.traceId!=null&&e.hasOwnProperty("traceId")&&!(e.traceId&&typeof e.traceId.length=="number"||f.isString(e.traceId))?"traceId: buffer expected":null},s.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.Exemplar)return e;var n=new p.opentelemetry.proto.metrics.v1.Exemplar;if(e.filteredAttributes){if(!Array.isArray(e.filteredAttributes))throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: array expected");n.filteredAttributes=[];for(var u=0;u<e.filteredAttributes.length;++u){if(typeof e.filteredAttributes[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected");n.filteredAttributes[u]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.filteredAttributes[u])}}return e.timeUnixNano!=null&&(f.Long?(n.timeUnixNano=f.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.asDouble!=null&&(n.asDouble=Number(e.asDouble)),e.asInt!=null&&(f.Long?(n.asInt=f.Long.fromValue(e.asInt)).unsigned=!1:typeof e.asInt=="string"?n.asInt=parseInt(e.asInt,10):typeof e.asInt=="number"?n.asInt=e.asInt:typeof e.asInt=="object"&&(n.asInt=new f.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber())),e.spanId!=null&&(typeof e.spanId=="string"?f.base64.decode(e.spanId,n.spanId=f.newBuffer(f.base64.length(e.spanId)),0):e.spanId.length>=0&&(n.spanId=e.spanId)),e.traceId!=null&&(typeof e.traceId=="string"?f.base64.decode(e.traceId,n.traceId=f.newBuffer(f.base64.length(e.traceId)),0):e.traceId.length>=0&&(n.traceId=e.traceId)),n},s.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.filteredAttributes=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.timeUnixNano=n.longs===String?"0":0;n.bytes===String?u.spanId="":(u.spanId=[],n.bytes!==Array&&(u.spanId=f.newBuffer(u.spanId))),n.bytes===String?u.traceId="":(u.traceId=[],n.bytes!==Array&&(u.traceId=f.newBuffer(u.traceId)))}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?u.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:u.timeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.asDouble!=null&&e.hasOwnProperty("asDouble")&&(u.asDouble=n.json&&!isFinite(e.asDouble)?String(e.asDouble):e.asDouble,n.oneofs&&(u.value="asDouble")),e.spanId!=null&&e.hasOwnProperty("spanId")&&(u.spanId=n.bytes===String?f.base64.encode(e.spanId,0,e.spanId.length):n.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),e.traceId!=null&&e.hasOwnProperty("traceId")&&(u.traceId=n.bytes===String?f.base64.encode(e.traceId,0,e.traceId.length):n.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),e.asInt!=null&&e.hasOwnProperty("asInt")&&(typeof e.asInt=="number"?u.asInt=n.longs===String?String(e.asInt):e.asInt:u.asInt=n.longs===String?f.Long.prototype.toString.call(e.asInt):n.longs===Number?new f.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber():e.asInt,n.oneofs&&(u.value="asInt")),e.filteredAttributes&&e.filteredAttributes.length){u.filteredAttributes=[];for(var h=0;h<e.filteredAttributes.length;++h)u.filteredAttributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.filteredAttributes[h],n)}return u},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Exemplar"},s}(),c}(),o}(),r.logs=function(){var o={};return o.v1=function(){var c={};return c.LogsData=function(){function s(a){if(this.resourceLogs=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.resourceLogs=f.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.resourceLogs!=null&&t.resourceLogs.length)for(var n=0;n<t.resourceLogs.length;++n)p.opentelemetry.proto.logs.v1.ResourceLogs.encode(t.resourceLogs[n],e.uint32(10).fork()).ldelim();return e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.logs.v1.LogsData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.resourceLogs&&u.resourceLogs.length||(u.resourceLogs=[]),u.resourceLogs.push(p.opentelemetry.proto.logs.v1.ResourceLogs.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resourceLogs!=null&&t.hasOwnProperty("resourceLogs")){if(!Array.isArray(t.resourceLogs))return"resourceLogs: array expected";for(var e=0;e<t.resourceLogs.length;++e){var n=p.opentelemetry.proto.logs.v1.ResourceLogs.verify(t.resourceLogs[e]);if(n)return"resourceLogs."+n}}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.logs.v1.LogsData)return t;var e=new p.opentelemetry.proto.logs.v1.LogsData;if(t.resourceLogs){if(!Array.isArray(t.resourceLogs))throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: array expected");e.resourceLogs=[];for(var n=0;n<t.resourceLogs.length;++n){if(typeof t.resourceLogs[n]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: object expected");e.resourceLogs[n]=p.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(t.resourceLogs[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.resourceLogs=[]),t.resourceLogs&&t.resourceLogs.length){n.resourceLogs=[];for(var u=0;u<t.resourceLogs.length;++u)n.resourceLogs[u]=p.opentelemetry.proto.logs.v1.ResourceLogs.toObject(t.resourceLogs[u],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.LogsData"},s}(),c.ResourceLogs=function(){function s(a){if(this.scopeLogs=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.resource=null,s.prototype.scopeLogs=f.emptyArray,s.prototype.schemaUrl=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.resource!=null&&Object.hasOwnProperty.call(t,"resource")&&p.opentelemetry.proto.resource.v1.Resource.encode(t.resource,e.uint32(10).fork()).ldelim(),t.scopeLogs!=null&&t.scopeLogs.length)for(var n=0;n<t.scopeLogs.length;++n)p.opentelemetry.proto.logs.v1.ScopeLogs.encode(t.scopeLogs[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.logs.v1.ResourceLogs;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{u.scopeLogs&&u.scopeLogs.length||(u.scopeLogs=[]),u.scopeLogs.push(p.opentelemetry.proto.logs.v1.ScopeLogs.decode(t,t.uint32()));break}case 3:{u.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resource!=null&&t.hasOwnProperty("resource")){var e=p.opentelemetry.proto.resource.v1.Resource.verify(t.resource);if(e)return"resource."+e}if(t.scopeLogs!=null&&t.hasOwnProperty("scopeLogs")){if(!Array.isArray(t.scopeLogs))return"scopeLogs: array expected";for(var n=0;n<t.scopeLogs.length;++n){var e=p.opentelemetry.proto.logs.v1.ScopeLogs.verify(t.scopeLogs[n]);if(e)return"scopeLogs."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!f.isString(t.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.logs.v1.ResourceLogs)return t;var e=new p.opentelemetry.proto.logs.v1.ResourceLogs;if(t.resource!=null){if(typeof t.resource!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.resource: object expected");e.resource=p.opentelemetry.proto.resource.v1.Resource.fromObject(t.resource)}if(t.scopeLogs){if(!Array.isArray(t.scopeLogs))throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: array expected");e.scopeLogs=[];for(var n=0;n<t.scopeLogs.length;++n){if(typeof t.scopeLogs[n]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: object expected");e.scopeLogs[n]=p.opentelemetry.proto.logs.v1.ScopeLogs.fromObject(t.scopeLogs[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.scopeLogs=[]),e.defaults&&(n.resource=null,n.schemaUrl=""),t.resource!=null&&t.hasOwnProperty("resource")&&(n.resource=p.opentelemetry.proto.resource.v1.Resource.toObject(t.resource,e)),t.scopeLogs&&t.scopeLogs.length){n.scopeLogs=[];for(var u=0;u<t.scopeLogs.length;++u)n.scopeLogs[u]=p.opentelemetry.proto.logs.v1.ScopeLogs.toObject(t.scopeLogs[u],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.ResourceLogs"},s}(),c.ScopeLogs=function(){function s(a){if(this.logRecords=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.scope=null,s.prototype.logRecords=f.emptyArray,s.prototype.schemaUrl=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.scope!=null&&Object.hasOwnProperty.call(t,"scope")&&p.opentelemetry.proto.common.v1.InstrumentationScope.encode(t.scope,e.uint32(10).fork()).ldelim(),t.logRecords!=null&&t.logRecords.length)for(var n=0;n<t.logRecords.length;++n)p.opentelemetry.proto.logs.v1.LogRecord.encode(t.logRecords[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.logs.v1.ScopeLogs;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{u.logRecords&&u.logRecords.length||(u.logRecords=[]),u.logRecords.push(p.opentelemetry.proto.logs.v1.LogRecord.decode(t,t.uint32()));break}case 3:{u.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.scope!=null&&t.hasOwnProperty("scope")){var e=p.opentelemetry.proto.common.v1.InstrumentationScope.verify(t.scope);if(e)return"scope."+e}if(t.logRecords!=null&&t.hasOwnProperty("logRecords")){if(!Array.isArray(t.logRecords))return"logRecords: array expected";for(var n=0;n<t.logRecords.length;++n){var e=p.opentelemetry.proto.logs.v1.LogRecord.verify(t.logRecords[n]);if(e)return"logRecords."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!f.isString(t.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.logs.v1.ScopeLogs)return t;var e=new p.opentelemetry.proto.logs.v1.ScopeLogs;if(t.scope!=null){if(typeof t.scope!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.scope: object expected");e.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(t.scope)}if(t.logRecords){if(!Array.isArray(t.logRecords))throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: array expected");e.logRecords=[];for(var n=0;n<t.logRecords.length;++n){if(typeof t.logRecords[n]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: object expected");e.logRecords[n]=p.opentelemetry.proto.logs.v1.LogRecord.fromObject(t.logRecords[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.logRecords=[]),e.defaults&&(n.scope=null,n.schemaUrl=""),t.scope!=null&&t.hasOwnProperty("scope")&&(n.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.toObject(t.scope,e)),t.logRecords&&t.logRecords.length){n.logRecords=[];for(var u=0;u<t.logRecords.length;++u)n.logRecords[u]=p.opentelemetry.proto.logs.v1.LogRecord.toObject(t.logRecords[u],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.ScopeLogs"},s}(),c.SeverityNumber=function(){var s={},a=Object.create(s);return a[s[0]="SEVERITY_NUMBER_UNSPECIFIED"]=0,a[s[1]="SEVERITY_NUMBER_TRACE"]=1,a[s[2]="SEVERITY_NUMBER_TRACE2"]=2,a[s[3]="SEVERITY_NUMBER_TRACE3"]=3,a[s[4]="SEVERITY_NUMBER_TRACE4"]=4,a[s[5]="SEVERITY_NUMBER_DEBUG"]=5,a[s[6]="SEVERITY_NUMBER_DEBUG2"]=6,a[s[7]="SEVERITY_NUMBER_DEBUG3"]=7,a[s[8]="SEVERITY_NUMBER_DEBUG4"]=8,a[s[9]="SEVERITY_NUMBER_INFO"]=9,a[s[10]="SEVERITY_NUMBER_INFO2"]=10,a[s[11]="SEVERITY_NUMBER_INFO3"]=11,a[s[12]="SEVERITY_NUMBER_INFO4"]=12,a[s[13]="SEVERITY_NUMBER_WARN"]=13,a[s[14]="SEVERITY_NUMBER_WARN2"]=14,a[s[15]="SEVERITY_NUMBER_WARN3"]=15,a[s[16]="SEVERITY_NUMBER_WARN4"]=16,a[s[17]="SEVERITY_NUMBER_ERROR"]=17,a[s[18]="SEVERITY_NUMBER_ERROR2"]=18,a[s[19]="SEVERITY_NUMBER_ERROR3"]=19,a[s[20]="SEVERITY_NUMBER_ERROR4"]=20,a[s[21]="SEVERITY_NUMBER_FATAL"]=21,a[s[22]="SEVERITY_NUMBER_FATAL2"]=22,a[s[23]="SEVERITY_NUMBER_FATAL3"]=23,a[s[24]="SEVERITY_NUMBER_FATAL4"]=24,a}(),c.LogRecordFlags=function(){var s={},a=Object.create(s);return a[s[0]="LOG_RECORD_FLAGS_DO_NOT_USE"]=0,a[s[255]="LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"]=255,a}(),c.LogRecord=function(){function s(a){if(this.attributes=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.timeUnixNano=null,s.prototype.observedTimeUnixNano=null,s.prototype.severityNumber=null,s.prototype.severityText=null,s.prototype.body=null,s.prototype.attributes=f.emptyArray,s.prototype.droppedAttributesCount=null,s.prototype.flags=null,s.prototype.traceId=null,s.prototype.spanId=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&e.uint32(9).fixed64(t.timeUnixNano),t.severityNumber!=null&&Object.hasOwnProperty.call(t,"severityNumber")&&e.uint32(16).int32(t.severityNumber),t.severityText!=null&&Object.hasOwnProperty.call(t,"severityText")&&e.uint32(26).string(t.severityText),t.body!=null&&Object.hasOwnProperty.call(t,"body")&&p.opentelemetry.proto.common.v1.AnyValue.encode(t.body,e.uint32(42).fork()).ldelim(),t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(50).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&e.uint32(56).uint32(t.droppedAttributesCount),t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&e.uint32(69).fixed32(t.flags),t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId")&&e.uint32(74).bytes(t.traceId),t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId")&&e.uint32(82).bytes(t.spanId),t.observedTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"observedTimeUnixNano")&&e.uint32(89).fixed64(t.observedTimeUnixNano),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.logs.v1.LogRecord;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.timeUnixNano=t.fixed64();break}case 11:{u.observedTimeUnixNano=t.fixed64();break}case 2:{u.severityNumber=t.int32();break}case 3:{u.severityText=t.string();break}case 5:{u.body=p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32());break}case 6:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 7:{u.droppedAttributesCount=t.uint32();break}case 8:{u.flags=t.fixed32();break}case 9:{u.traceId=t.bytes();break}case 10:{u.spanId=t.bytes();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!f.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&f.isInteger(t.timeUnixNano.low)&&f.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.observedTimeUnixNano!=null&&t.hasOwnProperty("observedTimeUnixNano")&&!f.isInteger(t.observedTimeUnixNano)&&!(t.observedTimeUnixNano&&f.isInteger(t.observedTimeUnixNano.low)&&f.isInteger(t.observedTimeUnixNano.high)))return"observedTimeUnixNano: integer|Long expected";if(t.severityNumber!=null&&t.hasOwnProperty("severityNumber"))switch(t.severityNumber){default:return"severityNumber: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:break}if(t.severityText!=null&&t.hasOwnProperty("severityText")&&!f.isString(t.severityText))return"severityText: string expected";if(t.body!=null&&t.hasOwnProperty("body")){var e=p.opentelemetry.proto.common.v1.AnyValue.verify(t.body);if(e)return"body."+e}if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var n=0;n<t.attributes.length;++n){var e=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[n]);if(e)return"attributes."+e}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":t.flags!=null&&t.hasOwnProperty("flags")&&!f.isInteger(t.flags)?"flags: integer expected":t.traceId!=null&&t.hasOwnProperty("traceId")&&!(t.traceId&&typeof t.traceId.length=="number"||f.isString(t.traceId))?"traceId: buffer expected":t.spanId!=null&&t.hasOwnProperty("spanId")&&!(t.spanId&&typeof t.spanId.length=="number"||f.isString(t.spanId))?"spanId: buffer expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.logs.v1.LogRecord)return t;var e=new p.opentelemetry.proto.logs.v1.LogRecord;switch(t.timeUnixNano!=null&&(f.Long?(e.timeUnixNano=f.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?e.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?e.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(e.timeUnixNano=new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.observedTimeUnixNano!=null&&(f.Long?(e.observedTimeUnixNano=f.Long.fromValue(t.observedTimeUnixNano)).unsigned=!1:typeof t.observedTimeUnixNano=="string"?e.observedTimeUnixNano=parseInt(t.observedTimeUnixNano,10):typeof t.observedTimeUnixNano=="number"?e.observedTimeUnixNano=t.observedTimeUnixNano:typeof t.observedTimeUnixNano=="object"&&(e.observedTimeUnixNano=new f.LongBits(t.observedTimeUnixNano.low>>>0,t.observedTimeUnixNano.high>>>0).toNumber())),t.severityNumber){default:if(typeof t.severityNumber=="number"){e.severityNumber=t.severityNumber;break}break;case"SEVERITY_NUMBER_UNSPECIFIED":case 0:e.severityNumber=0;break;case"SEVERITY_NUMBER_TRACE":case 1:e.severityNumber=1;break;case"SEVERITY_NUMBER_TRACE2":case 2:e.severityNumber=2;break;case"SEVERITY_NUMBER_TRACE3":case 3:e.severityNumber=3;break;case"SEVERITY_NUMBER_TRACE4":case 4:e.severityNumber=4;break;case"SEVERITY_NUMBER_DEBUG":case 5:e.severityNumber=5;break;case"SEVERITY_NUMBER_DEBUG2":case 6:e.severityNumber=6;break;case"SEVERITY_NUMBER_DEBUG3":case 7:e.severityNumber=7;break;case"SEVERITY_NUMBER_DEBUG4":case 8:e.severityNumber=8;break;case"SEVERITY_NUMBER_INFO":case 9:e.severityNumber=9;break;case"SEVERITY_NUMBER_INFO2":case 10:e.severityNumber=10;break;case"SEVERITY_NUMBER_INFO3":case 11:e.severityNumber=11;break;case"SEVERITY_NUMBER_INFO4":case 12:e.severityNumber=12;break;case"SEVERITY_NUMBER_WARN":case 13:e.severityNumber=13;break;case"SEVERITY_NUMBER_WARN2":case 14:e.severityNumber=14;break;case"SEVERITY_NUMBER_WARN3":case 15:e.severityNumber=15;break;case"SEVERITY_NUMBER_WARN4":case 16:e.severityNumber=16;break;case"SEVERITY_NUMBER_ERROR":case 17:e.severityNumber=17;break;case"SEVERITY_NUMBER_ERROR2":case 18:e.severityNumber=18;break;case"SEVERITY_NUMBER_ERROR3":case 19:e.severityNumber=19;break;case"SEVERITY_NUMBER_ERROR4":case 20:e.severityNumber=20;break;case"SEVERITY_NUMBER_FATAL":case 21:e.severityNumber=21;break;case"SEVERITY_NUMBER_FATAL2":case 22:e.severityNumber=22;break;case"SEVERITY_NUMBER_FATAL3":case 23:e.severityNumber=23;break;case"SEVERITY_NUMBER_FATAL4":case 24:e.severityNumber=24;break}if(t.severityText!=null&&(e.severityText=String(t.severityText)),t.body!=null){if(typeof t.body!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected");e.body=p.opentelemetry.proto.common.v1.AnyValue.fromObject(t.body)}if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}return t.droppedAttributesCount!=null&&(e.droppedAttributesCount=t.droppedAttributesCount>>>0),t.flags!=null&&(e.flags=t.flags>>>0),t.traceId!=null&&(typeof t.traceId=="string"?f.base64.decode(t.traceId,e.traceId=f.newBuffer(f.base64.length(t.traceId)),0):t.traceId.length>=0&&(e.traceId=t.traceId)),t.spanId!=null&&(typeof t.spanId=="string"?f.base64.decode(t.spanId,e.spanId=f.newBuffer(f.base64.length(t.spanId)),0):t.spanId.length>=0&&(e.spanId=t.spanId)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),e.defaults){if(f.Long){var u=new f.Long(0,0,!1);n.timeUnixNano=e.longs===String?u.toString():e.longs===Number?u.toNumber():u}else n.timeUnixNano=e.longs===String?"0":0;if(n.severityNumber=e.enums===String?"SEVERITY_NUMBER_UNSPECIFIED":0,n.severityText="",n.body=null,n.droppedAttributesCount=0,n.flags=0,e.bytes===String?n.traceId="":(n.traceId=[],e.bytes!==Array&&(n.traceId=f.newBuffer(n.traceId))),e.bytes===String?n.spanId="":(n.spanId=[],e.bytes!==Array&&(n.spanId=f.newBuffer(n.spanId))),f.Long){var u=new f.Long(0,0,!1);n.observedTimeUnixNano=e.longs===String?u.toString():e.longs===Number?u.toNumber():u}else n.observedTimeUnixNano=e.longs===String?"0":0}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?n.timeUnixNano=e.longs===String?String(t.timeUnixNano):t.timeUnixNano:n.timeUnixNano=e.longs===String?f.Long.prototype.toString.call(t.timeUnixNano):e.longs===Number?new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.severityNumber!=null&&t.hasOwnProperty("severityNumber")&&(n.severityNumber=e.enums===String?p.opentelemetry.proto.logs.v1.SeverityNumber[t.severityNumber]===void 0?t.severityNumber:p.opentelemetry.proto.logs.v1.SeverityNumber[t.severityNumber]:t.severityNumber),t.severityText!=null&&t.hasOwnProperty("severityText")&&(n.severityText=t.severityText),t.body!=null&&t.hasOwnProperty("body")&&(n.body=p.opentelemetry.proto.common.v1.AnyValue.toObject(t.body,e)),t.attributes&&t.attributes.length){n.attributes=[];for(var l=0;l<t.attributes.length;++l)n.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[l],e)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),t.flags!=null&&t.hasOwnProperty("flags")&&(n.flags=t.flags),t.traceId!=null&&t.hasOwnProperty("traceId")&&(n.traceId=e.bytes===String?f.base64.encode(t.traceId,0,t.traceId.length):e.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId),t.spanId!=null&&t.hasOwnProperty("spanId")&&(n.spanId=e.bytes===String?f.base64.encode(t.spanId,0,t.spanId.length):e.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId),t.observedTimeUnixNano!=null&&t.hasOwnProperty("observedTimeUnixNano")&&(typeof t.observedTimeUnixNano=="number"?n.observedTimeUnixNano=e.longs===String?String(t.observedTimeUnixNano):t.observedTimeUnixNano:n.observedTimeUnixNano=e.longs===String?f.Long.prototype.toString.call(t.observedTimeUnixNano):e.longs===Number?new f.LongBits(t.observedTimeUnixNano.low>>>0,t.observedTimeUnixNano.high>>>0).toNumber():t.observedTimeUnixNano),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.LogRecord"},s}(),c}(),o}(),r}(),i}();_m.exports=p});var rs=d(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.ServiceClientType=void 0;var JS;(function(i){i[i.SPANS=0]="SPANS",i[i.METRICS=1]="METRICS",i[i.LOGS=2]="LOGS"})(JS=sn.ServiceClientType||(sn.ServiceClientType={}))});var un=d(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.getExportRequestProto=void 0;var Dc=ym(),Em=rs();function QS(i){return i===Em.ServiceClientType.SPANS?Dc.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest:i===Em.ServiceClientType.LOGS?Dc.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest:Dc.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest}ns.getExportRequestProto=QS});var Bc=d(os=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});os.send=void 0;var gm=Ji(),ZS=un();function eb(i,r,o,c,s){let a=i.convert(r),t=(0,ZS.getExportRequestProto)(i.getServiceClientType()),e=t.create(a);if(e){let n=t.encode(e).finish();n&&(0,gm.sendWithHttp)(i,Buffer.from(n),"application/x-protobuf",c,s)}else s(new gm.OTLPExporterError("No proto"))}os.send=eb});var vm=d(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});is.OTLPProtoExporterNodeBase=void 0;var tb=(y(),E(_)),rb=Ji(),Vc=class extends rb.OTLPExporterNodeBase{constructor(r={}){super(r)}_sendPromise(r,o,c){let s=new Promise((t,e)=>{this._send(this,r,this.compression,t,e)}).then(o,c);this._sendingPromises.push(s);let a=()=>{let t=this._sendingPromises.indexOf(s);this._sendingPromises.splice(t,1)};s.then(a,a)}send(r,o,c){if(this._shutdownOnce.isCalled){tb.diag.debug("Shutdown already started. Cannot send objects");return}this._send?this._sendPromise(r,o,c):setImmediate(()=>{let{send:s}=Bc();this._send=s,this._sendPromise(r,o,c)})}};is.OTLPProtoExporterNodeBase=Vc});var Tm=d(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.send=yr.OTLPProtoExporterNodeBase=void 0;var nb=vm();Object.defineProperty(yr,"OTLPProtoExporterNodeBase",{enumerable:!0,get:function(){return nb.OTLPProtoExporterNodeBase}});var ob=Bc();Object.defineProperty(yr,"send",{enumerable:!0,get:function(){return ob.send}})});var Sm=d(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});ss.OTLPProtoExporterBrowserBase=void 0;var ib=(y(),E(_)),kc=Ji(),sb=un(),qc=class extends kc.OTLPExporterBrowserBase{constructor(r={}){super(r)}send(r,o,c){if(this._shutdownOnce.isCalled){ib.diag.debug("Shutdown already started. Cannot send objects");return}let s=this.convert(r),a=(0,sb.getExportRequestProto)(this.getServiceClientType()),t=a.create(s);if(t){let e=a.encode(t).finish();e&&(0,kc.sendWithXhr)(new Blob([e],{type:"application/x-protobuf"}),this.url,Object.assign(Object.assign({},this._headers),{"Content-Type":"application/x-protobuf",Accept:"application/x-protobuf"}),this.timeoutMillis,o,c)}else c(new kc.OTLPExporterError("No proto"))}};ss.OTLPProtoExporterBrowserBase=qc});var bm=d(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.ServiceClientType=Er.OTLPProtoExporterBrowserBase=void 0;var ub=Sm();Object.defineProperty(Er,"OTLPProtoExporterBrowserBase",{enumerable:!0,get:function(){return ub.OTLPProtoExporterBrowserBase}});var ab=rs();Object.defineProperty(Er,"ServiceClientType",{enumerable:!0,get:function(){return ab.ServiceClientType}})});var Am=d(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.getExportRequestProto=ye.ServiceClientType=ye.OTLPProtoExporterBrowserBase=ye.send=ye.OTLPProtoExporterNodeBase=void 0;var Om=Tm();Object.defineProperty(ye,"OTLPProtoExporterNodeBase",{enumerable:!0,get:function(){return Om.OTLPProtoExporterNodeBase}});Object.defineProperty(ye,"send",{enumerable:!0,get:function(){return Om.send}});var cb=bm();Object.defineProperty(ye,"OTLPProtoExporterBrowserBase",{enumerable:!0,get:function(){return cb.OTLPProtoExporterBrowserBase}});var lb=rs();Object.defineProperty(ye,"ServiceClientType",{enumerable:!0,get:function(){return lb.ServiceClientType}});var pb=un();Object.defineProperty(ye,"getExportRequestProto",{enumerable:!0,get:function(){return pb.getExportRequestProto}})});var q=Q(Lu(),1);y();Du();var Mm=Q(Ef(),1),Tr=Q(pt(),1),Cm=Q(Cf(),1),Um=Q(qd(),1),Dm=Q(fe(),1),Sr=Q(hn(),1),Bm=Q(Gd(),1),be=Q(N(),1);y();var zT=Symbol.for("@vercel/request-context");function cr(){return globalThis[zT]?.get()}var rc=Q(fe(),1);function ki(i){return Object.fromEntries(Object.entries(i).filter(([r,o])=>o!==void 0))}function Hd(i){return i?i.split("::").at(-1):void 0}function Fd(i=cr(),r){if(!i)return;let o=r?YT(r,i.headers):void 0;return ki({[rc.SemanticAttributes.HTTP_HOST]:i.headers.host,[rc.SemanticAttributes.HTTP_USER_AGENT]:i.headers["user-agent"],"http.referer":i.headers.referer,"vercel.request_id":Hd(i.headers["x-vercel-id"]),"vercel.matched_path":i.headers["x-matched-path"],"vercel.edge_region":i.headers["x-vercel-edge-region"],...o})}var $T={keys(i){return[]},get(i,r){return i[r.toLocaleLowerCase()]}};function YT(i,r){if(typeof i=="function")return i(r,$T);let o={};for(let[c,s]of Object.entries(i)){let a=r[s.toLocaleLowerCase()];a!==void 0&&(o[c]=a)}return o}y();function $r(i){return(i&_.TraceFlags.SAMPLED)!==0}var qi=class{constructor(r,o){this.processors=r;this.attributesFromHeaders=o;this.rootSpanIds=new Map;this.waitSpanEnd=new Map}forceFlush(){return Promise.all(this.processors.map(r=>r.forceFlush().catch(o=>{_.diag.error("@vercel/otel: forceFlush failed:",o)}))).then(()=>{})}shutdown(){return Promise.all(this.processors.map(r=>r.shutdown().catch(()=>{}))).then(()=>{})}onStart(r,o){let{traceId:c,spanId:s,traceFlags:a}=r.spanContext(),t=!r.parentSpanId||!this.rootSpanIds.has(c);if(t?this.rootSpanIds.set(c,{rootSpanId:s,open:[]}):this.rootSpanIds.get(c)?.open.push(r),t&&$r(a)){let e=cr(),n=Fd(e,this.attributesFromHeaders);n&&r.setAttributes(n),e&&e.waitUntil(async()=>{if(this.rootSpanIds.has(c)){let u=new Promise(h=>{this.waitSpanEnd.set(c,h)}),l;await Promise.race([u,new Promise(h=>{l=setTimeout(()=>{this.waitSpanEnd.delete(c),h(void 0)},50)})]),l&&clearTimeout(l)}return this.forceFlush()})}for(let e of this.processors)e.onStart(r,o)}onEnd(r){let{traceId:o,spanId:c,traceFlags:s}=r.spanContext(),a=$r(s),t=this.rootSpanIds.get(o),e=t?.rootSpanId===c;if(a){let n=JT(r);n&&Object.assign(r.attributes,n)}if(e){if(this.rootSpanIds.delete(o),t.open.length>0){for(let n of t.open)if(!n.ended&&n.spanContext().spanId!==c)try{n.end()}catch(u){_.diag.error("@vercel/otel: onEnd failed:",u)}}}else if(t)for(let n=0;n<t.open.length;n++)t.open[n]?.spanContext().spanId===c&&t.open.splice(n,1);for(let n of this.processors)n.onEnd(r);if(e){let n=this.waitSpanEnd.get(o);n&&(this.waitSpanEnd.delete(o),n())}}},WT={[_.SpanKind.INTERNAL]:"internal",[_.SpanKind.SERVER]:"server",[_.SpanKind.CLIENT]:"client",[_.SpanKind.PRODUCER]:"producer",[_.SpanKind.CONSUMER]:"consumer"};function JT(i){let{kind:r,attributes:o}=i,{"operation.name":c,"resouce.name":s,"span.type":a,"next.span_type":t,"http.method":e,"http.route":n}=o;if(c)return;let u=s??(e&&typeof e=="string"&&n&&typeof n=="string"?`${e} ${n}`:n);if(i.kind===_.SpanKind.SERVER&&e&&n&&typeof e=="string"&&typeof n=="string")return{"operation.name":"web.request","resource.name":u};let l=i.instrumentationLibrary.name,h=t??a;if(h&&typeof h=="string"){let T=Kd(l,h);return n?{"operation.name":T,"resource.name":u}:{"operation.name":T}}return{"operation.name":Kd(l,r===_.SpanKind.INTERNAL?"":WT[r])}}function Kd(i,r){if(!i)return r;let o=i.replace(/[ @./]/g,"_");return o.startsWith("_")&&(o=o.slice(1)),r?`${o}.${r}`:o}var oh=Q(cc(),1);var nh=Q(Wr(),1);y();var lr=class extends nh.OTLPExporterBase{constructor(r={}){super(r),r.headers&&(this._headers=r.headers)}onShutdown(){_.diag.debug("@vercel/otel/otlp: onShutdown")}onInit(){_.diag.debug("@vercel/otel/otlp: onInit")}send(r,o,c){if(this._shutdownOnce.isCalled){_.diag.debug("@vercel/otel/otlp: Shutdown already started. Cannot send objects");return}let s=this.convert(r),a,t,e;try{({body:a,contentType:t,headers:e}=this.toMessage(s))}catch(u){_.diag.warn("@vercel/otel/otlp: no proto",u);return}let n=fetch(this.url,{method:"POST",body:a,headers:{...this._headers,...e,"Content-Type":t,"User-Agent":"OTel-OTLP-Exporter-JavaScript/0.46.0"},next:{internal:!0}}).then(u=>{_.diag.debug("@vercel/otel/otlp: onSuccess",u.status,u.statusText),o(),u.arrayBuffer().catch(()=>{})}).catch(u=>{_.diag.error("@vercel/otel/otlp: onError",u),c(u)}).finally(()=>{let u=this._sendingPromises.indexOf(n);this._sendingPromises.splice(u,1)});this._sendingPromises.push(n)}getDefaultUrl(r){throw new Error("Method not implemented.")}};var ES="v1/traces",gS=`http://localhost:4318/${ES}`;function Fi(i){return typeof i.url=="string"?i.url:gS}var pr=class{constructor(r={}){this.impl=new dc(r)}export(r,o){this.impl.export(r,o)}shutdown(){return this.impl.shutdown()}forceFlush(){return this.impl.forceFlush()}},dc=class extends lr{convert(r){return(0,oh.createExportTraceServiceRequest)(r,{useHex:!0,useLongBits:!1})}toMessage(r){return{body:JSON.stringify(r),contentType:"application/json"}}getDefaultUrl(r){return Fi(r)}};var Pm=Q(cc(),1),Nm=Q(Am(),1),Rm=Q(un(),1);var Tt=class{constructor(r={}){this.impl=new jc(r)}export(r,o){this.impl.export(r,o)}shutdown(){return this.impl.shutdown()}forceFlush(){return this.impl.forceFlush()}},jc=class extends lr{convert(r){return(0,Pm.createExportTraceServiceRequest)(r,void 0)}toMessage(r){let o=Nm.ServiceClientType.SPANS,c=(0,Rm.getExportRequestProto)(o),s=c.create(r);return{body:c.encode(s).finish(),contentType:"application/x-protobuf",headers:{accept:"application/x-protobuf"}}}getDefaultUrl(r){return Fi(r)}};y();var Ce=Q(fe(),1);function xm(i,r){return i.replace(/\{(?<temp1>[^{}]+)\}/g,(o,c)=>{let s=r[c];return s!==void 0?String(s):o})}var gr=class{constructor(r={}){this.instrumentationName="@vercel/otel/fetch";this.instrumentationVersion="1.0.0";this.config=r}getConfig(){return this.config}setConfig(){}setTracerProvider(r){this.tracerProvider=r}setMeterProvider(){}enable(){this.disable();let{tracerProvider:r}=this;if(!r)return;let o=r.getTracer(this.instrumentationName,this.instrumentationVersion),c=this.config.ignoreUrls??[],s=(x,B)=>{if(B?.opentelemetry?.ignore!==void 0)return B.opentelemetry.ignore;if(c.length===0)return!1;let b=x.toString();return c.some(S=>typeof S=="string"?S==="*"?!0:b.startsWith(S):S.test(b))},a=process.env.VERCEL_URL||process.env.NEXT_PUBLIC_VERCEL_URL||null,t=process.env.VERCEL_BRANCH_URL||process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL||null,e=this.config.propagateContextUrls??[],n=this.config.dontPropagateContextUrls??[],u=this.config.resourceNameTemplate,{attributesFromRequestHeaders:l,attributesFromResponseHeaders:h}=this.config,T=(x,B)=>{if(B?.opentelemetry?.propagateContext)return B.opentelemetry.propagateContext;let b=x.toString();return n.length>0&&n.some(S=>typeof S=="string"?S==="*"?!0:b.startsWith(S):S.test(b))?!1:a&&x.protocol==="https:"&&(x.host===a||x.host===t||x.host===cr()?.headers.host)||!a&&x.protocol==="http:"&&x.hostname==="localhost"?!0:e.some(S=>typeof S=="string"?S==="*"?!0:b.startsWith(S):S.test(b))};process.env.NEXT_OTEL_FETCH_DISABLED="1";let D=globalThis.fetch;this.originalFetch=D;let L=async(x,B)=>{let b=B;if(b?.next?.internal)return D(x,b);let S=new Request(x instanceof Request?x.clone():x,b),K=new URL(S.url);if(s(K,b))return D(x,b);let as={[Ce.SemanticAttributes.HTTP_METHOD]:S.method,[Ce.SemanticAttributes.HTTP_URL]:S.url,[Ce.SemanticAttributes.HTTP_HOST]:K.host,[Ce.SemanticAttributes.HTTP_SCHEME]:K.protocol.replace(":",""),[Ce.SemanticAttributes.NET_PEER_NAME]:K.hostname,[Ce.SemanticAttributes.NET_PEER_PORT]:K.port},St=u?xm(u,as):db(S.url),km=b?.opentelemetry?.spanName??`fetch ${S.method} ${S.url}`,Y=o.startSpan(km,{kind:_.SpanKind.CLIENT,attributes:{...as,"operation.name":`fetch.${S.method}`,"resource.name":St,...b?.opentelemetry?.attributes}},_.context.active());if(!Y.isRecording()||!$r(Y.spanContext().traceFlags))return Y.end(),D(x,b);T(K,b)&&_.propagation.inject(_.context.active(),S.headers,fb),l&&Im(Y,l,S.headers);try{let an=Date.now(),Ue=await D(x,{...b,headers:S.headers}),qm=Date.now()-an;return Y.setAttribute(Ce.SemanticAttributes.HTTP_STATUS_CODE,Ue.status),Y.setAttribute("http.response_time",qm),h&&Im(Y,h,Ue.headers),Ue.status>=500&&Gc(Y,`Status: ${Ue.status} (${Ue.statusText})`),Ue.body?hb(Ue).then(cs=>{Y.isRecording()&&(Y.setAttribute(Ce.SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED,cs),Y.end())},cs=>{Y.isRecording()&&(Gc(Y,cs),Y.end())}):Y.end(),Ue}catch(an){throw Gc(Y,an),Y.end(),an}};globalThis.fetch=L}disable(){this.originalFetch&&(globalThis.fetch=this.originalFetch)}},fb={set(i,r,o){i.set(r,o)}};function db(i){let r=i.indexOf("?");return r===-1?i:i.substring(0,r)}function hb(i){let r=0,c=i.clone().body?.getReader();if(!c)return Promise.resolve(0);let s=()=>c.read().then(({done:a,value:t})=>{if(!a)return r+=t.byteLength,s()});return s().then(()=>r)}function Gc(i,r){if(r instanceof Error)i.recordException(r),i.setStatus({code:_.SpanStatusCode.ERROR,message:r.message});else{let o=String(r);i.setStatus({code:_.SpanStatusCode.ERROR,message:o})}}function Im(i,r,o){for(let[c,s]of Object.entries(r)){let a=o.get(s);a!==null&&i.setAttribute(c,a)}}var us=class{constructor(r={}){this.configuration=r}start(){let r=mb(),o=(0,Sr.getEnvWithoutDefaults)(),c=this.configuration,s=process.env.NEXT_RUNTIME||"nodejs",a=!!r.OTEL_SDK_DISABLED;if(o.OTEL_LOG_LEVEL&&_.diag.setLogger(new _.DiagConsoleLogger,{logLevel:o.OTEL_LOG_LEVEL}),a)return;let t=c.idGenerator??new q.RandomIdGenerator,e=c.contextManager??new Bm.AsyncLocalStorageContextManager;e.enable(),this.contextManager=e;let n=r.OTEL_SERVICE_NAME||c.serviceName||"app",u=new Tr.Resource(ki({[Dm.SemanticResourceAttributes.SERVICE_NAME]:n,"node.ci":process.env.CI?!0:void 0,"node.env":process.env.NODE_ENV,env:process.env.VERCEL_ENV||process.env.NEXT_PUBLIC_VERCEL_ENV,"vercel.region":process.env.VERCEL_REGION,"vercel.runtime":s,"vercel.sha":process.env.VERCEL_GIT_COMMIT_SHA||process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA,"vercel.host":process.env.VERCEL_URL||process.env.NEXT_PUBLIC_VERCEL_URL||void 0,"vercel.branch_host":process.env.VERCEL_BRANCH_URL||process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL||void 0,...c.attributes})),l=c.resourceDetectors??[Tr.envDetectorSync];if(c.autoDetectResources??!0){let S={detectors:l};u=u.merge((0,Tr.detectResourcesSync)(S))}let T=yb(c.propagators,r),D=Eb(c.traceSampler,r),L=gb(c.spanProcessors,c,r);L.length===0&&_.diag.warn("@vercel/otel: No span processors configured. No spans will be exported.");let x=c.spanLimits,B=new q.BasicTracerProvider({resource:u,idGenerator:t,sampler:D,spanLimits:x});if(B.addSpanProcessor(new qi(L,c.attributesFromHeaders)),B.register({contextManager:e,propagator:new be.CompositePropagator({propagators:T})}),this.tracerProvider=B,c.logRecordProcessor){let S=new Cm.LoggerProvider({resource:u});this.loggerProvider=S,S.addLogRecordProcessor(c.logRecordProcessor),ht.logs.setGlobalLoggerProvider(S)}if(c.metricReader||c.views){let S=new Um.MeterProvider({resource:u,views:c.views??[]});c.metricReader&&S.addMetricReader(c.metricReader),_.metrics.setGlobalMeterProvider(S),this.meterProvider=S}let b=_b(c.instrumentations,c.instrumentationConfig);this.disableInstumentations=(0,Mm.registerInstrumentations)({instrumentations:b}),_.diag.info("@vercel/otel: started",n,s)}async shutdown(){let r=[];this.tracerProvider&&r.push(this.tracerProvider.shutdown()),this.loggerProvider&&r.push(this.loggerProvider.shutdown()),this.meterProvider&&r.push(this.meterProvider.shutdown()),_.diag.info("@vercel/otel: shutting down",r.length,process.env.NEXT_RUNTIME),await Promise.all(r),this.contextManager&&this.contextManager.disable();let{disableInstumentations:o}=this;o&&o()}};function mb(){let i=(0,Sr.parseEnvironment)(process.env);return{...Sr.DEFAULT_ENVIRONMENT,...i}}function _b(i,r){return(i??["auto"]).map(o=>o==="auto"?(_.diag.debug("@vercel/otel: Configure instrumentations: fetch",r?.fetch),[new gr(r?.fetch)]):o==="fetch"?(_.diag.debug("@vercel/otel: Configure instrumentations: fetch",r?.fetch),new gr(r?.fetch)):o).flat()}function yb(i,r){let o=r.OTEL_PROPAGATORS&&r.OTEL_PROPAGATORS.length>0?r.OTEL_PROPAGATORS:void 0;return(i??o??["auto"]).map(c=>{if(c==="none")return[];if(c==="auto")return _.diag.debug("@vercel/otel: Configure propagators: tracecontext, baggage"),[new be.W3CTraceContextPropagator,new be.W3CBaggagePropagator];if(c==="tracecontext")return _.diag.debug("@vercel/otel: Configure propagator: tracecontext"),new be.W3CTraceContextPropagator;if(c==="baggage")return _.diag.debug("@vercel/otel: Configure propagator: baggage"),new be.W3CBaggagePropagator;if(typeof c=="string")throw new Error(`Unknown propagator: "${c}"`);return c}).flat()}var Lm="always_on",vr=1;function Eb(i,r){if(i&&typeof i!="string")return i;let o=i&&i!=="auto"?i:r.OTEL_TRACES_SAMPLER||Lm;switch(_.diag.debug("@vercel/otel: Configure sampler: ",o),o){case"always_on":return new q.AlwaysOnSampler;case"always_off":return new q.AlwaysOffSampler;case"parentbased_always_on":return new q.ParentBasedSampler({root:new q.AlwaysOnSampler});case"parentbased_always_off":return new q.ParentBasedSampler({root:new q.AlwaysOffSampler});case"traceidratio":return new q.TraceIdRatioBasedSampler(wm(r));case"parentbased_traceidratio":return new q.ParentBasedSampler({root:new q.TraceIdRatioBasedSampler(wm(r))});default:return _.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER value "${String(r.OTEL_TRACES_SAMPLER)} invalid, defaulting to ${Lm}".`),new q.AlwaysOnSampler}}function wm(i){if(i.OTEL_TRACES_SAMPLER_ARG===void 0||i.OTEL_TRACES_SAMPLER_ARG==="")return _.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${vr}.`),vr;_.diag.debug("@vercel/otel: Configure sampler probability: ",i.OTEL_TRACES_SAMPLER_ARG);let r=Number(i.OTEL_TRACES_SAMPLER_ARG);return isNaN(r)?(_.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${i.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${vr}.`),vr):r<0||r>1?(_.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${i.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${vr}.`),vr):r}function gb(i,r,o){return[...(i??["auto"]).map(c=>{if(c==="auto"){if(process.env.VERCEL_OTEL_ENDPOINTS){let s=process.env.VERCEL_OTEL_ENDPOINTS_PORT||"4318",a=process.env.VERCEL_OTEL_ENDPOINTS_PROTOCOL||"http/protobuf";_.diag.debug("@vercel/otel: Configure vercel otel collector on port: ",s,a);let t={url:`http://localhost:${s}/v1/traces`,headers:{}},e=a==="http/protobuf"?new Tt(t):new pr(t);return new q.BatchSpanProcessor(e)}return!r.traceExporter||r.traceExporter==="auto"||o.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT||o.OTEL_EXPORTER_OTLP_ENDPOINT?new q.BatchSpanProcessor(vb(o)):void 0}return c}).filter(bb),...r.traceExporter&&r.traceExporter!=="auto"?[new q.BatchSpanProcessor(r.traceExporter)]:[]]}function vb(i){let r=process.env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL??process.env.OTEL_EXPORTER_OTLP_PROTOCOL??"http/protobuf",o=Sb(i),c={...be.baggageUtils.parseKeyPairsIntoRecord(i.OTEL_EXPORTER_OTLP_HEADERS),...be.baggageUtils.parseKeyPairsIntoRecord(i.OTEL_EXPORTER_OTLP_TRACES_HEADERS)};switch(_.diag.debug("@vercel/otel: Configure trace exporter: ",r,o,`headers: ${Object.keys(c).join(",")||"<none>"}`),r){case"http/json":return new pr({url:o,headers:c});case"http/protobuf":return new Tt({url:o,headers:c});default:return _.diag.warn(`@vercel/otel: Unsupported OTLP traces protocol: ${r}. Using http/protobuf.`),new Tt}}var Vm="v1/traces",Tb=`http://localhost:4318/${Vm}`;function Sb(i){let r=i.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT;if(r&&typeof r=="string")return r;let o=i.OTEL_EXPORTER_OTLP_ENDPOINT;return o&&typeof o=="string"?`${o}/${Vm}`:Tb}function bb(i){return i!=null}function cR(i){let r;i?typeof i=="string"?r={serviceName:i}:r=i:r={},new us(r).start()}export{gr as FetchInstrumentation,pr as OTLPHttpJsonTraceExporter,Tt as OTLPHttpProtoTraceExporter,cR as registerOTel};
|
|
20
|
+
`,(0,Si.getConflictResolutionRecipe)(a,r))}return c}};bi.MetricStorageRegistry=Da});var Od=d(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.MultiMetricStorage=void 0;var Ba=class{constructor(r){this._backingStorages=r}record(r,o,c,s){this._backingStorages.forEach(a=>{a.record(r,o,c,s)})}};Oi.MultiMetricStorage=Ba});var Pd=d(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.BatchObservableResultImpl=ar.ObservableResultImpl=void 0;var ur=(y(),E(_)),Ad=Xr(),sT=mi(),Va=class{constructor(r,o){this._instrumentName=r,this._valueType=o,this._buffer=new Ad.AttributeHashMap}observe(r,o={}){if(typeof r!="number"){ur.diag.warn(`non-number value provided to metric ${this._instrumentName}: ${r}`);return}this._valueType===ur.ValueType.INT&&!Number.isInteger(r)&&(ur.diag.warn(`INT value type cannot accept a floating-point value for ${this._instrumentName}, ignoring the fractional digits.`),r=Math.trunc(r),!Number.isInteger(r))||this._buffer.set(o,r)}};ar.ObservableResultImpl=Va;var ka=class{constructor(){this._buffer=new Map}observe(r,o,c={}){if(!(0,sT.isObservableInstrument)(r))return;let s=this._buffer.get(r);if(s==null&&(s=new Ad.AttributeHashMap,this._buffer.set(r,s)),typeof o!="number"){ur.diag.warn(`non-number value provided to metric ${r._descriptor.name}: ${o}`);return}r._descriptor.valueType===ur.ValueType.INT&&!Number.isInteger(o)&&(ur.diag.warn(`INT value type cannot accept a floating-point value for ${r._descriptor.name}, ignoring the fractional digits.`),o=Math.trunc(o),!Number.isInteger(o))||s.set(c,o)}};ar.BatchObservableResultImpl=ka});var xd=d(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.ObservableRegistry=void 0;var uT=(y(),E(_)),Nd=mi(),Rd=Pd(),zr=Ne(),qa=class{constructor(){this._callbacks=[],this._batchCallbacks=[]}addCallback(r,o){this._findCallback(r,o)>=0||this._callbacks.push({callback:r,instrument:o})}removeCallback(r,o){let c=this._findCallback(r,o);c<0||this._callbacks.splice(c,1)}addBatchCallback(r,o){let c=new Set(o.filter(Nd.isObservableInstrument));if(c.size===0){uT.diag.error("BatchObservableCallback is not associated with valid instruments",o);return}this._findBatchCallback(r,c)>=0||this._batchCallbacks.push({callback:r,instruments:c})}removeBatchCallback(r,o){let c=new Set(o.filter(Nd.isObservableInstrument)),s=this._findBatchCallback(r,c);s<0||this._batchCallbacks.splice(s,1)}async observe(r,o){let c=this._observeCallbacks(r,o),s=this._observeBatchCallbacks(r,o);return(await(0,zr.PromiseAllSettled)([...c,...s])).filter(zr.isPromiseAllSettledRejectionResult).map(e=>e.reason)}_observeCallbacks(r,o){return this._callbacks.map(async({callback:c,instrument:s})=>{let a=new Rd.ObservableResultImpl(s._descriptor.name,s._descriptor.valueType),t=Promise.resolve(c(a));o!=null&&(t=(0,zr.callWithTimeout)(t,o)),await t,s._metricStorages.forEach(e=>{e.record(a._buffer,r)})})}_observeBatchCallbacks(r,o){return this._batchCallbacks.map(async({callback:c,instruments:s})=>{let a=new Rd.BatchObservableResultImpl,t=Promise.resolve(c(a));o!=null&&(t=(0,zr.callWithTimeout)(t,o)),await t,s.forEach(e=>{let n=a._buffer.get(e);n!=null&&e._metricStorages.forEach(u=>{u.record(n,r)})})})}_findCallback(r,o){return this._callbacks.findIndex(c=>c.callback===r&&c.instrument===o)}_findBatchCallback(r,o){return this._batchCallbacks.findIndex(c=>c.callback===r&&(0,zr.setEquals)(c.instruments,o))}};Ai.ObservableRegistry=qa});var Id=d(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.SyncMetricStorage=void 0;var aT=Ra(),cT=wa(),lT=Ca(),ja=class extends aT.MetricStorage{constructor(r,o,c,s){super(r),this._attributesProcessor=c,this._deltaMetricStorage=new cT.DeltaMetricProcessor(o),this._temporalMetricStorage=new lT.TemporalMetricProcessor(o,s)}record(r,o,c,s){o=this._attributesProcessor.process(o,c),this._deltaMetricStorage.record(r,o,c,s)}collect(r,o){let c=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,c,o)}};Pi.SyncMetricStorage=ja});var Ha=d(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.FilteringAttributesProcessor=He.NoopAttributesProcessor=He.AttributesProcessor=void 0;var $r=class{static Noop(){return pT}};He.AttributesProcessor=$r;var Ni=class extends $r{process(r,o){return r}};He.NoopAttributesProcessor=Ni;var Ga=class extends $r{constructor(r){super(),this._allowedAttributeNames=r}process(r,o){let c={};return Object.keys(r).filter(s=>this._allowedAttributeNames.includes(s)).forEach(s=>c[s]=r[s]),c}};He.FilteringAttributesProcessor=Ga;var pT=new Ni});var Ld=d(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.MeterSharedState=void 0;var fT=we(),dT=md(),hT=Ne(),mT=_d(),_T=bd(),yT=Od(),ET=xd(),gT=Id(),vT=Ha(),Fa=class{constructor(r,o){this._meterProviderSharedState=r,this._instrumentationScope=o,this.metricStorageRegistry=new _T.MetricStorageRegistry,this.observableRegistry=new ET.ObservableRegistry,this.meter=new dT.Meter(this)}registerMetricStorage(r){let o=this._registerMetricStorage(r,gT.SyncMetricStorage);return o.length===1?o[0]:new yT.MultiMetricStorage(o)}registerAsyncMetricStorage(r){return this._registerMetricStorage(r,mT.AsyncMetricStorage)}async collect(r,o,c){let s=await this.observableRegistry.observe(o,c?.timeoutMillis),a=this.metricStorageRegistry.getStorages(r);if(a.length===0)return null;let t=a.map(e=>e.collect(r,o)).filter(hT.isNotNullish);return t.length===0?{errors:s}:{scopeMetrics:{scope:this._instrumentationScope,metrics:t},errors:s}}_registerMetricStorage(r,o){let s=this._meterProviderSharedState.viewRegistry.findViews(r,this._instrumentationScope).map(a=>{let t=(0,fT.createInstrumentDescriptorWithView)(a,r),e=this.metricStorageRegistry.findOrUpdateCompatibleStorage(t);if(e!=null)return e;let n=a.aggregation.createAggregator(t),u=new o(t,n,a.attributesProcessor,this._meterProviderSharedState.metricCollectors);return this.metricStorageRegistry.register(u),u});if(s.length===0){let t=this._meterProviderSharedState.selectAggregations(r.type).map(([e,n])=>{let u=this.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(e,r);if(u!=null)return u;let l=n.createAggregator(r),h=new o(r,l,vT.AttributesProcessor.Noop(),[e]);return this.metricStorageRegistry.registerForCollector(e,h),h});s=s.concat(t)}return s}};Ri.MeterSharedState=Fa});var wd=d(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});xi.MeterProviderSharedState=void 0;var TT=Ne(),ST=hd(),bT=Ld(),Ka=class{constructor(r){this.resource=r,this.viewRegistry=new ST.ViewRegistry,this.metricCollectors=[],this.meterSharedStates=new Map}getMeterSharedState(r){let o=(0,TT.instrumentationScopeId)(r),c=this.meterSharedStates.get(o);return c==null&&(c=new bT.MeterSharedState(this,r),this.meterSharedStates.set(o,c)),c}selectAggregations(r){let o=[];for(let c of this.metricCollectors)o.push([c,c.selectAggregation(r)]);return o}};xi.MeterProviderSharedState=Ka});var Md=d(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.MetricCollector=void 0;var OT=N(),Xa=class{constructor(r,o){this._sharedState=r,this._metricReader=o}async collect(r){let o=(0,OT.millisToHrTime)(Date.now()),c=[],s=[],a=Array.from(this._sharedState.meterSharedStates.values()).map(async t=>{let e=await t.collect(this,o,r);e?.scopeMetrics!=null&&c.push(e.scopeMetrics),e?.errors!=null&&s.push(...e.errors)});return await Promise.all(a),{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:c},errors:s}}async forceFlush(r){await this._metricReader.forceFlush(r)}async shutdown(r){await this._metricReader.shutdown(r)}selectAggregationTemporality(r){return this._metricReader.selectAggregationTemporality(r)}selectAggregation(r){return this._metricReader.selectAggregation(r)}};Ii.MetricCollector=Xa});var Ud=d(wi=>{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});wi.MeterProvider=void 0;var Li=(y(),E(_)),Cd=pt(),AT=wd(),PT=Md(),za=class{constructor(r){var o;this._shutdown=!1;let c=Cd.Resource.default().merge((o=r?.resource)!==null&&o!==void 0?o:Cd.Resource.empty());if(this._sharedState=new AT.MeterProviderSharedState(c),r?.views!=null&&r.views.length>0)for(let s of r.views)this._sharedState.viewRegistry.addView(s)}getMeter(r,o="",c={}){return this._shutdown?(Li.diag.warn("A shutdown MeterProvider cannot provide a Meter"),(0,Li.createNoopMeter)()):this._sharedState.getMeterSharedState({name:r,version:o,schemaUrl:c.schemaUrl}).meter}addMetricReader(r){let o=new PT.MetricCollector(this._sharedState,r);r.setMetricProducer(o),this._sharedState.metricCollectors.push(o)}async shutdown(r){if(this._shutdown){Li.diag.warn("shutdown may only be called once per MeterProvider");return}this._shutdown=!0,await Promise.all(this._sharedState.metricCollectors.map(o=>o.shutdown(r)))}async forceFlush(r){if(this._shutdown){Li.diag.warn("invalid attempt to force flush after MeterProvider shutdown");return}await Promise.all(this._sharedState.metricCollectors.map(o=>o.forceFlush(r)))}};wi.MeterProvider=za});var Mi=d(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.ExactPredicate=cr.PatternPredicate=void 0;var NT=/[\^$\\.+?()[\]{}|]/g,$a=class i{constructor(r){r==="*"?(this._matchAll=!0,this._regexp=/.*/):(this._matchAll=!1,this._regexp=new RegExp(i.escapePattern(r)))}match(r){return this._matchAll?!0:this._regexp.test(r)}static escapePattern(r){return`^${r.replace(NT,"\\$&").replace("*",".*")}$`}static hasWildcard(r){return r.includes("*")}};cr.PatternPredicate=$a;var Ya=class{constructor(r){this._matchAll=r===void 0,this._pattern=r}match(r){return!!(this._matchAll||r===this._pattern)}};cr.ExactPredicate=Ya});var Bd=d(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.InstrumentSelector=void 0;var Dd=Mi(),Wa=class{constructor(r){var o;this._nameFilter=new Dd.PatternPredicate((o=r?.name)!==null&&o!==void 0?o:"*"),this._type=r?.type,this._unitFilter=new Dd.ExactPredicate(r?.unit)}getType(){return this._type}getNameFilter(){return this._nameFilter}getUnitFilter(){return this._unitFilter}};Ci.InstrumentSelector=Wa});var Vd=d(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.MeterSelector=void 0;var Ja=Mi(),Qa=class{constructor(r){this._nameFilter=new Ja.ExactPredicate(r?.name),this._versionFilter=new Ja.ExactPredicate(r?.version),this._schemaUrlFilter=new Ja.ExactPredicate(r?.schemaUrl)}getNameFilter(){return this._nameFilter}getVersionFilter(){return this._versionFilter}getSchemaUrlFilter(){return this._schemaUrlFilter}};Ui.MeterSelector=Qa});var qd=d(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.View=void 0;var RT=Mi(),kd=Ha(),xT=Bd(),IT=Vd(),LT=ui();function wT(i){return i.instrumentName==null&&i.instrumentType==null&&i.instrumentUnit==null&&i.meterName==null&&i.meterVersion==null&&i.meterSchemaUrl==null}var Za=class{constructor(r){var o;if(wT(r))throw new Error("Cannot create view with no selector arguments supplied");if(r.name!=null&&(r?.instrumentName==null||RT.PatternPredicate.hasWildcard(r.instrumentName)))throw new Error("Views with a specified name must be declared with an instrument selector that selects at most one instrument per meter.");r.attributeKeys!=null?this.attributesProcessor=new kd.FilteringAttributesProcessor(r.attributeKeys):this.attributesProcessor=kd.AttributesProcessor.Noop(),this.name=r.name,this.description=r.description,this.aggregation=(o=r.aggregation)!==null&&o!==void 0?o:LT.Aggregation.Default(),this.instrumentSelector=new xT.InstrumentSelector({name:r.instrumentName,type:r.instrumentType,unit:r.instrumentUnit}),this.meterSelector=new IT.MeterSelector({name:r.meterName,version:r.meterVersion,schemaUrl:r.meterSchemaUrl})}};Di.View=Za});var jd=d(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});A.TimeoutError=A.View=A.Aggregation=A.SumAggregation=A.LastValueAggregation=A.HistogramAggregation=A.DropAggregation=A.ExponentialHistogramAggregation=A.ExplicitBucketHistogramAggregation=A.DefaultAggregation=A.MeterProvider=A.InstrumentType=A.ConsoleMetricExporter=A.InMemoryMetricExporter=A.PeriodicExportingMetricReader=A.MetricReader=A.DataPointType=A.AggregationTemporality=void 0;var MT=zo();Object.defineProperty(A,"AggregationTemporality",{enumerable:!0,get:function(){return MT.AggregationTemporality}});var CT=Ht();Object.defineProperty(A,"DataPointType",{enumerable:!0,get:function(){return CT.DataPointType}});var UT=ma();Object.defineProperty(A,"MetricReader",{enumerable:!0,get:function(){return UT.MetricReader}});var DT=cd();Object.defineProperty(A,"PeriodicExportingMetricReader",{enumerable:!0,get:function(){return DT.PeriodicExportingMetricReader}});var BT=pd();Object.defineProperty(A,"InMemoryMetricExporter",{enumerable:!0,get:function(){return BT.InMemoryMetricExporter}});var VT=dd();Object.defineProperty(A,"ConsoleMetricExporter",{enumerable:!0,get:function(){return VT.ConsoleMetricExporter}});var kT=we();Object.defineProperty(A,"InstrumentType",{enumerable:!0,get:function(){return kT.InstrumentType}});var qT=Ud();Object.defineProperty(A,"MeterProvider",{enumerable:!0,get:function(){return qT.MeterProvider}});var Fe=ui();Object.defineProperty(A,"DefaultAggregation",{enumerable:!0,get:function(){return Fe.DefaultAggregation}});Object.defineProperty(A,"ExplicitBucketHistogramAggregation",{enumerable:!0,get:function(){return Fe.ExplicitBucketHistogramAggregation}});Object.defineProperty(A,"ExponentialHistogramAggregation",{enumerable:!0,get:function(){return Fe.ExponentialHistogramAggregation}});Object.defineProperty(A,"DropAggregation",{enumerable:!0,get:function(){return Fe.DropAggregation}});Object.defineProperty(A,"HistogramAggregation",{enumerable:!0,get:function(){return Fe.HistogramAggregation}});Object.defineProperty(A,"LastValueAggregation",{enumerable:!0,get:function(){return Fe.LastValueAggregation}});Object.defineProperty(A,"SumAggregation",{enumerable:!0,get:function(){return Fe.SumAggregation}});Object.defineProperty(A,"Aggregation",{enumerable:!0,get:function(){return Fe.Aggregation}});var jT=qd();Object.defineProperty(A,"View",{enumerable:!0,get:function(){return jT.View}});var GT=Ne();Object.defineProperty(A,"TimeoutError",{enumerable:!0,get:function(){return GT.TimeoutError}})});var Gd=d(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.AbstractAsyncHooksContextManager=void 0;var HT=z("events"),FT=["addListener","on","once","prependListener","prependOnceListener"],ec=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(r,o){return o instanceof HT.EventEmitter?this._bindEventEmitter(r,o):typeof o=="function"?this._bindFunction(r,o):o}_bindFunction(r,o){let c=this,s=function(...a){return c.with(r,()=>o.apply(this,a))};return Object.defineProperty(s,"length",{enumerable:!1,configurable:!0,writable:!1,value:o.length}),s}_bindEventEmitter(r,o){return this._getPatchMap(o)!==void 0||(this._createPatchMap(o),FT.forEach(s=>{o[s]!==void 0&&(o[s]=this._patchAddListener(o,o[s],r))}),typeof o.removeListener=="function"&&(o.removeListener=this._patchRemoveListener(o,o.removeListener)),typeof o.off=="function"&&(o.off=this._patchRemoveListener(o,o.off)),typeof o.removeAllListeners=="function"&&(o.removeAllListeners=this._patchRemoveAllListeners(o,o.removeAllListeners))),o}_patchRemoveListener(r,o){let c=this;return function(s,a){var t;let e=(t=c._getPatchMap(r))===null||t===void 0?void 0:t[s];if(e===void 0)return o.call(this,s,a);let n=e.get(a);return o.call(this,s,n||a)}}_patchRemoveAllListeners(r,o){let c=this;return function(s){let a=c._getPatchMap(r);return a!==void 0&&(arguments.length===0?c._createPatchMap(r):a[s]!==void 0&&delete a[s]),o.apply(this,arguments)}}_patchAddListener(r,o,c){let s=this;return function(a,t){if(s._wrapped)return o.call(this,a,t);let e=s._getPatchMap(r);e===void 0&&(e=s._createPatchMap(r));let n=e[a];n===void 0&&(n=new WeakMap,e[a]=n);let u=s.bind(c,t);n.set(t,u),s._wrapped=!0;try{return o.call(this,a,u)}finally{s._wrapped=!1}}}_createPatchMap(r){let o=Object.create(null);return r[this._kOtListeners]=o,o}_getPatchMap(r){return r[this._kOtListeners]}};Bi.AbstractAsyncHooksContextManager=ec});var Hd=d(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});Vi.AsyncLocalStorageContextManager=void 0;var KT=(y(),E(_)),XT=z("async_hooks"),zT=Gd(),tc=class extends zT.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new XT.AsyncLocalStorage}active(){var r;return(r=this._asyncLocalStorage.getStore())!==null&&r!==void 0?r:KT.ROOT_CONTEXT}with(r,o,c,...s){let a=c==null?o:o.bind(c);return this._asyncLocalStorage.run(r,a,...s)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};Vi.AsyncLocalStorageContextManager=tc});var ic=d(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.toAnyValue=Ke.toKeyValue=Ke.toAttributes=void 0;function ZT(i){return Object.keys(i).map(r=>nc(r,i[r]))}Ke.toAttributes=ZT;function nc(i,r){return{key:i,value:oc(r)}}Ke.toKeyValue=nc;function oc(i){let r=typeof i;return r==="string"?{stringValue:i}:r==="number"?Number.isInteger(i)?{intValue:i}:{doubleValue:i}:r==="boolean"?{boolValue:i}:i instanceof Uint8Array?{bytesValue:i}:Array.isArray(i)?{arrayValue:{values:i.map(oc)}}:r==="object"&&i!=null?{kvlistValue:{values:Object.entries(i).map(([o,c])=>nc(o,c))}}:{}}Ke.toAnyValue=oc});var Yd=d(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.toOtlpSpanEvent=Xe.toOtlpLink=Xe.sdkSpanToOtlpSpan=void 0;var sc=ic();function eS(i,r){var o;let c=i.spanContext(),s=i.status;return{traceId:r.encodeSpanContext(c.traceId),spanId:r.encodeSpanContext(c.spanId),parentSpanId:r.encodeOptionalSpanContext(i.parentSpanId),traceState:(o=c.traceState)===null||o===void 0?void 0:o.serialize(),name:i.name,kind:i.kind==null?0:i.kind+1,startTimeUnixNano:r.encodeHrTime(i.startTime),endTimeUnixNano:r.encodeHrTime(i.endTime),attributes:(0,sc.toAttributes)(i.attributes),droppedAttributesCount:i.droppedAttributesCount,events:i.events.map(a=>$d(a,r)),droppedEventsCount:i.droppedEventsCount,status:{code:s.code,message:s.message},links:i.links.map(a=>zd(a,r)),droppedLinksCount:i.droppedLinksCount}}Xe.sdkSpanToOtlpSpan=eS;function zd(i,r){var o;return{attributes:i.attributes?(0,sc.toAttributes)(i.attributes):[],spanId:r.encodeSpanContext(i.context.spanId),traceId:r.encodeSpanContext(i.context.traceId),traceState:(o=i.context.traceState)===null||o===void 0?void 0:o.serialize(),droppedAttributesCount:i.droppedAttributesCount||0}}Xe.toOtlpLink=zd;function $d(i,r){return{attributes:i.attributes?(0,sc.toAttributes)(i.attributes):[],name:i.name,timeUnixNano:r.encodeHrTime(i.time),droppedAttributesCount:i.droppedAttributesCount||0}}Xe.toOtlpSpanEvent=$d});var eh=d(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.getOtlpEncoder=he.encodeAsString=he.encodeAsLongBits=he.toLongBits=he.hrTimeToNanos=void 0;var ji=N(),tS=BigInt(1e9);function uc(i){return BigInt(i[0])*tS+BigInt(i[1])}he.hrTimeToNanos=uc;function Jd(i){let r=Number(BigInt.asUintN(32,i)),o=Number(BigInt.asUintN(32,i>>BigInt(32)));return{low:r,high:o}}he.toLongBits=Jd;function ac(i){let r=uc(i);return Jd(r)}he.encodeAsLongBits=ac;function Qd(i){return uc(i).toString()}he.encodeAsString=Qd;var rS=typeof BigInt<"u"?Qd:ji.hrTimeToNanoseconds;function Wd(i){return i}function Zd(i){if(i!==void 0)return(0,ji.hexToBase64)(i)}var nS={encodeHrTime:ac,encodeSpanContext:ji.hexToBase64,encodeOptionalSpanContext:Zd};function oS(i){var r,o;if(i===void 0)return nS;let c=(r=i.useLongBits)!==null&&r!==void 0?r:!0,s=(o=i.useHex)!==null&&o!==void 0?o:!1;return{encodeHrTime:c?ac:rS,encodeSpanContext:s?Wd:ji.hexToBase64,encodeOptionalSpanContext:s?Wd:Zd}}he.getOtlpEncoder=oS});var cc=d(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.createExportTraceServiceRequest=void 0;var iS=ic(),sS=Yd(),uS=eh();function aS(i,r){let o=(0,uS.getOtlpEncoder)(r);return{resourceSpans:lS(i,o)}}Gi.createExportTraceServiceRequest=aS;function cS(i){let r=new Map;for(let o of i){let c=r.get(o.resource);c||(c=new Map,r.set(o.resource,c));let s=`${o.instrumentationLibrary.name}@${o.instrumentationLibrary.version||""}:${o.instrumentationLibrary.schemaUrl||""}`,a=c.get(s);a||(a=[],c.set(s,a)),a.push(o)}return r}function lS(i,r){let o=cS(i),c=[],s=o.entries(),a=s.next();for(;!a.done;){let[t,e]=a.value,n=[],u=e.values(),l=u.next();for(;!l.done;){let T=l.value;if(T.length>0){let{name:D,version:L,schemaUrl:x}=T[0].instrumentationLibrary,B=T.map(b=>(0,sS.sdkSpanToOtlpSpan)(b,r));n.push({scope:{name:D,version:L},spans:B,schemaUrl:x})}l=u.next()}let h={resource:{attributes:(0,iS.toAttributes)(t.attributes),droppedAttributesCount:0},scopeSpans:n,schemaUrl:void 0};c.push(h),a=s.next()}return c}});var Et=d(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.parseRetryAfterToMills=k.isExportRetryable=k.invalidTimeout=k.configureExporterTimeout=k.appendRootPathToUrlIfNeeded=k.appendResourcePathToUrl=k.parseHeaders=k.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=k.DEFAULT_EXPORT_MAX_BACKOFF=k.DEFAULT_EXPORT_INITIAL_BACKOFF=k.DEFAULT_EXPORT_MAX_ATTEMPTS=void 0;var lc=(y(),E(_)),th=N(),rh=1e4;k.DEFAULT_EXPORT_MAX_ATTEMPTS=5;k.DEFAULT_EXPORT_INITIAL_BACKOFF=1e3;k.DEFAULT_EXPORT_MAX_BACKOFF=5e3;k.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=1.5;function pS(i={}){let r={};return Object.entries(i).forEach(([o,c])=>{typeof c<"u"?r[o]=String(c):lc.diag.warn(`Header "${o}" has wrong value and will be ignored`)}),r}k.parseHeaders=pS;function fS(i,r){return i.endsWith("/")||(i=i+"/"),i+r}k.appendResourcePathToUrl=fS;function dS(i){try{let r=new URL(i);return r.pathname===""&&(r.pathname=r.pathname+"/"),r.toString()}catch{return lc.diag.warn(`Could not parse export URL: '${i}'`),i}}k.appendRootPathToUrlIfNeeded=dS;function hS(i){return typeof i=="number"?i<=0?pc(i,rh):i:mS()}k.configureExporterTimeout=hS;function mS(){var i;let r=Number((i=(0,th.getEnv)().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)!==null&&i!==void 0?i:(0,th.getEnv)().OTEL_EXPORTER_OTLP_TIMEOUT);return r<=0?pc(r,rh):r}function pc(i,r){return lc.diag.warn("Timeout must be greater than 0",i),r}k.invalidTimeout=pc;function _S(i){return[429,502,503,504].includes(i)}k.isExportRetryable=_S;function yS(i){if(i==null)return-1;let r=Number.parseInt(i,10);if(Number.isInteger(r))return r>0?r*1e3:-1;let o=new Date(i).getTime()-Date.now();return o>=0?o:0}k.parseRetryAfterToMills=yS});var Jr=d(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.OTLPExporterBase=void 0;var nh=(y(),E(_)),Wr=N(),ES=Et(),fc=class{constructor(r={}){this._sendingPromises=[],this.url=this.getDefaultUrl(r),typeof r.hostname=="string"&&(this.hostname=r.hostname),this.shutdown=this.shutdown.bind(this),this._shutdownOnce=new Wr.BindOnceFuture(this._shutdown,this),this._concurrencyLimit=typeof r.concurrencyLimit=="number"?r.concurrencyLimit:30,this.timeoutMillis=(0,ES.configureExporterTimeout)(r.timeoutMillis),this.onInit(r)}export(r,o){if(this._shutdownOnce.isCalled){o({code:Wr.ExportResultCode.FAILED,error:new Error("Exporter has been shutdown")});return}if(this._sendingPromises.length>=this._concurrencyLimit){o({code:Wr.ExportResultCode.FAILED,error:new Error("Concurrent export limit reached")});return}this._export(r).then(()=>{o({code:Wr.ExportResultCode.SUCCESS})}).catch(c=>{o({code:Wr.ExportResultCode.FAILED,error:c})})}_export(r){return new Promise((o,c)=>{try{nh.diag.debug("items to be sent",r),this.send(r,o,c)}catch(s){c(s)}})}shutdown(){return this._shutdownOnce.call()}forceFlush(){return Promise.all(this._sendingPromises).then(()=>{})}_shutdown(){return nh.diag.debug("shutdown started"),this.onShutdown(),this.forceFlush()}};Hi.OTLPExporterBase=fc});var hc=d(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.CompressionAlgorithm=void 0;var TS;(function(i){i.NONE="none",i.GZIP="gzip"})(TS=Qr.CompressionAlgorithm||(Qr.CompressionAlgorithm={}))});var Xi=d(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.OTLPExporterError=void 0;var mc=class extends Error{constructor(r,o,c){super(r),this.name="OTLPExporterError",this.data=c,this.code=o}};Ki.OTLPExporterError=mc});var yc=d(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.configureCompression=ze.createHttpAgent=ze.sendWithHttp=void 0;var uh=z("url"),ah=z("http"),ch=z("https"),SS=z("zlib"),bS=z("stream"),_c=(y(),E(_)),zi=hc(),sh=N(),Zr=Xi(),dr=Et();function OS(i,r,o,c,s){let a=i.timeoutMillis,t=new uh.URL(i.url),e=Number(process.versions.node.split(".")[0]),n,u,l=!1,h=setTimeout(()=>{if(clearTimeout(n),l=!0,u.destroyed){let x=new Zr.OTLPExporterError("Request Timeout");s(x)}else e>=14?u.destroy():u.abort()},a),T={hostname:t.hostname,port:t.port,path:t.pathname,method:"POST",headers:Object.assign({"Content-Type":o},i.headers),agent:i.agent},D=t.protocol==="http:"?ah.request:ch.request,L=(x=dr.DEFAULT_EXPORT_MAX_ATTEMPTS,B=dr.DEFAULT_EXPORT_INITIAL_BACKOFF)=>{switch(u=D(T,b=>{let S="";b.on("data",K=>S+=K),b.on("aborted",()=>{if(l){let K=new Zr.OTLPExporterError("Request Timeout");s(K)}}),b.on("end",()=>{if(l===!1)if(b.statusCode&&b.statusCode<299)_c.diag.debug(`statusCode: ${b.statusCode}`,S),c(),clearTimeout(h),clearTimeout(n);else if(b.statusCode&&(0,dr.isExportRetryable)(b.statusCode)&&x>0){let K;B=dr.DEFAULT_EXPORT_BACKOFF_MULTIPLIER*B,b.headers["retry-after"]?K=(0,dr.parseRetryAfterToMills)(b.headers["retry-after"]):K=Math.round(Math.random()*(dr.DEFAULT_EXPORT_MAX_BACKOFF-B)+B),n=setTimeout(()=>{L(x-1,B)},K)}else{let K=new Zr.OTLPExporterError(b.statusMessage,b.statusCode,S);s(K),clearTimeout(h),clearTimeout(n)}})}),u.on("error",b=>{if(l){let S=new Zr.OTLPExporterError("Request Timeout",b.code);s(S)}else s(b);clearTimeout(h),clearTimeout(n)}),u.on("abort",()=>{if(l){let b=new Zr.OTLPExporterError("Request Timeout");s(b)}clearTimeout(h),clearTimeout(n)}),i.compression){case zi.CompressionAlgorithm.GZIP:{u.setHeader("Content-Encoding","gzip"),AS(r).on("error",s).pipe(SS.createGzip()).on("error",s).pipe(u);break}default:u.end(r);break}};L()}ze.sendWithHttp=OS;function AS(i){let r=new bS.Readable;return r.push(i),r.push(null),r}function PS(i){if(i.httpAgentOptions&&i.keepAlive===!1){_c.diag.warn("httpAgentOptions is used only when keepAlive is true");return}if(!(i.keepAlive===!1||!i.url))try{let o=new uh.URL(i.url).protocol==="http:"?ah.Agent:ch.Agent;return new o(Object.assign({keepAlive:!0},i.httpAgentOptions))}catch(r){_c.diag.error(`collector exporter failed to create http agent. err: ${r.message}`);return}}ze.createHttpAgent=PS;function NS(i){return i||(((0,sh.getEnv)().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION||(0,sh.getEnv)().OTEL_EXPORTER_OTLP_COMPRESSION)===zi.CompressionAlgorithm.GZIP?zi.CompressionAlgorithm.GZIP:zi.CompressionAlgorithm.NONE)}ze.configureCompression=NS});var fh=d($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.OTLPExporterNodeBase=void 0;var RS=Jr(),xS=Et(),Ec=yc(),lh=(y(),E(_)),ph=N(),gc=class extends RS.OTLPExporterBase{constructor(r={}){super(r),this.DEFAULT_HEADERS={},r.metadata&&lh.diag.warn("Metadata cannot be set when using http"),this.headers=Object.assign(this.DEFAULT_HEADERS,(0,xS.parseHeaders)(r.headers),ph.baggageUtils.parseKeyPairsIntoRecord((0,ph.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)),this.agent=(0,Ec.createHttpAgent)(r),this.compression=(0,Ec.configureCompression)(r.compression)}onInit(r){}send(r,o,c){if(this._shutdownOnce.isCalled){lh.diag.debug("Shutdown already started. Cannot send objects");return}let s=this.convert(r),a=new Promise((e,n)=>{(0,Ec.sendWithHttp)(this,JSON.stringify(s),"application/json",e,n)}).then(o,c);this._sendingPromises.push(a);let t=()=>{let e=this._sendingPromises.indexOf(a);this._sendingPromises.splice(e,1)};a.then(t,t)}onShutdown(){}};$i.OTLPExporterNodeBase=gc});var dh=d(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.CompressionAlgorithm=me.configureCompression=me.createHttpAgent=me.sendWithHttp=me.OTLPExporterNodeBase=void 0;var IS=fh();Object.defineProperty(me,"OTLPExporterNodeBase",{enumerable:!0,get:function(){return IS.OTLPExporterNodeBase}});var vc=yc();Object.defineProperty(me,"sendWithHttp",{enumerable:!0,get:function(){return vc.sendWithHttp}});Object.defineProperty(me,"createHttpAgent",{enumerable:!0,get:function(){return vc.createHttpAgent}});Object.defineProperty(me,"configureCompression",{enumerable:!0,get:function(){return vc.configureCompression}});var LS=hc();Object.defineProperty(me,"CompressionAlgorithm",{enumerable:!0,get:function(){return LS.CompressionAlgorithm}})});var Tc=d(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.sendWithXhr=mr.sendWithBeacon=void 0;var hh=(y(),E(_)),en=Xi(),hr=Et();function wS(i,r,o,c,s){if(navigator.sendBeacon(r,new Blob([i],o)))hh.diag.debug("sendBeacon - can send",i),c();else{let a=new en.OTLPExporterError(`sendBeacon - cannot send ${i}`);s(a)}}mr.sendWithBeacon=wS;function MS(i,r,o,c,s,a){let t,e,n=!1,u=setTimeout(()=>{if(clearTimeout(t),n=!0,e.readyState===XMLHttpRequest.DONE){let h=new en.OTLPExporterError("Request Timeout");a(h)}else e.abort()},c),l=(h=hr.DEFAULT_EXPORT_MAX_ATTEMPTS,T=hr.DEFAULT_EXPORT_INITIAL_BACKOFF)=>{e=new XMLHttpRequest,e.open("POST",r),Object.entries(Object.assign(Object.assign({},{Accept:"application/json","Content-Type":"application/json"}),o)).forEach(([L,x])=>{e.setRequestHeader(L,x)}),e.send(i),e.onreadystatechange=()=>{if(e.readyState===XMLHttpRequest.DONE&&n===!1)if(e.status>=200&&e.status<=299)hh.diag.debug("xhr success",i),s(),clearTimeout(u),clearTimeout(t);else if(e.status&&(0,hr.isExportRetryable)(e.status)&&h>0){let L;T=hr.DEFAULT_EXPORT_BACKOFF_MULTIPLIER*T,e.getResponseHeader("Retry-After")?L=(0,hr.parseRetryAfterToMills)(e.getResponseHeader("Retry-After")):L=Math.round(Math.random()*(hr.DEFAULT_EXPORT_MAX_BACKOFF-T)+T),t=setTimeout(()=>{l(h-1,T)},L)}else{let L=new en.OTLPExporterError(`Failed to export with XHR (status: ${e.status})`,e.status);a(L),clearTimeout(u),clearTimeout(t)}},e.onabort=()=>{if(n){let L=new en.OTLPExporterError("Request Timeout");a(L)}clearTimeout(u),clearTimeout(t)},e.onerror=()=>{if(n){let L=new en.OTLPExporterError("Request Timeout");a(L)}clearTimeout(u),clearTimeout(t)}};l()}mr.sendWithXhr=MS});var _h=d(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});Wi.OTLPExporterBrowserBase=void 0;var CS=Jr(),US=Et(),mh=Tc(),DS=(y(),E(_)),Yi=N(),Sc=class extends CS.OTLPExporterBase{constructor(r={}){super(r),this._useXHR=!1,this._useXHR=!!r.headers||typeof navigator.sendBeacon!="function",this._useXHR?this._headers=Object.assign({},(0,US.parseHeaders)(r.headers),Yi.baggageUtils.parseKeyPairsIntoRecord((0,Yi.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)):this._headers={}}onInit(){Yi._globalThis.addEventListener("unload",this.shutdown)}onShutdown(){Yi._globalThis.removeEventListener("unload",this.shutdown)}send(r,o,c){if(this._shutdownOnce.isCalled){DS.diag.debug("Shutdown already started. Cannot send objects");return}let s=this.convert(r),a=JSON.stringify(s),t=new Promise((n,u)=>{this._useXHR?(0,mh.sendWithXhr)(a,this.url,this._headers,this.timeoutMillis,n,u):(0,mh.sendWithBeacon)(a,this.url,{type:"application/json"},n,u)}).then(o,c);this._sendingPromises.push(t);let e=()=>{let n=this._sendingPromises.indexOf(t);this._sendingPromises.splice(n,1)};t.then(e,e)}};Wi.OTLPExporterBrowserBase=Sc});var yh=d(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.sendWithXhr=_r.OTLPExporterBrowserBase=void 0;var BS=_h();Object.defineProperty(_r,"OTLPExporterBrowserBase",{enumerable:!0,get:function(){return BS.OTLPExporterBrowserBase}});var VS=Tc();Object.defineProperty(_r,"sendWithXhr",{enumerable:!0,get:function(){return VS.sendWithXhr}})});var gh=d(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.sendWithXhr=oe.OTLPExporterBrowserBase=oe.CompressionAlgorithm=oe.configureCompression=oe.createHttpAgent=oe.sendWithHttp=oe.OTLPExporterNodeBase=void 0;var tn=dh();Object.defineProperty(oe,"OTLPExporterNodeBase",{enumerable:!0,get:function(){return tn.OTLPExporterNodeBase}});Object.defineProperty(oe,"sendWithHttp",{enumerable:!0,get:function(){return tn.sendWithHttp}});Object.defineProperty(oe,"createHttpAgent",{enumerable:!0,get:function(){return tn.createHttpAgent}});Object.defineProperty(oe,"configureCompression",{enumerable:!0,get:function(){return tn.configureCompression}});Object.defineProperty(oe,"CompressionAlgorithm",{enumerable:!0,get:function(){return tn.CompressionAlgorithm}});var Eh=yh();Object.defineProperty(oe,"OTLPExporterBrowserBase",{enumerable:!0,get:function(){return Eh.OTLPExporterBrowserBase}});Object.defineProperty(oe,"sendWithXhr",{enumerable:!0,get:function(){return Eh.sendWithXhr}})});var Ji=d(j=>{"use strict";var kS=j&&j.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),qS=j&&j.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&kS(r,i,o)};Object.defineProperty(j,"__esModule",{value:!0});j.invalidTimeout=j.configureExporterTimeout=j.appendRootPathToUrlIfNeeded=j.appendResourcePathToUrl=j.parseHeaders=j.OTLPExporterError=j.OTLPExporterBase=void 0;qS(gh(),j);var jS=Jr();Object.defineProperty(j,"OTLPExporterBase",{enumerable:!0,get:function(){return jS.OTLPExporterBase}});var GS=Xi();Object.defineProperty(j,"OTLPExporterError",{enumerable:!0,get:function(){return GS.OTLPExporterError}});var rn=Et();Object.defineProperty(j,"parseHeaders",{enumerable:!0,get:function(){return rn.parseHeaders}});Object.defineProperty(j,"appendResourcePathToUrl",{enumerable:!0,get:function(){return rn.appendResourcePathToUrl}});Object.defineProperty(j,"appendRootPathToUrlIfNeeded",{enumerable:!0,get:function(){return rn.appendRootPathToUrlIfNeeded}});Object.defineProperty(j,"configureExporterTimeout",{enumerable:!0,get:function(){return rn.configureExporterTimeout}});Object.defineProperty(j,"invalidTimeout",{enumerable:!0,get:function(){return rn.invalidTimeout}})});var Th=d((vN,vh)=>{"use strict";vh.exports=HS;function HS(i,r){for(var o=new Array(arguments.length-1),c=0,s=2,a=!0;s<arguments.length;)o[c++]=arguments[s++];return new Promise(function(e,n){o[c]=function(l){if(a)if(a=!1,l)n(l);else{for(var h=new Array(arguments.length-1),T=0;T<h.length;)h[T++]=arguments[T];e.apply(null,h)}};try{i.apply(r||null,o)}catch(u){a&&(a=!1,n(u))}})}});var Ah=d(Oh=>{"use strict";var Qi=Oh;Qi.length=function(r){var o=r.length;if(!o)return 0;for(var c=0;--o%4>1&&r.charAt(o)==="=";)++c;return Math.ceil(r.length*3)/4-c};var yr=new Array(64),bh=new Array(123);for(ve=0;ve<64;)bh[yr[ve]=ve<26?ve+65:ve<52?ve+71:ve<62?ve-4:ve-59|43]=ve++;var ve;Qi.encode=function(r,o,c){for(var s=null,a=[],t=0,e=0,n;o<c;){var u=r[o++];switch(e){case 0:a[t++]=yr[u>>2],n=(u&3)<<4,e=1;break;case 1:a[t++]=yr[n|u>>4],n=(u&15)<<2,e=2;break;case 2:a[t++]=yr[n|u>>6],a[t++]=yr[u&63],e=0;break}t>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,a)),t=0)}return e&&(a[t++]=yr[n],a[t++]=61,e===1&&(a[t++]=61)),s?(t&&s.push(String.fromCharCode.apply(String,a.slice(0,t))),s.join("")):String.fromCharCode.apply(String,a.slice(0,t))};var Sh="invalid encoding";Qi.decode=function(r,o,c){for(var s=c,a=0,t,e=0;e<r.length;){var n=r.charCodeAt(e++);if(n===61&&a>1)break;if((n=bh[n])===void 0)throw Error(Sh);switch(a){case 0:t=n,a=1;break;case 1:o[c++]=t<<2|(n&48)>>4,t=n,a=2;break;case 2:o[c++]=(t&15)<<4|(n&60)>>2,t=n,a=3;break;case 3:o[c++]=(t&3)<<6|n,a=0;break}}if(a===1)throw Error(Sh);return c-s};Qi.test=function(r){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r)}});var Nh=d((SN,Ph)=>{"use strict";Ph.exports=Zi;function Zi(){this._listeners={}}Zi.prototype.on=function(r,o,c){return(this._listeners[r]||(this._listeners[r]=[])).push({fn:o,ctx:c||this}),this};Zi.prototype.off=function(r,o){if(r===void 0)this._listeners={};else if(o===void 0)this._listeners[r]=[];else for(var c=this._listeners[r],s=0;s<c.length;)c[s].fn===o?c.splice(s,1):++s;return this};Zi.prototype.emit=function(r){var o=this._listeners[r];if(o){for(var c=[],s=1;s<arguments.length;)c.push(arguments[s++]);for(s=0;s<o.length;)o[s].fn.apply(o[s++].ctx,c)}return this}});var Ch=d((bN,Mh)=>{"use strict";Mh.exports=Rh(Rh);function Rh(i){return typeof Float32Array<"u"?function(){var r=new Float32Array([-0]),o=new Uint8Array(r.buffer),c=o[3]===128;function s(n,u,l){r[0]=n,u[l]=o[0],u[l+1]=o[1],u[l+2]=o[2],u[l+3]=o[3]}function a(n,u,l){r[0]=n,u[l]=o[3],u[l+1]=o[2],u[l+2]=o[1],u[l+3]=o[0]}i.writeFloatLE=c?s:a,i.writeFloatBE=c?a:s;function t(n,u){return o[0]=n[u],o[1]=n[u+1],o[2]=n[u+2],o[3]=n[u+3],r[0]}function e(n,u){return o[3]=n[u],o[2]=n[u+1],o[1]=n[u+2],o[0]=n[u+3],r[0]}i.readFloatLE=c?t:e,i.readFloatBE=c?e:t}():function(){function r(c,s,a,t){var e=s<0?1:0;if(e&&(s=-s),s===0)c(1/s>0?0:2147483648,a,t);else if(isNaN(s))c(2143289344,a,t);else if(s>34028234663852886e22)c((e<<31|2139095040)>>>0,a,t);else if(s<11754943508222875e-54)c((e<<31|Math.round(s/1401298464324817e-60))>>>0,a,t);else{var n=Math.floor(Math.log(s)/Math.LN2),u=Math.round(s*Math.pow(2,-n)*8388608)&8388607;c((e<<31|n+127<<23|u)>>>0,a,t)}}i.writeFloatLE=r.bind(null,xh),i.writeFloatBE=r.bind(null,Ih);function o(c,s,a){var t=c(s,a),e=(t>>31)*2+1,n=t>>>23&255,u=t&8388607;return n===255?u?NaN:e*(1/0):n===0?e*1401298464324817e-60*u:e*Math.pow(2,n-150)*(u+8388608)}i.readFloatLE=o.bind(null,Lh),i.readFloatBE=o.bind(null,wh)}(),typeof Float64Array<"u"?function(){var r=new Float64Array([-0]),o=new Uint8Array(r.buffer),c=o[7]===128;function s(n,u,l){r[0]=n,u[l]=o[0],u[l+1]=o[1],u[l+2]=o[2],u[l+3]=o[3],u[l+4]=o[4],u[l+5]=o[5],u[l+6]=o[6],u[l+7]=o[7]}function a(n,u,l){r[0]=n,u[l]=o[7],u[l+1]=o[6],u[l+2]=o[5],u[l+3]=o[4],u[l+4]=o[3],u[l+5]=o[2],u[l+6]=o[1],u[l+7]=o[0]}i.writeDoubleLE=c?s:a,i.writeDoubleBE=c?a:s;function t(n,u){return o[0]=n[u],o[1]=n[u+1],o[2]=n[u+2],o[3]=n[u+3],o[4]=n[u+4],o[5]=n[u+5],o[6]=n[u+6],o[7]=n[u+7],r[0]}function e(n,u){return o[7]=n[u],o[6]=n[u+1],o[5]=n[u+2],o[4]=n[u+3],o[3]=n[u+4],o[2]=n[u+5],o[1]=n[u+6],o[0]=n[u+7],r[0]}i.readDoubleLE=c?t:e,i.readDoubleBE=c?e:t}():function(){function r(c,s,a,t,e,n){var u=t<0?1:0;if(u&&(t=-t),t===0)c(0,e,n+s),c(1/t>0?0:2147483648,e,n+a);else if(isNaN(t))c(0,e,n+s),c(2146959360,e,n+a);else if(t>17976931348623157e292)c(0,e,n+s),c((u<<31|2146435072)>>>0,e,n+a);else{var l;if(t<22250738585072014e-324)l=t/5e-324,c(l>>>0,e,n+s),c((u<<31|l/4294967296)>>>0,e,n+a);else{var h=Math.floor(Math.log(t)/Math.LN2);h===1024&&(h=1023),l=t*Math.pow(2,-h),c(l*4503599627370496>>>0,e,n+s),c((u<<31|h+1023<<20|l*1048576&1048575)>>>0,e,n+a)}}}i.writeDoubleLE=r.bind(null,xh,0,4),i.writeDoubleBE=r.bind(null,Ih,4,0);function o(c,s,a,t,e){var n=c(t,e+s),u=c(t,e+a),l=(u>>31)*2+1,h=u>>>20&2047,T=4294967296*(u&1048575)+n;return h===2047?T?NaN:l*(1/0):h===0?l*5e-324*T:l*Math.pow(2,h-1075)*(T+4503599627370496)}i.readDoubleLE=o.bind(null,Lh,0,4),i.readDoubleBE=o.bind(null,wh,4,0)}(),i}function xh(i,r,o){r[o]=i&255,r[o+1]=i>>>8&255,r[o+2]=i>>>16&255,r[o+3]=i>>>24}function Ih(i,r,o){r[o]=i>>>24,r[o+1]=i>>>16&255,r[o+2]=i>>>8&255,r[o+3]=i&255}function Lh(i,r){return(i[r]|i[r+1]<<8|i[r+2]<<16|i[r+3]<<24)>>>0}function wh(i,r){return(i[r]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3])>>>0}});var Uh=d((exports,module)=>{"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(i){}return null}});var Bh=d(Dh=>{"use strict";var bc=Dh;bc.length=function(r){for(var o=0,c=0,s=0;s<r.length;++s)c=r.charCodeAt(s),c<128?o+=1:c<2048?o+=2:(c&64512)===55296&&(r.charCodeAt(s+1)&64512)===56320?(++s,o+=4):o+=3;return o};bc.read=function(r,o,c){var s=c-o;if(s<1)return"";for(var a=null,t=[],e=0,n;o<c;)n=r[o++],n<128?t[e++]=n:n>191&&n<224?t[e++]=(n&31)<<6|r[o++]&63:n>239&&n<365?(n=((n&7)<<18|(r[o++]&63)<<12|(r[o++]&63)<<6|r[o++]&63)-65536,t[e++]=55296+(n>>10),t[e++]=56320+(n&1023)):t[e++]=(n&15)<<12|(r[o++]&63)<<6|r[o++]&63,e>8191&&((a||(a=[])).push(String.fromCharCode.apply(String,t)),e=0);return a?(e&&a.push(String.fromCharCode.apply(String,t.slice(0,e))),a.join("")):String.fromCharCode.apply(String,t.slice(0,e))};bc.write=function(r,o,c){for(var s=c,a,t,e=0;e<r.length;++e)a=r.charCodeAt(e),a<128?o[c++]=a:a<2048?(o[c++]=a>>6|192,o[c++]=a&63|128):(a&64512)===55296&&((t=r.charCodeAt(e+1))&64512)===56320?(a=65536+((a&1023)<<10)+(t&1023),++e,o[c++]=a>>18|240,o[c++]=a>>12&63|128,o[c++]=a>>6&63|128,o[c++]=a&63|128):(o[c++]=a>>12|224,o[c++]=a>>6&63|128,o[c++]=a&63|128);return c-s}});var kh=d((AN,Vh)=>{"use strict";Vh.exports=FS;function FS(i,r,o){var c=o||8192,s=c>>>1,a=null,t=c;return function(n){if(n<1||n>s)return i(n);t+n>c&&(a=i(c),t=0);var u=r.call(a,t,t+=n);return t&7&&(t=(t|7)+1),u}}});var jh=d((PN,qh)=>{"use strict";qh.exports=Y;var nn=Ye();function Y(i,r){this.lo=i>>>0,this.hi=r>>>0}var gt=Y.zero=new Y(0,0);gt.toNumber=function(){return 0};gt.zzEncode=gt.zzDecode=function(){return this};gt.length=function(){return 1};var KS=Y.zeroHash="\0\0\0\0\0\0\0\0";Y.fromNumber=function(r){if(r===0)return gt;var o=r<0;o&&(r=-r);var c=r>>>0,s=(r-c)/4294967296>>>0;return o&&(s=~s>>>0,c=~c>>>0,++c>4294967295&&(c=0,++s>4294967295&&(s=0))),new Y(c,s)};Y.from=function(r){if(typeof r=="number")return Y.fromNumber(r);if(nn.isString(r))if(nn.Long)r=nn.Long.fromString(r);else return Y.fromNumber(parseInt(r,10));return r.low||r.high?new Y(r.low>>>0,r.high>>>0):gt};Y.prototype.toNumber=function(r){if(!r&&this.hi>>>31){var o=~this.lo+1>>>0,c=~this.hi>>>0;return o||(c=c+1>>>0),-(o+c*4294967296)}return this.lo+this.hi*4294967296};Y.prototype.toLong=function(r){return nn.Long?new nn.Long(this.lo|0,this.hi|0,!!r):{low:this.lo|0,high:this.hi|0,unsigned:!!r}};var $e=String.prototype.charCodeAt;Y.fromHash=function(r){return r===KS?gt:new Y(($e.call(r,0)|$e.call(r,1)<<8|$e.call(r,2)<<16|$e.call(r,3)<<24)>>>0,($e.call(r,4)|$e.call(r,5)<<8|$e.call(r,6)<<16|$e.call(r,7)<<24)>>>0)};Y.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};Y.prototype.zzEncode=function(){var r=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^r)>>>0,this.lo=(this.lo<<1^r)>>>0,this};Y.prototype.zzDecode=function(){var r=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^r)>>>0,this.hi=(this.hi>>>1^r)>>>0,this};Y.prototype.length=function(){var r=this.lo,o=(this.lo>>>28|this.hi<<4)>>>0,c=this.hi>>>24;return c===0?o===0?r<16384?r<128?1:2:r<2097152?3:4:o<16384?o<128?5:6:o<2097152?7:8:c<128?9:10}});var Ye=d(Oc=>{"use strict";var g=Oc;g.asPromise=Th();g.base64=Ah();g.EventEmitter=Nh();g.float=Ch();g.inquire=Uh();g.utf8=Bh();g.pool=kh();g.LongBits=jh();g.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);g.global=g.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||Oc;g.emptyArray=Object.freeze?Object.freeze([]):[];g.emptyObject=Object.freeze?Object.freeze({}):{};g.isInteger=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r};g.isString=function(r){return typeof r=="string"||r instanceof String};g.isObject=function(r){return r&&typeof r=="object"};g.isset=g.isSet=function(r,o){var c=r[o];return c!=null&&r.hasOwnProperty(o)?typeof c!="object"||(Array.isArray(c)?c.length:Object.keys(c).length)>0:!1};g.Buffer=function(){try{var i=g.inquire("buffer").Buffer;return i.prototype.utf8Write?i:null}catch{return null}}();g._Buffer_from=null;g._Buffer_allocUnsafe=null;g.newBuffer=function(r){return typeof r=="number"?g.Buffer?g._Buffer_allocUnsafe(r):new g.Array(r):g.Buffer?g._Buffer_from(r):typeof Uint8Array>"u"?r:new Uint8Array(r)};g.Array=typeof Uint8Array<"u"?Uint8Array:Array;g.Long=g.global.dcodeIO&&g.global.dcodeIO.Long||g.global.Long||g.inquire("long");g.key2Re=/^true|false|0|1$/;g.key32Re=/^-?(?:0|[1-9][0-9]*)$/;g.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;g.longToHash=function(r){return r?g.LongBits.from(r).toHash():g.LongBits.zeroHash};g.longFromHash=function(r,o){var c=g.LongBits.fromHash(r);return g.Long?g.Long.fromBits(c.lo,c.hi,o):c.toNumber(!!o)};function Gh(i,r,o){for(var c=Object.keys(r),s=0;s<c.length;++s)(i[c[s]]===void 0||!o)&&(i[c[s]]=r[c[s]]);return i}g.merge=Gh;g.lcFirst=function(r){return r.charAt(0).toLowerCase()+r.substring(1)};function Hh(i){function r(o,c){if(!(this instanceof r))return new r(o,c);Object.defineProperty(this,"message",{get:function(){return o}}),Error.captureStackTrace?Error.captureStackTrace(this,r):Object.defineProperty(this,"stack",{value:new Error().stack||""}),c&&Gh(this,c)}return r.prototype=Object.create(Error.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return i},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),r}g.newError=Hh;g.ProtocolError=Hh("ProtocolError");g.oneOfGetter=function(r){for(var o={},c=0;c<r.length;++c)o[r[c]]=1;return function(){for(var s=Object.keys(this),a=s.length-1;a>-1;--a)if(o[s[a]]===1&&this[s[a]]!==void 0&&this[s[a]]!==null)return s[a]}};g.oneOfSetter=function(r){return function(o){for(var c=0;c<r.length;++c)r[c]!==o&&delete this[r[c]]}};g.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};g._configure=function(){var i=g.Buffer;if(!i){g._Buffer_from=g._Buffer_allocUnsafe=null;return}g._Buffer_from=i.from!==Uint8Array.from&&i.from||function(o,c){return new i(o,c)},g._Buffer_allocUnsafe=i.allocUnsafe||function(o){return new i(o)}}});var Lc=d((RN,zh)=>{"use strict";zh.exports=R;var _e=Ye(),Ac,es=_e.LongBits,Fh=_e.base64,Kh=_e.utf8;function on(i,r,o){this.fn=i,this.len=r,this.next=void 0,this.val=o}function Nc(){}function XS(i){this.head=i.head,this.tail=i.tail,this.len=i.len,this.next=i.states}function R(){this.len=0,this.head=new on(Nc,0,0),this.tail=this.head,this.states=null}var Xh=function(){return _e.Buffer?function(){return(R.create=function(){return new Ac})()}:function(){return new R}};R.create=Xh();R.alloc=function(r){return new _e.Array(r)};_e.Array!==Array&&(R.alloc=_e.pool(R.alloc,_e.Array.prototype.subarray));R.prototype._push=function(r,o,c){return this.tail=this.tail.next=new on(r,o,c),this.len+=o,this};function Rc(i,r,o){r[o]=i&255}function zS(i,r,o){for(;i>127;)r[o++]=i&127|128,i>>>=7;r[o]=i}function xc(i,r){this.len=i,this.next=void 0,this.val=r}xc.prototype=Object.create(on.prototype);xc.prototype.fn=zS;R.prototype.uint32=function(r){return this.len+=(this.tail=this.tail.next=new xc((r=r>>>0)<128?1:r<16384?2:r<2097152?3:r<268435456?4:5,r)).len,this};R.prototype.int32=function(r){return r<0?this._push(Ic,10,es.fromNumber(r)):this.uint32(r)};R.prototype.sint32=function(r){return this.uint32((r<<1^r>>31)>>>0)};function Ic(i,r,o){for(;i.hi;)r[o++]=i.lo&127|128,i.lo=(i.lo>>>7|i.hi<<25)>>>0,i.hi>>>=7;for(;i.lo>127;)r[o++]=i.lo&127|128,i.lo=i.lo>>>7;r[o++]=i.lo}R.prototype.uint64=function(r){var o=es.from(r);return this._push(Ic,o.length(),o)};R.prototype.int64=R.prototype.uint64;R.prototype.sint64=function(r){var o=es.from(r).zzEncode();return this._push(Ic,o.length(),o)};R.prototype.bool=function(r){return this._push(Rc,1,r?1:0)};function Pc(i,r,o){r[o]=i&255,r[o+1]=i>>>8&255,r[o+2]=i>>>16&255,r[o+3]=i>>>24}R.prototype.fixed32=function(r){return this._push(Pc,4,r>>>0)};R.prototype.sfixed32=R.prototype.fixed32;R.prototype.fixed64=function(r){var o=es.from(r);return this._push(Pc,4,o.lo)._push(Pc,4,o.hi)};R.prototype.sfixed64=R.prototype.fixed64;R.prototype.float=function(r){return this._push(_e.float.writeFloatLE,4,r)};R.prototype.double=function(r){return this._push(_e.float.writeDoubleLE,8,r)};var $S=_e.Array.prototype.set?function(r,o,c){o.set(r,c)}:function(r,o,c){for(var s=0;s<r.length;++s)o[c+s]=r[s]};R.prototype.bytes=function(r){var o=r.length>>>0;if(!o)return this._push(Rc,1,0);if(_e.isString(r)){var c=R.alloc(o=Fh.length(r));Fh.decode(r,c,0),r=c}return this.uint32(o)._push($S,o,r)};R.prototype.string=function(r){var o=Kh.length(r);return o?this.uint32(o)._push(Kh.write,o,r):this._push(Rc,1,0)};R.prototype.fork=function(){return this.states=new XS(this),this.head=this.tail=new on(Nc,0,0),this.len=0,this};R.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new on(Nc,0,0),this.len=0),this};R.prototype.ldelim=function(){var r=this.head,o=this.tail,c=this.len;return this.reset().uint32(c),c&&(this.tail.next=r.next,this.tail=o,this.len+=c),this};R.prototype.finish=function(){for(var r=this.head.next,o=this.constructor.alloc(this.len),c=0;r;)r.fn(r.val,o,c),c+=r.len,r=r.next;return o};R._configure=function(i){Ac=i,R.create=Xh(),Ac._configure()}});var Wh=d((xN,Yh)=>{"use strict";Yh.exports=xe;var $h=Lc();(xe.prototype=Object.create($h.prototype)).constructor=xe;var We=Ye();function xe(){$h.call(this)}xe._configure=function(){xe.alloc=We._Buffer_allocUnsafe,xe.writeBytesBuffer=We.Buffer&&We.Buffer.prototype instanceof Uint8Array&&We.Buffer.prototype.set.name==="set"?function(r,o,c){o.set(r,c)}:function(r,o,c){if(r.copy)r.copy(o,c,0,r.length);else for(var s=0;s<r.length;)o[c++]=r[s++]}};xe.prototype.bytes=function(r){We.isString(r)&&(r=We._Buffer_from(r,"base64"));var o=r.length>>>0;return this.uint32(o),o&&this._push(xe.writeBytesBuffer,o,r),this};function YS(i,r,o){i.length<40?We.utf8.write(i,r,o):r.utf8Write?r.utf8Write(i,o):r.write(i,o)}xe.prototype.string=function(r){var o=We.Buffer.byteLength(r);return this.uint32(o),o&&this._push(YS,o,r),this};xe._configure()});var Cc=d((IN,tm)=>{"use strict";tm.exports=G;var Te=Ye(),Mc,Zh=Te.LongBits,WS=Te.utf8;function Se(i,r){return RangeError("index out of range: "+i.pos+" + "+(r||1)+" > "+i.len)}function G(i){this.buf=i,this.pos=0,this.len=i.length}var Jh=typeof Uint8Array<"u"?function(r){if(r instanceof Uint8Array||Array.isArray(r))return new G(r);throw Error("illegal buffer")}:function(r){if(Array.isArray(r))return new G(r);throw Error("illegal buffer")},em=function(){return Te.Buffer?function(o){return(G.create=function(s){return Te.Buffer.isBuffer(s)?new Mc(s):Jh(s)})(o)}:Jh};G.create=em();G.prototype._slice=Te.Array.prototype.subarray||Te.Array.prototype.slice;G.prototype.uint32=function(){var r=4294967295;return function(){if(r=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(r=(r|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return r;if((this.pos+=5)>this.len)throw this.pos=this.len,Se(this,10);return r}}();G.prototype.int32=function(){return this.uint32()|0};G.prototype.sint32=function(){var r=this.uint32();return r>>>1^-(r&1)|0};function wc(){var i=new Zh(0,0),r=0;if(this.len-this.pos>4){for(;r<4;++r)if(i.lo=(i.lo|(this.buf[this.pos]&127)<<r*7)>>>0,this.buf[this.pos++]<128)return i;if(i.lo=(i.lo|(this.buf[this.pos]&127)<<28)>>>0,i.hi=(i.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return i;r=0}else{for(;r<3;++r){if(this.pos>=this.len)throw Se(this);if(i.lo=(i.lo|(this.buf[this.pos]&127)<<r*7)>>>0,this.buf[this.pos++]<128)return i}return i.lo=(i.lo|(this.buf[this.pos++]&127)<<r*7)>>>0,i}if(this.len-this.pos>4){for(;r<5;++r)if(i.hi=(i.hi|(this.buf[this.pos]&127)<<r*7+3)>>>0,this.buf[this.pos++]<128)return i}else for(;r<5;++r){if(this.pos>=this.len)throw Se(this);if(i.hi=(i.hi|(this.buf[this.pos]&127)<<r*7+3)>>>0,this.buf[this.pos++]<128)return i}throw Error("invalid varint encoding")}G.prototype.bool=function(){return this.uint32()!==0};function ts(i,r){return(i[r-4]|i[r-3]<<8|i[r-2]<<16|i[r-1]<<24)>>>0}G.prototype.fixed32=function(){if(this.pos+4>this.len)throw Se(this,4);return ts(this.buf,this.pos+=4)};G.prototype.sfixed32=function(){if(this.pos+4>this.len)throw Se(this,4);return ts(this.buf,this.pos+=4)|0};function Qh(){if(this.pos+8>this.len)throw Se(this,8);return new Zh(ts(this.buf,this.pos+=4),ts(this.buf,this.pos+=4))}G.prototype.float=function(){if(this.pos+4>this.len)throw Se(this,4);var r=Te.float.readFloatLE(this.buf,this.pos);return this.pos+=4,r};G.prototype.double=function(){if(this.pos+8>this.len)throw Se(this,4);var r=Te.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,r};G.prototype.bytes=function(){var r=this.uint32(),o=this.pos,c=this.pos+r;if(c>this.len)throw Se(this,r);if(this.pos+=r,Array.isArray(this.buf))return this.buf.slice(o,c);if(o===c){var s=Te.Buffer;return s?s.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,o,c)};G.prototype.string=function(){var r=this.bytes();return WS.read(r,0,r.length)};G.prototype.skip=function(r){if(typeof r=="number"){if(this.pos+r>this.len)throw Se(this,r);this.pos+=r}else do if(this.pos>=this.len)throw Se(this);while(this.buf[this.pos++]&128);return this};G.prototype.skipType=function(i){switch(i){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(i=this.uint32()&7)!==4;)this.skipType(i);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+i+" at offset "+this.pos)}return this};G._configure=function(i){Mc=i,G.create=em(),Mc._configure();var r=Te.Long?"toLong":"toNumber";Te.merge(G.prototype,{int64:function(){return wc.call(this)[r](!1)},uint64:function(){return wc.call(this)[r](!0)},sint64:function(){return wc.call(this).zzDecode()[r](!1)},fixed64:function(){return Qh.call(this)[r](!0)},sfixed64:function(){return Qh.call(this)[r](!1)}})}});var im=d((LN,om)=>{"use strict";om.exports=vt;var nm=Cc();(vt.prototype=Object.create(nm.prototype)).constructor=vt;var rm=Ye();function vt(i){nm.call(this,i)}vt._configure=function(){rm.Buffer&&(vt.prototype._slice=rm.Buffer.prototype.slice)};vt.prototype.string=function(){var r=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+r,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+r,this.len))};vt._configure()});var um=d((wN,sm)=>{"use strict";sm.exports=sn;var Uc=Ye();(sn.prototype=Object.create(Uc.EventEmitter.prototype)).constructor=sn;function sn(i,r,o){if(typeof i!="function")throw TypeError("rpcImpl must be a function");Uc.EventEmitter.call(this),this.rpcImpl=i,this.requestDelimited=!!r,this.responseDelimited=!!o}sn.prototype.rpcCall=function i(r,o,c,s,a){if(!s)throw TypeError("request must be specified");var t=this;if(!a)return Uc.asPromise(i,t,r,o,c,s);if(!t.rpcImpl){setTimeout(function(){a(Error("already ended"))},0);return}try{return t.rpcImpl(r,o[t.requestDelimited?"encodeDelimited":"encode"](s).finish(),function(n,u){if(n)return t.emit("error",n,r),a(n);if(u===null){t.end(!0);return}if(!(u instanceof c))try{u=c[t.responseDelimited?"decodeDelimited":"decode"](u)}catch(l){return t.emit("error",l,r),a(l)}return t.emit("data",u,r),a(null,u)})}catch(e){t.emit("error",e,r),setTimeout(function(){a(e)},0);return}};sn.prototype.end=function(r){return this.rpcImpl&&(r||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var cm=d(am=>{"use strict";var JS=am;JS.Service=um()});var pm=d((CN,lm)=>{"use strict";lm.exports={}});var hm=d(dm=>{"use strict";var ue=dm;ue.build="minimal";ue.Writer=Lc();ue.BufferWriter=Wh();ue.Reader=Cc();ue.BufferReader=im();ue.util=Ye();ue.rpc=cm();ue.roots=pm();ue.configure=fm;function fm(){ue.util._configure(),ue.Writer._configure(ue.BufferWriter),ue.Reader._configure(ue.BufferReader)}fm()});var _m=d((DN,mm)=>{"use strict";mm.exports=hm()});var Em=d((BN,ym)=>{"use strict";var v=_m(),m=v.Reader,O=v.Writer,f=v.util,p=v.roots.default||(v.roots.default={});p.opentelemetry=function(){var i={};return i.proto=function(){var r={};return r.common=function(){var o={};return o.v1=function(){var c={};return c.AnyValue=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}s.prototype.stringValue=null,s.prototype.boolValue=null,s.prototype.intValue=null,s.prototype.doubleValue=null,s.prototype.arrayValue=null,s.prototype.kvlistValue=null,s.prototype.bytesValue=null;var a;return Object.defineProperty(s.prototype,"value",{get:f.oneOfGetter(a=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"]),set:f.oneOfSetter(a)}),s.create=function(e){return new s(e)},s.encode=function(e,n){return n||(n=O.create()),e.stringValue!=null&&Object.hasOwnProperty.call(e,"stringValue")&&n.uint32(10).string(e.stringValue),e.boolValue!=null&&Object.hasOwnProperty.call(e,"boolValue")&&n.uint32(16).bool(e.boolValue),e.intValue!=null&&Object.hasOwnProperty.call(e,"intValue")&&n.uint32(24).int64(e.intValue),e.doubleValue!=null&&Object.hasOwnProperty.call(e,"doubleValue")&&n.uint32(33).double(e.doubleValue),e.arrayValue!=null&&Object.hasOwnProperty.call(e,"arrayValue")&&p.opentelemetry.proto.common.v1.ArrayValue.encode(e.arrayValue,n.uint32(42).fork()).ldelim(),e.kvlistValue!=null&&Object.hasOwnProperty.call(e,"kvlistValue")&&p.opentelemetry.proto.common.v1.KeyValueList.encode(e.kvlistValue,n.uint32(50).fork()).ldelim(),e.bytesValue!=null&&Object.hasOwnProperty.call(e,"bytesValue")&&n.uint32(58).bytes(e.bytesValue),n},s.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},s.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.common.v1.AnyValue;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.stringValue=e.string();break}case 2:{l.boolValue=e.bool();break}case 3:{l.intValue=e.int64();break}case 4:{l.doubleValue=e.double();break}case 5:{l.arrayValue=p.opentelemetry.proto.common.v1.ArrayValue.decode(e,e.uint32());break}case 6:{l.kvlistValue=p.opentelemetry.proto.common.v1.KeyValueList.decode(e,e.uint32());break}case 7:{l.bytesValue=e.bytes();break}default:e.skipType(h&7);break}}return l},s.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.stringValue!=null&&e.hasOwnProperty("stringValue")&&(n.value=1,!f.isString(e.stringValue)))return"stringValue: string expected";if(e.boolValue!=null&&e.hasOwnProperty("boolValue")){if(n.value===1)return"value: multiple values";if(n.value=1,typeof e.boolValue!="boolean")return"boolValue: boolean expected"}if(e.intValue!=null&&e.hasOwnProperty("intValue")){if(n.value===1)return"value: multiple values";if(n.value=1,!f.isInteger(e.intValue)&&!(e.intValue&&f.isInteger(e.intValue.low)&&f.isInteger(e.intValue.high)))return"intValue: integer|Long expected"}if(e.doubleValue!=null&&e.hasOwnProperty("doubleValue")){if(n.value===1)return"value: multiple values";if(n.value=1,typeof e.doubleValue!="number")return"doubleValue: number expected"}if(e.arrayValue!=null&&e.hasOwnProperty("arrayValue")){if(n.value===1)return"value: multiple values";n.value=1;{var u=p.opentelemetry.proto.common.v1.ArrayValue.verify(e.arrayValue);if(u)return"arrayValue."+u}}if(e.kvlistValue!=null&&e.hasOwnProperty("kvlistValue")){if(n.value===1)return"value: multiple values";n.value=1;{var u=p.opentelemetry.proto.common.v1.KeyValueList.verify(e.kvlistValue);if(u)return"kvlistValue."+u}}if(e.bytesValue!=null&&e.hasOwnProperty("bytesValue")){if(n.value===1)return"value: multiple values";if(n.value=1,!(e.bytesValue&&typeof e.bytesValue.length=="number"||f.isString(e.bytesValue)))return"bytesValue: buffer expected"}return null},s.fromObject=function(e){if(e instanceof p.opentelemetry.proto.common.v1.AnyValue)return e;var n=new p.opentelemetry.proto.common.v1.AnyValue;if(e.stringValue!=null&&(n.stringValue=String(e.stringValue)),e.boolValue!=null&&(n.boolValue=!!e.boolValue),e.intValue!=null&&(f.Long?(n.intValue=f.Long.fromValue(e.intValue)).unsigned=!1:typeof e.intValue=="string"?n.intValue=parseInt(e.intValue,10):typeof e.intValue=="number"?n.intValue=e.intValue:typeof e.intValue=="object"&&(n.intValue=new f.LongBits(e.intValue.low>>>0,e.intValue.high>>>0).toNumber())),e.doubleValue!=null&&(n.doubleValue=Number(e.doubleValue)),e.arrayValue!=null){if(typeof e.arrayValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected");n.arrayValue=p.opentelemetry.proto.common.v1.ArrayValue.fromObject(e.arrayValue)}if(e.kvlistValue!=null){if(typeof e.kvlistValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected");n.kvlistValue=p.opentelemetry.proto.common.v1.KeyValueList.fromObject(e.kvlistValue)}return e.bytesValue!=null&&(typeof e.bytesValue=="string"?f.base64.decode(e.bytesValue,n.bytesValue=f.newBuffer(f.base64.length(e.bytesValue)),0):e.bytesValue.length>=0&&(n.bytesValue=e.bytesValue)),n},s.toObject=function(e,n){n||(n={});var u={};return e.stringValue!=null&&e.hasOwnProperty("stringValue")&&(u.stringValue=e.stringValue,n.oneofs&&(u.value="stringValue")),e.boolValue!=null&&e.hasOwnProperty("boolValue")&&(u.boolValue=e.boolValue,n.oneofs&&(u.value="boolValue")),e.intValue!=null&&e.hasOwnProperty("intValue")&&(typeof e.intValue=="number"?u.intValue=n.longs===String?String(e.intValue):e.intValue:u.intValue=n.longs===String?f.Long.prototype.toString.call(e.intValue):n.longs===Number?new f.LongBits(e.intValue.low>>>0,e.intValue.high>>>0).toNumber():e.intValue,n.oneofs&&(u.value="intValue")),e.doubleValue!=null&&e.hasOwnProperty("doubleValue")&&(u.doubleValue=n.json&&!isFinite(e.doubleValue)?String(e.doubleValue):e.doubleValue,n.oneofs&&(u.value="doubleValue")),e.arrayValue!=null&&e.hasOwnProperty("arrayValue")&&(u.arrayValue=p.opentelemetry.proto.common.v1.ArrayValue.toObject(e.arrayValue,n),n.oneofs&&(u.value="arrayValue")),e.kvlistValue!=null&&e.hasOwnProperty("kvlistValue")&&(u.kvlistValue=p.opentelemetry.proto.common.v1.KeyValueList.toObject(e.kvlistValue,n),n.oneofs&&(u.value="kvlistValue")),e.bytesValue!=null&&e.hasOwnProperty("bytesValue")&&(u.bytesValue=n.bytes===String?f.base64.encode(e.bytesValue,0,e.bytesValue.length):n.bytes===Array?Array.prototype.slice.call(e.bytesValue):e.bytesValue,n.oneofs&&(u.value="bytesValue")),u},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.AnyValue"},s}(),c.ArrayValue=function(){function s(a){if(this.values=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.values=f.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.values!=null&&t.values.length)for(var n=0;n<t.values.length;++n)p.opentelemetry.proto.common.v1.AnyValue.encode(t.values[n],e.uint32(10).fork()).ldelim();return e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.common.v1.ArrayValue;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.values&&u.values.length||(u.values=[]),u.values.push(p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.values!=null&&t.hasOwnProperty("values")){if(!Array.isArray(t.values))return"values: array expected";for(var e=0;e<t.values.length;++e){var n=p.opentelemetry.proto.common.v1.AnyValue.verify(t.values[e]);if(n)return"values."+n}}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.common.v1.ArrayValue)return t;var e=new p.opentelemetry.proto.common.v1.ArrayValue;if(t.values){if(!Array.isArray(t.values))throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: array expected");e.values=[];for(var n=0;n<t.values.length;++n){if(typeof t.values[n]!="object")throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: object expected");e.values[n]=p.opentelemetry.proto.common.v1.AnyValue.fromObject(t.values[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.values=[]),t.values&&t.values.length){n.values=[];for(var u=0;u<t.values.length;++u)n.values[u]=p.opentelemetry.proto.common.v1.AnyValue.toObject(t.values[u],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.ArrayValue"},s}(),c.KeyValueList=function(){function s(a){if(this.values=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.values=f.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.values!=null&&t.values.length)for(var n=0;n<t.values.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.values[n],e.uint32(10).fork()).ldelim();return e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.common.v1.KeyValueList;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.values&&u.values.length||(u.values=[]),u.values.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.values!=null&&t.hasOwnProperty("values")){if(!Array.isArray(t.values))return"values: array expected";for(var e=0;e<t.values.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.values[e]);if(n)return"values."+n}}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.common.v1.KeyValueList)return t;var e=new p.opentelemetry.proto.common.v1.KeyValueList;if(t.values){if(!Array.isArray(t.values))throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: array expected");e.values=[];for(var n=0;n<t.values.length;++n){if(typeof t.values[n]!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: object expected");e.values[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.values[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.values=[]),t.values&&t.values.length){n.values=[];for(var u=0;u<t.values.length;++u)n.values[u]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.values[u],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.KeyValueList"},s}(),c.KeyValue=function(){function s(a){if(a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.key=null,s.prototype.value=null,s.create=function(t){return new s(t)},s.encode=function(t,e){return e||(e=O.create()),t.key!=null&&Object.hasOwnProperty.call(t,"key")&&e.uint32(10).string(t.key),t.value!=null&&Object.hasOwnProperty.call(t,"value")&&p.opentelemetry.proto.common.v1.AnyValue.encode(t.value,e.uint32(18).fork()).ldelim(),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.common.v1.KeyValue;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.key=t.string();break}case 2:{u.value=p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32());break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.key!=null&&t.hasOwnProperty("key")&&!f.isString(t.key))return"key: string expected";if(t.value!=null&&t.hasOwnProperty("value")){var e=p.opentelemetry.proto.common.v1.AnyValue.verify(t.value);if(e)return"value."+e}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.common.v1.KeyValue)return t;var e=new p.opentelemetry.proto.common.v1.KeyValue;if(t.key!=null&&(e.key=String(t.key)),t.value!=null){if(typeof t.value!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected");e.value=p.opentelemetry.proto.common.v1.AnyValue.fromObject(t.value)}return e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.key="",n.value=null),t.key!=null&&t.hasOwnProperty("key")&&(n.key=t.key),t.value!=null&&t.hasOwnProperty("value")&&(n.value=p.opentelemetry.proto.common.v1.AnyValue.toObject(t.value,e)),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.KeyValue"},s}(),c.InstrumentationScope=function(){function s(a){if(this.attributes=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.name=null,s.prototype.version=null,s.prototype.attributes=f.emptyArray,s.prototype.droppedAttributesCount=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.name!=null&&Object.hasOwnProperty.call(t,"name")&&e.uint32(10).string(t.name),t.version!=null&&Object.hasOwnProperty.call(t,"version")&&e.uint32(18).string(t.version),t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(26).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&e.uint32(32).uint32(t.droppedAttributesCount),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.common.v1.InstrumentationScope;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.name=t.string();break}case 2:{u.version=t.string();break}case 3:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 4:{u.droppedAttributesCount=t.uint32();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.name!=null&&t.hasOwnProperty("name")&&!f.isString(t.name))return"name: string expected";if(t.version!=null&&t.hasOwnProperty("version")&&!f.isString(t.version))return"version: string expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(n)return"attributes."+n}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.common.v1.InstrumentationScope)return t;var e=new p.opentelemetry.proto.common.v1.InstrumentationScope;if(t.name!=null&&(e.name=String(t.name)),t.version!=null&&(e.version=String(t.version)),t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}return t.droppedAttributesCount!=null&&(e.droppedAttributesCount=t.droppedAttributesCount>>>0),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),e.defaults&&(n.name="",n.version="",n.droppedAttributesCount=0),t.name!=null&&t.hasOwnProperty("name")&&(n.name=t.name),t.version!=null&&t.hasOwnProperty("version")&&(n.version=t.version),t.attributes&&t.attributes.length){n.attributes=[];for(var u=0;u<t.attributes.length;++u)n.attributes[u]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[u],e)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.InstrumentationScope"},s}(),c}(),o}(),r.resource=function(){var o={};return o.v1=function(){var c={};return c.Resource=function(){function s(a){if(this.attributes=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.attributes=f.emptyArray,s.prototype.droppedAttributesCount=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(10).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&e.uint32(16).uint32(t.droppedAttributesCount),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.resource.v1.Resource;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{u.droppedAttributesCount=t.uint32();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(n)return"attributes."+n}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.resource.v1.Resource)return t;var e=new p.opentelemetry.proto.resource.v1.Resource;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}return t.droppedAttributesCount!=null&&(e.droppedAttributesCount=t.droppedAttributesCount>>>0),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),e.defaults&&(n.droppedAttributesCount=0),t.attributes&&t.attributes.length){n.attributes=[];for(var u=0;u<t.attributes.length;++u)n.attributes[u]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[u],e)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.resource.v1.Resource"},s}(),c}(),o}(),r.trace=function(){var o={};return o.v1=function(){var c={};return c.TracesData=function(){function s(a){if(this.resourceSpans=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.resourceSpans=f.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.resourceSpans!=null&&t.resourceSpans.length)for(var n=0;n<t.resourceSpans.length;++n)p.opentelemetry.proto.trace.v1.ResourceSpans.encode(t.resourceSpans[n],e.uint32(10).fork()).ldelim();return e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.trace.v1.TracesData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.resourceSpans&&u.resourceSpans.length||(u.resourceSpans=[]),u.resourceSpans.push(p.opentelemetry.proto.trace.v1.ResourceSpans.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resourceSpans!=null&&t.hasOwnProperty("resourceSpans")){if(!Array.isArray(t.resourceSpans))return"resourceSpans: array expected";for(var e=0;e<t.resourceSpans.length;++e){var n=p.opentelemetry.proto.trace.v1.ResourceSpans.verify(t.resourceSpans[e]);if(n)return"resourceSpans."+n}}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.TracesData)return t;var e=new p.opentelemetry.proto.trace.v1.TracesData;if(t.resourceSpans){if(!Array.isArray(t.resourceSpans))throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: array expected");e.resourceSpans=[];for(var n=0;n<t.resourceSpans.length;++n){if(typeof t.resourceSpans[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: object expected");e.resourceSpans[n]=p.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(t.resourceSpans[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.resourceSpans=[]),t.resourceSpans&&t.resourceSpans.length){n.resourceSpans=[];for(var u=0;u<t.resourceSpans.length;++u)n.resourceSpans[u]=p.opentelemetry.proto.trace.v1.ResourceSpans.toObject(t.resourceSpans[u],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.TracesData"},s}(),c.ResourceSpans=function(){function s(a){if(this.scopeSpans=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.resource=null,s.prototype.scopeSpans=f.emptyArray,s.prototype.schemaUrl=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.resource!=null&&Object.hasOwnProperty.call(t,"resource")&&p.opentelemetry.proto.resource.v1.Resource.encode(t.resource,e.uint32(10).fork()).ldelim(),t.scopeSpans!=null&&t.scopeSpans.length)for(var n=0;n<t.scopeSpans.length;++n)p.opentelemetry.proto.trace.v1.ScopeSpans.encode(t.scopeSpans[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.trace.v1.ResourceSpans;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{u.scopeSpans&&u.scopeSpans.length||(u.scopeSpans=[]),u.scopeSpans.push(p.opentelemetry.proto.trace.v1.ScopeSpans.decode(t,t.uint32()));break}case 3:{u.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resource!=null&&t.hasOwnProperty("resource")){var e=p.opentelemetry.proto.resource.v1.Resource.verify(t.resource);if(e)return"resource."+e}if(t.scopeSpans!=null&&t.hasOwnProperty("scopeSpans")){if(!Array.isArray(t.scopeSpans))return"scopeSpans: array expected";for(var n=0;n<t.scopeSpans.length;++n){var e=p.opentelemetry.proto.trace.v1.ScopeSpans.verify(t.scopeSpans[n]);if(e)return"scopeSpans."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!f.isString(t.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.ResourceSpans)return t;var e=new p.opentelemetry.proto.trace.v1.ResourceSpans;if(t.resource!=null){if(typeof t.resource!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.resource: object expected");e.resource=p.opentelemetry.proto.resource.v1.Resource.fromObject(t.resource)}if(t.scopeSpans){if(!Array.isArray(t.scopeSpans))throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: array expected");e.scopeSpans=[];for(var n=0;n<t.scopeSpans.length;++n){if(typeof t.scopeSpans[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: object expected");e.scopeSpans[n]=p.opentelemetry.proto.trace.v1.ScopeSpans.fromObject(t.scopeSpans[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.scopeSpans=[]),e.defaults&&(n.resource=null,n.schemaUrl=""),t.resource!=null&&t.hasOwnProperty("resource")&&(n.resource=p.opentelemetry.proto.resource.v1.Resource.toObject(t.resource,e)),t.scopeSpans&&t.scopeSpans.length){n.scopeSpans=[];for(var u=0;u<t.scopeSpans.length;++u)n.scopeSpans[u]=p.opentelemetry.proto.trace.v1.ScopeSpans.toObject(t.scopeSpans[u],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.ResourceSpans"},s}(),c.ScopeSpans=function(){function s(a){if(this.spans=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.scope=null,s.prototype.spans=f.emptyArray,s.prototype.schemaUrl=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.scope!=null&&Object.hasOwnProperty.call(t,"scope")&&p.opentelemetry.proto.common.v1.InstrumentationScope.encode(t.scope,e.uint32(10).fork()).ldelim(),t.spans!=null&&t.spans.length)for(var n=0;n<t.spans.length;++n)p.opentelemetry.proto.trace.v1.Span.encode(t.spans[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.trace.v1.ScopeSpans;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{u.spans&&u.spans.length||(u.spans=[]),u.spans.push(p.opentelemetry.proto.trace.v1.Span.decode(t,t.uint32()));break}case 3:{u.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.scope!=null&&t.hasOwnProperty("scope")){var e=p.opentelemetry.proto.common.v1.InstrumentationScope.verify(t.scope);if(e)return"scope."+e}if(t.spans!=null&&t.hasOwnProperty("spans")){if(!Array.isArray(t.spans))return"spans: array expected";for(var n=0;n<t.spans.length;++n){var e=p.opentelemetry.proto.trace.v1.Span.verify(t.spans[n]);if(e)return"spans."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!f.isString(t.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.ScopeSpans)return t;var e=new p.opentelemetry.proto.trace.v1.ScopeSpans;if(t.scope!=null){if(typeof t.scope!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.scope: object expected");e.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(t.scope)}if(t.spans){if(!Array.isArray(t.spans))throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: array expected");e.spans=[];for(var n=0;n<t.spans.length;++n){if(typeof t.spans[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: object expected");e.spans[n]=p.opentelemetry.proto.trace.v1.Span.fromObject(t.spans[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.spans=[]),e.defaults&&(n.scope=null,n.schemaUrl=""),t.scope!=null&&t.hasOwnProperty("scope")&&(n.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.toObject(t.scope,e)),t.spans&&t.spans.length){n.spans=[];for(var u=0;u<t.spans.length;++u)n.spans[u]=p.opentelemetry.proto.trace.v1.Span.toObject(t.spans[u],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.ScopeSpans"},s}(),c.Span=function(){function s(a){if(this.attributes=[],this.events=[],this.links=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.traceId=null,s.prototype.spanId=null,s.prototype.traceState=null,s.prototype.parentSpanId=null,s.prototype.name=null,s.prototype.kind=null,s.prototype.startTimeUnixNano=null,s.prototype.endTimeUnixNano=null,s.prototype.attributes=f.emptyArray,s.prototype.droppedAttributesCount=null,s.prototype.events=f.emptyArray,s.prototype.droppedEventsCount=null,s.prototype.links=f.emptyArray,s.prototype.droppedLinksCount=null,s.prototype.status=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId")&&e.uint32(10).bytes(t.traceId),t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId")&&e.uint32(18).bytes(t.spanId),t.traceState!=null&&Object.hasOwnProperty.call(t,"traceState")&&e.uint32(26).string(t.traceState),t.parentSpanId!=null&&Object.hasOwnProperty.call(t,"parentSpanId")&&e.uint32(34).bytes(t.parentSpanId),t.name!=null&&Object.hasOwnProperty.call(t,"name")&&e.uint32(42).string(t.name),t.kind!=null&&Object.hasOwnProperty.call(t,"kind")&&e.uint32(48).int32(t.kind),t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&e.uint32(57).fixed64(t.startTimeUnixNano),t.endTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"endTimeUnixNano")&&e.uint32(65).fixed64(t.endTimeUnixNano),t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(74).fork()).ldelim();if(t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&e.uint32(80).uint32(t.droppedAttributesCount),t.events!=null&&t.events.length)for(var n=0;n<t.events.length;++n)p.opentelemetry.proto.trace.v1.Span.Event.encode(t.events[n],e.uint32(90).fork()).ldelim();if(t.droppedEventsCount!=null&&Object.hasOwnProperty.call(t,"droppedEventsCount")&&e.uint32(96).uint32(t.droppedEventsCount),t.links!=null&&t.links.length)for(var n=0;n<t.links.length;++n)p.opentelemetry.proto.trace.v1.Span.Link.encode(t.links[n],e.uint32(106).fork()).ldelim();return t.droppedLinksCount!=null&&Object.hasOwnProperty.call(t,"droppedLinksCount")&&e.uint32(112).uint32(t.droppedLinksCount),t.status!=null&&Object.hasOwnProperty.call(t,"status")&&p.opentelemetry.proto.trace.v1.Status.encode(t.status,e.uint32(122).fork()).ldelim(),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.trace.v1.Span;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.traceId=t.bytes();break}case 2:{u.spanId=t.bytes();break}case 3:{u.traceState=t.string();break}case 4:{u.parentSpanId=t.bytes();break}case 5:{u.name=t.string();break}case 6:{u.kind=t.int32();break}case 7:{u.startTimeUnixNano=t.fixed64();break}case 8:{u.endTimeUnixNano=t.fixed64();break}case 9:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 10:{u.droppedAttributesCount=t.uint32();break}case 11:{u.events&&u.events.length||(u.events=[]),u.events.push(p.opentelemetry.proto.trace.v1.Span.Event.decode(t,t.uint32()));break}case 12:{u.droppedEventsCount=t.uint32();break}case 13:{u.links&&u.links.length||(u.links=[]),u.links.push(p.opentelemetry.proto.trace.v1.Span.Link.decode(t,t.uint32()));break}case 14:{u.droppedLinksCount=t.uint32();break}case 15:{u.status=p.opentelemetry.proto.trace.v1.Status.decode(t,t.uint32());break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.traceId!=null&&t.hasOwnProperty("traceId")&&!(t.traceId&&typeof t.traceId.length=="number"||f.isString(t.traceId)))return"traceId: buffer expected";if(t.spanId!=null&&t.hasOwnProperty("spanId")&&!(t.spanId&&typeof t.spanId.length=="number"||f.isString(t.spanId)))return"spanId: buffer expected";if(t.traceState!=null&&t.hasOwnProperty("traceState")&&!f.isString(t.traceState))return"traceState: string expected";if(t.parentSpanId!=null&&t.hasOwnProperty("parentSpanId")&&!(t.parentSpanId&&typeof t.parentSpanId.length=="number"||f.isString(t.parentSpanId)))return"parentSpanId: buffer expected";if(t.name!=null&&t.hasOwnProperty("name")&&!f.isString(t.name))return"name: string expected";if(t.kind!=null&&t.hasOwnProperty("kind"))switch(t.kind){default:return"kind: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!f.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&f.isInteger(t.startTimeUnixNano.low)&&f.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.endTimeUnixNano!=null&&t.hasOwnProperty("endTimeUnixNano")&&!f.isInteger(t.endTimeUnixNano)&&!(t.endTimeUnixNano&&f.isInteger(t.endTimeUnixNano.low)&&f.isInteger(t.endTimeUnixNano.high)))return"endTimeUnixNano: integer|Long expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(n)return"attributes."+n}}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(t.droppedAttributesCount))return"droppedAttributesCount: integer expected";if(t.events!=null&&t.hasOwnProperty("events")){if(!Array.isArray(t.events))return"events: array expected";for(var e=0;e<t.events.length;++e){var n=p.opentelemetry.proto.trace.v1.Span.Event.verify(t.events[e]);if(n)return"events."+n}}if(t.droppedEventsCount!=null&&t.hasOwnProperty("droppedEventsCount")&&!f.isInteger(t.droppedEventsCount))return"droppedEventsCount: integer expected";if(t.links!=null&&t.hasOwnProperty("links")){if(!Array.isArray(t.links))return"links: array expected";for(var e=0;e<t.links.length;++e){var n=p.opentelemetry.proto.trace.v1.Span.Link.verify(t.links[e]);if(n)return"links."+n}}if(t.droppedLinksCount!=null&&t.hasOwnProperty("droppedLinksCount")&&!f.isInteger(t.droppedLinksCount))return"droppedLinksCount: integer expected";if(t.status!=null&&t.hasOwnProperty("status")){var n=p.opentelemetry.proto.trace.v1.Status.verify(t.status);if(n)return"status."+n}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.Span)return t;var e=new p.opentelemetry.proto.trace.v1.Span;switch(t.traceId!=null&&(typeof t.traceId=="string"?f.base64.decode(t.traceId,e.traceId=f.newBuffer(f.base64.length(t.traceId)),0):t.traceId.length>=0&&(e.traceId=t.traceId)),t.spanId!=null&&(typeof t.spanId=="string"?f.base64.decode(t.spanId,e.spanId=f.newBuffer(f.base64.length(t.spanId)),0):t.spanId.length>=0&&(e.spanId=t.spanId)),t.traceState!=null&&(e.traceState=String(t.traceState)),t.parentSpanId!=null&&(typeof t.parentSpanId=="string"?f.base64.decode(t.parentSpanId,e.parentSpanId=f.newBuffer(f.base64.length(t.parentSpanId)),0):t.parentSpanId.length>=0&&(e.parentSpanId=t.parentSpanId)),t.name!=null&&(e.name=String(t.name)),t.kind){default:if(typeof t.kind=="number"){e.kind=t.kind;break}break;case"SPAN_KIND_UNSPECIFIED":case 0:e.kind=0;break;case"SPAN_KIND_INTERNAL":case 1:e.kind=1;break;case"SPAN_KIND_SERVER":case 2:e.kind=2;break;case"SPAN_KIND_CLIENT":case 3:e.kind=3;break;case"SPAN_KIND_PRODUCER":case 4:e.kind=4;break;case"SPAN_KIND_CONSUMER":case 5:e.kind=5;break}if(t.startTimeUnixNano!=null&&(f.Long?(e.startTimeUnixNano=f.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?e.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?e.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(e.startTimeUnixNano=new f.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.endTimeUnixNano!=null&&(f.Long?(e.endTimeUnixNano=f.Long.fromValue(t.endTimeUnixNano)).unsigned=!1:typeof t.endTimeUnixNano=="string"?e.endTimeUnixNano=parseInt(t.endTimeUnixNano,10):typeof t.endTimeUnixNano=="number"?e.endTimeUnixNano=t.endTimeUnixNano:typeof t.endTimeUnixNano=="object"&&(e.endTimeUnixNano=new f.LongBits(t.endTimeUnixNano.low>>>0,t.endTimeUnixNano.high>>>0).toNumber())),t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}if(t.droppedAttributesCount!=null&&(e.droppedAttributesCount=t.droppedAttributesCount>>>0),t.events){if(!Array.isArray(t.events))throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected");e.events=[];for(var n=0;n<t.events.length;++n){if(typeof t.events[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.events: object expected");e.events[n]=p.opentelemetry.proto.trace.v1.Span.Event.fromObject(t.events[n])}}if(t.droppedEventsCount!=null&&(e.droppedEventsCount=t.droppedEventsCount>>>0),t.links){if(!Array.isArray(t.links))throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected");e.links=[];for(var n=0;n<t.links.length;++n){if(typeof t.links[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.links: object expected");e.links[n]=p.opentelemetry.proto.trace.v1.Span.Link.fromObject(t.links[n])}}if(t.droppedLinksCount!=null&&(e.droppedLinksCount=t.droppedLinksCount>>>0),t.status!=null){if(typeof t.status!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected");e.status=p.opentelemetry.proto.trace.v1.Status.fromObject(t.status)}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[],n.events=[],n.links=[]),e.defaults){if(e.bytes===String?n.traceId="":(n.traceId=[],e.bytes!==Array&&(n.traceId=f.newBuffer(n.traceId))),e.bytes===String?n.spanId="":(n.spanId=[],e.bytes!==Array&&(n.spanId=f.newBuffer(n.spanId))),n.traceState="",e.bytes===String?n.parentSpanId="":(n.parentSpanId=[],e.bytes!==Array&&(n.parentSpanId=f.newBuffer(n.parentSpanId))),n.name="",n.kind=e.enums===String?"SPAN_KIND_UNSPECIFIED":0,f.Long){var u=new f.Long(0,0,!1);n.startTimeUnixNano=e.longs===String?u.toString():e.longs===Number?u.toNumber():u}else n.startTimeUnixNano=e.longs===String?"0":0;if(f.Long){var u=new f.Long(0,0,!1);n.endTimeUnixNano=e.longs===String?u.toString():e.longs===Number?u.toNumber():u}else n.endTimeUnixNano=e.longs===String?"0":0;n.droppedAttributesCount=0,n.droppedEventsCount=0,n.droppedLinksCount=0,n.status=null}if(t.traceId!=null&&t.hasOwnProperty("traceId")&&(n.traceId=e.bytes===String?f.base64.encode(t.traceId,0,t.traceId.length):e.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId),t.spanId!=null&&t.hasOwnProperty("spanId")&&(n.spanId=e.bytes===String?f.base64.encode(t.spanId,0,t.spanId.length):e.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId),t.traceState!=null&&t.hasOwnProperty("traceState")&&(n.traceState=t.traceState),t.parentSpanId!=null&&t.hasOwnProperty("parentSpanId")&&(n.parentSpanId=e.bytes===String?f.base64.encode(t.parentSpanId,0,t.parentSpanId.length):e.bytes===Array?Array.prototype.slice.call(t.parentSpanId):t.parentSpanId),t.name!=null&&t.hasOwnProperty("name")&&(n.name=t.name),t.kind!=null&&t.hasOwnProperty("kind")&&(n.kind=e.enums===String?p.opentelemetry.proto.trace.v1.Span.SpanKind[t.kind]===void 0?t.kind:p.opentelemetry.proto.trace.v1.Span.SpanKind[t.kind]:t.kind),t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?n.startTimeUnixNano=e.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:n.startTimeUnixNano=e.longs===String?f.Long.prototype.toString.call(t.startTimeUnixNano):e.longs===Number?new f.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.endTimeUnixNano!=null&&t.hasOwnProperty("endTimeUnixNano")&&(typeof t.endTimeUnixNano=="number"?n.endTimeUnixNano=e.longs===String?String(t.endTimeUnixNano):t.endTimeUnixNano:n.endTimeUnixNano=e.longs===String?f.Long.prototype.toString.call(t.endTimeUnixNano):e.longs===Number?new f.LongBits(t.endTimeUnixNano.low>>>0,t.endTimeUnixNano.high>>>0).toNumber():t.endTimeUnixNano),t.attributes&&t.attributes.length){n.attributes=[];for(var l=0;l<t.attributes.length;++l)n.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[l],e)}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),t.events&&t.events.length){n.events=[];for(var l=0;l<t.events.length;++l)n.events[l]=p.opentelemetry.proto.trace.v1.Span.Event.toObject(t.events[l],e)}if(t.droppedEventsCount!=null&&t.hasOwnProperty("droppedEventsCount")&&(n.droppedEventsCount=t.droppedEventsCount),t.links&&t.links.length){n.links=[];for(var l=0;l<t.links.length;++l)n.links[l]=p.opentelemetry.proto.trace.v1.Span.Link.toObject(t.links[l],e)}return t.droppedLinksCount!=null&&t.hasOwnProperty("droppedLinksCount")&&(n.droppedLinksCount=t.droppedLinksCount),t.status!=null&&t.hasOwnProperty("status")&&(n.status=p.opentelemetry.proto.trace.v1.Status.toObject(t.status,e)),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Span"},s.SpanKind=function(){var a={},t=Object.create(a);return t[a[0]="SPAN_KIND_UNSPECIFIED"]=0,t[a[1]="SPAN_KIND_INTERNAL"]=1,t[a[2]="SPAN_KIND_SERVER"]=2,t[a[3]="SPAN_KIND_CLIENT"]=3,t[a[4]="SPAN_KIND_PRODUCER"]=4,t[a[5]="SPAN_KIND_CONSUMER"]=5,t}(),s.Event=function(){function a(t){if(this.attributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.timeUnixNano=null,a.prototype.name=null,a.prototype.attributes=f.emptyArray,a.prototype.droppedAttributesCount=null,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=O.create()),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(9).fixed64(e.timeUnixNano),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&n.uint32(18).string(e.name),e.attributes!=null&&e.attributes.length)for(var u=0;u<e.attributes.length;++u)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[u],n.uint32(26).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&n.uint32(32).uint32(e.droppedAttributesCount),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.trace.v1.Span.Event;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.timeUnixNano=e.fixed64();break}case 2:{l.name=e.string();break}case 3:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 4:{l.droppedAttributesCount=e.uint32();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!f.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&f.isInteger(e.timeUnixNano.low)&&f.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.name!=null&&e.hasOwnProperty("name")&&!f.isString(e.name))return"name: string expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var n=0;n<e.attributes.length;++n){var u=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[n]);if(u)return"attributes."+u}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.trace.v1.Span.Event)return e;var n=new p.opentelemetry.proto.trace.v1.Span.Event;if(e.timeUnixNano!=null&&(f.Long?(n.timeUnixNano=f.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.name!=null&&(n.name=String(e.name)),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");n.attributes=[];for(var u=0;u<e.attributes.length;++u){if(typeof e.attributes[u]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected");n.attributes[u]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[u])}}return e.droppedAttributesCount!=null&&(n.droppedAttributesCount=e.droppedAttributesCount>>>0),n},a.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.attributes=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.timeUnixNano=n.longs===String?"0":0;u.name="",u.droppedAttributesCount=0}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?u.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:u.timeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.name!=null&&e.hasOwnProperty("name")&&(u.name=e.name),e.attributes&&e.attributes.length){u.attributes=[];for(var h=0;h<e.attributes.length;++h)u.attributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[h],n)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(u.droppedAttributesCount=e.droppedAttributesCount),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span.Event"},a}(),s.Link=function(){function a(t){if(this.attributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.traceId=null,a.prototype.spanId=null,a.prototype.traceState=null,a.prototype.attributes=f.emptyArray,a.prototype.droppedAttributesCount=null,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=O.create()),e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId")&&n.uint32(10).bytes(e.traceId),e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId")&&n.uint32(18).bytes(e.spanId),e.traceState!=null&&Object.hasOwnProperty.call(e,"traceState")&&n.uint32(26).string(e.traceState),e.attributes!=null&&e.attributes.length)for(var u=0;u<e.attributes.length;++u)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[u],n.uint32(34).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&n.uint32(40).uint32(e.droppedAttributesCount),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.trace.v1.Span.Link;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.traceId=e.bytes();break}case 2:{l.spanId=e.bytes();break}case 3:{l.traceState=e.string();break}case 4:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 5:{l.droppedAttributesCount=e.uint32();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.traceId!=null&&e.hasOwnProperty("traceId")&&!(e.traceId&&typeof e.traceId.length=="number"||f.isString(e.traceId)))return"traceId: buffer expected";if(e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||f.isString(e.spanId)))return"spanId: buffer expected";if(e.traceState!=null&&e.hasOwnProperty("traceState")&&!f.isString(e.traceState))return"traceState: string expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var n=0;n<e.attributes.length;++n){var u=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[n]);if(u)return"attributes."+u}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.trace.v1.Span.Link)return e;var n=new p.opentelemetry.proto.trace.v1.Span.Link;if(e.traceId!=null&&(typeof e.traceId=="string"?f.base64.decode(e.traceId,n.traceId=f.newBuffer(f.base64.length(e.traceId)),0):e.traceId.length>=0&&(n.traceId=e.traceId)),e.spanId!=null&&(typeof e.spanId=="string"?f.base64.decode(e.spanId,n.spanId=f.newBuffer(f.base64.length(e.spanId)),0):e.spanId.length>=0&&(n.spanId=e.spanId)),e.traceState!=null&&(n.traceState=String(e.traceState)),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");n.attributes=[];for(var u=0;u<e.attributes.length;++u){if(typeof e.attributes[u]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected");n.attributes[u]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[u])}}return e.droppedAttributesCount!=null&&(n.droppedAttributesCount=e.droppedAttributesCount>>>0),n},a.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.attributes=[]),n.defaults&&(n.bytes===String?u.traceId="":(u.traceId=[],n.bytes!==Array&&(u.traceId=f.newBuffer(u.traceId))),n.bytes===String?u.spanId="":(u.spanId=[],n.bytes!==Array&&(u.spanId=f.newBuffer(u.spanId))),u.traceState="",u.droppedAttributesCount=0),e.traceId!=null&&e.hasOwnProperty("traceId")&&(u.traceId=n.bytes===String?f.base64.encode(e.traceId,0,e.traceId.length):n.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),e.spanId!=null&&e.hasOwnProperty("spanId")&&(u.spanId=n.bytes===String?f.base64.encode(e.spanId,0,e.spanId.length):n.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),e.traceState!=null&&e.hasOwnProperty("traceState")&&(u.traceState=e.traceState),e.attributes&&e.attributes.length){u.attributes=[];for(var l=0;l<e.attributes.length;++l)u.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[l],n)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(u.droppedAttributesCount=e.droppedAttributesCount),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span.Link"},a}(),s}(),c.Status=function(){function s(a){if(a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.message=null,s.prototype.code=null,s.create=function(t){return new s(t)},s.encode=function(t,e){return e||(e=O.create()),t.message!=null&&Object.hasOwnProperty.call(t,"message")&&e.uint32(18).string(t.message),t.code!=null&&Object.hasOwnProperty.call(t,"code")&&e.uint32(24).int32(t.code),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.trace.v1.Status;t.pos<n;){var l=t.uint32();switch(l>>>3){case 2:{u.message=t.string();break}case 3:{u.code=t.int32();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.message!=null&&t.hasOwnProperty("message")&&!f.isString(t.message))return"message: string expected";if(t.code!=null&&t.hasOwnProperty("code"))switch(t.code){default:return"code: enum value expected";case 0:case 1:case 2:break}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.Status)return t;var e=new p.opentelemetry.proto.trace.v1.Status;switch(t.message!=null&&(e.message=String(t.message)),t.code){default:if(typeof t.code=="number"){e.code=t.code;break}break;case"STATUS_CODE_UNSET":case 0:e.code=0;break;case"STATUS_CODE_OK":case 1:e.code=1;break;case"STATUS_CODE_ERROR":case 2:e.code=2;break}return e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.message="",n.code=e.enums===String?"STATUS_CODE_UNSET":0),t.message!=null&&t.hasOwnProperty("message")&&(n.message=t.message),t.code!=null&&t.hasOwnProperty("code")&&(n.code=e.enums===String?p.opentelemetry.proto.trace.v1.Status.StatusCode[t.code]===void 0?t.code:p.opentelemetry.proto.trace.v1.Status.StatusCode[t.code]:t.code),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Status"},s.StatusCode=function(){var a={},t=Object.create(a);return t[a[0]="STATUS_CODE_UNSET"]=0,t[a[1]="STATUS_CODE_OK"]=1,t[a[2]="STATUS_CODE_ERROR"]=2,t}(),s}(),c}(),o}(),r.collector=function(){var o={};return o.trace=function(){var c={};return c.v1=function(){var s={};return s.TraceService=function(){function a(t,e,n){v.rpc.Service.call(this,t,e,n)}return(a.prototype=Object.create(v.rpc.Service.prototype)).constructor=a,a.create=function(e,n,u){return new this(e,n,u)},Object.defineProperty(a.prototype.export=function t(e,n){return this.rpcCall(t,p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,e,n)},"name",{value:"Export"}),a}(),s.ExportTraceServiceRequest=function(){function a(t){if(this.resourceSpans=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.resourceSpans=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=O.create()),e.resourceSpans!=null&&e.resourceSpans.length)for(var u=0;u<e.resourceSpans.length;++u)p.opentelemetry.proto.trace.v1.ResourceSpans.encode(e.resourceSpans[u],n.uint32(10).fork()).ldelim();return n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.resourceSpans&&l.resourceSpans.length||(l.resourceSpans=[]),l.resourceSpans.push(p.opentelemetry.proto.trace.v1.ResourceSpans.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceSpans!=null&&e.hasOwnProperty("resourceSpans")){if(!Array.isArray(e.resourceSpans))return"resourceSpans: array expected";for(var n=0;n<e.resourceSpans.length;++n){var u=p.opentelemetry.proto.trace.v1.ResourceSpans.verify(e.resourceSpans[n]);if(u)return"resourceSpans."+u}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;if(e.resourceSpans){if(!Array.isArray(e.resourceSpans))throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected");n.resourceSpans=[];for(var u=0;u<e.resourceSpans.length;++u){if(typeof e.resourceSpans[u]!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected");n.resourceSpans[u]=p.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(e.resourceSpans[u])}}return n},a.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.resourceSpans=[]),e.resourceSpans&&e.resourceSpans.length){u.resourceSpans=[];for(var l=0;l<e.resourceSpans.length;++l)u.resourceSpans[l]=p.opentelemetry.proto.trace.v1.ResourceSpans.toObject(e.resourceSpans[l],n)}return u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"},a}(),s.ExportTraceServiceResponse=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.partialSuccess=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=O.create()),e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess")&&p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(e.partialSuccess,n.uint32(10).fork()).ldelim(),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(e,e.uint32());break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(e.partialSuccess)}return n},a.toObject=function(e,n){n||(n={});var u={};return n.defaults&&(u.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(u.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(e.partialSuccess,n)),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},a}(),s.ExportTracePartialSuccess=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.rejectedSpans=null,a.prototype.errorMessage=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=O.create()),e.rejectedSpans!=null&&Object.hasOwnProperty.call(e,"rejectedSpans")&&n.uint32(8).int64(e.rejectedSpans),e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage")&&n.uint32(18).string(e.errorMessage),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.rejectedSpans=e.int64();break}case 2:{l.errorMessage=e.string();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedSpans!=null&&e.hasOwnProperty("rejectedSpans")&&!f.isInteger(e.rejectedSpans)&&!(e.rejectedSpans&&f.isInteger(e.rejectedSpans.low)&&f.isInteger(e.rejectedSpans.high))?"rejectedSpans: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!f.isString(e.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;return e.rejectedSpans!=null&&(f.Long?(n.rejectedSpans=f.Long.fromValue(e.rejectedSpans)).unsigned=!1:typeof e.rejectedSpans=="string"?n.rejectedSpans=parseInt(e.rejectedSpans,10):typeof e.rejectedSpans=="number"?n.rejectedSpans=e.rejectedSpans:typeof e.rejectedSpans=="object"&&(n.rejectedSpans=new f.LongBits(e.rejectedSpans.low>>>0,e.rejectedSpans.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},a.toObject=function(e,n){n||(n={});var u={};if(n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.rejectedSpans=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.rejectedSpans=n.longs===String?"0":0;u.errorMessage=""}return e.rejectedSpans!=null&&e.hasOwnProperty("rejectedSpans")&&(typeof e.rejectedSpans=="number"?u.rejectedSpans=n.longs===String?String(e.rejectedSpans):e.rejectedSpans:u.rejectedSpans=n.longs===String?f.Long.prototype.toString.call(e.rejectedSpans):n.longs===Number?new f.LongBits(e.rejectedSpans.low>>>0,e.rejectedSpans.high>>>0).toNumber():e.rejectedSpans),e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&(u.errorMessage=e.errorMessage),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},a}(),s}(),c}(),o.metrics=function(){var c={};return c.v1=function(){var s={};return s.MetricsService=function(){function a(t,e,n){v.rpc.Service.call(this,t,e,n)}return(a.prototype=Object.create(v.rpc.Service.prototype)).constructor=a,a.create=function(e,n,u){return new this(e,n,u)},Object.defineProperty(a.prototype.export=function t(e,n){return this.rpcCall(t,p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,e,n)},"name",{value:"Export"}),a}(),s.ExportMetricsServiceRequest=function(){function a(t){if(this.resourceMetrics=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.resourceMetrics=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=O.create()),e.resourceMetrics!=null&&e.resourceMetrics.length)for(var u=0;u<e.resourceMetrics.length;++u)p.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(e.resourceMetrics[u],n.uint32(10).fork()).ldelim();return n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.resourceMetrics&&l.resourceMetrics.length||(l.resourceMetrics=[]),l.resourceMetrics.push(p.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceMetrics!=null&&e.hasOwnProperty("resourceMetrics")){if(!Array.isArray(e.resourceMetrics))return"resourceMetrics: array expected";for(var n=0;n<e.resourceMetrics.length;++n){var u=p.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(e.resourceMetrics[n]);if(u)return"resourceMetrics."+u}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;if(e.resourceMetrics){if(!Array.isArray(e.resourceMetrics))throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected");n.resourceMetrics=[];for(var u=0;u<e.resourceMetrics.length;++u){if(typeof e.resourceMetrics[u]!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected");n.resourceMetrics[u]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(e.resourceMetrics[u])}}return n},a.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.resourceMetrics=[]),e.resourceMetrics&&e.resourceMetrics.length){u.resourceMetrics=[];for(var l=0;l<e.resourceMetrics.length;++l)u.resourceMetrics[l]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(e.resourceMetrics[l],n)}return u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"},a}(),s.ExportMetricsServiceResponse=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.partialSuccess=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=O.create()),e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess")&&p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(e.partialSuccess,n.uint32(10).fork()).ldelim(),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(e,e.uint32());break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(e.partialSuccess)}return n},a.toObject=function(e,n){n||(n={});var u={};return n.defaults&&(u.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(u.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(e.partialSuccess,n)),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},a}(),s.ExportMetricsPartialSuccess=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.rejectedDataPoints=null,a.prototype.errorMessage=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=O.create()),e.rejectedDataPoints!=null&&Object.hasOwnProperty.call(e,"rejectedDataPoints")&&n.uint32(8).int64(e.rejectedDataPoints),e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage")&&n.uint32(18).string(e.errorMessage),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.rejectedDataPoints=e.int64();break}case 2:{l.errorMessage=e.string();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedDataPoints!=null&&e.hasOwnProperty("rejectedDataPoints")&&!f.isInteger(e.rejectedDataPoints)&&!(e.rejectedDataPoints&&f.isInteger(e.rejectedDataPoints.low)&&f.isInteger(e.rejectedDataPoints.high))?"rejectedDataPoints: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!f.isString(e.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;return e.rejectedDataPoints!=null&&(f.Long?(n.rejectedDataPoints=f.Long.fromValue(e.rejectedDataPoints)).unsigned=!1:typeof e.rejectedDataPoints=="string"?n.rejectedDataPoints=parseInt(e.rejectedDataPoints,10):typeof e.rejectedDataPoints=="number"?n.rejectedDataPoints=e.rejectedDataPoints:typeof e.rejectedDataPoints=="object"&&(n.rejectedDataPoints=new f.LongBits(e.rejectedDataPoints.low>>>0,e.rejectedDataPoints.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},a.toObject=function(e,n){n||(n={});var u={};if(n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.rejectedDataPoints=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.rejectedDataPoints=n.longs===String?"0":0;u.errorMessage=""}return e.rejectedDataPoints!=null&&e.hasOwnProperty("rejectedDataPoints")&&(typeof e.rejectedDataPoints=="number"?u.rejectedDataPoints=n.longs===String?String(e.rejectedDataPoints):e.rejectedDataPoints:u.rejectedDataPoints=n.longs===String?f.Long.prototype.toString.call(e.rejectedDataPoints):n.longs===Number?new f.LongBits(e.rejectedDataPoints.low>>>0,e.rejectedDataPoints.high>>>0).toNumber():e.rejectedDataPoints),e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&(u.errorMessage=e.errorMessage),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},a}(),s}(),c}(),o.logs=function(){var c={};return c.v1=function(){var s={};return s.LogsService=function(){function a(t,e,n){v.rpc.Service.call(this,t,e,n)}return(a.prototype=Object.create(v.rpc.Service.prototype)).constructor=a,a.create=function(e,n,u){return new this(e,n,u)},Object.defineProperty(a.prototype.export=function t(e,n){return this.rpcCall(t,p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,e,n)},"name",{value:"Export"}),a}(),s.ExportLogsServiceRequest=function(){function a(t){if(this.resourceLogs=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.resourceLogs=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=O.create()),e.resourceLogs!=null&&e.resourceLogs.length)for(var u=0;u<e.resourceLogs.length;++u)p.opentelemetry.proto.logs.v1.ResourceLogs.encode(e.resourceLogs[u],n.uint32(10).fork()).ldelim();return n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.resourceLogs&&l.resourceLogs.length||(l.resourceLogs=[]),l.resourceLogs.push(p.opentelemetry.proto.logs.v1.ResourceLogs.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceLogs!=null&&e.hasOwnProperty("resourceLogs")){if(!Array.isArray(e.resourceLogs))return"resourceLogs: array expected";for(var n=0;n<e.resourceLogs.length;++n){var u=p.opentelemetry.proto.logs.v1.ResourceLogs.verify(e.resourceLogs[n]);if(u)return"resourceLogs."+u}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;if(e.resourceLogs){if(!Array.isArray(e.resourceLogs))throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected");n.resourceLogs=[];for(var u=0;u<e.resourceLogs.length;++u){if(typeof e.resourceLogs[u]!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected");n.resourceLogs[u]=p.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(e.resourceLogs[u])}}return n},a.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.resourceLogs=[]),e.resourceLogs&&e.resourceLogs.length){u.resourceLogs=[];for(var l=0;l<e.resourceLogs.length;++l)u.resourceLogs[l]=p.opentelemetry.proto.logs.v1.ResourceLogs.toObject(e.resourceLogs[l],n)}return u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"},a}(),s.ExportLogsServiceResponse=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.partialSuccess=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=O.create()),e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess")&&p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(e.partialSuccess,n.uint32(10).fork()).ldelim(),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(e,e.uint32());break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(e.partialSuccess)}return n},a.toObject=function(e,n){n||(n={});var u={};return n.defaults&&(u.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(u.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(e.partialSuccess,n)),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},a}(),s.ExportLogsPartialSuccess=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.rejectedLogRecords=null,a.prototype.errorMessage=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=O.create()),e.rejectedLogRecords!=null&&Object.hasOwnProperty.call(e,"rejectedLogRecords")&&n.uint32(8).int64(e.rejectedLogRecords),e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage")&&n.uint32(18).string(e.errorMessage),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.rejectedLogRecords=e.int64();break}case 2:{l.errorMessage=e.string();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedLogRecords!=null&&e.hasOwnProperty("rejectedLogRecords")&&!f.isInteger(e.rejectedLogRecords)&&!(e.rejectedLogRecords&&f.isInteger(e.rejectedLogRecords.low)&&f.isInteger(e.rejectedLogRecords.high))?"rejectedLogRecords: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!f.isString(e.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;return e.rejectedLogRecords!=null&&(f.Long?(n.rejectedLogRecords=f.Long.fromValue(e.rejectedLogRecords)).unsigned=!1:typeof e.rejectedLogRecords=="string"?n.rejectedLogRecords=parseInt(e.rejectedLogRecords,10):typeof e.rejectedLogRecords=="number"?n.rejectedLogRecords=e.rejectedLogRecords:typeof e.rejectedLogRecords=="object"&&(n.rejectedLogRecords=new f.LongBits(e.rejectedLogRecords.low>>>0,e.rejectedLogRecords.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},a.toObject=function(e,n){n||(n={});var u={};if(n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.rejectedLogRecords=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.rejectedLogRecords=n.longs===String?"0":0;u.errorMessage=""}return e.rejectedLogRecords!=null&&e.hasOwnProperty("rejectedLogRecords")&&(typeof e.rejectedLogRecords=="number"?u.rejectedLogRecords=n.longs===String?String(e.rejectedLogRecords):e.rejectedLogRecords:u.rejectedLogRecords=n.longs===String?f.Long.prototype.toString.call(e.rejectedLogRecords):n.longs===Number?new f.LongBits(e.rejectedLogRecords.low>>>0,e.rejectedLogRecords.high>>>0).toNumber():e.rejectedLogRecords),e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&(u.errorMessage=e.errorMessage),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},a}(),s}(),c}(),o}(),r.metrics=function(){var o={};return o.v1=function(){var c={};return c.MetricsData=function(){function s(a){if(this.resourceMetrics=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.resourceMetrics=f.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.resourceMetrics!=null&&t.resourceMetrics.length)for(var n=0;n<t.resourceMetrics.length;++n)p.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(t.resourceMetrics[n],e.uint32(10).fork()).ldelim();return e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.MetricsData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.resourceMetrics&&u.resourceMetrics.length||(u.resourceMetrics=[]),u.resourceMetrics.push(p.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resourceMetrics!=null&&t.hasOwnProperty("resourceMetrics")){if(!Array.isArray(t.resourceMetrics))return"resourceMetrics: array expected";for(var e=0;e<t.resourceMetrics.length;++e){var n=p.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(t.resourceMetrics[e]);if(n)return"resourceMetrics."+n}}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.MetricsData)return t;var e=new p.opentelemetry.proto.metrics.v1.MetricsData;if(t.resourceMetrics){if(!Array.isArray(t.resourceMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: array expected");e.resourceMetrics=[];for(var n=0;n<t.resourceMetrics.length;++n){if(typeof t.resourceMetrics[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: object expected");e.resourceMetrics[n]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(t.resourceMetrics[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.resourceMetrics=[]),t.resourceMetrics&&t.resourceMetrics.length){n.resourceMetrics=[];for(var u=0;u<t.resourceMetrics.length;++u)n.resourceMetrics[u]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(t.resourceMetrics[u],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.MetricsData"},s}(),c.ResourceMetrics=function(){function s(a){if(this.scopeMetrics=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.resource=null,s.prototype.scopeMetrics=f.emptyArray,s.prototype.schemaUrl=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.resource!=null&&Object.hasOwnProperty.call(t,"resource")&&p.opentelemetry.proto.resource.v1.Resource.encode(t.resource,e.uint32(10).fork()).ldelim(),t.scopeMetrics!=null&&t.scopeMetrics.length)for(var n=0;n<t.scopeMetrics.length;++n)p.opentelemetry.proto.metrics.v1.ScopeMetrics.encode(t.scopeMetrics[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.ResourceMetrics;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{u.scopeMetrics&&u.scopeMetrics.length||(u.scopeMetrics=[]),u.scopeMetrics.push(p.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(t,t.uint32()));break}case 3:{u.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resource!=null&&t.hasOwnProperty("resource")){var e=p.opentelemetry.proto.resource.v1.Resource.verify(t.resource);if(e)return"resource."+e}if(t.scopeMetrics!=null&&t.hasOwnProperty("scopeMetrics")){if(!Array.isArray(t.scopeMetrics))return"scopeMetrics: array expected";for(var n=0;n<t.scopeMetrics.length;++n){var e=p.opentelemetry.proto.metrics.v1.ScopeMetrics.verify(t.scopeMetrics[n]);if(e)return"scopeMetrics."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!f.isString(t.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.ResourceMetrics)return t;var e=new p.opentelemetry.proto.metrics.v1.ResourceMetrics;if(t.resource!=null){if(typeof t.resource!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.resource: object expected");e.resource=p.opentelemetry.proto.resource.v1.Resource.fromObject(t.resource)}if(t.scopeMetrics){if(!Array.isArray(t.scopeMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: array expected");e.scopeMetrics=[];for(var n=0;n<t.scopeMetrics.length;++n){if(typeof t.scopeMetrics[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: object expected");e.scopeMetrics[n]=p.opentelemetry.proto.metrics.v1.ScopeMetrics.fromObject(t.scopeMetrics[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.scopeMetrics=[]),e.defaults&&(n.resource=null,n.schemaUrl=""),t.resource!=null&&t.hasOwnProperty("resource")&&(n.resource=p.opentelemetry.proto.resource.v1.Resource.toObject(t.resource,e)),t.scopeMetrics&&t.scopeMetrics.length){n.scopeMetrics=[];for(var u=0;u<t.scopeMetrics.length;++u)n.scopeMetrics[u]=p.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(t.scopeMetrics[u],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ResourceMetrics"},s}(),c.ScopeMetrics=function(){function s(a){if(this.metrics=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.scope=null,s.prototype.metrics=f.emptyArray,s.prototype.schemaUrl=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.scope!=null&&Object.hasOwnProperty.call(t,"scope")&&p.opentelemetry.proto.common.v1.InstrumentationScope.encode(t.scope,e.uint32(10).fork()).ldelim(),t.metrics!=null&&t.metrics.length)for(var n=0;n<t.metrics.length;++n)p.opentelemetry.proto.metrics.v1.Metric.encode(t.metrics[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.ScopeMetrics;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{u.metrics&&u.metrics.length||(u.metrics=[]),u.metrics.push(p.opentelemetry.proto.metrics.v1.Metric.decode(t,t.uint32()));break}case 3:{u.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.scope!=null&&t.hasOwnProperty("scope")){var e=p.opentelemetry.proto.common.v1.InstrumentationScope.verify(t.scope);if(e)return"scope."+e}if(t.metrics!=null&&t.hasOwnProperty("metrics")){if(!Array.isArray(t.metrics))return"metrics: array expected";for(var n=0;n<t.metrics.length;++n){var e=p.opentelemetry.proto.metrics.v1.Metric.verify(t.metrics[n]);if(e)return"metrics."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!f.isString(t.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.ScopeMetrics)return t;var e=new p.opentelemetry.proto.metrics.v1.ScopeMetrics;if(t.scope!=null){if(typeof t.scope!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.scope: object expected");e.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(t.scope)}if(t.metrics){if(!Array.isArray(t.metrics))throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: array expected");e.metrics=[];for(var n=0;n<t.metrics.length;++n){if(typeof t.metrics[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: object expected");e.metrics[n]=p.opentelemetry.proto.metrics.v1.Metric.fromObject(t.metrics[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.metrics=[]),e.defaults&&(n.scope=null,n.schemaUrl=""),t.scope!=null&&t.hasOwnProperty("scope")&&(n.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.toObject(t.scope,e)),t.metrics&&t.metrics.length){n.metrics=[];for(var u=0;u<t.metrics.length;++u)n.metrics[u]=p.opentelemetry.proto.metrics.v1.Metric.toObject(t.metrics[u],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ScopeMetrics"},s}(),c.Metric=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}s.prototype.name=null,s.prototype.description=null,s.prototype.unit=null,s.prototype.gauge=null,s.prototype.sum=null,s.prototype.histogram=null,s.prototype.exponentialHistogram=null,s.prototype.summary=null;var a;return Object.defineProperty(s.prototype,"data",{get:f.oneOfGetter(a=["gauge","sum","histogram","exponentialHistogram","summary"]),set:f.oneOfSetter(a)}),s.create=function(e){return new s(e)},s.encode=function(e,n){return n||(n=O.create()),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&n.uint32(10).string(e.name),e.description!=null&&Object.hasOwnProperty.call(e,"description")&&n.uint32(18).string(e.description),e.unit!=null&&Object.hasOwnProperty.call(e,"unit")&&n.uint32(26).string(e.unit),e.gauge!=null&&Object.hasOwnProperty.call(e,"gauge")&&p.opentelemetry.proto.metrics.v1.Gauge.encode(e.gauge,n.uint32(42).fork()).ldelim(),e.sum!=null&&Object.hasOwnProperty.call(e,"sum")&&p.opentelemetry.proto.metrics.v1.Sum.encode(e.sum,n.uint32(58).fork()).ldelim(),e.histogram!=null&&Object.hasOwnProperty.call(e,"histogram")&&p.opentelemetry.proto.metrics.v1.Histogram.encode(e.histogram,n.uint32(74).fork()).ldelim(),e.exponentialHistogram!=null&&Object.hasOwnProperty.call(e,"exponentialHistogram")&&p.opentelemetry.proto.metrics.v1.ExponentialHistogram.encode(e.exponentialHistogram,n.uint32(82).fork()).ldelim(),e.summary!=null&&Object.hasOwnProperty.call(e,"summary")&&p.opentelemetry.proto.metrics.v1.Summary.encode(e.summary,n.uint32(90).fork()).ldelim(),n},s.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},s.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.Metric;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.name=e.string();break}case 2:{l.description=e.string();break}case 3:{l.unit=e.string();break}case 5:{l.gauge=p.opentelemetry.proto.metrics.v1.Gauge.decode(e,e.uint32());break}case 7:{l.sum=p.opentelemetry.proto.metrics.v1.Sum.decode(e,e.uint32());break}case 9:{l.histogram=p.opentelemetry.proto.metrics.v1.Histogram.decode(e,e.uint32());break}case 10:{l.exponentialHistogram=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(e,e.uint32());break}case 11:{l.summary=p.opentelemetry.proto.metrics.v1.Summary.decode(e,e.uint32());break}default:e.skipType(h&7);break}}return l},s.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.name!=null&&e.hasOwnProperty("name")&&!f.isString(e.name))return"name: string expected";if(e.description!=null&&e.hasOwnProperty("description")&&!f.isString(e.description))return"description: string expected";if(e.unit!=null&&e.hasOwnProperty("unit")&&!f.isString(e.unit))return"unit: string expected";if(e.gauge!=null&&e.hasOwnProperty("gauge")){n.data=1;{var u=p.opentelemetry.proto.metrics.v1.Gauge.verify(e.gauge);if(u)return"gauge."+u}}if(e.sum!=null&&e.hasOwnProperty("sum")){if(n.data===1)return"data: multiple values";n.data=1;{var u=p.opentelemetry.proto.metrics.v1.Sum.verify(e.sum);if(u)return"sum."+u}}if(e.histogram!=null&&e.hasOwnProperty("histogram")){if(n.data===1)return"data: multiple values";n.data=1;{var u=p.opentelemetry.proto.metrics.v1.Histogram.verify(e.histogram);if(u)return"histogram."+u}}if(e.exponentialHistogram!=null&&e.hasOwnProperty("exponentialHistogram")){if(n.data===1)return"data: multiple values";n.data=1;{var u=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(e.exponentialHistogram);if(u)return"exponentialHistogram."+u}}if(e.summary!=null&&e.hasOwnProperty("summary")){if(n.data===1)return"data: multiple values";n.data=1;{var u=p.opentelemetry.proto.metrics.v1.Summary.verify(e.summary);if(u)return"summary."+u}}return null},s.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.Metric)return e;var n=new p.opentelemetry.proto.metrics.v1.Metric;if(e.name!=null&&(n.name=String(e.name)),e.description!=null&&(n.description=String(e.description)),e.unit!=null&&(n.unit=String(e.unit)),e.gauge!=null){if(typeof e.gauge!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected");n.gauge=p.opentelemetry.proto.metrics.v1.Gauge.fromObject(e.gauge)}if(e.sum!=null){if(typeof e.sum!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.sum: object expected");n.sum=p.opentelemetry.proto.metrics.v1.Sum.fromObject(e.sum)}if(e.histogram!=null){if(typeof e.histogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.histogram: object expected");n.histogram=p.opentelemetry.proto.metrics.v1.Histogram.fromObject(e.histogram)}if(e.exponentialHistogram!=null){if(typeof e.exponentialHistogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected");n.exponentialHistogram=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(e.exponentialHistogram)}if(e.summary!=null){if(typeof e.summary!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.summary: object expected");n.summary=p.opentelemetry.proto.metrics.v1.Summary.fromObject(e.summary)}return n},s.toObject=function(e,n){n||(n={});var u={};return n.defaults&&(u.name="",u.description="",u.unit=""),e.name!=null&&e.hasOwnProperty("name")&&(u.name=e.name),e.description!=null&&e.hasOwnProperty("description")&&(u.description=e.description),e.unit!=null&&e.hasOwnProperty("unit")&&(u.unit=e.unit),e.gauge!=null&&e.hasOwnProperty("gauge")&&(u.gauge=p.opentelemetry.proto.metrics.v1.Gauge.toObject(e.gauge,n),n.oneofs&&(u.data="gauge")),e.sum!=null&&e.hasOwnProperty("sum")&&(u.sum=p.opentelemetry.proto.metrics.v1.Sum.toObject(e.sum,n),n.oneofs&&(u.data="sum")),e.histogram!=null&&e.hasOwnProperty("histogram")&&(u.histogram=p.opentelemetry.proto.metrics.v1.Histogram.toObject(e.histogram,n),n.oneofs&&(u.data="histogram")),e.exponentialHistogram!=null&&e.hasOwnProperty("exponentialHistogram")&&(u.exponentialHistogram=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(e.exponentialHistogram,n),n.oneofs&&(u.data="exponentialHistogram")),e.summary!=null&&e.hasOwnProperty("summary")&&(u.summary=p.opentelemetry.proto.metrics.v1.Summary.toObject(e.summary,n),n.oneofs&&(u.data="summary")),u},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Metric"},s}(),c.Gauge=function(){function s(a){if(this.dataPoints=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.dataPoints=f.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.Gauge;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.dataPoints&&u.dataPoints.length||(u.dataPoints=[]),u.dataPoints.push(p.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.Gauge)return t;var e=new p.opentelemetry.proto.metrics.v1.Gauge;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(t.dataPoints[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var u=0;u<t.dataPoints.length;++u)n.dataPoints[u]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(t.dataPoints[u],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Gauge"},s}(),c.Sum=function(){function s(a){if(this.dataPoints=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.dataPoints=f.emptyArray,s.prototype.aggregationTemporality=null,s.prototype.isMonotonic=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return t.aggregationTemporality!=null&&Object.hasOwnProperty.call(t,"aggregationTemporality")&&e.uint32(16).int32(t.aggregationTemporality),t.isMonotonic!=null&&Object.hasOwnProperty.call(t,"isMonotonic")&&e.uint32(24).bool(t.isMonotonic),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.Sum;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.dataPoints&&u.dataPoints.length||(u.dataPoints=[]),u.dataPoints.push(p.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(t,t.uint32()));break}case 2:{u.aggregationTemporality=t.int32();break}case 3:{u.isMonotonic=t.bool();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))switch(t.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return t.isMonotonic!=null&&t.hasOwnProperty("isMonotonic")&&typeof t.isMonotonic!="boolean"?"isMonotonic: boolean expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.Sum)return t;var e=new p.opentelemetry.proto.metrics.v1.Sum;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(t.dataPoints[n])}}switch(t.aggregationTemporality){default:if(typeof t.aggregationTemporality=="number"){e.aggregationTemporality=t.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:e.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:e.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:e.aggregationTemporality=2;break}return t.isMonotonic!=null&&(e.isMonotonic=!!t.isMonotonic),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),e.defaults&&(n.aggregationTemporality=e.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0,n.isMonotonic=!1),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var u=0;u<t.dataPoints.length;++u)n.dataPoints[u]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(t.dataPoints[u],e)}return t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality")&&(n.aggregationTemporality=e.enums===String?p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]===void 0?t.aggregationTemporality:p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]:t.aggregationTemporality),t.isMonotonic!=null&&t.hasOwnProperty("isMonotonic")&&(n.isMonotonic=t.isMonotonic),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Sum"},s}(),c.Histogram=function(){function s(a){if(this.dataPoints=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.dataPoints=f.emptyArray,s.prototype.aggregationTemporality=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.HistogramDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return t.aggregationTemporality!=null&&Object.hasOwnProperty.call(t,"aggregationTemporality")&&e.uint32(16).int32(t.aggregationTemporality),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.Histogram;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.dataPoints&&u.dataPoints.length||(u.dataPoints=[]),u.dataPoints.push(p.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(t,t.uint32()));break}case 2:{u.aggregationTemporality=t.int32();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.HistogramDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))switch(t.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.Histogram)return t;var e=new p.opentelemetry.proto.metrics.v1.Histogram;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.HistogramDataPoint.fromObject(t.dataPoints[n])}}switch(t.aggregationTemporality){default:if(typeof t.aggregationTemporality=="number"){e.aggregationTemporality=t.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:e.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:e.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:e.aggregationTemporality=2;break}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),e.defaults&&(n.aggregationTemporality=e.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var u=0;u<t.dataPoints.length;++u)n.dataPoints[u]=p.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(t.dataPoints[u],e)}return t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality")&&(n.aggregationTemporality=e.enums===String?p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]===void 0?t.aggregationTemporality:p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]:t.aggregationTemporality),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Histogram"},s}(),c.ExponentialHistogram=function(){function s(a){if(this.dataPoints=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.dataPoints=f.emptyArray,s.prototype.aggregationTemporality=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return t.aggregationTemporality!=null&&Object.hasOwnProperty.call(t,"aggregationTemporality")&&e.uint32(16).int32(t.aggregationTemporality),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.ExponentialHistogram;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.dataPoints&&u.dataPoints.length||(u.dataPoints=[]),u.dataPoints.push(p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(t,t.uint32()));break}case 2:{u.aggregationTemporality=t.int32();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))switch(t.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.ExponentialHistogram)return t;var e=new p.opentelemetry.proto.metrics.v1.ExponentialHistogram;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.fromObject(t.dataPoints[n])}}switch(t.aggregationTemporality){default:if(typeof t.aggregationTemporality=="number"){e.aggregationTemporality=t.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:e.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:e.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:e.aggregationTemporality=2;break}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),e.defaults&&(n.aggregationTemporality=e.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var u=0;u<t.dataPoints.length;++u)n.dataPoints[u]=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(t.dataPoints[u],e)}return t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality")&&(n.aggregationTemporality=e.enums===String?p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]===void 0?t.aggregationTemporality:p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]:t.aggregationTemporality),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ExponentialHistogram"},s}(),c.Summary=function(){function s(a){if(this.dataPoints=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.dataPoints=f.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.SummaryDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.Summary;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.dataPoints&&u.dataPoints.length||(u.dataPoints=[]),u.dataPoints.push(p.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.Summary)return t;var e=new p.opentelemetry.proto.metrics.v1.Summary;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.fromObject(t.dataPoints[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var u=0;u<t.dataPoints.length;++u)n.dataPoints[u]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(t.dataPoints[u],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Summary"},s}(),c.AggregationTemporality=function(){var s={},a=Object.create(s);return a[s[0]="AGGREGATION_TEMPORALITY_UNSPECIFIED"]=0,a[s[1]="AGGREGATION_TEMPORALITY_DELTA"]=1,a[s[2]="AGGREGATION_TEMPORALITY_CUMULATIVE"]=2,a}(),c.DataPointFlags=function(){var s={},a=Object.create(s);return a[s[0]="DATA_POINT_FLAGS_DO_NOT_USE"]=0,a[s[1]="DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"]=1,a}(),c.NumberDataPoint=function(){function s(t){if(this.attributes=[],this.exemplars=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}s.prototype.attributes=f.emptyArray,s.prototype.startTimeUnixNano=null,s.prototype.timeUnixNano=null,s.prototype.asDouble=null,s.prototype.asInt=null,s.prototype.exemplars=f.emptyArray,s.prototype.flags=null;var a;return Object.defineProperty(s.prototype,"value",{get:f.oneOfGetter(a=["asDouble","asInt"]),set:f.oneOfSetter(a)}),s.create=function(e){return new s(e)},s.encode=function(e,n){if(n||(n=O.create()),e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&n.uint32(17).fixed64(e.startTimeUnixNano),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(25).fixed64(e.timeUnixNano),e.asDouble!=null&&Object.hasOwnProperty.call(e,"asDouble")&&n.uint32(33).double(e.asDouble),e.exemplars!=null&&e.exemplars.length)for(var u=0;u<e.exemplars.length;++u)p.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[u],n.uint32(42).fork()).ldelim();if(e.asInt!=null&&Object.hasOwnProperty.call(e,"asInt")&&n.uint32(49).sfixed64(e.asInt),e.attributes!=null&&e.attributes.length)for(var u=0;u<e.attributes.length;++u)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[u],n.uint32(58).fork()).ldelim();return e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&n.uint32(64).uint32(e.flags),n},s.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},s.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.NumberDataPoint;e.pos<u;){var h=e.uint32();switch(h>>>3){case 7:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.startTimeUnixNano=e.fixed64();break}case 3:{l.timeUnixNano=e.fixed64();break}case 4:{l.asDouble=e.double();break}case 6:{l.asInt=e.sfixed64();break}case 5:{l.exemplars&&l.exemplars.length||(l.exemplars=[]),l.exemplars.push(p.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 8:{l.flags=e.uint32();break}default:e.skipType(h&7);break}}return l},s.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var u=0;u<e.attributes.length;++u){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[u]);if(l)return"attributes."+l}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!f.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&f.isInteger(e.startTimeUnixNano.low)&&f.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!f.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&f.isInteger(e.timeUnixNano.low)&&f.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.asDouble!=null&&e.hasOwnProperty("asDouble")&&(n.value=1,typeof e.asDouble!="number"))return"asDouble: number expected";if(e.asInt!=null&&e.hasOwnProperty("asInt")){if(n.value===1)return"value: multiple values";if(n.value=1,!f.isInteger(e.asInt)&&!(e.asInt&&f.isInteger(e.asInt.low)&&f.isInteger(e.asInt.high)))return"asInt: integer|Long expected"}if(e.exemplars!=null&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(var u=0;u<e.exemplars.length;++u){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[u]);if(l)return"exemplars."+l}}return e.flags!=null&&e.hasOwnProperty("flags")&&!f.isInteger(e.flags)?"flags: integer expected":null},s.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.NumberDataPoint)return e;var n=new p.opentelemetry.proto.metrics.v1.NumberDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: array expected");n.attributes=[];for(var u=0;u<e.attributes.length;++u){if(typeof e.attributes[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected");n.attributes[u]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[u])}}if(e.startTimeUnixNano!=null&&(f.Long?(n.startTimeUnixNano=f.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?n.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?n.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(n.startTimeUnixNano=new f.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.timeUnixNano!=null&&(f.Long?(n.timeUnixNano=f.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.asDouble!=null&&(n.asDouble=Number(e.asDouble)),e.asInt!=null&&(f.Long?(n.asInt=f.Long.fromValue(e.asInt)).unsigned=!1:typeof e.asInt=="string"?n.asInt=parseInt(e.asInt,10):typeof e.asInt=="number"?n.asInt=e.asInt:typeof e.asInt=="object"&&(n.asInt=new f.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber())),e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected");n.exemplars=[];for(var u=0;u<e.exemplars.length;++u){if(typeof e.exemplars[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected");n.exemplars[u]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[u])}}return e.flags!=null&&(n.flags=e.flags>>>0),n},s.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.exemplars=[],u.attributes=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.startTimeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.startTimeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);u.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.timeUnixNano=n.longs===String?"0":0;u.flags=0}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?u.startTimeUnixNano=n.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:u.startTimeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.startTimeUnixNano):n.longs===Number?new f.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?u.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:u.timeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.asDouble!=null&&e.hasOwnProperty("asDouble")&&(u.asDouble=n.json&&!isFinite(e.asDouble)?String(e.asDouble):e.asDouble,n.oneofs&&(u.value="asDouble")),e.exemplars&&e.exemplars.length){u.exemplars=[];for(var h=0;h<e.exemplars.length;++h)u.exemplars[h]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[h],n)}if(e.asInt!=null&&e.hasOwnProperty("asInt")&&(typeof e.asInt=="number"?u.asInt=n.longs===String?String(e.asInt):e.asInt:u.asInt=n.longs===String?f.Long.prototype.toString.call(e.asInt):n.longs===Number?new f.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber():e.asInt,n.oneofs&&(u.value="asInt")),e.attributes&&e.attributes.length){u.attributes=[];for(var h=0;h<e.attributes.length;++h)u.attributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[h],n)}return e.flags!=null&&e.hasOwnProperty("flags")&&(u.flags=e.flags),u},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.NumberDataPoint"},s}(),c.HistogramDataPoint=function(){function s(t){if(this.attributes=[],this.bucketCounts=[],this.explicitBounds=[],this.exemplars=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}s.prototype.attributes=f.emptyArray,s.prototype.startTimeUnixNano=null,s.prototype.timeUnixNano=null,s.prototype.count=null,s.prototype.sum=null,s.prototype.bucketCounts=f.emptyArray,s.prototype.explicitBounds=f.emptyArray,s.prototype.exemplars=f.emptyArray,s.prototype.flags=null,s.prototype.min=null,s.prototype.max=null;var a;return Object.defineProperty(s.prototype,"_sum",{get:f.oneOfGetter(a=["sum"]),set:f.oneOfSetter(a)}),Object.defineProperty(s.prototype,"_min",{get:f.oneOfGetter(a=["min"]),set:f.oneOfSetter(a)}),Object.defineProperty(s.prototype,"_max",{get:f.oneOfGetter(a=["max"]),set:f.oneOfSetter(a)}),s.create=function(e){return new s(e)},s.encode=function(e,n){if(n||(n=O.create()),e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&n.uint32(17).fixed64(e.startTimeUnixNano),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(25).fixed64(e.timeUnixNano),e.count!=null&&Object.hasOwnProperty.call(e,"count")&&n.uint32(33).fixed64(e.count),e.sum!=null&&Object.hasOwnProperty.call(e,"sum")&&n.uint32(41).double(e.sum),e.bucketCounts!=null&&e.bucketCounts.length){n.uint32(50).fork();for(var u=0;u<e.bucketCounts.length;++u)n.fixed64(e.bucketCounts[u]);n.ldelim()}if(e.explicitBounds!=null&&e.explicitBounds.length){n.uint32(58).fork();for(var u=0;u<e.explicitBounds.length;++u)n.double(e.explicitBounds[u]);n.ldelim()}if(e.exemplars!=null&&e.exemplars.length)for(var u=0;u<e.exemplars.length;++u)p.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[u],n.uint32(66).fork()).ldelim();if(e.attributes!=null&&e.attributes.length)for(var u=0;u<e.attributes.length;++u)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[u],n.uint32(74).fork()).ldelim();return e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&n.uint32(80).uint32(e.flags),e.min!=null&&Object.hasOwnProperty.call(e,"min")&&n.uint32(89).double(e.min),e.max!=null&&Object.hasOwnProperty.call(e,"max")&&n.uint32(97).double(e.max),n},s.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},s.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.HistogramDataPoint;e.pos<u;){var h=e.uint32();switch(h>>>3){case 9:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.startTimeUnixNano=e.fixed64();break}case 3:{l.timeUnixNano=e.fixed64();break}case 4:{l.count=e.fixed64();break}case 5:{l.sum=e.double();break}case 6:{if(l.bucketCounts&&l.bucketCounts.length||(l.bucketCounts=[]),(h&7)===2)for(var T=e.uint32()+e.pos;e.pos<T;)l.bucketCounts.push(e.fixed64());else l.bucketCounts.push(e.fixed64());break}case 7:{if(l.explicitBounds&&l.explicitBounds.length||(l.explicitBounds=[]),(h&7)===2)for(var T=e.uint32()+e.pos;e.pos<T;)l.explicitBounds.push(e.double());else l.explicitBounds.push(e.double());break}case 8:{l.exemplars&&l.exemplars.length||(l.exemplars=[]),l.exemplars.push(p.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 10:{l.flags=e.uint32();break}case 11:{l.min=e.double();break}case 12:{l.max=e.double();break}default:e.skipType(h&7);break}}return l},s.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var u=0;u<e.attributes.length;++u){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[u]);if(l)return"attributes."+l}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!f.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&f.isInteger(e.startTimeUnixNano.low)&&f.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!f.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&f.isInteger(e.timeUnixNano.low)&&f.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.count!=null&&e.hasOwnProperty("count")&&!f.isInteger(e.count)&&!(e.count&&f.isInteger(e.count.low)&&f.isInteger(e.count.high)))return"count: integer|Long expected";if(e.sum!=null&&e.hasOwnProperty("sum")&&(n._sum=1,typeof e.sum!="number"))return"sum: number expected";if(e.bucketCounts!=null&&e.hasOwnProperty("bucketCounts")){if(!Array.isArray(e.bucketCounts))return"bucketCounts: array expected";for(var u=0;u<e.bucketCounts.length;++u)if(!f.isInteger(e.bucketCounts[u])&&!(e.bucketCounts[u]&&f.isInteger(e.bucketCounts[u].low)&&f.isInteger(e.bucketCounts[u].high)))return"bucketCounts: integer|Long[] expected"}if(e.explicitBounds!=null&&e.hasOwnProperty("explicitBounds")){if(!Array.isArray(e.explicitBounds))return"explicitBounds: array expected";for(var u=0;u<e.explicitBounds.length;++u)if(typeof e.explicitBounds[u]!="number")return"explicitBounds: number[] expected"}if(e.exemplars!=null&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(var u=0;u<e.exemplars.length;++u){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[u]);if(l)return"exemplars."+l}}return e.flags!=null&&e.hasOwnProperty("flags")&&!f.isInteger(e.flags)?"flags: integer expected":e.min!=null&&e.hasOwnProperty("min")&&(n._min=1,typeof e.min!="number")?"min: number expected":e.max!=null&&e.hasOwnProperty("max")&&(n._max=1,typeof e.max!="number")?"max: number expected":null},s.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.HistogramDataPoint)return e;var n=new p.opentelemetry.proto.metrics.v1.HistogramDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: array expected");n.attributes=[];for(var u=0;u<e.attributes.length;++u){if(typeof e.attributes[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected");n.attributes[u]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[u])}}if(e.startTimeUnixNano!=null&&(f.Long?(n.startTimeUnixNano=f.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?n.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?n.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(n.startTimeUnixNano=new f.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.timeUnixNano!=null&&(f.Long?(n.timeUnixNano=f.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.count!=null&&(f.Long?(n.count=f.Long.fromValue(e.count)).unsigned=!1:typeof e.count=="string"?n.count=parseInt(e.count,10):typeof e.count=="number"?n.count=e.count:typeof e.count=="object"&&(n.count=new f.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber())),e.sum!=null&&(n.sum=Number(e.sum)),e.bucketCounts){if(!Array.isArray(e.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected");n.bucketCounts=[];for(var u=0;u<e.bucketCounts.length;++u)f.Long?(n.bucketCounts[u]=f.Long.fromValue(e.bucketCounts[u])).unsigned=!1:typeof e.bucketCounts[u]=="string"?n.bucketCounts[u]=parseInt(e.bucketCounts[u],10):typeof e.bucketCounts[u]=="number"?n.bucketCounts[u]=e.bucketCounts[u]:typeof e.bucketCounts[u]=="object"&&(n.bucketCounts[u]=new f.LongBits(e.bucketCounts[u].low>>>0,e.bucketCounts[u].high>>>0).toNumber())}if(e.explicitBounds){if(!Array.isArray(e.explicitBounds))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected");n.explicitBounds=[];for(var u=0;u<e.explicitBounds.length;++u)n.explicitBounds[u]=Number(e.explicitBounds[u])}if(e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected");n.exemplars=[];for(var u=0;u<e.exemplars.length;++u){if(typeof e.exemplars[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected");n.exemplars[u]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[u])}}return e.flags!=null&&(n.flags=e.flags>>>0),e.min!=null&&(n.min=Number(e.min)),e.max!=null&&(n.max=Number(e.max)),n},s.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.bucketCounts=[],u.explicitBounds=[],u.exemplars=[],u.attributes=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.startTimeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.startTimeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);u.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.timeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);u.count=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.count=n.longs===String?"0":0;u.flags=0}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?u.startTimeUnixNano=n.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:u.startTimeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.startTimeUnixNano):n.longs===Number?new f.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?u.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:u.timeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.count!=null&&e.hasOwnProperty("count")&&(typeof e.count=="number"?u.count=n.longs===String?String(e.count):e.count:u.count=n.longs===String?f.Long.prototype.toString.call(e.count):n.longs===Number?new f.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count),e.sum!=null&&e.hasOwnProperty("sum")&&(u.sum=n.json&&!isFinite(e.sum)?String(e.sum):e.sum,n.oneofs&&(u._sum="sum")),e.bucketCounts&&e.bucketCounts.length){u.bucketCounts=[];for(var h=0;h<e.bucketCounts.length;++h)typeof e.bucketCounts[h]=="number"?u.bucketCounts[h]=n.longs===String?String(e.bucketCounts[h]):e.bucketCounts[h]:u.bucketCounts[h]=n.longs===String?f.Long.prototype.toString.call(e.bucketCounts[h]):n.longs===Number?new f.LongBits(e.bucketCounts[h].low>>>0,e.bucketCounts[h].high>>>0).toNumber():e.bucketCounts[h]}if(e.explicitBounds&&e.explicitBounds.length){u.explicitBounds=[];for(var h=0;h<e.explicitBounds.length;++h)u.explicitBounds[h]=n.json&&!isFinite(e.explicitBounds[h])?String(e.explicitBounds[h]):e.explicitBounds[h]}if(e.exemplars&&e.exemplars.length){u.exemplars=[];for(var h=0;h<e.exemplars.length;++h)u.exemplars[h]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[h],n)}if(e.attributes&&e.attributes.length){u.attributes=[];for(var h=0;h<e.attributes.length;++h)u.attributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[h],n)}return e.flags!=null&&e.hasOwnProperty("flags")&&(u.flags=e.flags),e.min!=null&&e.hasOwnProperty("min")&&(u.min=n.json&&!isFinite(e.min)?String(e.min):e.min,n.oneofs&&(u._min="min")),e.max!=null&&e.hasOwnProperty("max")&&(u.max=n.json&&!isFinite(e.max)?String(e.max):e.max,n.oneofs&&(u._max="max")),u},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.HistogramDataPoint"},s}(),c.ExponentialHistogramDataPoint=function(){function s(t){if(this.attributes=[],this.exemplars=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}s.prototype.attributes=f.emptyArray,s.prototype.startTimeUnixNano=null,s.prototype.timeUnixNano=null,s.prototype.count=null,s.prototype.sum=null,s.prototype.scale=null,s.prototype.zeroCount=null,s.prototype.positive=null,s.prototype.negative=null,s.prototype.flags=null,s.prototype.exemplars=f.emptyArray,s.prototype.min=null,s.prototype.max=null,s.prototype.zeroThreshold=null;var a;return Object.defineProperty(s.prototype,"_sum",{get:f.oneOfGetter(a=["sum"]),set:f.oneOfSetter(a)}),Object.defineProperty(s.prototype,"_min",{get:f.oneOfGetter(a=["min"]),set:f.oneOfSetter(a)}),Object.defineProperty(s.prototype,"_max",{get:f.oneOfGetter(a=["max"]),set:f.oneOfSetter(a)}),s.create=function(e){return new s(e)},s.encode=function(e,n){if(n||(n=O.create()),e.attributes!=null&&e.attributes.length)for(var u=0;u<e.attributes.length;++u)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[u],n.uint32(10).fork()).ldelim();if(e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&n.uint32(17).fixed64(e.startTimeUnixNano),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(25).fixed64(e.timeUnixNano),e.count!=null&&Object.hasOwnProperty.call(e,"count")&&n.uint32(33).fixed64(e.count),e.sum!=null&&Object.hasOwnProperty.call(e,"sum")&&n.uint32(41).double(e.sum),e.scale!=null&&Object.hasOwnProperty.call(e,"scale")&&n.uint32(48).sint32(e.scale),e.zeroCount!=null&&Object.hasOwnProperty.call(e,"zeroCount")&&n.uint32(57).fixed64(e.zeroCount),e.positive!=null&&Object.hasOwnProperty.call(e,"positive")&&p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(e.positive,n.uint32(66).fork()).ldelim(),e.negative!=null&&Object.hasOwnProperty.call(e,"negative")&&p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(e.negative,n.uint32(74).fork()).ldelim(),e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&n.uint32(80).uint32(e.flags),e.exemplars!=null&&e.exemplars.length)for(var u=0;u<e.exemplars.length;++u)p.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[u],n.uint32(90).fork()).ldelim();return e.min!=null&&Object.hasOwnProperty.call(e,"min")&&n.uint32(97).double(e.min),e.max!=null&&Object.hasOwnProperty.call(e,"max")&&n.uint32(105).double(e.max),e.zeroThreshold!=null&&Object.hasOwnProperty.call(e,"zeroThreshold")&&n.uint32(113).double(e.zeroThreshold),n},s.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},s.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.startTimeUnixNano=e.fixed64();break}case 3:{l.timeUnixNano=e.fixed64();break}case 4:{l.count=e.fixed64();break}case 5:{l.sum=e.double();break}case 6:{l.scale=e.sint32();break}case 7:{l.zeroCount=e.fixed64();break}case 8:{l.positive=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(e,e.uint32());break}case 9:{l.negative=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(e,e.uint32());break}case 10:{l.flags=e.uint32();break}case 11:{l.exemplars&&l.exemplars.length||(l.exemplars=[]),l.exemplars.push(p.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 12:{l.min=e.double();break}case 13:{l.max=e.double();break}case 14:{l.zeroThreshold=e.double();break}default:e.skipType(h&7);break}}return l},s.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var u=0;u<e.attributes.length;++u){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[u]);if(l)return"attributes."+l}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!f.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&f.isInteger(e.startTimeUnixNano.low)&&f.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!f.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&f.isInteger(e.timeUnixNano.low)&&f.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.count!=null&&e.hasOwnProperty("count")&&!f.isInteger(e.count)&&!(e.count&&f.isInteger(e.count.low)&&f.isInteger(e.count.high)))return"count: integer|Long expected";if(e.sum!=null&&e.hasOwnProperty("sum")&&(n._sum=1,typeof e.sum!="number"))return"sum: number expected";if(e.scale!=null&&e.hasOwnProperty("scale")&&!f.isInteger(e.scale))return"scale: integer expected";if(e.zeroCount!=null&&e.hasOwnProperty("zeroCount")&&!f.isInteger(e.zeroCount)&&!(e.zeroCount&&f.isInteger(e.zeroCount.low)&&f.isInteger(e.zeroCount.high)))return"zeroCount: integer|Long expected";if(e.positive!=null&&e.hasOwnProperty("positive")){var l=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(e.positive);if(l)return"positive."+l}if(e.negative!=null&&e.hasOwnProperty("negative")){var l=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(e.negative);if(l)return"negative."+l}if(e.flags!=null&&e.hasOwnProperty("flags")&&!f.isInteger(e.flags))return"flags: integer expected";if(e.exemplars!=null&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(var u=0;u<e.exemplars.length;++u){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[u]);if(l)return"exemplars."+l}}return e.min!=null&&e.hasOwnProperty("min")&&(n._min=1,typeof e.min!="number")?"min: number expected":e.max!=null&&e.hasOwnProperty("max")&&(n._max=1,typeof e.max!="number")?"max: number expected":e.zeroThreshold!=null&&e.hasOwnProperty("zeroThreshold")&&typeof e.zeroThreshold!="number"?"zeroThreshold: number expected":null},s.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint)return e;var n=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: array expected");n.attributes=[];for(var u=0;u<e.attributes.length;++u){if(typeof e.attributes[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected");n.attributes[u]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[u])}}if(e.startTimeUnixNano!=null&&(f.Long?(n.startTimeUnixNano=f.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?n.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?n.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(n.startTimeUnixNano=new f.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.timeUnixNano!=null&&(f.Long?(n.timeUnixNano=f.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.count!=null&&(f.Long?(n.count=f.Long.fromValue(e.count)).unsigned=!1:typeof e.count=="string"?n.count=parseInt(e.count,10):typeof e.count=="number"?n.count=e.count:typeof e.count=="object"&&(n.count=new f.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber())),e.sum!=null&&(n.sum=Number(e.sum)),e.scale!=null&&(n.scale=e.scale|0),e.zeroCount!=null&&(f.Long?(n.zeroCount=f.Long.fromValue(e.zeroCount)).unsigned=!1:typeof e.zeroCount=="string"?n.zeroCount=parseInt(e.zeroCount,10):typeof e.zeroCount=="number"?n.zeroCount=e.zeroCount:typeof e.zeroCount=="object"&&(n.zeroCount=new f.LongBits(e.zeroCount.low>>>0,e.zeroCount.high>>>0).toNumber())),e.positive!=null){if(typeof e.positive!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected");n.positive=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(e.positive)}if(e.negative!=null){if(typeof e.negative!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected");n.negative=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(e.negative)}if(e.flags!=null&&(n.flags=e.flags>>>0),e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected");n.exemplars=[];for(var u=0;u<e.exemplars.length;++u){if(typeof e.exemplars[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected");n.exemplars[u]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[u])}}return e.min!=null&&(n.min=Number(e.min)),e.max!=null&&(n.max=Number(e.max)),e.zeroThreshold!=null&&(n.zeroThreshold=Number(e.zeroThreshold)),n},s.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.attributes=[],u.exemplars=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.startTimeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.startTimeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);u.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.timeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);u.count=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.count=n.longs===String?"0":0;if(u.scale=0,f.Long){var l=new f.Long(0,0,!1);u.zeroCount=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.zeroCount=n.longs===String?"0":0;u.positive=null,u.negative=null,u.flags=0,u.zeroThreshold=0}if(e.attributes&&e.attributes.length){u.attributes=[];for(var h=0;h<e.attributes.length;++h)u.attributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[h],n)}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?u.startTimeUnixNano=n.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:u.startTimeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.startTimeUnixNano):n.longs===Number?new f.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?u.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:u.timeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.count!=null&&e.hasOwnProperty("count")&&(typeof e.count=="number"?u.count=n.longs===String?String(e.count):e.count:u.count=n.longs===String?f.Long.prototype.toString.call(e.count):n.longs===Number?new f.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count),e.sum!=null&&e.hasOwnProperty("sum")&&(u.sum=n.json&&!isFinite(e.sum)?String(e.sum):e.sum,n.oneofs&&(u._sum="sum")),e.scale!=null&&e.hasOwnProperty("scale")&&(u.scale=e.scale),e.zeroCount!=null&&e.hasOwnProperty("zeroCount")&&(typeof e.zeroCount=="number"?u.zeroCount=n.longs===String?String(e.zeroCount):e.zeroCount:u.zeroCount=n.longs===String?f.Long.prototype.toString.call(e.zeroCount):n.longs===Number?new f.LongBits(e.zeroCount.low>>>0,e.zeroCount.high>>>0).toNumber():e.zeroCount),e.positive!=null&&e.hasOwnProperty("positive")&&(u.positive=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(e.positive,n)),e.negative!=null&&e.hasOwnProperty("negative")&&(u.negative=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(e.negative,n)),e.flags!=null&&e.hasOwnProperty("flags")&&(u.flags=e.flags),e.exemplars&&e.exemplars.length){u.exemplars=[];for(var h=0;h<e.exemplars.length;++h)u.exemplars[h]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[h],n)}return e.min!=null&&e.hasOwnProperty("min")&&(u.min=n.json&&!isFinite(e.min)?String(e.min):e.min,n.oneofs&&(u._min="min")),e.max!=null&&e.hasOwnProperty("max")&&(u.max=n.json&&!isFinite(e.max)?String(e.max):e.max,n.oneofs&&(u._max="max")),e.zeroThreshold!=null&&e.hasOwnProperty("zeroThreshold")&&(u.zeroThreshold=n.json&&!isFinite(e.zeroThreshold)?String(e.zeroThreshold):e.zeroThreshold),u},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"},s.Buckets=function(){function t(e){if(this.bucketCounts=[],e)for(var n=Object.keys(e),u=0;u<n.length;++u)e[n[u]]!=null&&(this[n[u]]=e[n[u]])}return t.prototype.offset=null,t.prototype.bucketCounts=f.emptyArray,t.create=function(n){return new t(n)},t.encode=function(n,u){if(u||(u=O.create()),n.offset!=null&&Object.hasOwnProperty.call(n,"offset")&&u.uint32(8).sint32(n.offset),n.bucketCounts!=null&&n.bucketCounts.length){u.uint32(18).fork();for(var l=0;l<n.bucketCounts.length;++l)u.uint64(n.bucketCounts[l]);u.ldelim()}return u},t.encodeDelimited=function(n,u){return this.encode(n,u).ldelim()},t.decode=function(n,u){n instanceof m||(n=m.create(n));for(var l=u===void 0?n.len:n.pos+u,h=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;n.pos<l;){var T=n.uint32();switch(T>>>3){case 1:{h.offset=n.sint32();break}case 2:{if(h.bucketCounts&&h.bucketCounts.length||(h.bucketCounts=[]),(T&7)===2)for(var D=n.uint32()+n.pos;n.pos<D;)h.bucketCounts.push(n.uint64());else h.bucketCounts.push(n.uint64());break}default:n.skipType(T&7);break}}return h},t.decodeDelimited=function(n){return n instanceof m||(n=new m(n)),this.decode(n,n.uint32())},t.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.offset!=null&&n.hasOwnProperty("offset")&&!f.isInteger(n.offset))return"offset: integer expected";if(n.bucketCounts!=null&&n.hasOwnProperty("bucketCounts")){if(!Array.isArray(n.bucketCounts))return"bucketCounts: array expected";for(var u=0;u<n.bucketCounts.length;++u)if(!f.isInteger(n.bucketCounts[u])&&!(n.bucketCounts[u]&&f.isInteger(n.bucketCounts[u].low)&&f.isInteger(n.bucketCounts[u].high)))return"bucketCounts: integer|Long[] expected"}return null},t.fromObject=function(n){if(n instanceof p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets)return n;var u=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;if(n.offset!=null&&(u.offset=n.offset|0),n.bucketCounts){if(!Array.isArray(n.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected");u.bucketCounts=[];for(var l=0;l<n.bucketCounts.length;++l)f.Long?(u.bucketCounts[l]=f.Long.fromValue(n.bucketCounts[l])).unsigned=!0:typeof n.bucketCounts[l]=="string"?u.bucketCounts[l]=parseInt(n.bucketCounts[l],10):typeof n.bucketCounts[l]=="number"?u.bucketCounts[l]=n.bucketCounts[l]:typeof n.bucketCounts[l]=="object"&&(u.bucketCounts[l]=new f.LongBits(n.bucketCounts[l].low>>>0,n.bucketCounts[l].high>>>0).toNumber(!0))}return u},t.toObject=function(n,u){u||(u={});var l={};if((u.arrays||u.defaults)&&(l.bucketCounts=[]),u.defaults&&(l.offset=0),n.offset!=null&&n.hasOwnProperty("offset")&&(l.offset=n.offset),n.bucketCounts&&n.bucketCounts.length){l.bucketCounts=[];for(var h=0;h<n.bucketCounts.length;++h)typeof n.bucketCounts[h]=="number"?l.bucketCounts[h]=u.longs===String?String(n.bucketCounts[h]):n.bucketCounts[h]:l.bucketCounts[h]=u.longs===String?f.Long.prototype.toString.call(n.bucketCounts[h]):u.longs===Number?new f.LongBits(n.bucketCounts[h].low>>>0,n.bucketCounts[h].high>>>0).toNumber(!0):n.bucketCounts[h]}return l},t.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},t.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},t}(),s}(),c.SummaryDataPoint=function(){function s(a){if(this.attributes=[],this.quantileValues=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.attributes=f.emptyArray,s.prototype.startTimeUnixNano=null,s.prototype.timeUnixNano=null,s.prototype.count=null,s.prototype.sum=null,s.prototype.quantileValues=f.emptyArray,s.prototype.flags=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&e.uint32(17).fixed64(t.startTimeUnixNano),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&e.uint32(25).fixed64(t.timeUnixNano),t.count!=null&&Object.hasOwnProperty.call(t,"count")&&e.uint32(33).fixed64(t.count),t.sum!=null&&Object.hasOwnProperty.call(t,"sum")&&e.uint32(41).double(t.sum),t.quantileValues!=null&&t.quantileValues.length)for(var n=0;n<t.quantileValues.length;++n)p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.encode(t.quantileValues[n],e.uint32(50).fork()).ldelim();if(t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(58).fork()).ldelim();return t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&e.uint32(64).uint32(t.flags),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint;t.pos<n;){var l=t.uint32();switch(l>>>3){case 7:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{u.startTimeUnixNano=t.fixed64();break}case 3:{u.timeUnixNano=t.fixed64();break}case 4:{u.count=t.fixed64();break}case 5:{u.sum=t.double();break}case 6:{u.quantileValues&&u.quantileValues.length||(u.quantileValues=[]),u.quantileValues.push(p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(t,t.uint32()));break}case 8:{u.flags=t.uint32();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(n)return"attributes."+n}}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!f.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&f.isInteger(t.startTimeUnixNano.low)&&f.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!f.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&f.isInteger(t.timeUnixNano.low)&&f.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.count!=null&&t.hasOwnProperty("count")&&!f.isInteger(t.count)&&!(t.count&&f.isInteger(t.count.low)&&f.isInteger(t.count.high)))return"count: integer|Long expected";if(t.sum!=null&&t.hasOwnProperty("sum")&&typeof t.sum!="number")return"sum: number expected";if(t.quantileValues!=null&&t.hasOwnProperty("quantileValues")){if(!Array.isArray(t.quantileValues))return"quantileValues: array expected";for(var e=0;e<t.quantileValues.length;++e){var n=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify(t.quantileValues[e]);if(n)return"quantileValues."+n}}return t.flags!=null&&t.hasOwnProperty("flags")&&!f.isInteger(t.flags)?"flags: integer expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.SummaryDataPoint)return t;var e=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}if(t.startTimeUnixNano!=null&&(f.Long?(e.startTimeUnixNano=f.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?e.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?e.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(e.startTimeUnixNano=new f.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.timeUnixNano!=null&&(f.Long?(e.timeUnixNano=f.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?e.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?e.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(e.timeUnixNano=new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.count!=null&&(f.Long?(e.count=f.Long.fromValue(t.count)).unsigned=!1:typeof t.count=="string"?e.count=parseInt(t.count,10):typeof t.count=="number"?e.count=t.count:typeof t.count=="object"&&(e.count=new f.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber())),t.sum!=null&&(e.sum=Number(t.sum)),t.quantileValues){if(!Array.isArray(t.quantileValues))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected");e.quantileValues=[];for(var n=0;n<t.quantileValues.length;++n){if(typeof t.quantileValues[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: object expected");e.quantileValues[n]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.fromObject(t.quantileValues[n])}}return t.flags!=null&&(e.flags=t.flags>>>0),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.quantileValues=[],n.attributes=[]),e.defaults){if(f.Long){var u=new f.Long(0,0,!1);n.startTimeUnixNano=e.longs===String?u.toString():e.longs===Number?u.toNumber():u}else n.startTimeUnixNano=e.longs===String?"0":0;if(f.Long){var u=new f.Long(0,0,!1);n.timeUnixNano=e.longs===String?u.toString():e.longs===Number?u.toNumber():u}else n.timeUnixNano=e.longs===String?"0":0;if(f.Long){var u=new f.Long(0,0,!1);n.count=e.longs===String?u.toString():e.longs===Number?u.toNumber():u}else n.count=e.longs===String?"0":0;n.sum=0,n.flags=0}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?n.startTimeUnixNano=e.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:n.startTimeUnixNano=e.longs===String?f.Long.prototype.toString.call(t.startTimeUnixNano):e.longs===Number?new f.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?n.timeUnixNano=e.longs===String?String(t.timeUnixNano):t.timeUnixNano:n.timeUnixNano=e.longs===String?f.Long.prototype.toString.call(t.timeUnixNano):e.longs===Number?new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.count!=null&&t.hasOwnProperty("count")&&(typeof t.count=="number"?n.count=e.longs===String?String(t.count):t.count:n.count=e.longs===String?f.Long.prototype.toString.call(t.count):e.longs===Number?new f.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber():t.count),t.sum!=null&&t.hasOwnProperty("sum")&&(n.sum=e.json&&!isFinite(t.sum)?String(t.sum):t.sum),t.quantileValues&&t.quantileValues.length){n.quantileValues=[];for(var l=0;l<t.quantileValues.length;++l)n.quantileValues[l]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(t.quantileValues[l],e)}if(t.attributes&&t.attributes.length){n.attributes=[];for(var l=0;l<t.attributes.length;++l)n.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[l],e)}return t.flags!=null&&t.hasOwnProperty("flags")&&(n.flags=t.flags),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.SummaryDataPoint"},s.ValueAtQuantile=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.quantile=null,a.prototype.value=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=O.create()),e.quantile!=null&&Object.hasOwnProperty.call(e,"quantile")&&n.uint32(9).double(e.quantile),e.value!=null&&Object.hasOwnProperty.call(e,"value")&&n.uint32(17).double(e.value),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.quantile=e.double();break}case 2:{l.value=e.double();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.quantile!=null&&e.hasOwnProperty("quantile")&&typeof e.quantile!="number"?"quantile: number expected":e.value!=null&&e.hasOwnProperty("value")&&typeof e.value!="number"?"value: number expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return e;var n=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;return e.quantile!=null&&(n.quantile=Number(e.quantile)),e.value!=null&&(n.value=Number(e.value)),n},a.toObject=function(e,n){n||(n={});var u={};return n.defaults&&(u.quantile=0,u.value=0),e.quantile!=null&&e.hasOwnProperty("quantile")&&(u.quantile=n.json&&!isFinite(e.quantile)?String(e.quantile):e.quantile),e.value!=null&&e.hasOwnProperty("value")&&(u.value=n.json&&!isFinite(e.value)?String(e.value):e.value),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},a}(),s}(),c.Exemplar=function(){function s(t){if(this.filteredAttributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}s.prototype.filteredAttributes=f.emptyArray,s.prototype.timeUnixNano=null,s.prototype.asDouble=null,s.prototype.asInt=null,s.prototype.spanId=null,s.prototype.traceId=null;var a;return Object.defineProperty(s.prototype,"value",{get:f.oneOfGetter(a=["asDouble","asInt"]),set:f.oneOfSetter(a)}),s.create=function(e){return new s(e)},s.encode=function(e,n){if(n||(n=O.create()),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(17).fixed64(e.timeUnixNano),e.asDouble!=null&&Object.hasOwnProperty.call(e,"asDouble")&&n.uint32(25).double(e.asDouble),e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId")&&n.uint32(34).bytes(e.spanId),e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId")&&n.uint32(42).bytes(e.traceId),e.asInt!=null&&Object.hasOwnProperty.call(e,"asInt")&&n.uint32(49).sfixed64(e.asInt),e.filteredAttributes!=null&&e.filteredAttributes.length)for(var u=0;u<e.filteredAttributes.length;++u)p.opentelemetry.proto.common.v1.KeyValue.encode(e.filteredAttributes[u],n.uint32(58).fork()).ldelim();return n},s.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},s.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.Exemplar;e.pos<u;){var h=e.uint32();switch(h>>>3){case 7:{l.filteredAttributes&&l.filteredAttributes.length||(l.filteredAttributes=[]),l.filteredAttributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.timeUnixNano=e.fixed64();break}case 3:{l.asDouble=e.double();break}case 6:{l.asInt=e.sfixed64();break}case 4:{l.spanId=e.bytes();break}case 5:{l.traceId=e.bytes();break}default:e.skipType(h&7);break}}return l},s.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.filteredAttributes!=null&&e.hasOwnProperty("filteredAttributes")){if(!Array.isArray(e.filteredAttributes))return"filteredAttributes: array expected";for(var u=0;u<e.filteredAttributes.length;++u){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.filteredAttributes[u]);if(l)return"filteredAttributes."+l}}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!f.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&f.isInteger(e.timeUnixNano.low)&&f.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.asDouble!=null&&e.hasOwnProperty("asDouble")&&(n.value=1,typeof e.asDouble!="number"))return"asDouble: number expected";if(e.asInt!=null&&e.hasOwnProperty("asInt")){if(n.value===1)return"value: multiple values";if(n.value=1,!f.isInteger(e.asInt)&&!(e.asInt&&f.isInteger(e.asInt.low)&&f.isInteger(e.asInt.high)))return"asInt: integer|Long expected"}return e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||f.isString(e.spanId))?"spanId: buffer expected":e.traceId!=null&&e.hasOwnProperty("traceId")&&!(e.traceId&&typeof e.traceId.length=="number"||f.isString(e.traceId))?"traceId: buffer expected":null},s.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.Exemplar)return e;var n=new p.opentelemetry.proto.metrics.v1.Exemplar;if(e.filteredAttributes){if(!Array.isArray(e.filteredAttributes))throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: array expected");n.filteredAttributes=[];for(var u=0;u<e.filteredAttributes.length;++u){if(typeof e.filteredAttributes[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected");n.filteredAttributes[u]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.filteredAttributes[u])}}return e.timeUnixNano!=null&&(f.Long?(n.timeUnixNano=f.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.asDouble!=null&&(n.asDouble=Number(e.asDouble)),e.asInt!=null&&(f.Long?(n.asInt=f.Long.fromValue(e.asInt)).unsigned=!1:typeof e.asInt=="string"?n.asInt=parseInt(e.asInt,10):typeof e.asInt=="number"?n.asInt=e.asInt:typeof e.asInt=="object"&&(n.asInt=new f.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber())),e.spanId!=null&&(typeof e.spanId=="string"?f.base64.decode(e.spanId,n.spanId=f.newBuffer(f.base64.length(e.spanId)),0):e.spanId.length>=0&&(n.spanId=e.spanId)),e.traceId!=null&&(typeof e.traceId=="string"?f.base64.decode(e.traceId,n.traceId=f.newBuffer(f.base64.length(e.traceId)),0):e.traceId.length>=0&&(n.traceId=e.traceId)),n},s.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.filteredAttributes=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.timeUnixNano=n.longs===String?"0":0;n.bytes===String?u.spanId="":(u.spanId=[],n.bytes!==Array&&(u.spanId=f.newBuffer(u.spanId))),n.bytes===String?u.traceId="":(u.traceId=[],n.bytes!==Array&&(u.traceId=f.newBuffer(u.traceId)))}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?u.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:u.timeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.asDouble!=null&&e.hasOwnProperty("asDouble")&&(u.asDouble=n.json&&!isFinite(e.asDouble)?String(e.asDouble):e.asDouble,n.oneofs&&(u.value="asDouble")),e.spanId!=null&&e.hasOwnProperty("spanId")&&(u.spanId=n.bytes===String?f.base64.encode(e.spanId,0,e.spanId.length):n.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),e.traceId!=null&&e.hasOwnProperty("traceId")&&(u.traceId=n.bytes===String?f.base64.encode(e.traceId,0,e.traceId.length):n.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),e.asInt!=null&&e.hasOwnProperty("asInt")&&(typeof e.asInt=="number"?u.asInt=n.longs===String?String(e.asInt):e.asInt:u.asInt=n.longs===String?f.Long.prototype.toString.call(e.asInt):n.longs===Number?new f.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber():e.asInt,n.oneofs&&(u.value="asInt")),e.filteredAttributes&&e.filteredAttributes.length){u.filteredAttributes=[];for(var h=0;h<e.filteredAttributes.length;++h)u.filteredAttributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.filteredAttributes[h],n)}return u},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Exemplar"},s}(),c}(),o}(),r.logs=function(){var o={};return o.v1=function(){var c={};return c.LogsData=function(){function s(a){if(this.resourceLogs=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.resourceLogs=f.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.resourceLogs!=null&&t.resourceLogs.length)for(var n=0;n<t.resourceLogs.length;++n)p.opentelemetry.proto.logs.v1.ResourceLogs.encode(t.resourceLogs[n],e.uint32(10).fork()).ldelim();return e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.logs.v1.LogsData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.resourceLogs&&u.resourceLogs.length||(u.resourceLogs=[]),u.resourceLogs.push(p.opentelemetry.proto.logs.v1.ResourceLogs.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resourceLogs!=null&&t.hasOwnProperty("resourceLogs")){if(!Array.isArray(t.resourceLogs))return"resourceLogs: array expected";for(var e=0;e<t.resourceLogs.length;++e){var n=p.opentelemetry.proto.logs.v1.ResourceLogs.verify(t.resourceLogs[e]);if(n)return"resourceLogs."+n}}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.logs.v1.LogsData)return t;var e=new p.opentelemetry.proto.logs.v1.LogsData;if(t.resourceLogs){if(!Array.isArray(t.resourceLogs))throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: array expected");e.resourceLogs=[];for(var n=0;n<t.resourceLogs.length;++n){if(typeof t.resourceLogs[n]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: object expected");e.resourceLogs[n]=p.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(t.resourceLogs[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.resourceLogs=[]),t.resourceLogs&&t.resourceLogs.length){n.resourceLogs=[];for(var u=0;u<t.resourceLogs.length;++u)n.resourceLogs[u]=p.opentelemetry.proto.logs.v1.ResourceLogs.toObject(t.resourceLogs[u],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.LogsData"},s}(),c.ResourceLogs=function(){function s(a){if(this.scopeLogs=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.resource=null,s.prototype.scopeLogs=f.emptyArray,s.prototype.schemaUrl=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.resource!=null&&Object.hasOwnProperty.call(t,"resource")&&p.opentelemetry.proto.resource.v1.Resource.encode(t.resource,e.uint32(10).fork()).ldelim(),t.scopeLogs!=null&&t.scopeLogs.length)for(var n=0;n<t.scopeLogs.length;++n)p.opentelemetry.proto.logs.v1.ScopeLogs.encode(t.scopeLogs[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.logs.v1.ResourceLogs;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{u.scopeLogs&&u.scopeLogs.length||(u.scopeLogs=[]),u.scopeLogs.push(p.opentelemetry.proto.logs.v1.ScopeLogs.decode(t,t.uint32()));break}case 3:{u.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resource!=null&&t.hasOwnProperty("resource")){var e=p.opentelemetry.proto.resource.v1.Resource.verify(t.resource);if(e)return"resource."+e}if(t.scopeLogs!=null&&t.hasOwnProperty("scopeLogs")){if(!Array.isArray(t.scopeLogs))return"scopeLogs: array expected";for(var n=0;n<t.scopeLogs.length;++n){var e=p.opentelemetry.proto.logs.v1.ScopeLogs.verify(t.scopeLogs[n]);if(e)return"scopeLogs."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!f.isString(t.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.logs.v1.ResourceLogs)return t;var e=new p.opentelemetry.proto.logs.v1.ResourceLogs;if(t.resource!=null){if(typeof t.resource!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.resource: object expected");e.resource=p.opentelemetry.proto.resource.v1.Resource.fromObject(t.resource)}if(t.scopeLogs){if(!Array.isArray(t.scopeLogs))throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: array expected");e.scopeLogs=[];for(var n=0;n<t.scopeLogs.length;++n){if(typeof t.scopeLogs[n]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: object expected");e.scopeLogs[n]=p.opentelemetry.proto.logs.v1.ScopeLogs.fromObject(t.scopeLogs[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.scopeLogs=[]),e.defaults&&(n.resource=null,n.schemaUrl=""),t.resource!=null&&t.hasOwnProperty("resource")&&(n.resource=p.opentelemetry.proto.resource.v1.Resource.toObject(t.resource,e)),t.scopeLogs&&t.scopeLogs.length){n.scopeLogs=[];for(var u=0;u<t.scopeLogs.length;++u)n.scopeLogs[u]=p.opentelemetry.proto.logs.v1.ScopeLogs.toObject(t.scopeLogs[u],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.ResourceLogs"},s}(),c.ScopeLogs=function(){function s(a){if(this.logRecords=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.scope=null,s.prototype.logRecords=f.emptyArray,s.prototype.schemaUrl=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.scope!=null&&Object.hasOwnProperty.call(t,"scope")&&p.opentelemetry.proto.common.v1.InstrumentationScope.encode(t.scope,e.uint32(10).fork()).ldelim(),t.logRecords!=null&&t.logRecords.length)for(var n=0;n<t.logRecords.length;++n)p.opentelemetry.proto.logs.v1.LogRecord.encode(t.logRecords[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.logs.v1.ScopeLogs;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{u.logRecords&&u.logRecords.length||(u.logRecords=[]),u.logRecords.push(p.opentelemetry.proto.logs.v1.LogRecord.decode(t,t.uint32()));break}case 3:{u.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.scope!=null&&t.hasOwnProperty("scope")){var e=p.opentelemetry.proto.common.v1.InstrumentationScope.verify(t.scope);if(e)return"scope."+e}if(t.logRecords!=null&&t.hasOwnProperty("logRecords")){if(!Array.isArray(t.logRecords))return"logRecords: array expected";for(var n=0;n<t.logRecords.length;++n){var e=p.opentelemetry.proto.logs.v1.LogRecord.verify(t.logRecords[n]);if(e)return"logRecords."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!f.isString(t.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.logs.v1.ScopeLogs)return t;var e=new p.opentelemetry.proto.logs.v1.ScopeLogs;if(t.scope!=null){if(typeof t.scope!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.scope: object expected");e.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(t.scope)}if(t.logRecords){if(!Array.isArray(t.logRecords))throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: array expected");e.logRecords=[];for(var n=0;n<t.logRecords.length;++n){if(typeof t.logRecords[n]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: object expected");e.logRecords[n]=p.opentelemetry.proto.logs.v1.LogRecord.fromObject(t.logRecords[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.logRecords=[]),e.defaults&&(n.scope=null,n.schemaUrl=""),t.scope!=null&&t.hasOwnProperty("scope")&&(n.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.toObject(t.scope,e)),t.logRecords&&t.logRecords.length){n.logRecords=[];for(var u=0;u<t.logRecords.length;++u)n.logRecords[u]=p.opentelemetry.proto.logs.v1.LogRecord.toObject(t.logRecords[u],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.ScopeLogs"},s}(),c.SeverityNumber=function(){var s={},a=Object.create(s);return a[s[0]="SEVERITY_NUMBER_UNSPECIFIED"]=0,a[s[1]="SEVERITY_NUMBER_TRACE"]=1,a[s[2]="SEVERITY_NUMBER_TRACE2"]=2,a[s[3]="SEVERITY_NUMBER_TRACE3"]=3,a[s[4]="SEVERITY_NUMBER_TRACE4"]=4,a[s[5]="SEVERITY_NUMBER_DEBUG"]=5,a[s[6]="SEVERITY_NUMBER_DEBUG2"]=6,a[s[7]="SEVERITY_NUMBER_DEBUG3"]=7,a[s[8]="SEVERITY_NUMBER_DEBUG4"]=8,a[s[9]="SEVERITY_NUMBER_INFO"]=9,a[s[10]="SEVERITY_NUMBER_INFO2"]=10,a[s[11]="SEVERITY_NUMBER_INFO3"]=11,a[s[12]="SEVERITY_NUMBER_INFO4"]=12,a[s[13]="SEVERITY_NUMBER_WARN"]=13,a[s[14]="SEVERITY_NUMBER_WARN2"]=14,a[s[15]="SEVERITY_NUMBER_WARN3"]=15,a[s[16]="SEVERITY_NUMBER_WARN4"]=16,a[s[17]="SEVERITY_NUMBER_ERROR"]=17,a[s[18]="SEVERITY_NUMBER_ERROR2"]=18,a[s[19]="SEVERITY_NUMBER_ERROR3"]=19,a[s[20]="SEVERITY_NUMBER_ERROR4"]=20,a[s[21]="SEVERITY_NUMBER_FATAL"]=21,a[s[22]="SEVERITY_NUMBER_FATAL2"]=22,a[s[23]="SEVERITY_NUMBER_FATAL3"]=23,a[s[24]="SEVERITY_NUMBER_FATAL4"]=24,a}(),c.LogRecordFlags=function(){var s={},a=Object.create(s);return a[s[0]="LOG_RECORD_FLAGS_DO_NOT_USE"]=0,a[s[255]="LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"]=255,a}(),c.LogRecord=function(){function s(a){if(this.attributes=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.timeUnixNano=null,s.prototype.observedTimeUnixNano=null,s.prototype.severityNumber=null,s.prototype.severityText=null,s.prototype.body=null,s.prototype.attributes=f.emptyArray,s.prototype.droppedAttributesCount=null,s.prototype.flags=null,s.prototype.traceId=null,s.prototype.spanId=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&e.uint32(9).fixed64(t.timeUnixNano),t.severityNumber!=null&&Object.hasOwnProperty.call(t,"severityNumber")&&e.uint32(16).int32(t.severityNumber),t.severityText!=null&&Object.hasOwnProperty.call(t,"severityText")&&e.uint32(26).string(t.severityText),t.body!=null&&Object.hasOwnProperty.call(t,"body")&&p.opentelemetry.proto.common.v1.AnyValue.encode(t.body,e.uint32(42).fork()).ldelim(),t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(50).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&e.uint32(56).uint32(t.droppedAttributesCount),t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&e.uint32(69).fixed32(t.flags),t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId")&&e.uint32(74).bytes(t.traceId),t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId")&&e.uint32(82).bytes(t.spanId),t.observedTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"observedTimeUnixNano")&&e.uint32(89).fixed64(t.observedTimeUnixNano),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.logs.v1.LogRecord;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.timeUnixNano=t.fixed64();break}case 11:{u.observedTimeUnixNano=t.fixed64();break}case 2:{u.severityNumber=t.int32();break}case 3:{u.severityText=t.string();break}case 5:{u.body=p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32());break}case 6:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 7:{u.droppedAttributesCount=t.uint32();break}case 8:{u.flags=t.fixed32();break}case 9:{u.traceId=t.bytes();break}case 10:{u.spanId=t.bytes();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!f.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&f.isInteger(t.timeUnixNano.low)&&f.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.observedTimeUnixNano!=null&&t.hasOwnProperty("observedTimeUnixNano")&&!f.isInteger(t.observedTimeUnixNano)&&!(t.observedTimeUnixNano&&f.isInteger(t.observedTimeUnixNano.low)&&f.isInteger(t.observedTimeUnixNano.high)))return"observedTimeUnixNano: integer|Long expected";if(t.severityNumber!=null&&t.hasOwnProperty("severityNumber"))switch(t.severityNumber){default:return"severityNumber: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:break}if(t.severityText!=null&&t.hasOwnProperty("severityText")&&!f.isString(t.severityText))return"severityText: string expected";if(t.body!=null&&t.hasOwnProperty("body")){var e=p.opentelemetry.proto.common.v1.AnyValue.verify(t.body);if(e)return"body."+e}if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var n=0;n<t.attributes.length;++n){var e=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[n]);if(e)return"attributes."+e}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":t.flags!=null&&t.hasOwnProperty("flags")&&!f.isInteger(t.flags)?"flags: integer expected":t.traceId!=null&&t.hasOwnProperty("traceId")&&!(t.traceId&&typeof t.traceId.length=="number"||f.isString(t.traceId))?"traceId: buffer expected":t.spanId!=null&&t.hasOwnProperty("spanId")&&!(t.spanId&&typeof t.spanId.length=="number"||f.isString(t.spanId))?"spanId: buffer expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.logs.v1.LogRecord)return t;var e=new p.opentelemetry.proto.logs.v1.LogRecord;switch(t.timeUnixNano!=null&&(f.Long?(e.timeUnixNano=f.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?e.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?e.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(e.timeUnixNano=new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.observedTimeUnixNano!=null&&(f.Long?(e.observedTimeUnixNano=f.Long.fromValue(t.observedTimeUnixNano)).unsigned=!1:typeof t.observedTimeUnixNano=="string"?e.observedTimeUnixNano=parseInt(t.observedTimeUnixNano,10):typeof t.observedTimeUnixNano=="number"?e.observedTimeUnixNano=t.observedTimeUnixNano:typeof t.observedTimeUnixNano=="object"&&(e.observedTimeUnixNano=new f.LongBits(t.observedTimeUnixNano.low>>>0,t.observedTimeUnixNano.high>>>0).toNumber())),t.severityNumber){default:if(typeof t.severityNumber=="number"){e.severityNumber=t.severityNumber;break}break;case"SEVERITY_NUMBER_UNSPECIFIED":case 0:e.severityNumber=0;break;case"SEVERITY_NUMBER_TRACE":case 1:e.severityNumber=1;break;case"SEVERITY_NUMBER_TRACE2":case 2:e.severityNumber=2;break;case"SEVERITY_NUMBER_TRACE3":case 3:e.severityNumber=3;break;case"SEVERITY_NUMBER_TRACE4":case 4:e.severityNumber=4;break;case"SEVERITY_NUMBER_DEBUG":case 5:e.severityNumber=5;break;case"SEVERITY_NUMBER_DEBUG2":case 6:e.severityNumber=6;break;case"SEVERITY_NUMBER_DEBUG3":case 7:e.severityNumber=7;break;case"SEVERITY_NUMBER_DEBUG4":case 8:e.severityNumber=8;break;case"SEVERITY_NUMBER_INFO":case 9:e.severityNumber=9;break;case"SEVERITY_NUMBER_INFO2":case 10:e.severityNumber=10;break;case"SEVERITY_NUMBER_INFO3":case 11:e.severityNumber=11;break;case"SEVERITY_NUMBER_INFO4":case 12:e.severityNumber=12;break;case"SEVERITY_NUMBER_WARN":case 13:e.severityNumber=13;break;case"SEVERITY_NUMBER_WARN2":case 14:e.severityNumber=14;break;case"SEVERITY_NUMBER_WARN3":case 15:e.severityNumber=15;break;case"SEVERITY_NUMBER_WARN4":case 16:e.severityNumber=16;break;case"SEVERITY_NUMBER_ERROR":case 17:e.severityNumber=17;break;case"SEVERITY_NUMBER_ERROR2":case 18:e.severityNumber=18;break;case"SEVERITY_NUMBER_ERROR3":case 19:e.severityNumber=19;break;case"SEVERITY_NUMBER_ERROR4":case 20:e.severityNumber=20;break;case"SEVERITY_NUMBER_FATAL":case 21:e.severityNumber=21;break;case"SEVERITY_NUMBER_FATAL2":case 22:e.severityNumber=22;break;case"SEVERITY_NUMBER_FATAL3":case 23:e.severityNumber=23;break;case"SEVERITY_NUMBER_FATAL4":case 24:e.severityNumber=24;break}if(t.severityText!=null&&(e.severityText=String(t.severityText)),t.body!=null){if(typeof t.body!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected");e.body=p.opentelemetry.proto.common.v1.AnyValue.fromObject(t.body)}if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}return t.droppedAttributesCount!=null&&(e.droppedAttributesCount=t.droppedAttributesCount>>>0),t.flags!=null&&(e.flags=t.flags>>>0),t.traceId!=null&&(typeof t.traceId=="string"?f.base64.decode(t.traceId,e.traceId=f.newBuffer(f.base64.length(t.traceId)),0):t.traceId.length>=0&&(e.traceId=t.traceId)),t.spanId!=null&&(typeof t.spanId=="string"?f.base64.decode(t.spanId,e.spanId=f.newBuffer(f.base64.length(t.spanId)),0):t.spanId.length>=0&&(e.spanId=t.spanId)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),e.defaults){if(f.Long){var u=new f.Long(0,0,!1);n.timeUnixNano=e.longs===String?u.toString():e.longs===Number?u.toNumber():u}else n.timeUnixNano=e.longs===String?"0":0;if(n.severityNumber=e.enums===String?"SEVERITY_NUMBER_UNSPECIFIED":0,n.severityText="",n.body=null,n.droppedAttributesCount=0,n.flags=0,e.bytes===String?n.traceId="":(n.traceId=[],e.bytes!==Array&&(n.traceId=f.newBuffer(n.traceId))),e.bytes===String?n.spanId="":(n.spanId=[],e.bytes!==Array&&(n.spanId=f.newBuffer(n.spanId))),f.Long){var u=new f.Long(0,0,!1);n.observedTimeUnixNano=e.longs===String?u.toString():e.longs===Number?u.toNumber():u}else n.observedTimeUnixNano=e.longs===String?"0":0}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?n.timeUnixNano=e.longs===String?String(t.timeUnixNano):t.timeUnixNano:n.timeUnixNano=e.longs===String?f.Long.prototype.toString.call(t.timeUnixNano):e.longs===Number?new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.severityNumber!=null&&t.hasOwnProperty("severityNumber")&&(n.severityNumber=e.enums===String?p.opentelemetry.proto.logs.v1.SeverityNumber[t.severityNumber]===void 0?t.severityNumber:p.opentelemetry.proto.logs.v1.SeverityNumber[t.severityNumber]:t.severityNumber),t.severityText!=null&&t.hasOwnProperty("severityText")&&(n.severityText=t.severityText),t.body!=null&&t.hasOwnProperty("body")&&(n.body=p.opentelemetry.proto.common.v1.AnyValue.toObject(t.body,e)),t.attributes&&t.attributes.length){n.attributes=[];for(var l=0;l<t.attributes.length;++l)n.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[l],e)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),t.flags!=null&&t.hasOwnProperty("flags")&&(n.flags=t.flags),t.traceId!=null&&t.hasOwnProperty("traceId")&&(n.traceId=e.bytes===String?f.base64.encode(t.traceId,0,t.traceId.length):e.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId),t.spanId!=null&&t.hasOwnProperty("spanId")&&(n.spanId=e.bytes===String?f.base64.encode(t.spanId,0,t.spanId.length):e.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId),t.observedTimeUnixNano!=null&&t.hasOwnProperty("observedTimeUnixNano")&&(typeof t.observedTimeUnixNano=="number"?n.observedTimeUnixNano=e.longs===String?String(t.observedTimeUnixNano):t.observedTimeUnixNano:n.observedTimeUnixNano=e.longs===String?f.Long.prototype.toString.call(t.observedTimeUnixNano):e.longs===Number?new f.LongBits(t.observedTimeUnixNano.low>>>0,t.observedTimeUnixNano.high>>>0).toNumber():t.observedTimeUnixNano),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.LogRecord"},s}(),c}(),o}(),r}(),i}();ym.exports=p});var rs=d(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.ServiceClientType=void 0;var QS;(function(i){i[i.SPANS=0]="SPANS",i[i.METRICS=1]="METRICS",i[i.LOGS=2]="LOGS"})(QS=un.ServiceClientType||(un.ServiceClientType={}))});var an=d(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.getExportRequestProto=void 0;var Dc=Em(),gm=rs();function ZS(i){return i===gm.ServiceClientType.SPANS?Dc.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest:i===gm.ServiceClientType.LOGS?Dc.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest:Dc.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest}ns.getExportRequestProto=ZS});var Bc=d(os=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});os.send=void 0;var vm=Ji(),eb=an();function tb(i,r,o,c,s){let a=i.convert(r),t=(0,eb.getExportRequestProto)(i.getServiceClientType()),e=t.create(a);if(e){let n=t.encode(e).finish();n&&(0,vm.sendWithHttp)(i,Buffer.from(n),"application/x-protobuf",c,s)}else s(new vm.OTLPExporterError("No proto"))}os.send=tb});var Tm=d(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});is.OTLPProtoExporterNodeBase=void 0;var rb=(y(),E(_)),nb=Ji(),Vc=class extends nb.OTLPExporterNodeBase{constructor(r={}){super(r)}_sendPromise(r,o,c){let s=new Promise((t,e)=>{this._send(this,r,this.compression,t,e)}).then(o,c);this._sendingPromises.push(s);let a=()=>{let t=this._sendingPromises.indexOf(s);this._sendingPromises.splice(t,1)};s.then(a,a)}send(r,o,c){if(this._shutdownOnce.isCalled){rb.diag.debug("Shutdown already started. Cannot send objects");return}this._send?this._sendPromise(r,o,c):setImmediate(()=>{let{send:s}=Bc();this._send=s,this._sendPromise(r,o,c)})}};is.OTLPProtoExporterNodeBase=Vc});var Sm=d(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.send=Er.OTLPProtoExporterNodeBase=void 0;var ob=Tm();Object.defineProperty(Er,"OTLPProtoExporterNodeBase",{enumerable:!0,get:function(){return ob.OTLPProtoExporterNodeBase}});var ib=Bc();Object.defineProperty(Er,"send",{enumerable:!0,get:function(){return ib.send}})});var bm=d(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});ss.OTLPProtoExporterBrowserBase=void 0;var sb=(y(),E(_)),kc=Ji(),ub=an(),qc=class extends kc.OTLPExporterBrowserBase{constructor(r={}){super(r)}send(r,o,c){if(this._shutdownOnce.isCalled){sb.diag.debug("Shutdown already started. Cannot send objects");return}let s=this.convert(r),a=(0,ub.getExportRequestProto)(this.getServiceClientType()),t=a.create(s);if(t){let e=a.encode(t).finish();e&&(0,kc.sendWithXhr)(new Blob([e],{type:"application/x-protobuf"}),this.url,Object.assign(Object.assign({},this._headers),{"Content-Type":"application/x-protobuf",Accept:"application/x-protobuf"}),this.timeoutMillis,o,c)}else c(new kc.OTLPExporterError("No proto"))}};ss.OTLPProtoExporterBrowserBase=qc});var Om=d(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.ServiceClientType=gr.OTLPProtoExporterBrowserBase=void 0;var ab=bm();Object.defineProperty(gr,"OTLPProtoExporterBrowserBase",{enumerable:!0,get:function(){return ab.OTLPProtoExporterBrowserBase}});var cb=rs();Object.defineProperty(gr,"ServiceClientType",{enumerable:!0,get:function(){return cb.ServiceClientType}})});var Pm=d(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.getExportRequestProto=ye.ServiceClientType=ye.OTLPProtoExporterBrowserBase=ye.send=ye.OTLPProtoExporterNodeBase=void 0;var Am=Sm();Object.defineProperty(ye,"OTLPProtoExporterNodeBase",{enumerable:!0,get:function(){return Am.OTLPProtoExporterNodeBase}});Object.defineProperty(ye,"send",{enumerable:!0,get:function(){return Am.send}});var lb=Om();Object.defineProperty(ye,"OTLPProtoExporterBrowserBase",{enumerable:!0,get:function(){return lb.OTLPProtoExporterBrowserBase}});var pb=rs();Object.defineProperty(ye,"ServiceClientType",{enumerable:!0,get:function(){return pb.ServiceClientType}});var fb=an();Object.defineProperty(ye,"getExportRequestProto",{enumerable:!0,get:function(){return fb.getExportRequestProto}})});var q=Q(Lu(),1);y();Du();var Cm=Q(gf(),1),Sr=Q(pt(),1),Um=Q(Uf(),1),Dm=Q(jd(),1),Bm=Q(fe(),1),br=Q(hn(),1),Vm=Q(Hd(),1),be=Q(N(),1);y();var $T=Symbol.for("@vercel/request-context");function lr(){return globalThis[$T]?.get()}var rc=Q(fe(),1);function ki(i){return Object.fromEntries(Object.entries(i).filter(([r,o])=>o!==void 0))}function Fd(i){return i?i.split("::").at(-1):void 0}function Kd(i=lr(),r){if(!i)return;let o=r?WT(r,i.headers):void 0;return ki({[rc.SemanticAttributes.HTTP_HOST]:i.headers.host,[rc.SemanticAttributes.HTTP_USER_AGENT]:i.headers["user-agent"],"http.referer":i.headers.referer,"vercel.request_id":Fd(i.headers["x-vercel-id"]),"vercel.matched_path":i.headers["x-matched-path"],"vercel.edge_region":i.headers["x-vercel-edge-region"],...o})}var YT={keys(i){return[]},get(i,r){return i[r.toLocaleLowerCase()]}};function WT(i,r){if(typeof i=="function")return i(r,YT);let o={};for(let[c,s]of Object.entries(i)){let a=r[s.toLocaleLowerCase()];a!==void 0&&(o[c]=a)}return o}y();function Yr(i){return(i&_.TraceFlags.SAMPLED)!==0}var qi=class{constructor(r,o){this.processors=r;this.attributesFromHeaders=o;this.rootSpanIds=new Map;this.waitSpanEnd=new Map}forceFlush(){return Promise.all(this.processors.map(r=>r.forceFlush().catch(o=>{_.diag.error("@vercel/otel: forceFlush failed:",o)}))).then(()=>{})}shutdown(){return Promise.all(this.processors.map(r=>r.shutdown().catch(()=>{}))).then(()=>{})}onStart(r,o){let{traceId:c,spanId:s,traceFlags:a}=r.spanContext(),t=!r.parentSpanId||!this.rootSpanIds.has(c);if(t?this.rootSpanIds.set(c,{rootSpanId:s,open:[]}):this.rootSpanIds.get(c)?.open.push(r),t&&Yr(a)){let e=lr(),n=Kd(e,this.attributesFromHeaders);n&&r.setAttributes(n),e&&e.waitUntil(async()=>{if(this.rootSpanIds.has(c)){let u=new Promise(h=>{this.waitSpanEnd.set(c,h)}),l;await Promise.race([u,new Promise(h=>{l=setTimeout(()=>{this.waitSpanEnd.delete(c),h(void 0)},50)})]),l&&clearTimeout(l)}return this.forceFlush()})}for(let e of this.processors)e.onStart(r,o)}onEnd(r){let{traceId:o,spanId:c,traceFlags:s}=r.spanContext(),a=Yr(s),t=this.rootSpanIds.get(o),e=t?.rootSpanId===c;if(a){let n=QT(r);n&&Object.assign(r.attributes,n)}if(e){if(this.rootSpanIds.delete(o),t.open.length>0){for(let n of t.open)if(!n.ended&&n.spanContext().spanId!==c)try{n.end()}catch(u){_.diag.error("@vercel/otel: onEnd failed:",u)}}}else if(t)for(let n=0;n<t.open.length;n++)t.open[n]?.spanContext().spanId===c&&t.open.splice(n,1);for(let n of this.processors)n.onEnd(r);if(e){let n=this.waitSpanEnd.get(o);n&&(this.waitSpanEnd.delete(o),n())}}},JT={[_.SpanKind.INTERNAL]:"internal",[_.SpanKind.SERVER]:"server",[_.SpanKind.CLIENT]:"client",[_.SpanKind.PRODUCER]:"producer",[_.SpanKind.CONSUMER]:"consumer"};function QT(i){let{kind:r,attributes:o}=i,{"operation.name":c,"resouce.name":s,"span.type":a,"next.span_type":t,"http.method":e,"http.route":n}=o;if(c)return;let u=s??(e&&typeof e=="string"&&n&&typeof n=="string"?`${e} ${n}`:n);if(i.kind===_.SpanKind.SERVER&&e&&n&&typeof e=="string"&&typeof n=="string")return{"operation.name":"web.request","resource.name":u};let l=i.instrumentationLibrary.name,h=t??a;if(h&&typeof h=="string"){let T=Xd(l,h);return n?{"operation.name":T,"resource.name":u}:{"operation.name":T}}return{"operation.name":Xd(l,r===_.SpanKind.INTERNAL?"":JT[r])}}function Xd(i,r){if(!i)return r;let o=i.replace(/[ @./]/g,"_");return o.startsWith("_")&&(o=o.slice(1)),r?`${o}.${r}`:o}var ih=Q(cc(),1);var oh=Q(Jr(),1);y();var pr=class extends oh.OTLPExporterBase{constructor(r={}){super(r),r.headers&&(this._headers=r.headers)}onShutdown(){_.diag.debug("@vercel/otel/otlp: onShutdown")}onInit(){_.diag.debug("@vercel/otel/otlp: onInit")}send(r,o,c){if(this._shutdownOnce.isCalled){_.diag.debug("@vercel/otel/otlp: Shutdown already started. Cannot send objects");return}let s=this.convert(r),a,t,e;try{({body:a,contentType:t,headers:e}=this.toMessage(s))}catch(u){_.diag.warn("@vercel/otel/otlp: no proto",u);return}let n=fetch(this.url,{method:"POST",body:a,headers:{...this._headers,...e,"Content-Type":t,"User-Agent":"OTel-OTLP-Exporter-JavaScript/0.46.0"},next:{internal:!0}}).then(u=>{_.diag.debug("@vercel/otel/otlp: onSuccess",u.status,u.statusText),o(),u.arrayBuffer().catch(()=>{})}).catch(u=>{_.diag.error("@vercel/otel/otlp: onError",u),c(u)}).finally(()=>{let u=this._sendingPromises.indexOf(n);this._sendingPromises.splice(u,1)});this._sendingPromises.push(n)}getDefaultUrl(r){throw new Error("Method not implemented.")}};var gS="v1/traces",vS=`http://localhost:4318/${gS}`;function Fi(i){return typeof i.url=="string"?i.url:vS}var fr=class{constructor(r={}){this.impl=new dc(r)}export(r,o){this.impl.export(r,o)}shutdown(){return this.impl.shutdown()}forceFlush(){return this.impl.forceFlush()}},dc=class extends pr{convert(r){return(0,ih.createExportTraceServiceRequest)(r,{useHex:!0,useLongBits:!1})}toMessage(r){return{body:JSON.stringify(r),contentType:"application/json"}}getDefaultUrl(r){return Fi(r)}};var Nm=Q(cc(),1),Rm=Q(Pm(),1),xm=Q(an(),1);var Tt=class{constructor(r={}){this.impl=new jc(r)}export(r,o){this.impl.export(r,o)}shutdown(){return this.impl.shutdown()}forceFlush(){return this.impl.forceFlush()}},jc=class extends pr{convert(r){return(0,Nm.createExportTraceServiceRequest)(r,void 0)}toMessage(r){let o=Rm.ServiceClientType.SPANS,c=(0,xm.getExportRequestProto)(o),s=c.create(r);return{body:c.encode(s).finish(),contentType:"application/x-protobuf",headers:{accept:"application/x-protobuf"}}}getDefaultUrl(r){return Fi(r)}};y();var Ce=Q(fe(),1);function Im(i,r){return i.replace(/\{(?<temp1>[^{}]+)\}/g,(o,c)=>{let s=r[c];return s!==void 0?String(s):o})}var vr=class{constructor(r={}){this.instrumentationName="@vercel/otel/fetch";this.instrumentationVersion="1.0.0";this.config=r}getConfig(){return this.config}setConfig(){}setTracerProvider(r){this.tracerProvider=r}setMeterProvider(){}enable(){this.disable();let{tracerProvider:r}=this;if(!r)return;let o=r.getTracer(this.instrumentationName,this.instrumentationVersion),c=this.config.ignoreUrls??[],s=(x,B)=>{if(B?.opentelemetry?.ignore!==void 0)return B.opentelemetry.ignore;if(c.length===0)return!1;let b=x.toString();return c.some(S=>typeof S=="string"?S==="*"?!0:b.startsWith(S):S.test(b))},a=process.env.VERCEL_URL||process.env.NEXT_PUBLIC_VERCEL_URL||null,t=process.env.VERCEL_BRANCH_URL||process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL||null,e=this.config.propagateContextUrls??[],n=this.config.dontPropagateContextUrls??[],u=this.config.resourceNameTemplate,{attributesFromRequestHeaders:l,attributesFromResponseHeaders:h}=this.config,T=(x,B)=>{if(B?.opentelemetry?.propagateContext)return B.opentelemetry.propagateContext;let b=x.toString();return n.length>0&&n.some(S=>typeof S=="string"?S==="*"?!0:b.startsWith(S):S.test(b))?!1:a&&x.protocol==="https:"&&(x.host===a||x.host===t||x.host===lr()?.headers.host)||!a&&x.protocol==="http:"&&x.hostname==="localhost"?!0:e.some(S=>typeof S=="string"?S==="*"?!0:b.startsWith(S):S.test(b))};process.env.NEXT_OTEL_FETCH_DISABLED="1";let D=globalThis.fetch;this.originalFetch=D;let L=async(x,B)=>{let b=B;if(b?.next?.internal)return D(x,b);let S=new Request(x instanceof Request?x.clone():x,b),K=new URL(S.url);if(s(K,b))return D(x,b);let as={[Ce.SemanticAttributes.HTTP_METHOD]:S.method,[Ce.SemanticAttributes.HTTP_URL]:S.url,[Ce.SemanticAttributes.HTTP_HOST]:K.host,[Ce.SemanticAttributes.HTTP_SCHEME]:K.protocol.replace(":",""),[Ce.SemanticAttributes.NET_PEER_NAME]:K.hostname,[Ce.SemanticAttributes.NET_PEER_PORT]:K.port},St=u?Im(u,as):hb(S.url),qm=b?.opentelemetry?.spanName??`fetch ${S.method} ${S.url}`,Hc=_.context.active(),X=o.startSpan(qm,{kind:_.SpanKind.CLIENT,attributes:{...as,"operation.name":`fetch.${S.method}`,"resource.name":St,...b?.opentelemetry?.attributes}},Hc);if(!X.isRecording()||!Yr(X.spanContext().traceFlags))return X.end(),D(x,b);if(T(K,b)){let bt=_.trace.setSpan(Hc,X);_.propagation.inject(bt,S.headers,db)}l&&Lm(X,l,S.headers);try{let bt=Date.now(),Ue=await D(x,{...b,headers:S.headers}),jm=Date.now()-bt;return X.setAttribute(Ce.SemanticAttributes.HTTP_STATUS_CODE,Ue.status),X.setAttribute("http.response_time",jm),h&&Lm(X,h,Ue.headers),Ue.status>=500&&Gc(X,`Status: ${Ue.status} (${Ue.statusText})`),Ue.body?mb(Ue).then(cs=>{X.isRecording()&&(X.setAttribute(Ce.SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED,cs),X.end())},cs=>{X.isRecording()&&(Gc(X,cs),X.end())}):X.end(),Ue}catch(bt){throw Gc(X,bt),X.end(),bt}};globalThis.fetch=L}disable(){this.originalFetch&&(globalThis.fetch=this.originalFetch)}},db={set(i,r,o){i.set(r,o)}};function hb(i){let r=i.indexOf("?");return r===-1?i:i.substring(0,r)}function mb(i){let r=0,c=i.clone().body?.getReader();if(!c)return Promise.resolve(0);let s=()=>c.read().then(({done:a,value:t})=>{if(!a)return r+=t.byteLength,s()});return s().then(()=>r)}function Gc(i,r){if(r instanceof Error)i.recordException(r),i.setStatus({code:_.SpanStatusCode.ERROR,message:r.message});else{let o=String(r);i.setStatus({code:_.SpanStatusCode.ERROR,message:o})}}function Lm(i,r,o){for(let[c,s]of Object.entries(r)){let a=o.get(s);a!==null&&i.setAttribute(c,a)}}var us=class{constructor(r={}){this.configuration=r}start(){let r=_b(),o=(0,br.getEnvWithoutDefaults)(),c=this.configuration,s=process.env.NEXT_RUNTIME||"nodejs",a=!!r.OTEL_SDK_DISABLED;if(o.OTEL_LOG_LEVEL&&_.diag.setLogger(new _.DiagConsoleLogger,{logLevel:o.OTEL_LOG_LEVEL}),a)return;let t=c.idGenerator??new q.RandomIdGenerator,e=c.contextManager??new Vm.AsyncLocalStorageContextManager;e.enable(),this.contextManager=e;let n=r.OTEL_SERVICE_NAME||c.serviceName||"app",u=new Sr.Resource(ki({[Bm.SemanticResourceAttributes.SERVICE_NAME]:n,"node.ci":process.env.CI?!0:void 0,"node.env":process.env.NODE_ENV,env:process.env.VERCEL_ENV||process.env.NEXT_PUBLIC_VERCEL_ENV,"vercel.region":process.env.VERCEL_REGION,"vercel.runtime":s,"vercel.sha":process.env.VERCEL_GIT_COMMIT_SHA||process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA,"vercel.host":process.env.VERCEL_URL||process.env.NEXT_PUBLIC_VERCEL_URL||void 0,"vercel.branch_host":process.env.VERCEL_BRANCH_URL||process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL||void 0,...c.attributes})),l=c.resourceDetectors??[Sr.envDetectorSync];if(c.autoDetectResources??!0){let S={detectors:l};u=u.merge((0,Sr.detectResourcesSync)(S))}let T=Eb(c.propagators,r),D=gb(c.traceSampler,r),L=vb(c.spanProcessors,c,r);L.length===0&&_.diag.warn("@vercel/otel: No span processors configured. No spans will be exported.");let x=c.spanLimits,B=new q.BasicTracerProvider({resource:u,idGenerator:t,sampler:D,spanLimits:x});if(B.addSpanProcessor(new qi(L,c.attributesFromHeaders)),B.register({contextManager:e,propagator:new be.CompositePropagator({propagators:T})}),this.tracerProvider=B,c.logRecordProcessor){let S=new Um.LoggerProvider({resource:u});this.loggerProvider=S,S.addLogRecordProcessor(c.logRecordProcessor),ht.logs.setGlobalLoggerProvider(S)}if(c.metricReader||c.views){let S=new Dm.MeterProvider({resource:u,views:c.views??[]});c.metricReader&&S.addMetricReader(c.metricReader),_.metrics.setGlobalMeterProvider(S),this.meterProvider=S}let b=yb(c.instrumentations,c.instrumentationConfig);this.disableInstumentations=(0,Cm.registerInstrumentations)({instrumentations:b}),_.diag.info("@vercel/otel: started",n,s)}async shutdown(){let r=[];this.tracerProvider&&r.push(this.tracerProvider.shutdown()),this.loggerProvider&&r.push(this.loggerProvider.shutdown()),this.meterProvider&&r.push(this.meterProvider.shutdown()),_.diag.info("@vercel/otel: shutting down",r.length,process.env.NEXT_RUNTIME),await Promise.all(r),this.contextManager&&this.contextManager.disable();let{disableInstumentations:o}=this;o&&o()}};function _b(){let i=(0,br.parseEnvironment)(process.env);return{...br.DEFAULT_ENVIRONMENT,...i}}function yb(i,r){return(i??["auto"]).map(o=>o==="auto"?(_.diag.debug("@vercel/otel: Configure instrumentations: fetch",r?.fetch),[new vr(r?.fetch)]):o==="fetch"?(_.diag.debug("@vercel/otel: Configure instrumentations: fetch",r?.fetch),new vr(r?.fetch)):o).flat()}function Eb(i,r){let o=r.OTEL_PROPAGATORS&&r.OTEL_PROPAGATORS.length>0?r.OTEL_PROPAGATORS:void 0;return(i??o??["auto"]).map(c=>{if(c==="none")return[];if(c==="auto")return _.diag.debug("@vercel/otel: Configure propagators: tracecontext, baggage"),[new be.W3CTraceContextPropagator,new be.W3CBaggagePropagator];if(c==="tracecontext")return _.diag.debug("@vercel/otel: Configure propagator: tracecontext"),new be.W3CTraceContextPropagator;if(c==="baggage")return _.diag.debug("@vercel/otel: Configure propagator: baggage"),new be.W3CBaggagePropagator;if(typeof c=="string")throw new Error(`Unknown propagator: "${c}"`);return c}).flat()}var wm="always_on",Tr=1;function gb(i,r){if(i&&typeof i!="string")return i;let o=i&&i!=="auto"?i:r.OTEL_TRACES_SAMPLER||wm;switch(_.diag.debug("@vercel/otel: Configure sampler: ",o),o){case"always_on":return new q.AlwaysOnSampler;case"always_off":return new q.AlwaysOffSampler;case"parentbased_always_on":return new q.ParentBasedSampler({root:new q.AlwaysOnSampler});case"parentbased_always_off":return new q.ParentBasedSampler({root:new q.AlwaysOffSampler});case"traceidratio":return new q.TraceIdRatioBasedSampler(Mm(r));case"parentbased_traceidratio":return new q.ParentBasedSampler({root:new q.TraceIdRatioBasedSampler(Mm(r))});default:return _.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER value "${String(r.OTEL_TRACES_SAMPLER)} invalid, defaulting to ${wm}".`),new q.AlwaysOnSampler}}function Mm(i){if(i.OTEL_TRACES_SAMPLER_ARG===void 0||i.OTEL_TRACES_SAMPLER_ARG==="")return _.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${Tr}.`),Tr;_.diag.debug("@vercel/otel: Configure sampler probability: ",i.OTEL_TRACES_SAMPLER_ARG);let r=Number(i.OTEL_TRACES_SAMPLER_ARG);return isNaN(r)?(_.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${i.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${Tr}.`),Tr):r<0||r>1?(_.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${i.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${Tr}.`),Tr):r}function vb(i,r,o){return[...(i??["auto"]).map(c=>{if(c==="auto"){if(process.env.VERCEL_OTEL_ENDPOINTS){let s=process.env.VERCEL_OTEL_ENDPOINTS_PORT||"4318",a=process.env.VERCEL_OTEL_ENDPOINTS_PROTOCOL||"http/protobuf";_.diag.debug("@vercel/otel: Configure vercel otel collector on port: ",s,a);let t={url:`http://localhost:${s}/v1/traces`,headers:{}},e=a==="http/protobuf"?new Tt(t):new fr(t);return new q.BatchSpanProcessor(e)}return!r.traceExporter||r.traceExporter==="auto"||o.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT||o.OTEL_EXPORTER_OTLP_ENDPOINT?new q.BatchSpanProcessor(Tb(o)):void 0}return c}).filter(Ob),...r.traceExporter&&r.traceExporter!=="auto"?[new q.BatchSpanProcessor(r.traceExporter)]:[]]}function Tb(i){let r=process.env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL??process.env.OTEL_EXPORTER_OTLP_PROTOCOL??"http/protobuf",o=bb(i),c={...be.baggageUtils.parseKeyPairsIntoRecord(i.OTEL_EXPORTER_OTLP_HEADERS),...be.baggageUtils.parseKeyPairsIntoRecord(i.OTEL_EXPORTER_OTLP_TRACES_HEADERS)};switch(_.diag.debug("@vercel/otel: Configure trace exporter: ",r,o,`headers: ${Object.keys(c).join(",")||"<none>"}`),r){case"http/json":return new fr({url:o,headers:c});case"http/protobuf":return new Tt({url:o,headers:c});default:return _.diag.warn(`@vercel/otel: Unsupported OTLP traces protocol: ${r}. Using http/protobuf.`),new Tt}}var km="v1/traces",Sb=`http://localhost:4318/${km}`;function bb(i){let r=i.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT;if(r&&typeof r=="string")return r;let o=i.OTEL_EXPORTER_OTLP_ENDPOINT;return o&&typeof o=="string"?`${o}/${km}`:Sb}function Ob(i){return i!=null}function lR(i){let r;i?typeof i=="string"?r={serviceName:i}:r=i:r={},new us(r).start()}export{vr as FetchInstrumentation,fr as OTLPHttpJsonTraceExporter,Tt as OTLPHttpProtoTraceExporter,lR as registerOTel};
|