@vercel/otel 1.3.1-e26a383e-20240221194233 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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 w_=Object.create;var uu=Object.defineProperty;var M_=Object.getOwnPropertyDescriptor;var C_=Object.getOwnPropertyNames;var U_=Object.getPrototypeOf,D_=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 Bc=(i,r)=>()=>(i&&(r=i(i=0)),r);var d=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports);var sn=(i,r,o,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let u of C_(r))!D_.call(i,u)&&u!==o&&uu(i,u,{get:()=>r[u],enumerable:!(c=M_(r,u))||c.enumerable});return i},Tt=(i,r,o)=>(sn(i,r,"default"),o&&sn(o,r,"default")),J=(i,r,o)=>(o=i!=null?w_(U_(i)):{},sn(r||!i||!i.__esModule?uu(o,"default",{value:i,enumerable:!0}):o,i)),E=i=>sn(uu({},"__esModule",{value:!0}),i);var m={};import*as fb from"@opentelemetry/api";var y=Bc(()=>{Tt(m,fb)});var Tr=d(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.isTracingSuppressed=Ce.unsuppressTracing=Ce.suppressTracing=void 0;var B_=(y(),E(m)),su=(0,B_.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function V_(i){return i.setValue(su,!0)}Ce.suppressTracing=V_;function k_(i){return i.deleteValue(su)}Ce.unsuppressTracing=k_;function q_(i){return i.getValue(su)===!0}Ce.isTracingSuppressed=q_});var au=d(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.BAGGAGE_MAX_TOTAL_LENGTH=Q.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=Q.BAGGAGE_MAX_NAME_VALUE_PAIRS=Q.BAGGAGE_HEADER=Q.BAGGAGE_ITEMS_SEPARATOR=Q.BAGGAGE_PROPERTIES_SEPARATOR=Q.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;Q.BAGGAGE_KEY_PAIR_SEPARATOR="=";Q.BAGGAGE_PROPERTIES_SEPARATOR=";";Q.BAGGAGE_ITEMS_SEPARATOR=",";Q.BAGGAGE_HEADER="baggage";Q.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;Q.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;Q.BAGGAGE_MAX_TOTAL_LENGTH=8192});var cu=d(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.parseKeyPairsIntoRecord=Oe.parsePairKeyValue=Oe.getKeyPairs=Oe.serializeKeyPairs=void 0;var j_=(y(),E(m)),We=au();function G_(i){return i.reduce((r,o)=>{let c=`${r}${r!==""?We.BAGGAGE_ITEMS_SEPARATOR:""}${o}`;return c.length>We.BAGGAGE_MAX_TOTAL_LENGTH?r:c},"")}Oe.serializeKeyPairs=G_;function H_(i){return i.getAllEntries().map(([r,o])=>{let c=`${encodeURIComponent(r)}=${encodeURIComponent(o.value)}`;return o.metadata!==void 0&&(c+=We.BAGGAGE_PROPERTIES_SEPARATOR+o.metadata.toString()),c})}Oe.getKeyPairs=H_;function Vc(i){let r=i.split(We.BAGGAGE_PROPERTIES_SEPARATOR);if(r.length<=0)return;let o=r.shift();if(!o)return;let c=o.indexOf(We.BAGGAGE_KEY_PAIR_SEPARATOR);if(c<=0)return;let u=decodeURIComponent(o.substring(0,c).trim()),a=decodeURIComponent(o.substring(c+1).trim()),t;return r.length>0&&(t=(0,j_.baggageEntryMetadataFromString)(r.join(We.BAGGAGE_PROPERTIES_SEPARATOR))),{key:u,value:a,metadata:t}}Oe.parsePairKeyValue=Vc;function F_(i){return typeof i!="string"||i.length===0?{}:i.split(We.BAGGAGE_ITEMS_SEPARATOR).map(r=>Vc(r)).filter(r=>r!==void 0&&r.value.length>0).reduce((r,o)=>(r[o.key]=o.value,r),{})}Oe.parseKeyPairsIntoRecord=F_});var kc=d(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.W3CBaggagePropagator=void 0;var lu=(y(),E(m)),K_=Tr(),Je=au(),pu=cu(),fu=class{inject(r,o,c){let u=lu.propagation.getBaggage(r);if(!u||(0,K_.isTracingSuppressed)(r))return;let a=(0,pu.getKeyPairs)(u).filter(e=>e.length<=Je.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,Je.BAGGAGE_MAX_NAME_VALUE_PAIRS),t=(0,pu.serializeKeyPairs)(a);t.length>0&&c.set(o,Je.BAGGAGE_HEADER,t)}extract(r,o,c){let u=c.get(o,Je.BAGGAGE_HEADER),a=Array.isArray(u)?u.join(Je.BAGGAGE_ITEMS_SEPARATOR):u;if(!a)return r;let t={};return a.length===0||(a.split(Je.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let s=(0,pu.parsePairKeyValue)(n);if(s){let l={value:s.value};s.metadata&&(l.metadata=s.metadata),t[s.key]=l}}),Object.entries(t).length===0)?r:lu.propagation.setBaggage(r,lu.propagation.createBaggage(t))}fields(){return[Je.BAGGAGE_HEADER]}};an.W3CBaggagePropagator=fu});var qc=d(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.AnchoredClock=void 0;var du=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}};cn.AnchoredClock=du});var Kc=d(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.isAttributeValue=Ue.isAttributeKey=Ue.sanitizeAttributes=void 0;var jc=(y(),E(m));function X_(i){let r={};if(typeof i!="object"||i==null)return r;for(let[o,c]of Object.entries(i)){if(!Gc(o)){jc.diag.warn(`Invalid attribute key: ${o}`);continue}if(!Hc(c)){jc.diag.warn(`Invalid attribute value set for key: ${o}`);continue}Array.isArray(c)?r[o]=c.slice():r[o]=c}return r}Ue.sanitizeAttributes=X_;function Gc(i){return typeof i=="string"&&i.length>0}Ue.isAttributeKey=Gc;function Hc(i){return i==null?!0:Array.isArray(i)?z_(i):Fc(i)}Ue.isAttributeValue=Hc;function z_(i){let r;for(let o of i)if(o!=null){if(!r){if(Fc(o)){r=typeof o;continue}return!1}if(typeof o!==r)return!1}return!0}function Fc(i){switch(typeof i){case"number":case"boolean":case"string":return!0}return!1}});var hu=d(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.loggingErrorHandler=void 0;var $_=(y(),E(m));function Y_(){return i=>{$_.diag.error(W_(i))}}ln.loggingErrorHandler=Y_;function W_(i){return typeof i=="string"?i:JSON.stringify(J_(i))}function J_(i){let r={},o=i;for(;o!==null;)Object.getOwnPropertyNames(o).forEach(c=>{if(r[c])return;let u=o[c];u&&(r[c]=String(u))}),o=Object.getPrototypeOf(o);return r}});var _u=d(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.globalErrorHandler=St.setGlobalErrorHandler=void 0;var Q_=hu(),Xc=(0,Q_.loggingErrorHandler)();function Z_(i){Xc=i}St.setGlobalErrorHandler=Z_;function em(i){try{Xc(i)}catch{}}St.globalErrorHandler=em});var mu=d(Sr=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});Sr.TracesSamplerValues=void 0;var tm;(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"})(tm=Sr.TracesSamplerValues||(Sr.TracesSamplerValues={}))});var zc=d(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn._globalThis=void 0;pn._globalThis=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});var fn=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 De=(y(),E(m)),rm=mu(),nm=zc(),om=",",im=["OTEL_SDK_DISABLED"];function um(i){return im.indexOf(i)>-1}var sm=["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 am(i){return sm.indexOf(i)>-1}var cm=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function lm(i){return cm.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:De.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:rm.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 pm(i,r,o){if(typeof o[i]>"u")return;let c=String(o[i]);r[i]=c.toLowerCase()==="true"}function fm(i,r,o,c=-1/0,u=1/0){if(typeof o[i]<"u"){let a=Number(o[i]);isNaN(a)||(a<c?r[i]=c:a>u?r[i]=u:r[i]=a)}}function dm(i,r,o,c=om){let u=o[i];typeof u=="string"&&(r[i]=u.split(c).map(a=>a.trim()))}var hm={ALL:De.DiagLogLevel.ALL,VERBOSE:De.DiagLogLevel.VERBOSE,DEBUG:De.DiagLogLevel.DEBUG,INFO:De.DiagLogLevel.INFO,WARN:De.DiagLogLevel.WARN,ERROR:De.DiagLogLevel.ERROR,NONE:De.DiagLogLevel.NONE};function _m(i,r,o){let c=o[i];if(typeof c=="string"){let u=hm[c.toUpperCase()];u!=null&&(r[i]=u)}}function yu(i){let r={};for(let o in C.DEFAULT_ENVIRONMENT){let c=o;switch(c){case"OTEL_LOG_LEVEL":_m(c,r,i);break;default:if(um(c))pm(c,r,i);else if(am(c))fm(c,r,i);else if(lm(c))dm(c,r,i);else{let u=i[c];typeof u<"u"&&u!==null&&(r[c]=String(u))}}}return r}C.parseEnvironment=yu;function mm(){return typeof process<"u"&&process&&process.env?yu(process.env):yu(nm._globalThis)}C.getEnvWithoutDefaults=mm});var Yc=d(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.getEnv=void 0;var ym=X("os"),$c=fn();function Em(){let i=(0,$c.parseEnvironment)(process.env);return Object.assign({HOSTNAME:ym.hostname()},$c.DEFAULT_ENVIRONMENT,i)}dn.getEnv=Em});var Wc=d(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn._globalThis=void 0;hn._globalThis=typeof globalThis=="object"?globalThis:global});var Qc=d(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.hexToBase64=void 0;function Jc(i){return i>=48&&i<=57?i-48:i>=97&&i<=102?i-87:i-55}var vm=Buffer.alloc(8),gm=Buffer.alloc(16);function Tm(i){let r;i.length===16?r=vm:i.length===32?r=gm:r=Buffer.alloc(i.length/2);let o=0;for(let c=0;c<i.length;c+=2){let u=Jc(i.charCodeAt(c)),a=Jc(i.charCodeAt(c+1));r.writeUInt8(u<<4|a,o++)}return r.toString("base64")}_n.hexToBase64=Tm});var tl=d(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.RandomIdGenerator=void 0;var Sm=8,el=16,Eu=class{constructor(){this.generateTraceId=Zc(el),this.generateSpanId=Zc(Sm)}};yn.RandomIdGenerator=Eu;var mn=Buffer.allocUnsafe(el);function Zc(i){return function(){for(let o=0;o<i/4;o++)mn.writeUInt32BE(Math.random()*2**32>>>0,o*4);for(let o=0;o<i&&!(mn[o]>0);o++)o===i-1&&(mn[i-1]=1);return mn.toString("hex",0,i)}}});var rl=d(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.otperformance=void 0;var bm=X("perf_hooks");En.otperformance=bm.performance});var vu=d(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.VERSION=void 0;vn.VERSION="1.19.0"});var nl=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 ol=d(Qe=>{"use strict";var Om=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]}),Am=Qe&&Qe.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Om(r,i,o)};Object.defineProperty(Qe,"__esModule",{value:!0});Am(nl(),Qe)});var il=d(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.TelemetrySdkLanguageValues=Z.OsTypeValues=Z.HostArchValues=Z.AwsEcsLaunchtypeValues=Z.CloudPlatformValues=Z.CloudProviderValues=Z.SemanticResourceAttributes=void 0;Z.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"};Z.CloudProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};Z.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"};Z.AwsEcsLaunchtypeValues={EC2:"ec2",FARGATE:"fargate"};Z.HostArchValues={AMD64:"amd64",ARM32:"arm32",ARM64:"arm64",IA64:"ia64",PPC32:"ppc32",PPC64:"ppc64",X86:"x86"};Z.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"};Z.TelemetrySdkLanguageValues={CPP:"cpp",DOTNET:"dotnet",ERLANG:"erlang",GO:"go",JAVA:"java",NODEJS:"nodejs",PHP:"php",PYTHON:"python",RUBY:"ruby",WEBJS:"webjs"}});var ul=d(Ze=>{"use strict";var Pm=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]}),Nm=Ze&&Ze.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Pm(r,i,o)};Object.defineProperty(Ze,"__esModule",{value:!0});Nm(il(),Ze)});var fe=d(Be=>{"use strict";var Rm=Be&&Be.__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]}),sl=Be&&Be.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Rm(r,i,o)};Object.defineProperty(Be,"__esModule",{value:!0});sl(ol(),Be);sl(ul(),Be)});var al=d(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.SDK_INFO=void 0;var xm=vu(),br=fe();gn.SDK_INFO={[br.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:"opentelemetry",[br.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"node",[br.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:br.TelemetrySdkLanguageValues.NODEJS,[br.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:xm.VERSION}});var cl=d(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.unrefTimer=void 0;function Im(i){i.unref()}Tn.unrefTimer=Im});var ll=d(se=>{"use strict";var Lm=se&&se.__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]}),et=se&&se.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Lm(r,i,o)};Object.defineProperty(se,"__esModule",{value:!0});et(Yc(),se);et(Wc(),se);et(Qc(),se);et(tl(),se);et(rl(),se);et(al(),se);et(cl(),se)});var gu=d(tt=>{"use strict";var wm=tt&&tt.__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]}),Mm=tt&&tt.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&wm(r,i,o)};Object.defineProperty(tt,"__esModule",{value:!0});Mm(ll(),tt)});var hl=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 Tu=gu(),pl=9,Cm=6,Um=Math.pow(10,Cm),Sn=Math.pow(10,pl);function Or(i){let r=i/1e3,o=Math.trunc(r),c=Math.round(i%1e3*Um);return[o,c]}M.millisToHrTime=Or;function Su(){let i=Tu.otperformance.timeOrigin;if(typeof i!="number"){let r=Tu.otperformance;i=r.timing&&r.timing.fetchStart}return i}M.getTimeOrigin=Su;function fl(i){let r=Or(Su()),o=Or(typeof i=="number"?i:Tu.otperformance.now());return dl(r,o)}M.hrTime=fl;function Dm(i){if(bu(i))return i;if(typeof i=="number")return i<Su()?fl(i):Or(i);if(i instanceof Date)return Or(i.getTime());throw TypeError("Invalid input type")}M.timeInputToHrTime=Dm;function Bm(i,r){let o=r[0]-i[0],c=r[1]-i[1];return c<0&&(o-=1,c+=Sn),[o,c]}M.hrTimeDuration=Bm;function Vm(i){let r=pl,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=Vm;function km(i){return i[0]*Sn+i[1]}M.hrTimeToNanoseconds=km;function qm(i){return i[0]*1e3+i[1]/1e6}M.hrTimeToMilliseconds=qm;function jm(i){return i[0]*1e6+i[1]/1e3}M.hrTimeToMicroseconds=jm;function bu(i){return Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"}M.isTimeInputHrTime=bu;function Gm(i){return bu(i)||typeof i=="number"||i instanceof Date}M.isTimeInput=Gm;function dl(i,r){let o=[i[0]+r[0],i[1]+r[1]];return o[1]>=Sn&&(o[1]-=Sn,o[0]+=1),o}M.addHrTimes=dl});var ml=d(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0})});var yl=d(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.ExportResultCode=void 0;var Hm;(function(i){i[i.SUCCESS=0]="SUCCESS",i[i.FAILED=1]="FAILED"})(Hm=Ar.ExportResultCode||(Ar.ExportResultCode={}))});var vl=d(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.CompositePropagator=void 0;var El=(y(),E(m)),Ou=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,u)=>c.concat(u),[])))}inject(r,o,c){for(let u of this._propagators)try{u.inject(r,o,c)}catch(a){El.diag.warn(`Failed to inject with ${u.constructor.name}. Err: ${a.message}`)}}extract(r,o,c){return this._propagators.reduce((u,a)=>{try{return a.extract(u,o,c)}catch(t){El.diag.warn(`Failed to inject with ${a.constructor.name}. Err: ${t.message}`)}return u},r)}fields(){return this._fields.slice()}};bn.CompositePropagator=Ou});var gl=d(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.validateValue=bt.validateKey=void 0;var Au="[_0-9a-z-*/]",Fm=`[a-z]${Au}{0,255}`,Km=`[a-z0-9]${Au}{0,240}@[a-z]${Au}{0,13}`,Xm=new RegExp(`^(?:${Fm}|${Km})$`),zm=/^[ -~]{0,255}[!-~]$/,$m=/,|=/;function Ym(i){return Xm.test(i)}bt.validateKey=Ym;function Wm(i){return zm.test(i)&&!$m.test(i)}bt.validateValue=Wm});var Nu=d(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.TraceState=void 0;var Tl=gl(),Sl=32,Jm=512,bl=",",Ol="=",Pu=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+Ol+this.get(o)),r),[]).join(bl)}_parse(r){r.length>Jm||(this._internalState=r.split(bl).reverse().reduce((o,c)=>{let u=c.trim(),a=u.indexOf(Ol);if(a!==-1){let t=u.slice(0,a),e=u.slice(a+1,c.length);(0,Tl.validateKey)(t)&&(0,Tl.validateValue)(e)&&o.set(t,e)}return o},new Map),this._internalState.size>Sl&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Sl))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let r=new i;return r._internalState=new Map(this._internalState),r}};On.TraceState=Pu});var Pl=d(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.W3CTraceContextPropagator=ee.parseTraceParent=ee.TRACE_STATE_HEADER=ee.TRACE_PARENT_HEADER=void 0;var An=(y(),E(m)),Qm=Tr(),Zm=Nu();ee.TRACE_PARENT_HEADER="traceparent";ee.TRACE_STATE_HEADER="tracestate";var ey="00",ty="(?!ff)[\\da-f]{2}",ry="(?![0]{32})[\\da-f]{32}",ny="(?![0]{16})[\\da-f]{16}",oy="[\\da-f]{2}",iy=new RegExp(`^\\s?(${ty})-(${ry})-(${ny})-(${oy})(-.*)?\\s?$`);function Al(i){let r=iy.exec(i);return!r||r[1]==="00"&&r[5]?null:{traceId:r[2],spanId:r[3],traceFlags:parseInt(r[4],16)}}ee.parseTraceParent=Al;var Ru=class{inject(r,o,c){let u=An.trace.getSpanContext(r);if(!u||(0,Qm.isTracingSuppressed)(r)||!(0,An.isSpanContextValid)(u))return;let a=`${ey}-${u.traceId}-${u.spanId}-0${Number(u.traceFlags||An.TraceFlags.NONE).toString(16)}`;c.set(o,ee.TRACE_PARENT_HEADER,a),u.traceState&&c.set(o,ee.TRACE_STATE_HEADER,u.traceState.serialize())}extract(r,o,c){let u=c.get(o,ee.TRACE_PARENT_HEADER);if(!u)return r;let a=Array.isArray(u)?u[0]:u;if(typeof a!="string")return r;let t=Al(a);if(!t)return r;t.isRemote=!0;let e=c.get(o,ee.TRACE_STATE_HEADER);if(e){let n=Array.isArray(e)?e.join(","):e;t.traceState=new Zm.TraceState(typeof n=="string"?n:void 0)}return An.trace.setSpanContext(r,t)}fields(){return[ee.TRACE_PARENT_HEADER,ee.TRACE_STATE_HEADER]}};ee.W3CTraceContextPropagator=Ru});var Rl=d(Nl=>{"use strict";Object.defineProperty(Nl,"__esModule",{value:!0})});var xl=d(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.getRPCMetadata=Ee.deleteRPCMetadata=Ee.setRPCMetadata=Ee.RPCType=void 0;var uy=(y(),E(m)),xu=(0,uy.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),sy;(function(i){i.HTTP="http"})(sy=Ee.RPCType||(Ee.RPCType={}));function ay(i,r){return i.setValue(xu,r)}Ee.setRPCMetadata=ay;function cy(i){return i.deleteValue(xu)}Ee.deleteRPCMetadata=cy;function ly(i){return i.getValue(xu)}Ee.getRPCMetadata=ly});var Lu=d(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.AlwaysOffSampler=void 0;var py=(y(),E(m)),Iu=class{shouldSample(){return{decision:py.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Pn.AlwaysOffSampler=Iu});var Mu=d(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.AlwaysOnSampler=void 0;var fy=(y(),E(m)),wu=class{shouldSample(){return{decision:fy.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};Nn.AlwaysOnSampler=wu});var Ll=d(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.ParentBasedSampler=void 0;var Rn=(y(),E(m)),dy=_u(),Il=Lu(),Cu=Mu(),Uu=class{constructor(r){var o,c,u,a;this._root=r.root,this._root||((0,dy.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Cu.AlwaysOnSampler),this._remoteParentSampled=(o=r.remoteParentSampled)!==null&&o!==void 0?o:new Cu.AlwaysOnSampler,this._remoteParentNotSampled=(c=r.remoteParentNotSampled)!==null&&c!==void 0?c:new Il.AlwaysOffSampler,this._localParentSampled=(u=r.localParentSampled)!==null&&u!==void 0?u:new Cu.AlwaysOnSampler,this._localParentNotSampled=(a=r.localParentNotSampled)!==null&&a!==void 0?a:new Il.AlwaysOffSampler}shouldSample(r,o,c,u,a,t){let e=Rn.trace.getSpanContext(r);return!e||!(0,Rn.isSpanContextValid)(e)?this._root.shouldSample(r,o,c,u,a,t):e.isRemote?e.traceFlags&Rn.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(r,o,c,u,a,t):this._remoteParentNotSampled.shouldSample(r,o,c,u,a,t):e.traceFlags&Rn.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(r,o,c,u,a,t):this._localParentNotSampled.shouldSample(r,o,c,u,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()}}`}};xn.ParentBasedSampler=Uu});var wl=d(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.TraceIdRatioBasedSampler=void 0;var Du=(y(),E(m)),Bu=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,Du.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?Du.SamplingDecision.RECORD_AND_SAMPLED:Du.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 u=c*8,a=parseInt(r.slice(u,u+8),16);o=(o^a)>>>0}return o}};In.TraceIdRatioBasedSampler=Bu});var Bl=d(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.isPlainObject=void 0;var hy="[object Object]",_y="[object Null]",my="[object Undefined]",yy=Function.prototype,Ml=yy.toString,Ey=Ml.call(Object),vy=gy(Object.getPrototypeOf,Object),Cl=Object.prototype,Ul=Cl.hasOwnProperty,rt=Symbol?Symbol.toStringTag:void 0,Dl=Cl.toString;function gy(i,r){return function(o){return i(r(o))}}function Ty(i){if(!Sy(i)||by(i)!==hy)return!1;let r=vy(i);if(r===null)return!0;let o=Ul.call(r,"constructor")&&r.constructor;return typeof o=="function"&&o instanceof o&&Ml.call(o)===Ey}Ln.isPlainObject=Ty;function Sy(i){return i!=null&&typeof i=="object"}function by(i){return i==null?i===void 0?my:_y:rt&&rt in Object(i)?Oy(i):Ay(i)}function Oy(i){let r=Ul.call(i,rt),o=i[rt],c=!1;try{i[rt]=void 0,c=!0}catch{}let u=Dl.call(i);return c&&(r?i[rt]=o:delete i[rt]),u}function Ay(i){return Dl.call(i)}});var Gl=d(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.merge=void 0;var Vl=Bl(),Py=20;function Ny(...i){let r=i.shift(),o=new WeakMap;for(;i.length>0;)r=ql(r,i.shift(),0,o);return r}Cn.merge=Ny;function Vu(i){return Mn(i)?i.slice():i}function ql(i,r,o=0,c){let u;if(!(o>Py)){if(o++,wn(i)||wn(r)||jl(r))u=Vu(r);else if(Mn(i)){if(u=i.slice(),Mn(r))for(let a=0,t=r.length;a<t;a++)u.push(Vu(r[a]));else if(Pr(r)){let a=Object.keys(r);for(let t=0,e=a.length;t<e;t++){let n=a[t];u[n]=Vu(r[n])}}}else if(Pr(i))if(Pr(r)){if(!Ry(i,r))return r;u=Object.assign({},i);let a=Object.keys(r);for(let t=0,e=a.length;t<e;t++){let n=a[t],s=r[n];if(wn(s))typeof s>"u"?delete u[n]:u[n]=s;else{let l=u[n],h=s;if(kl(i,n,c)||kl(r,n,c))delete u[n];else{if(Pr(l)&&Pr(h)){let T=c.get(l)||[],R=c.get(h)||[];T.push({obj:i,key:n}),R.push({obj:r,key:n}),c.set(l,T),c.set(h,R)}u[n]=ql(u[n],s,o,c)}}}}else u=r;return u}}function kl(i,r,o){let c=o.get(i[r])||[];for(let u=0,a=c.length;u<a;u++){let t=c[u];if(t.key===r&&t.obj===i)return!0}return!1}function Mn(i){return Array.isArray(i)}function jl(i){return typeof i=="function"}function Pr(i){return!wn(i)&&!Mn(i)&&!jl(i)&&typeof i=="object"}function wn(i){return typeof i=="string"||typeof i=="number"||typeof i=="boolean"||typeof i>"u"||i instanceof Date||i instanceof RegExp||i===null}function Ry(i,r){return!(!(0,Vl.isPlainObject)(i)||!(0,Vl.isPlainObject)(r))}});var Hl=d(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.callWithTimeout=Ot.TimeoutError=void 0;var Un=class i extends Error{constructor(r){super(r),Object.setPrototypeOf(this,i.prototype)}};Ot.TimeoutError=Un;function xy(i,r){let o,c=new Promise(function(a,t){o=setTimeout(function(){t(new Un("Operation timed out."))},r)});return Promise.race([i,c]).then(u=>(clearTimeout(o),u),u=>{throw clearTimeout(o),u})}Ot.callWithTimeout=xy});var Kl=d(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.isUrlIgnored=At.urlMatches=void 0;function Fl(i,r){return typeof r=="string"?i===r:!!i.match(r)}At.urlMatches=Fl;function Iy(i,r){if(!r)return!1;for(let o of r)if(Fl(i,o))return!0;return!1}At.isUrlIgnored=Iy});var Xl=d(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.isWrapped=void 0;function Ly(i){return typeof i=="function"&&typeof i.__original=="function"&&typeof i.__unwrap=="function"&&i.__wrapped===!0}Dn.isWrapped=Ly});var zl=d(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.Deferred=void 0;var ku=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)}};Bn.Deferred=ku});var $l=d(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.BindOnceFuture=void 0;var wy=zl(),qu=class{constructor(r,o){this._callback=r,this._that=o,this._isCalled=!1,this._deferred=new wy.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}};Vn.BindOnceFuture=qu});var Wl=d(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn._export=void 0;var Yl=(y(),E(m)),My=Tr();function Cy(i,r){return new Promise(o=>{Yl.context.with((0,My.suppressTracing)(Yl.context.active()),()=>{i.export(r,c=>{o(c)})})})}kn._export=Cy});var N=d(P=>{"use strict";var Uy=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)&&Uy(r,i,o)};Object.defineProperty(P,"__esModule",{value:!0});P.internal=P.baggageUtils=void 0;w(kc(),P);w(qc(),P);w(Kc(),P);w(_u(),P);w(hu(),P);w(hl(),P);w(ml(),P);w(yl(),P);P.baggageUtils=cu();w(gu(),P);w(vl(),P);w(Pl(),P);w(Rl(),P);w(xl(),P);w(Lu(),P);w(Mu(),P);w(Ll(),P);w(wl(),P);w(Tr(),P);w(Nu(),P);w(fn(),P);w(Gl(),P);w(mu(),P);w(Hl(),P);w(Kl(),P);w(Xl(),P);w($l(),P);w(vu(),P);var Dy=Wl();P.internal={_export:Dy._export}});var Jl=d(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.ExceptionEventName=void 0;qn.ExceptionEventName="exception"});var Gu=d(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.Span=void 0;var Ae=(y(),E(m)),te=N(),nt=fe(),By=Jl(),ju=class{constructor(r,o,c,u,a,t,e=[],n,s,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=u,this.parentSpanId=t,this.kind=a,this.links=e;let h=Date.now();this._performanceStartTime=te.otperformance.now(),this._performanceOffset=h-(this._performanceStartTime+(0,te.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,te.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,te.isTimeInput)(o)&&((0,te.isTimeInput)(c)||(c=o),o=void 0);let u=(0,te.sanitizeAttributes)(o);return this.events.push({name:r,attributes:u,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,te.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<te.otperformance.now())return(0,te.hrTime)(r+this._performanceOffset);if(typeof r=="number")return(0,te.millisToHrTime)(r);if(r instanceof Date)return(0,te.millisToHrTime)(r.getTime());if((0,te.isTimeInputHrTime)(r))return r;if(this._startTimeProvided)return(0,te.millisToHrTime)(Date.now());let o=te.otperformance.now()-this._performanceStartTime;return(0,te.addHrTimes)(this.startTime,(0,te.millisToHrTime)(o))}isRecording(){return this._ended===!1}recordException(r,o){let c={};typeof r=="string"?c[nt.SemanticAttributes.EXCEPTION_MESSAGE]=r:r&&(r.code?c[nt.SemanticAttributes.EXCEPTION_TYPE]=r.code.toString():r.name&&(c[nt.SemanticAttributes.EXCEPTION_TYPE]=r.name),r.message&&(c[nt.SemanticAttributes.EXCEPTION_MESSAGE]=r.message),r.stack&&(c[nt.SemanticAttributes.EXCEPTION_STACKTRACE]=r.stack)),c[nt.SemanticAttributes.EXCEPTION_TYPE]||c[nt.SemanticAttributes.EXCEPTION_MESSAGE]?this.addEvent(By.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}};jn.Span=ju});var Rr=d(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.SamplingDecision=void 0;var Vy;(function(i){i[i.NOT_RECORD=0]="NOT_RECORD",i[i.RECORD=1]="RECORD",i[i.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Vy=Nr.SamplingDecision||(Nr.SamplingDecision={}))});var Hn=d(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.AlwaysOffSampler=void 0;var ky=Rr(),Hu=class{shouldSample(){return{decision:ky.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Gn.AlwaysOffSampler=Hu});var Kn=d(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.AlwaysOnSampler=void 0;var qy=Rr(),Fu=class{shouldSample(){return{decision:qy.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};Fn.AlwaysOnSampler=Fu});var zu=d(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.ParentBasedSampler=void 0;var Xn=(y(),E(m)),jy=N(),Ql=Hn(),Ku=Kn(),Xu=class{constructor(r){var o,c,u,a;this._root=r.root,this._root||((0,jy.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Ku.AlwaysOnSampler),this._remoteParentSampled=(o=r.remoteParentSampled)!==null&&o!==void 0?o:new Ku.AlwaysOnSampler,this._remoteParentNotSampled=(c=r.remoteParentNotSampled)!==null&&c!==void 0?c:new Ql.AlwaysOffSampler,this._localParentSampled=(u=r.localParentSampled)!==null&&u!==void 0?u:new Ku.AlwaysOnSampler,this._localParentNotSampled=(a=r.localParentNotSampled)!==null&&a!==void 0?a:new Ql.AlwaysOffSampler}shouldSample(r,o,c,u,a,t){let e=Xn.trace.getSpanContext(r);return!e||!(0,Xn.isSpanContextValid)(e)?this._root.shouldSample(r,o,c,u,a,t):e.isRemote?e.traceFlags&Xn.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(r,o,c,u,a,t):this._remoteParentNotSampled.shouldSample(r,o,c,u,a,t):e.traceFlags&Xn.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(r,o,c,u,a,t):this._localParentNotSampled.shouldSample(r,o,c,u,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()}}`}};zn.ParentBasedSampler=Xu});var Yu=d($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.TraceIdRatioBasedSampler=void 0;var Gy=(y(),E(m)),Zl=Rr(),$u=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,Gy.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?Zl.SamplingDecision.RECORD_AND_SAMPLED:Zl.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 u=c*8,a=parseInt(r.slice(u,u+8),16);o=(o^a)>>>0}return o}};$n.TraceIdRatioBasedSampler=$u});var Qu=d(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.buildSamplerFromEnv=Nt.loadDefaultConfig=void 0;var Yn=(y(),E(m)),Y=N(),ep=Hn(),Wu=Kn(),Ju=zu(),tp=Yu(),Hy=(0,Y.getEnv)(),Fy=Y.TracesSamplerValues.AlwaysOn,Pt=1;function Ky(){return{sampler:np(Hy),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,Y.getEnv)().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,Y.getEnv)().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:(0,Y.getEnv)().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,Y.getEnv)().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:(0,Y.getEnv)().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:(0,Y.getEnv)().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:(0,Y.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:(0,Y.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}Nt.loadDefaultConfig=Ky;function np(i=(0,Y.getEnv)()){switch(i.OTEL_TRACES_SAMPLER){case Y.TracesSamplerValues.AlwaysOn:return new Wu.AlwaysOnSampler;case Y.TracesSamplerValues.AlwaysOff:return new ep.AlwaysOffSampler;case Y.TracesSamplerValues.ParentBasedAlwaysOn:return new Ju.ParentBasedSampler({root:new Wu.AlwaysOnSampler});case Y.TracesSamplerValues.ParentBasedAlwaysOff:return new Ju.ParentBasedSampler({root:new ep.AlwaysOffSampler});case Y.TracesSamplerValues.TraceIdRatio:return new tp.TraceIdRatioBasedSampler(rp(i));case Y.TracesSamplerValues.ParentBasedTraceIdRatio:return new Ju.ParentBasedSampler({root:new tp.TraceIdRatioBasedSampler(rp(i))});default:return Yn.diag.error(`OTEL_TRACES_SAMPLER value "${i.OTEL_TRACES_SAMPLER} invalid, defaulting to ${Fy}".`),new Wu.AlwaysOnSampler}}Nt.buildSamplerFromEnv=np;function rp(i){if(i.OTEL_TRACES_SAMPLER_ARG===void 0||i.OTEL_TRACES_SAMPLER_ARG==="")return Yn.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${Pt}.`),Pt;let r=Number(i.OTEL_TRACES_SAMPLER_ARG);return isNaN(r)?(Yn.diag.error(`OTEL_TRACES_SAMPLER_ARG=${i.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${Pt}.`),Pt):r<0||r>1?(Yn.diag.error(`OTEL_TRACES_SAMPLER_ARG=${i.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${Pt}.`),Pt):r}});var es=d(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.reconfigureLimits=Rt.mergeConfig=void 0;var op=Qu(),Zu=N();function Xy(i){let r={sampler:(0,op.buildSamplerFromEnv)()},o=(0,op.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}Rt.mergeConfig=Xy;function zy(i){var r,o,c,u,a,t,e,n,s,l,h,T;let R=Object.assign({},i.spanLimits),b=(0,Zu.getEnvWithoutDefaults)();return R.attributeCountLimit=(t=(a=(u=(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&&u!==void 0?u:b.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&a!==void 0?a:b.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&t!==void 0?t:Zu.DEFAULT_ATTRIBUTE_COUNT_LIMIT,R.attributeValueLengthLimit=(T=(h=(l=(n=(e=i.spanLimits)===null||e===void 0?void 0:e.attributeValueLengthLimit)!==null&&n!==void 0?n:(s=i.generalLimits)===null||s===void 0?void 0:s.attributeValueLengthLimit)!==null&&l!==void 0?l:b.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&h!==void 0?h:b.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&T!==void 0?T:Zu.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},i,{spanLimits:R})}Rt.reconfigureLimits=zy});var ip=d(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.BatchSpanProcessorBase=void 0;var xt=(y(),E(m)),ot=N(),ts=class{constructor(r,o){this._exporter=r,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;let c=(0,ot.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 ot.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(xt.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&xt.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&&xt.diag.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(xt.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=[],u=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let a=0,t=u;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);xt.context.with((0,ot.suppressTracing)(xt.context.active()),()=>{let u=this._finishedSpans.splice(0,this._maxExportBatchSize),a=()=>this._exporter.export(u,e=>{var n;clearTimeout(c),e.code===ot.ExportResultCode.SUCCESS?r():o((n=e.error)!==null&&n!==void 0?n:new Error("BatchSpanProcessor: span export failed"))}),t=u.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,ot.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,ot.globalErrorHandler)(o)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return r();this._timer===void 0&&(this._timer=setTimeout(()=>r(),this._scheduledDelayMillis),(0,ot.unrefTimer)(this._timer))}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}};Wn.BatchSpanProcessorBase=ts});var up=d(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.BatchSpanProcessor=void 0;var $y=ip(),rs=class extends $y.BatchSpanProcessorBase{onShutdown(){}};Jn.BatchSpanProcessor=rs});var cp=d(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.RandomIdGenerator=void 0;var Yy=8,ap=16,ns=class{constructor(){this.generateTraceId=sp(ap),this.generateSpanId=sp(Yy)}};Zn.RandomIdGenerator=ns;var Qn=Buffer.allocUnsafe(ap);function sp(i){return function(){for(let o=0;o<i/4;o++)Qn.writeUInt32BE(Math.random()*2**32>>>0,o*4);for(let o=0;o<i&&!(Qn[o]>0);o++)o===i-1&&(Qn[i-1]=1);return Qn.toString("hex",0,i)}}});var pp=d(Ve=>{"use strict";var Wy=Ve&&Ve.__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]}),lp=Ve&&Ve.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Wy(r,i,o)};Object.defineProperty(Ve,"__esModule",{value:!0});lp(up(),Ve);lp(cp(),Ve)});var eo=d(it=>{"use strict";var Jy=it&&it.__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]}),Qy=it&&it.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Jy(r,i,o)};Object.defineProperty(it,"__esModule",{value:!0});Qy(pp(),it)});var fp=d(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});ro.Tracer=void 0;var W=(y(),E(m)),to=N(),Zy=Gu(),eE=es(),tE=eo(),os=class{constructor(r,o,c){this._tracerProvider=c;let u=(0,eE.mergeConfig)(o);this._sampler=u.sampler,this._generalLimits=u.generalLimits,this._spanLimits=u.spanLimits,this._idGenerator=o.idGenerator||new tE.RandomIdGenerator,this.resource=c.resource,this.instrumentationLibrary=r}startSpan(r,o={},c=W.context.active()){var u,a,t;o.root&&(c=W.trace.deleteSpan(c));let e=W.trace.getSpan(c);if((0,to.isTracingSuppressed)(c))return W.diag.debug("Instrumentation suppressed, returning Noop Span"),W.trace.wrapSpanContext(W.INVALID_SPAN_CONTEXT);let n=e?.spanContext(),s=this._idGenerator.generateSpanId(),l,h,T;!n||!W.trace.isSpanContextValid(n)?l=this._idGenerator.generateTraceId():(l=n.traceId,h=n.traceState,T=n.spanId);let R=(u=o.kind)!==null&&u!==void 0?u:W.SpanKind.INTERNAL,b=((a=o.links)!==null&&a!==void 0?a:[]).map(un=>({context:un.context,attributes:(0,to.sanitizeAttributes)(un.attributes)})),O=(0,to.sanitizeAttributes)(o.attributes),V=this._sampler.shouldSample(c,l,r,R,O,b);h=(t=V.traceState)!==null&&t!==void 0?t:h;let L=V.decision===W.SamplingDecision.RECORD_AND_SAMPLED?W.TraceFlags.SAMPLED:W.TraceFlags.NONE,H={traceId:l,spanId:s,traceFlags:L,traceState:h};if(V.decision===W.SamplingDecision.NOT_RECORD)return W.diag.debug("Recording is off, propagating context in a non-recording span"),W.trace.wrapSpanContext(H);let k=(0,to.sanitizeAttributes)(Object.assign(O,V.attributes));return new Zy.Span(this,c,r,H,R,T,b,o.startTime,void 0,k)}startActiveSpan(r,o,c,u){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=u);let n=t??W.context.active(),s=this.startSpan(r,a,n),l=W.trace.setSpan(n,s);return W.context.with(l,e,void 0,s)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}getActiveSpanProcessor(){return this._tracerProvider.getActiveSpanProcessor()}};ro.Tracer=os});var dp=d(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.defaultServiceName=void 0;function rE(){return`unknown_service:${process.argv0}`}no.defaultServiceName=rE});var is=d(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.normalizeType=It.normalizeArch=void 0;var nE=i=>{switch(i){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return i}};It.normalizeArch=nE;var oE=i=>{switch(i){case"sunos":return"solaris";case"win32":return"windows";default:return i}};It.normalizeType=oE});var io=d(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.execAsync=void 0;var iE=X("child_process"),uE=X("util");oo.execAsync=uE.promisify(iE.exec)});var hp=d(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo.getMachineId=void 0;var sE=io(),aE=(y(),E(m));async function cE(){try{let r=(await(0,sE.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){aE.diag.debug(`error reading machine id: ${i}`)}return""}uo.getMachineId=cE});var _p=d(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.getMachineId=void 0;var lE=X("fs"),pE=(y(),E(m));async function fE(){let i=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let r of i)try{return(await lE.promises.readFile(r,{encoding:"utf8"})).trim()}catch(o){pE.diag.debug(`error reading machine id: ${o}`)}return""}so.getMachineId=fE});var yp=d(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.getMachineId=void 0;var dE=X("fs"),hE=io(),mp=(y(),E(m));async function _E(){try{return(await dE.promises.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(i){mp.diag.debug(`error reading machine id: ${i}`)}try{return(await(0,hE.execAsync)("kenv -q smbios.system.uuid")).stdout.trim()}catch(i){mp.diag.debug(`error reading machine id: ${i}`)}return""}ao.getMachineId=_E});var vp=d(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.getMachineId=void 0;var Ep=X("process"),mE=io(),yE=(y(),E(m));async function EE(){let i="QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",r="%windir%\\System32\\REG.exe";Ep.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in Ep.env&&(r="%windir%\\sysnative\\cmd.exe /c "+r);try{let c=(await(0,mE.execAsync)(`${r} ${i}`)).stdout.split("REG_SZ");if(c.length===2)return c[1].trim()}catch(o){yE.diag.debug(`error reading machine id: ${o}`)}return""}co.getMachineId=EE});var gp=d(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.getMachineId=void 0;var vE=(y(),E(m));async function gE(){return vE.diag.debug("could not read machine-id: unsupported platform"),""}lo.getMachineId=gE});var Tp=d(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.getMachineId=void 0;var TE=X("process"),Lt;Ie.getMachineId=Lt;switch(TE.platform){case"darwin":Ie.getMachineId=Lt=hp().getMachineId;break;case"linux":Ie.getMachineId=Lt=_p().getMachineId;break;case"freebsd":Ie.getMachineId=Lt=yp().getMachineId;break;case"win32":Ie.getMachineId=Lt=vp().getMachineId;break;default:Ie.getMachineId=Lt=gp().getMachineId}});var as=d(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.hostDetectorSync=void 0;var us=fe(),SE=ut(),Sp=X("os"),bE=is(),OE=Tp(),ss=class{detect(r){let o={[us.SemanticResourceAttributes.HOST_NAME]:(0,Sp.hostname)(),[us.SemanticResourceAttributes.HOST_ARCH]:(0,bE.normalizeArch)((0,Sp.arch)())};return new SE.Resource(o,this._getAsyncAttributes())}_getAsyncAttributes(){return(0,OE.getMachineId)().then(r=>{let o={};return r&&(o[us.SemanticResourceAttributes.HOST_ID]=r),o})}};po.hostDetectorSync=new ss});var bp=d(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.hostDetector=void 0;var AE=as(),cs=class{detect(r){return Promise.resolve(AE.hostDetectorSync.detect(r))}};fo.hostDetector=new cs});var ps=d(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.osDetectorSync=void 0;var Op=fe(),PE=ut(),Ap=X("os"),NE=is(),ls=class{detect(r){let o={[Op.SemanticResourceAttributes.OS_TYPE]:(0,NE.normalizeType)((0,Ap.platform)()),[Op.SemanticResourceAttributes.OS_VERSION]:(0,Ap.release)()};return new PE.Resource(o)}};ho.osDetectorSync=new ls});var Pp=d(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.osDetector=void 0;var RE=ps(),fs=class{detect(r){return Promise.resolve(RE.osDetectorSync.detect(r))}};_o.osDetector=new fs});var hs=d(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.processDetectorSync=void 0;var xE=(y(),E(m)),Le=fe(),IE=ut(),LE=X("os"),ds=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=LE.userInfo();o[Le.SemanticResourceAttributes.PROCESS_OWNER]=c.username}catch(c){xE.diag.debug(`error obtaining process owner: ${c}`)}return new IE.Resource(o)}};mo.processDetectorSync=new ds});var Np=d(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.processDetector=void 0;var wE=hs(),_s=class{detect(r){return Promise.resolve(wE.processDetectorSync.detect(r))}};yo.processDetector=new _s});var Rp=d(ae=>{"use strict";var ME=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]}),st=ae&&ae.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&ME(r,i,o)};Object.defineProperty(ae,"__esModule",{value:!0});st(dp(),ae);st(bp(),ae);st(Pp(),ae);st(as(),ae);st(ps(),ae);st(Np(),ae);st(hs(),ae)});var ms=d(at=>{"use strict";var CE=at&&at.__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=at&&at.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&CE(r,i,o)};Object.defineProperty(at,"__esModule",{value:!0});UE(Rp(),at)});var ut=d(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});Eo.Resource=void 0;var xp=(y(),E(m)),ct=fe(),ys=N(),DE=ms(),xr=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(u=>(this._attributes=Object.assign({},this._attributes,u),this.asyncAttributesPending=!1,u),u=>(xp.diag.debug("a resource's async attributes promise rejected: %s",u),this.asyncAttributesPending=!1,{}))}static empty(){return i.EMPTY}static default(){return new i({[ct.SemanticResourceAttributes.SERVICE_NAME]:(0,DE.defaultServiceName)(),[ct.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:ys.SDK_INFO[ct.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE],[ct.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:ys.SDK_INFO[ct.SemanticResourceAttributes.TELEMETRY_SDK_NAME],[ct.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:ys.SDK_INFO[ct.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]})}get attributes(){var r;return this.asyncAttributesPending&&xp.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 u=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,u)}};Eo.Resource=xr;xr.EMPTY=new xr({})});var Lp=d(Ip=>{"use strict";Object.defineProperty(Ip,"__esModule",{value:!0})});var Mp=d(wp=>{"use strict";Object.defineProperty(wp,"__esModule",{value:!0})});var Up=d(Cp=>{"use strict";Object.defineProperty(Cp,"__esModule",{value:!0})});var Dp=d(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.browserDetector=void 0;var BE=lt(),Es=class{detect(r){return Promise.resolve(BE.browserDetectorSync.detect(r))}};vo.browserDetector=new Es});var gs=d(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.envDetectorSync=void 0;var VE=(y(),E(m)),kE=N(),qE=fe(),jE=ut(),vs=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,kE.getEnv)(),u=c.OTEL_RESOURCE_ATTRIBUTES,a=c.OTEL_SERVICE_NAME;if(u)try{let t=this._parseResourceAttributes(u);Object.assign(o,t)}catch(t){VE.diag.debug(`EnvDetector failed: ${t.message}`)}return a&&(o[qE.SemanticResourceAttributes.SERVICE_NAME]=a),new jE.Resource(o)}_parseResourceAttributes(r){if(!r)return{};let o={},c=r.split(this._COMMA_SEPARATOR,-1);for(let u of c){let a=u.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)}};go.envDetectorSync=new vs});var Bp=d(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.envDetector=void 0;var GE=gs(),Ts=class{detect(r){return Promise.resolve(GE.envDetectorSync.detect(r))}};To.envDetector=new Ts});var Vp=d(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.browserDetectorSync=void 0;var So=fe(),Ss=lt(),HE=(y(),E(m)),bs=class{detect(r){if(!(typeof navigator<"u"))return Ss.Resource.empty();let c={[So.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"browser",[So.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]:"Web Browser",[So.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]:navigator.userAgent};return this._getResourceAttributes(c,r)}_getResourceAttributes(r,o){return r[So.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]===""?(HE.diag.debug("BrowserDetector failed: Unable to find required browser resources. "),Ss.Resource.empty()):new Ss.Resource(Object.assign({},r))}};bo.browserDetectorSync=new bs});var kp=d(Pe=>{"use strict";var FE=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]}),Oo=Pe&&Pe.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&FE(r,i,o)};Object.defineProperty(Pe,"__esModule",{value:!0});Oo(Dp(),Pe);Oo(Bp(),Pe);Oo(Vp(),Pe);Oo(gs(),Pe)});var qp=d(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.isPromiseLike=void 0;var KE=i=>i!==null&&typeof i=="object"&&typeof i.then=="function";Ao.isPromiseLike=KE});var Gp=d(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.detectResourcesSync=Mt.detectResources=void 0;var Ir=ut(),wt=(y(),E(m)),XE=qp(),zE=async(i={})=>{let r=await Promise.all((i.detectors||[]).map(async o=>{try{let c=await o.detect(i);return wt.diag.debug(`${o.constructor.name} found resource.`,c),c}catch(c){return wt.diag.debug(`${o.constructor.name} failed: ${c.message}`),Ir.Resource.empty()}}));return jp(r),r.reduce((o,c)=>o.merge(c),Ir.Resource.empty())};Mt.detectResources=zE;var $E=(i={})=>{var r;let o=((r=i.detectors)!==null&&r!==void 0?r:[]).map(u=>{try{let a=u.detect(i),t;if((0,XE.isPromiseLike)(a)){let e=async()=>(await a).attributes;t=new Ir.Resource({},e())}else t=a;return t.waitForAsyncAttributes?t.waitForAsyncAttributes().then(()=>wt.diag.debug(`${u.constructor.name} found resource.`,t)):wt.diag.debug(`${u.constructor.name} found resource.`,t),t}catch(a){return wt.diag.error(`${u.constructor.name} failed: ${a.message}`),Ir.Resource.empty()}}),c=o.reduce((u,a)=>u.merge(a),Ir.Resource.empty());return c.waitForAsyncAttributes&&c.waitForAsyncAttributes().then(()=>{jp(o)}),c};Mt.detectResourcesSync=$E;var jp=i=>{i.forEach(r=>{if(Object.keys(r.attributes).length>0){let o=JSON.stringify(r.attributes,null,4);wt.diag.verbose(o)}})}});var lt=d(ce=>{"use strict";var YE=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]}),pt=ce&&ce.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&YE(r,i,o)};Object.defineProperty(ce,"__esModule",{value:!0});pt(ut(),ce);pt(Lp(),ce);pt(ms(),ce);pt(Mp(),ce);pt(Up(),ce);pt(kp(),ce);pt(Gp(),ce)});var Hp=d(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.MultiSpanProcessor=void 0;var WE=N(),Os=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,WE.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)})}};Po.MultiSpanProcessor=Os});var Ps=d(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.NoopSpanProcessor=void 0;var As=class{onStart(r,o){}onEnd(r){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}};No.NoopSpanProcessor=As});var Kp=d(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.BasicTracerProvider=ft.ForceFlushState=void 0;var Ct=(y(),E(m)),Dt=N(),Fp=lt(),JE=Ns(),QE=Qu(),ZE=Hp(),ev=Ps(),tv=eo(),rv=es(),Ut;(function(i){i[i.resolved=0]="resolved",i[i.timeout=1]="timeout",i[i.error=2]="error",i[i.unresolved=3]="unresolved"})(Ut=ft.ForceFlushState||(ft.ForceFlushState={}));var Lr=class{constructor(r={}){var o;this._registeredSpanProcessors=[],this._tracers=new Map;let c=(0,Dt.merge)({},(0,QE.loadDefaultConfig)(),(0,rv.reconfigureLimits)(r));this.resource=(o=c.resource)!==null&&o!==void 0?o:Fp.Resource.empty(),this.resource=Fp.Resource.default().merge(this.resource),this._config=Object.assign({},c,{resource:this.resource});let u=this._buildExporterFromEnv();if(u!==void 0){let a=new tv.BatchSpanProcessor(u);this.activeSpanProcessor=a}else this.activeSpanProcessor=new ev.NoopSpanProcessor}getTracer(r,o,c){let u=`${r}@${o||""}:${c?.schemaUrl||""}`;return this._tracers.has(u)||this._tracers.set(u,new JE.Tracer({name:r,version:o,schemaUrl:c?.schemaUrl},this._config,this)),this._tracers.get(u)}addSpanProcessor(r){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(o=>Ct.diag.error("Error while trying to shutdown current span processor",o)),this._registeredSpanProcessors.push(r),this.activeSpanProcessor=new ZE.MultiSpanProcessor(this._registeredSpanProcessors)}getActiveSpanProcessor(){return this.activeSpanProcessor}register(r={}){Ct.trace.setGlobalTracerProvider(this),r.propagator===void 0&&(r.propagator=this._buildPropagatorFromEnv()),r.contextManager&&Ct.context.setGlobalContextManager(r.contextManager),r.propagator&&Ct.propagation.setGlobalPropagator(r.propagator)}forceFlush(){let r=this._config.forceFlushTimeoutMillis,o=this._registeredSpanProcessors.map(c=>new Promise(u=>{let a,t=setTimeout(()=>{u(new Error(`Span processor did not completed within timeout period of ${r} ms`)),a=Ut.timeout},r);c.forceFlush().then(()=>{clearTimeout(t),a!==Ut.timeout&&(a=Ut.resolved,u(a))}).catch(e=>{clearTimeout(t),a=Ut.error,u(e)})}));return new Promise((c,u)=>{Promise.all(o).then(a=>{let t=a.filter(e=>e!==Ut.resolved);t.length>0?u(t):c()}).catch(a=>u([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,Dt.getEnv)().OTEL_PROPAGATORS)),c=r.map(u=>{let a=this._getPropagator(u);return a||Ct.diag.warn(`Propagator "${u}" requested through environment variable is unavailable.`),a}).reduce((u,a)=>(a&&u.push(a),u),[]);if(c.length!==0)return r.length===1?c[0]:new Dt.CompositePropagator({propagators:c})}_buildExporterFromEnv(){let r=(0,Dt.getEnv)().OTEL_TRACES_EXPORTER;if(r==="none"||r==="")return;let o=this._getSpanExporter(r);return o||Ct.diag.error(`Exporter "${r}" requested through environment variable is unavailable.`),o}};ft.BasicTracerProvider=Lr;Lr._registeredPropagators=new Map([["tracecontext",()=>new Dt.W3CTraceContextPropagator],["baggage",()=>new Dt.W3CBaggagePropagator]]);Lr._registeredExporters=new Map});var Xp=d(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.ConsoleSpanExporter=void 0;var Rs=N(),xs=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,Rs.hrTimeToMicroseconds)(r.startTime),duration:(0,Rs.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:Rs.ExportResultCode.SUCCESS})}};Ro.ConsoleSpanExporter=xs});var $p=d(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.InMemorySpanExporter=void 0;var zp=N(),Is=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}};xo.InMemorySpanExporter=Is});var Wp=d(Yp=>{"use strict";Object.defineProperty(Yp,"__esModule",{value:!0})});var Jp=d(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.SimpleSpanProcessor=void 0;var nv=(y(),E(m)),Bt=N(),Ls=class{constructor(r){this._exporter=r,this._shutdownOnce=new Bt.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&nv.TraceFlags.SAMPLED))return;let u=()=>Bt.internal._export(this._exporter,[r]).then(a=>{var t;a.code!==Bt.ExportResultCode.SUCCESS&&(0,Bt.globalErrorHandler)((t=a.error)!==null&&t!==void 0?t:new Error(`SimpleSpanProcessor: span export failed (status ${a})`))}).catch(a=>{(0,Bt.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),u()),t=>(0,Bt.globalErrorHandler)(t));a!=null&&this._unresolvedExports.add(a)}else u()}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}};Io.SimpleSpanProcessor=Ls});var Zp=d(Qp=>{"use strict";Object.defineProperty(Qp,"__esModule",{value:!0})});var tf=d(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0})});var nf=d(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0})});var uf=d(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0})});var af=d(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0})});var Ns=d(U=>{"use strict";var ov=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]}),K=U&&U.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&ov(r,i,o)};Object.defineProperty(U,"__esModule",{value:!0});K(fp(),U);K(Kp(),U);K(eo(),U);K(Xp(),U);K($p(),U);K(Wp(),U);K(Jp(),U);K(Zp(),U);K(Ps(),U);K(Hn(),U);K(Kn(),U);K(zu(),U);K(Yu(),U);K(Rr(),U);K(Gu(),U);K(tf(),U);K(nf(),U);K(uf(),U);K(af(),U)});var dt={};import*as lA from"@opentelemetry/api-logs";var ws=Bc(()=>{Tt(dt,lA)});var lf=d(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.disableInstrumentations=ke.enableInstrumentations=ke.parseInstrumentationOptions=void 0;function cf(i=[]){let r=[];for(let o=0,c=i.length;o<c;o++){let u=i[o];if(Array.isArray(u)){let a=cf(u);r=r.concat(a.instrumentations)}else typeof u=="function"?r.push(new u):u.instrumentationName&&r.push(u)}return{instrumentations:r}}ke.parseInstrumentationOptions=cf;function iv(i,r,o){for(let c=0,u=i.length;c<u;c++){let a=i[c];r&&a.setTracerProvider(r),o&&a.setMeterProvider(o),a.getConfig().enabled||a.enable()}}ke.enableInstrumentations=iv;function uv(i){i.forEach(r=>r.disable())}ke.disableInstrumentations=uv});var ff=d(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.registerInstrumentations=void 0;var pf=(y(),E(m)),Ms=lf();function sv(i){let{instrumentations:r}=(0,Ms.parseInstrumentationOptions)(i.instrumentations),o=i.tracerProvider||pf.trace.getTracerProvider(),c=i.meterProvider||pf.metrics.getMeterProvider();return(0,Ms.enableInstrumentations)(r,o,c),()=>{(0,Ms.disableInstrumentations)(r)}}Lo.registerInstrumentations=sv});var Us=d(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.LogRecord=void 0;var av=(y(),E(m)),wr=(y(),E(m)),wo=N(),Cs=class{constructor(r,o,c){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;let{timestamp:u,observedTimestamp:a,severityNumber:t,severityText:e,body:n,attributes:s={},context:l}=c,h=Date.now();if(this.hrTime=(0,wo.timeInputToHrTime)(u??h),this.hrTimeObserved=(0,wo.timeInputToHrTime)(a??h),l){let T=wr.trace.getSpanContext(l);T&&wr.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(s)}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?(wr.diag.warn(`Invalid attribute key: ${r}`),this):!(0,wo.isAttributeValue)(o)&&!(typeof o=="object"&&!Array.isArray(o)&&Object.keys(o).length>0)?(wr.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,wo.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?(wr.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&&av.diag.warn("Can not execute the operation on emitted log record"),this._isReadonly}};Mo.LogRecord=Cs});var df=d(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.Logger=void 0;var cv=(y(),E(m)),lv=Us(),Ds=class{constructor(r,o){this.instrumentationScope=r,this._sharedState=o}emit(r){let o=r.context||cv.context.active(),c=new lv.LogRecord(this._sharedState,this.instrumentationScope,Object.assign({context:o},r));this._sharedState.activeProcessor.onEmit(c,o),c._makeReadonly()}};Co.Logger=Ds});var hf=d(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.reconfigureLimits=Vt.loadDefaultConfig=void 0;var Mr=N();function pv(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:(0,Mr.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,Mr.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT},includeTraceContext:!0}}Vt.loadDefaultConfig=pv;function fv(i){var r,o,c,u,a,t;let e=(0,Mr.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:Mr.DEFAULT_ATTRIBUTE_COUNT_LIMIT,attributeValueLengthLimit:(t=(a=(u=i.attributeValueLengthLimit)!==null&&u!==void 0?u:e.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&a!==void 0?a:e.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&t!==void 0?t:Mr.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT}}Vt.reconfigureLimits=fv});var _f=d(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});Uo.MultiLogRecordProcessor=void 0;var dv=N(),Bs=class{constructor(r,o){this.processors=r,this.forceFlushTimeoutMillis=o}async forceFlush(){let r=this.forceFlushTimeoutMillis;await Promise.all(this.processors.map(o=>(0,dv.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()))}};Uo.MultiLogRecordProcessor=Bs});var ks=d(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.NoopLogRecordProcessor=void 0;var Vs=class{forceFlush(){return Promise.resolve()}onEmit(r,o){}shutdown(){return Promise.resolve()}};Do.NoopLogRecordProcessor=Vs});var mf=d(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});Bo.LoggerProviderSharedState=void 0;var hv=ks(),qs=class{constructor(r,o,c){this.resource=r,this.forceFlushTimeoutMillis=o,this.logRecordLimits=c,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new hv.NoopLogRecordProcessor}};Bo.LoggerProviderSharedState=qs});var vf=d(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.LoggerProvider=ht.DEFAULT_LOGGER_NAME=void 0;var Cr=(y(),E(m)),_v=(ws(),E(dt)),mv=lt(),yf=N(),yv=df(),Ef=hf(),Ev=_f(),vv=mf();ht.DEFAULT_LOGGER_NAME="unknown";var js=class{constructor(r={}){let{resource:o=mv.Resource.default(),logRecordLimits:c,forceFlushTimeoutMillis:u}=(0,yf.merge)({},(0,Ef.loadDefaultConfig)(),r);this._sharedState=new vv.LoggerProviderSharedState(o,u,(0,Ef.reconfigureLimits)(c)),this._shutdownOnce=new yf.BindOnceFuture(this._shutdown,this)}getLogger(r,o,c){if(this._shutdownOnce.isCalled)return Cr.diag.warn("A shutdown LoggerProvider cannot provide a Logger"),_v.NOOP_LOGGER;r||Cr.diag.warn("Logger requested without instrumentation scope name.");let u=r||ht.DEFAULT_LOGGER_NAME,a=`${u}@${o||""}:${c?.schemaUrl||""}`;return this._sharedState.loggers.has(a)||this._sharedState.loggers.set(a,new yv.Logger({name:u,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=>Cr.diag.error("Error while trying to shutdown current log record processor",o)),this._sharedState.registeredLogRecordProcessors.push(r),this._sharedState.activeProcessor=new Ev.MultiLogRecordProcessor(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)}forceFlush(){return this._shutdownOnce.isCalled?(Cr.diag.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()}shutdown(){return this._shutdownOnce.isCalled?(Cr.diag.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()}_shutdown(){return this._sharedState.activeProcessor.shutdown()}};ht.LoggerProvider=js});var gf=d(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.ConsoleLogRecordExporter=void 0;var gv=N(),Tv=N(),Gs=class{export(r,o){this._sendLogRecords(r,o)}shutdown(){return Promise.resolve()}_exportInfo(r){var o,c,u;return{timestamp:(0,gv.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:(u=r.spanContext)===null||u===void 0?void 0:u.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:Tv.ExportResultCode.SUCCESS})}};Vo.ConsoleLogRecordExporter=Gs});var Tf=d(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.SimpleLogRecordProcessor=void 0;var Hs=N(),Fs=class{constructor(r){this._exporter=r,this._shutdownOnce=new Hs.BindOnceFuture(this._shutdown,this)}onEmit(r){this._shutdownOnce.isCalled||this._exporter.export([r],o=>{var c;if(o.code!==Hs.ExportResultCode.SUCCESS){(0,Hs.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()}};ko.SimpleLogRecordProcessor=Fs});var bf=d(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});qo.InMemoryLogRecordExporter=void 0;var Sf=N(),Ks=class{constructor(){this._finishedLogRecords=[],this._stopped=!1}export(r,o){if(this._stopped)return o({code:Sf.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedLogRecords.push(...r),o({code:Sf.ExportResultCode.SUCCESS})}shutdown(){return this._stopped=!0,this.reset(),Promise.resolve()}getFinishedLogRecords(){return this._finishedLogRecords}reset(){this._finishedLogRecords=[]}};qo.InMemoryLogRecordExporter=Ks});var Of=d(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});jo.BatchLogRecordProcessorBase=void 0;var Sv=(y(),E(m)),kt=N(),Xs=class{constructor(r,o){var c,u,a,t;this._exporter=r,this._finishedLogRecords=[];let e=(0,kt.getEnv)();this._maxExportBatchSize=(c=o?.maxExportBatchSize)!==null&&c!==void 0?c:e.OTEL_BLRP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=(u=o?.maxQueueSize)!==null&&u!==void 0?u: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 kt.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(Sv.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=[],u=Math.ceil(this._finishedLogRecords.length/this._maxExportBatchSize);for(let a=0;a<u;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,kt.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,kt.globalErrorHandler)(r)})},this._scheduledDelayMillis),(0,kt.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,u=>{var a;if(u.code!==kt.ExportResultCode.SUCCESS){c((a=u.error)!==null&&a!==void 0?a:new Error(`BatchLogRecordProcessorBase: log record export failed (status ${u})`));return}o(u)})})}};jo.BatchLogRecordProcessorBase=Xs});var Af=d(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.BatchLogRecordProcessor=void 0;var bv=Of(),zs=class extends bv.BatchLogRecordProcessorBase{onShutdown(){}};Go.BatchLogRecordProcessor=zs});var Pf=d(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.BatchLogRecordProcessor=void 0;var Ov=Af();Object.defineProperty(Ho,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return Ov.BatchLogRecordProcessor}})});var Nf=d(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.BatchLogRecordProcessor=void 0;var Av=Pf();Object.defineProperty(Fo,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return Av.BatchLogRecordProcessor}})});var Rf=d(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.BatchLogRecordProcessor=re.InMemoryLogRecordExporter=re.SimpleLogRecordProcessor=re.ConsoleLogRecordExporter=re.NoopLogRecordProcessor=re.LogRecord=re.LoggerProvider=void 0;var Pv=vf();Object.defineProperty(re,"LoggerProvider",{enumerable:!0,get:function(){return Pv.LoggerProvider}});var Nv=Us();Object.defineProperty(re,"LogRecord",{enumerable:!0,get:function(){return Nv.LogRecord}});var Rv=ks();Object.defineProperty(re,"NoopLogRecordProcessor",{enumerable:!0,get:function(){return Rv.NoopLogRecordProcessor}});var xv=gf();Object.defineProperty(re,"ConsoleLogRecordExporter",{enumerable:!0,get:function(){return xv.ConsoleLogRecordExporter}});var Iv=Tf();Object.defineProperty(re,"SimpleLogRecordProcessor",{enumerable:!0,get:function(){return Iv.SimpleLogRecordProcessor}});var Lv=bf();Object.defineProperty(re,"InMemoryLogRecordExporter",{enumerable:!0,get:function(){return Lv.InMemoryLogRecordExporter}});var wv=Nf();Object.defineProperty(re,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return wv.BatchLogRecordProcessor}})});var Ko=d(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.AggregationTemporality=void 0;var Mv;(function(i){i[i.DELTA=0]="DELTA",i[i.CUMULATIVE=1]="CUMULATIVE"})(Mv=Ur.AggregationTemporality||(Ur.AggregationTemporality={}))});var qt=d(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.DataPointType=void 0;var Cv;(function(i){i[i.HISTOGRAM=0]="HISTOGRAM",i[i.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",i[i.GAUGE=2]="GAUGE",i[i.SUM=3]="SUM"})(Cv=Dr.DataPointType||(Dr.DataPointType={}))});var Ne=d(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});D.equalsCaseInsensitive=D.binarySearchLB=D.setEquals=D.FlatMap=D.isPromiseAllSettledRejectionResult=D.PromiseAllSettled=D.callWithTimeout=D.TimeoutError=D.instrumentationScopeId=D.hashAttributes=D.isNotNullish=void 0;function Uv(i){return i!=null}D.isNotNullish=Uv;function Dv(i){let r=Object.keys(i);return r.length===0?"":(r=r.sort(),JSON.stringify(r.map(o=>[o,i[o]])))}D.hashAttributes=Dv;function Bv(i){var r,o;return`${i.name}:${(r=i.version)!==null&&r!==void 0?r:""}:${(o=i.schemaUrl)!==null&&o!==void 0?o:""}`}D.instrumentationScopeId=Bv;var Xo=class i extends Error{constructor(r){super(r),Object.setPrototypeOf(this,i.prototype)}};D.TimeoutError=Xo;function Vv(i,r){let o,c=new Promise(function(a,t){o=setTimeout(function(){t(new Xo("Operation timed out."))},r)});return Promise.race([i,c]).then(u=>(clearTimeout(o),u),u=>{throw clearTimeout(o),u})}D.callWithTimeout=Vv;async function kv(i){return Promise.all(i.map(async r=>{try{return{status:"fulfilled",value:await r}}catch(o){return{status:"rejected",reason:o}}}))}D.PromiseAllSettled=kv;function qv(i){return i.status==="rejected"}D.isPromiseAllSettledRejectionResult=qv;function jv(i,r){let o=[];return i.forEach(c=>{o.push(...r(c))}),o}D.FlatMap=jv;function Gv(i,r){if(i.size!==r.size)return!1;for(let o of i)if(!r.has(o))return!1;return!0}D.setEquals=Gv;function Hv(i,r){let o=0,c=i.length-1;for(;c-o>1;){let u=Math.trunc((c+o)/2);i[u]<=r?o=u:c=u-1}return i[c]<=r?c:i[o]<=r?o:-1}D.binarySearchLB=Hv;function Fv(i,r){return i.toLowerCase()===r.toLowerCase()}D.equalsCaseInsensitive=Fv});var jt=d(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.AggregatorKind=void 0;var Kv;(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"})(Kv=Br.AggregatorKind||(Br.AggregatorKind={}))});var xf=d(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.DropAggregator=void 0;var Xv=jt(),$s=class{constructor(){this.kind=Xv.AggregatorKind.DROP}createAccumulation(){}merge(r,o){}diff(r,o){}toMetricData(r,o,c,u){}};zo.DropAggregator=$s});var we=d(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.isValidName=le.isDescriptorCompatibleWith=le.createInstrumentDescriptorWithView=le.createInstrumentDescriptor=le.InstrumentType=void 0;var If=(y(),E(m)),zv=Ne(),$v;(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"})($v=le.InstrumentType||(le.InstrumentType={}));function Yv(i,r,o){var c,u,a,t;return Lf(i)||If.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:(u=o?.unit)!==null&&u!==void 0?u:"",valueType:(a=o?.valueType)!==null&&a!==void 0?a:If.ValueType.DOUBLE,advice:(t=o?.advice)!==null&&t!==void 0?t:{}}}le.createInstrumentDescriptor=Yv;function Wv(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}}le.createInstrumentDescriptorWithView=Wv;function Jv(i,r){return(0,zv.equalsCaseInsensitive)(i.name,r.name)&&i.unit===r.unit&&i.type===r.type&&i.valueType===r.valueType}le.isDescriptorCompatibleWith=Jv;var Qv=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Lf(i){return i.match(Qv)!=null}le.isValidName=Lf});var wf=d(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.HistogramAggregator=Ht.HistogramAccumulation=void 0;var Zv=jt(),eg=qt(),Ys=we(),tg=Ne();function rg(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 Gt=class{constructor(r,o,c=!0,u=rg(o)){this.startTime=r,this._boundaries=o,this._recordMinMax=c,this._current=u}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,tg.binarySearchLB)(this._boundaries,r);this._current.buckets.counts[o+1]+=1}setStartTime(r){this.startTime=r}toPointValue(){return this._current}};Ht.HistogramAccumulation=Gt;var Ws=class{constructor(r,o){this._boundaries=r,this._recordMinMax=o,this.kind=Zv.AggregatorKind.HISTOGRAM}createAccumulation(r){return new Gt(r,this._boundaries,this._recordMinMax)}merge(r,o){let c=r.toPointValue(),u=o.toPointValue(),a=c.buckets.counts,t=u.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,s=-1/0;return this._recordMinMax&&(c.hasMinMax&&u.hasMinMax?(n=Math.min(c.min,u.min),s=Math.max(c.max,u.max)):c.hasMinMax?(n=c.min,s=c.max):u.hasMinMax&&(n=u.min,s=u.max)),new Gt(r.startTime,c.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:c.buckets.boundaries,counts:e},count:c.count+u.count,sum:c.sum+u.sum,hasMinMax:this._recordMinMax&&(c.hasMinMax||u.hasMinMax),min:n,max:s})}diff(r,o){let c=r.toPointValue(),u=o.toPointValue(),a=c.buckets.counts,t=u.buckets.counts,e=new Array(a.length);for(let n=0;n<a.length;n++)e[n]=t[n]-a[n];return new Gt(o.startTime,c.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:c.buckets.boundaries,counts:e},count:u.count-c.count,sum:u.sum-c.sum,hasMinMax:!1,min:1/0,max:-1/0})}toMetricData(r,o,c,u){return{descriptor:r,aggregationTemporality:o,dataPointType:eg.DataPointType.HISTOGRAM,dataPoints:c.map(([a,t])=>{let e=t.toPointValue(),n=r.type===Ys.InstrumentType.UP_DOWN_COUNTER||r.type===Ys.InstrumentType.OBSERVABLE_GAUGE||r.type===Ys.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:t.startTime,endTime:u,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}}})}}};Ht.HistogramAggregator=Ws});var Mf=d($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});$o.Buckets=void 0;var Js=class i{constructor(r=new Qs,o=0,c=0,u=0){this.backing=r,this.indexBase=o,this.indexStart=c,this.indexEnd=u}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,u=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&&u<o;n++)this._relocateBucket(a,u),u++,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))}};$o.Buckets=Js;var Qs=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 u=new Array(r).fill(0);u.splice(c,this._counts.length-o,...this._counts.slice(o)),u.splice(0,o,...this._counts.slice(0,o)),this._counts=u}reverse(r,o){let c=Math.floor((r+o)/2)-r;for(let u=0;u<c;u++){let a=this._counts[r+u];this._counts[r+u]=this._counts[o-u-1],this._counts[o-u-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 ea=d(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.getSignificand=oe.getNormalBase2=oe.MIN_VALUE=oe.MAX_NORMAL_EXPONENT=oe.MIN_NORMAL_EXPONENT=oe.SIGNIFICAND_WIDTH=void 0;oe.SIGNIFICAND_WIDTH=52;var ng=2146435072,og=1048575,Zs=1023;oe.MIN_NORMAL_EXPONENT=-Zs+1;oe.MAX_NORMAL_EXPONENT=Zs;oe.MIN_VALUE=Math.pow(2,-1022);function ig(i){let r=new DataView(new ArrayBuffer(8));return r.setFloat64(0,i),((r.getUint32(0)&ng)>>20)-Zs}oe.getNormalBase2=ig;function ug(i){let r=new DataView(new ArrayBuffer(8));r.setFloat64(0,i);let o=r.getUint32(0),c=r.getUint32(4);return(o&og)*Math.pow(2,32)+c}oe.getSignificand=ug});var Yo=d(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.nextGreaterSquare=Ft.ldexp=void 0;function sg(i,r){return i===0||i===Number.POSITIVE_INFINITY||i===Number.NEGATIVE_INFINITY||Number.isNaN(i)?i:i*Math.pow(2,r)}Ft.ldexp=sg;function ag(i){return i--,i|=i>>1,i|=i>>2,i|=i>>4,i|=i>>8,i|=i>>16,i++,i}Ft.nextGreaterSquare=ag});var Jo=d(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.MappingError=void 0;var ta=class extends Error{};Wo.MappingError=ta});var Uf=d(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.ExponentMapping=void 0;var Kt=ea(),cg=Yo(),Cf=Jo(),ra=class{constructor(r){this._shift=-r}mapToIndex(r){if(r<Kt.MIN_VALUE)return this._minNormalLowerBoundaryIndex();let o=Kt.getNormalBase2(r),c=this._rightShift(Kt.getSignificand(r)-1,Kt.SIGNIFICAND_WIDTH);return o+c>>this._shift}lowerBoundary(r){let o=this._minNormalLowerBoundaryIndex();if(r<o)throw new Cf.MappingError(`underflow: ${r} is < minimum lower boundary: ${o}`);let c=this._maxNormalLowerBoundaryIndex();if(r>c)throw new Cf.MappingError(`overflow: ${r} is > maximum lower boundary: ${c}`);return cg.ldexp(1,r<<this._shift)}get scale(){return this._shift===0?0:-this._shift}_minNormalLowerBoundaryIndex(){let r=Kt.MIN_NORMAL_EXPONENT>>this._shift;return this._shift<2&&r--,r}_maxNormalLowerBoundaryIndex(){return Kt.MAX_NORMAL_EXPONENT>>this._shift}_rightShift(r,o){return Math.floor(r*Math.pow(2,-o))}};Qo.ExponentMapping=ra});var Vf=d(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.LogarithmMapping=void 0;var Xt=ea(),Df=Yo(),Bf=Jo(),na=class{constructor(r){this._scale=r,this._scaleFactor=Df.ldexp(Math.LOG2E,r),this._inverseFactor=Df.ldexp(Math.LN2,-r)}mapToIndex(r){if(r<=Xt.MIN_VALUE)return this._minNormalLowerBoundaryIndex()-1;if(Xt.getSignificand(r)===0)return(Xt.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 Bf.MappingError(`overflow: ${r} is > maximum lower boundary: ${o}`)}let c=this._minNormalLowerBoundaryIndex();if(r<=c){if(r===c)return Xt.MIN_VALUE;if(r===c-1)return Math.exp((r+(1<<this._scale))/this._scaleFactor)/2;throw new Bf.MappingError(`overflow: ${r} is < minimum lower boundary: ${c}`)}return Math.exp(r*this._inverseFactor)}get scale(){return this._scale}_minNormalLowerBoundaryIndex(){return Xt.MIN_NORMAL_EXPONENT<<this._scale}_maxNormalLowerBoundaryIndex(){return(Xt.MAX_NORMAL_EXPONENT+1<<this._scale)-1}};Zo.LogarithmMapping=na});var jf=d(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.getMapping=void 0;var lg=Uf(),pg=Vf(),fg=Jo(),kf=-10,qf=20,dg=Array.from({length:31},(i,r)=>r>10?new pg.LogarithmMapping(r-10):new lg.ExponentMapping(r-10));function hg(i){if(i>qf||i<kf)throw new fg.MappingError(`expected scale >= ${kf} && <= ${qf}, got: ${i}`);return dg[i+10]}ei.getMapping=hg});var Ff=d($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.ExponentialHistogramAggregator=$t.ExponentialHistogramAccumulation=void 0;var _g=jt(),mg=qt(),yg=(y(),E(m)),oa=we(),Gf=Mf(),Hf=jf(),Eg=Yo(),zt=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))}},vg=20,gg=160,ia=2,ti=class i{constructor(r=r,o=gg,c=!0,u=0,a=0,t=0,e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,s=new Gf.Buckets,l=new Gf.Buckets,h=(0,Hf.getMapping)(vg)){this.startTime=r,this._maxSize=o,this._recordMinMax=c,this._sum=u,this._count=a,this._zeroCount=t,this._min=e,this._max=n,this._positive=s,this._negative=l,this._mapping=h,this._maxSize<ia&&(yg.diag.warn(`Exponential Histogram Max Size set to ${this._maxSize}, changing to the minimum size of: ${ia}`),this._maxSize=ia)}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 u=this._mapping.mapToIndex(o),a=!1,t=0,e=0;if(r.length===0?(r.indexStart=u,r.indexEnd=r.indexStart,r.indexBase=r.indexStart):u<r.indexStart&&r.indexEnd-u>=this._maxSize?(a=!0,e=u,t=r.indexEnd):u>r.indexEnd&&u-r.indexStart>=this._maxSize&&(a=!0,e=r.indexStart,t=u),a){let n=this._changeScale(t,e);this._downscale(n),u=this._mapping.mapToIndex(o)}this._incrementIndexBy(r,u,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 u=o-r.indexBase;u<0&&(u+=r.backing.length),r.incrementBucket(u,c)}_grow(r,o){let c=r.backing.length,u=r.indexBase-r.indexStart,a=c-u,t=(0,Eg.nextGreaterSquare)(o);t>this._maxSize&&(t=this._maxSize);let e=t-u;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,Hf.getMapping)(o)}_minScale(r){let o=Math.min(this.scale,r.scale),c=zt.combine(this._highLowAtScale(this.positive,this.scale,o),this._highLowAtScale(r.positive,r.scale,o)),u=zt.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(u.high,u.low))}_highLowAtScale(r,o,c){if(r.length===0)return new zt(0,-1);let u=o-c;return new zt(r.indexStart>>u,r.indexEnd>>u)}_mergeBuckets(r,o,c,u){let a=c.offset,t=o.scale-u;for(let e=0;e<c.length;e++)this._incrementIndexBy(r,a+e>>t,c.at(e))}_diffBuckets(r,o,c,u){let a=c.offset,t=o.scale-u;for(let e=0;e<c.length;e++){let s=(a+e>>t)-r.indexBase;s<0&&(s+=r.backing.length),r.decrementBucket(s,c.at(e))}r.trim()}};$t.ExponentialHistogramAccumulation=ti;var ua=class{constructor(r,o){this._maxSize=r,this._recordMinMax=o,this.kind=_g.AggregatorKind.EXPONENTIAL_HISTOGRAM}createAccumulation(r){return new ti(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,u){return{descriptor:r,aggregationTemporality:o,dataPointType:mg.DataPointType.EXPONENTIAL_HISTOGRAM,dataPoints:c.map(([a,t])=>{let e=t.toPointValue(),n=r.type===oa.InstrumentType.UP_DOWN_COUNTER||r.type===oa.InstrumentType.OBSERVABLE_GAUGE||r.type===oa.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:t.startTime,endTime:u,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}}})}}};$t.ExponentialHistogramAggregator=ua});var Kf=d(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.LastValueAggregator=Wt.LastValueAccumulation=void 0;var Tg=jt(),Vr=N(),Sg=qt(),Yt=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,Vr.millisToHrTime)(Date.now())}setStartTime(r){this.startTime=r}toPointValue(){return this._current}};Wt.LastValueAccumulation=Yt;var sa=class{constructor(){this.kind=Tg.AggregatorKind.LAST_VALUE}createAccumulation(r){return new Yt(r)}merge(r,o){let c=(0,Vr.hrTimeToMicroseconds)(o.sampleTime)>=(0,Vr.hrTimeToMicroseconds)(r.sampleTime)?o:r;return new Yt(r.startTime,c.toPointValue(),c.sampleTime)}diff(r,o){let c=(0,Vr.hrTimeToMicroseconds)(o.sampleTime)>=(0,Vr.hrTimeToMicroseconds)(r.sampleTime)?o:r;return new Yt(o.startTime,c.toPointValue(),c.sampleTime)}toMetricData(r,o,c,u){return{descriptor:r,aggregationTemporality:o,dataPointType:Sg.DataPointType.GAUGE,dataPoints:c.map(([a,t])=>({attributes:a,startTime:t.startTime,endTime:u,value:t.toPointValue()}))}}};Wt.LastValueAggregator=sa});var Xf=d(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.SumAggregator=Jt.SumAccumulation=void 0;var bg=jt(),Og=qt(),qe=class{constructor(r,o,c=0,u=!1){this.startTime=r,this.monotonic=o,this._current=c,this.reset=u}record(r){this.monotonic&&r<0||(this._current+=r)}setStartTime(r){this.startTime=r}toPointValue(){return this._current}};Jt.SumAccumulation=qe;var aa=class{constructor(r){this.monotonic=r,this.kind=bg.AggregatorKind.SUM}createAccumulation(r){return new qe(r,this.monotonic)}merge(r,o){let c=r.toPointValue(),u=o.toPointValue();return o.reset?new qe(o.startTime,this.monotonic,u,o.reset):new qe(r.startTime,this.monotonic,c+u)}diff(r,o){let c=r.toPointValue(),u=o.toPointValue();return this.monotonic&&c>u?new qe(o.startTime,this.monotonic,u,!0):new qe(o.startTime,this.monotonic,u-c)}toMetricData(r,o,c,u){return{descriptor:r,aggregationTemporality:o,dataPointType:Og.DataPointType.SUM,dataPoints:c.map(([a,t])=>({attributes:a,startTime:t.startTime,endTime:u,value:t.toPointValue()})),isMonotonic:this.monotonic}}};Jt.SumAggregator=aa});var zf=d(ve=>{"use strict";var Ag=ve&&ve.__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]}),kr=ve&&ve.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Ag(r,i,o)};Object.defineProperty(ve,"__esModule",{value:!0});kr(xf(),ve);kr(wf(),ve);kr(Ff(),ve);kr(Kf(),ve);kr(Xf(),ve)});var ii=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 Pg=(y(),E(m)),_t=zf(),Me=we(),Re=class{static Drop(){return $f}static Sum(){return Yf}static LastValue(){return Wf}static Histogram(){return Jf}static ExponentialHistogram(){return Ng}static Default(){return Rg}};z.Aggregation=Re;var qr=class i extends Re{createAggregator(r){return i.DEFAULT_INSTANCE}};z.DropAggregation=qr;qr.DEFAULT_INSTANCE=new _t.DropAggregator;var Qt=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=Qt;Qt.MONOTONIC_INSTANCE=new _t.SumAggregator(!0);Qt.NON_MONOTONIC_INSTANCE=new _t.SumAggregator(!1);var jr=class i extends Re{createAggregator(r){return i.DEFAULT_INSTANCE}};z.LastValueAggregation=jr;jr.DEFAULT_INSTANCE=new _t.LastValueAggregator;var Gr=class i extends Re{createAggregator(r){return i.DEFAULT_INSTANCE}};z.HistogramAggregation=Gr;Gr.DEFAULT_INSTANCE=new _t.HistogramAggregator([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0);var ri=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),u=r.indexOf(1/0);u===-1&&(u=void 0),this._boundaries=r.slice(c+1,u)}createAggregator(r){return new _t.HistogramAggregator(this._boundaries,this._recordMinMax)}};z.ExplicitBucketHistogramAggregation=ri;var ni=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=ni;var oi=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 Yf;case Me.InstrumentType.OBSERVABLE_GAUGE:return Wf;case Me.InstrumentType.HISTOGRAM:return r.advice.explicitBucketBoundaries?new ri(r.advice.explicitBucketBoundaries):Jf}return Pg.diag.warn(`Unable to recognize instrument type: ${r.type}`),$f}createAggregator(r){return this._resolve(r).createAggregator(r)}};z.DefaultAggregation=oi;var $f=new qr,Yf=new Qt,Wf=new jr,Jf=new Gr,Ng=new ni,Rg=new oi});var ca=d(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=Zt.DEFAULT_AGGREGATION_SELECTOR=void 0;var xg=ii(),Ig=Ko(),Lg=i=>xg.Aggregation.Default();Zt.DEFAULT_AGGREGATION_SELECTOR=Lg;var wg=i=>Ig.AggregationTemporality.CUMULATIVE;Zt.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=wg});var pa=d(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.MetricReader=void 0;var Qf=(y(),E(m)),ui=Ne(),Zf=ca(),la=class{constructor(r){var o,c,u;this._shutdown=!1,this._aggregationSelector=(o=r?.aggregationSelector)!==null&&o!==void 0?o:Zf.DEFAULT_AGGREGATION_SELECTOR,this._aggregationTemporalitySelector=(c=r?.aggregationTemporalitySelector)!==null&&c!==void 0?c:Zf.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR,this._metricProducers=(u=r?.metricProducers)!==null&&u!==void 0?u:[]}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}))]),u=o.errors.concat((0,ui.FlatMap)(c,e=>e.errors)),a=o.resourceMetrics.resource,t=o.resourceMetrics.scopeMetrics.concat((0,ui.FlatMap)(c,e=>e.resourceMetrics.scopeMetrics));return{resourceMetrics:{resource:a,scopeMetrics:t},errors:u}}async shutdown(r){if(this._shutdown){Qf.diag.error("Cannot call shutdown twice.");return}r?.timeoutMillis==null?await this.onShutdown():await(0,ui.callWithTimeout)(this.onShutdown(),r.timeoutMillis),this._shutdown=!0}async forceFlush(r){if(this._shutdown){Qf.diag.warn("Cannot forceFlush on already shutdown MetricReader.");return}if(r?.timeoutMillis==null){await this.onForceFlush();return}await(0,ui.callWithTimeout)(this.onForceFlush(),r.timeoutMillis)}};si.MetricReader=la});var rd=d(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.PeriodicExportingMetricReader=void 0;var ed=(y(),E(m)),ai=N(),Mg=pa(),td=Ne(),Cg=(y(),E(m)),fa=class extends Mg.MetricReader{constructor(r){var o,c,u,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=(u=r.exportIntervalMillis)!==null&&u!==void 0?u:6e4,this._exportTimeout=(a=r.exportTimeoutMillis)!==null&&a!==void 0?a:3e4,this._exporter=r.exporter}async _runOnce(){try{await(0,td.callWithTimeout)(this._doRun(),this._exportTimeout)}catch(r){if(r instanceof td.TimeoutError){ed.diag.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout);return}(0,ai.globalErrorHandler)(r)}}async _doRun(){var r,o;let{resourceMetrics:c,errors:u}=await this.collect({timeoutMillis:this._exportTimeout});u.length>0&&ed.diag.error("PeriodicExportingMetricReader: metrics collection errors",...u);let a=async()=>{let t=await ai.internal._export(this._exporter,c);if(t.code!==ai.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=>Cg.diag.debug("Error while resolving async portion of resource: ",t)):await a()}onInitialized(){this._interval=setInterval(()=>{this._runOnce()},this._exportInterval),(0,ai.unrefTimer)(this._interval)}async onForceFlush(){await this._runOnce(),await this._exporter.forceFlush()}async onShutdown(){this._interval&&clearInterval(this._interval),await this._exporter.shutdown()}};ci.PeriodicExportingMetricReader=fa});var od=d(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.InMemoryMetricExporter=void 0;var nd=N(),da=class{constructor(r){this._shutdown=!1,this._metrics=[],this._aggregationTemporality=r}export(r,o){if(this._shutdown){setTimeout(()=>o({code:nd.ExportResultCode.FAILED}),0);return}this._metrics.push(r),setTimeout(()=>o({code:nd.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()}};li.InMemoryMetricExporter=da});var ud=d(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.ConsoleMetricExporter=void 0;var id=N(),Ug=ca(),ha=class i{constructor(r){var o;this._shutdown=!1,this._temporalitySelector=(o=r?.temporalitySelector)!==null&&o!==void 0?o:Ug.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR}export(r,o){if(this._shutdown){setImmediate(o,{code:id.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 u of c.metrics)console.dir({descriptor:u.descriptor,dataPointType:u.dataPointType,dataPoints:u.dataPoints});o({code:id.ExportResultCode.SUCCESS})}};pi.ConsoleMetricExporter=ha});var sd=d(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.ViewRegistry=void 0;var _a=class{constructor(){this._registeredViews=[]}addView(r){this._registeredViews.push(r)}findViews(r,o){return this._registeredViews.filter(u=>this._matchInstrument(u.instrumentSelector,r)&&this._matchMeter(u.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))}};fi.ViewRegistry=_a});var di=d(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.isObservableInstrument=F.ObservableUpDownCounterInstrument=F.ObservableGaugeInstrument=F.ObservableCounterInstrument=F.ObservableInstrument=F.HistogramInstrument=F.CounterInstrument=F.UpDownCounterInstrument=F.SyncInstrument=void 0;var er=(y(),E(m)),Dg=N(),tr=class{constructor(r,o){this._writableMetricStorage=r,this._descriptor=o}_record(r,o={},c=er.context.active()){if(typeof r!="number"){er.diag.warn(`non-number value provided to metric ${this._descriptor.name}: ${r}`);return}this._descriptor.valueType===er.ValueType.INT&&!Number.isInteger(r)&&(er.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,Dg.millisToHrTime)(Date.now()))}};F.SyncInstrument=tr;var ma=class extends tr{add(r,o,c){this._record(r,o,c)}};F.UpDownCounterInstrument=ma;var ya=class extends tr{add(r,o,c){if(r<0){er.diag.warn(`negative value provided to counter ${this._descriptor.name}: ${r}`);return}this._record(r,o,c)}};F.CounterInstrument=ya;var Ea=class extends tr{record(r,o,c){if(r<0){er.diag.warn(`negative value provided to histogram ${this._descriptor.name}: ${r}`);return}this._record(r,o,c)}};F.HistogramInstrument=Ea;var mt=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)}};F.ObservableInstrument=mt;var va=class extends mt{};F.ObservableCounterInstrument=va;var ga=class extends mt{};F.ObservableGaugeInstrument=ga;var Ta=class extends mt{};F.ObservableUpDownCounterInstrument=Ta;function Bg(i){return i instanceof mt}F.isObservableInstrument=Bg});var ad=d(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.Meter=void 0;var de=we(),rr=di(),Sa=class{constructor(r){this._meterSharedState=r}createHistogram(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.HISTOGRAM,o),u=this._meterSharedState.registerMetricStorage(c);return new rr.HistogramInstrument(u,c)}createCounter(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.COUNTER,o),u=this._meterSharedState.registerMetricStorage(c);return new rr.CounterInstrument(u,c)}createUpDownCounter(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.UP_DOWN_COUNTER,o),u=this._meterSharedState.registerMetricStorage(c);return new rr.UpDownCounterInstrument(u,c)}createObservableGauge(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.OBSERVABLE_GAUGE,o),u=this._meterSharedState.registerAsyncMetricStorage(c);return new rr.ObservableGaugeInstrument(c,u,this._meterSharedState.observableRegistry)}createObservableCounter(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.OBSERVABLE_COUNTER,o),u=this._meterSharedState.registerAsyncMetricStorage(c);return new rr.ObservableCounterInstrument(c,u,this._meterSharedState.observableRegistry)}createObservableUpDownCounter(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER,o),u=this._meterSharedState.registerAsyncMetricStorage(c);return new rr.ObservableUpDownCounterInstrument(c,u,this._meterSharedState.observableRegistry)}addBatchObservableCallback(r,o){this._meterSharedState.observableRegistry.addBatchCallback(r,o)}removeBatchObservableCallback(r,o){this._meterSharedState.observableRegistry.removeBatchCallback(r,o)}};hi.Meter=Sa});var Oa=d(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.MetricStorage=void 0;var Vg=we(),ba=class{constructor(r){this._instrumentDescriptor=r}getInstrumentDescriptor(){return this._instrumentDescriptor}updateDescription(r){this._instrumentDescriptor=(0,Vg.createInstrumentDescriptor)(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:r,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})}};_i.MetricStorage=ba});var Hr=d(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.AttributeHashMap=nr.HashMap=void 0;var kg=Ne(),mi=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 u=o();return this._keyMap.has(c)||this._keyMap.set(c,r),this._valueMap.set(c,u),u}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}};nr.HashMap=mi;var Aa=class extends mi{constructor(){super(kg.hashAttributes)}};nr.AttributeHashMap=Aa});var Ra=d(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.DeltaMetricProcessor=void 0;var Pa=Hr(),Na=class{constructor(r){this._aggregator=r,this._activeCollectionStorage=new Pa.AttributeHashMap,this._cumulativeMemoStorage=new Pa.AttributeHashMap}record(r,o,c,u){let a=this._activeCollectionStorage.getOrDefault(o,()=>this._aggregator.createAccumulation(u));a?.record(r)}batchCumulate(r,o){Array.from(r.entries()).forEach(([c,u,a])=>{let t=this._aggregator.createAccumulation(o);t?.record(u);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 Pa.AttributeHashMap,r}};yi.DeltaMetricProcessor=Na});var Ia=d(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.TemporalMetricProcessor=void 0;var qg=Ko(),jg=Hr(),xa=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,u){this._stashAccumulations(c);let a=this._getMergedUnreportedAccumulations(r),t=a,e;if(this._reportHistory.has(r)){let s=this._reportHistory.get(r),l=s.collectionTime;e=s.aggregationTemporality,e===qg.AggregationTemporality.CUMULATIVE?t=i.merge(s.accumulations,a,this._aggregator):t=i.calibrateStartTime(s.accumulations,a,l)}else e=r.selectAggregationTemporality(o.type);this._reportHistory.set(r,{accumulations:t,collectionTime:u,aggregationTemporality:e});let n=Gg(t);if(n.length!==0)return this._aggregator.toMetricData(o,e,n,u)}_stashAccumulations(r){let o=this._unreportedAccumulations.keys();for(let c of o){let u=this._unreportedAccumulations.get(c);u===void 0&&(u=[],this._unreportedAccumulations.set(c,u)),u.push(r)}}_getMergedUnreportedAccumulations(r){let o=new jg.AttributeHashMap,c=this._unreportedAccumulations.get(r);if(this._unreportedAccumulations.set(r,[]),c===void 0)return o;for(let u of c)o=i.merge(o,u,this._aggregator);return o}static merge(r,o,c){let u=r,a=o.entries(),t=a.next();for(;t.done!==!0;){let[e,n,s]=t.value;if(r.has(e,s)){let l=r.get(e,s),h=c.merge(l,n);u.set(e,h,s)}else u.set(e,n,s);t=a.next()}return u}static calibrateStartTime(r,o,c){for(let[u,a]of r.keys()){let t=o.get(u,a);t?.setStartTime(c)}return o}};Ei.TemporalMetricProcessor=xa;function Gg(i){return Array.from(i.entries())}});var cd=d(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.AsyncMetricStorage=void 0;var Hg=Oa(),Fg=Ra(),Kg=Ia(),Xg=Hr(),La=class extends Hg.MetricStorage{constructor(r,o,c,u){super(r),this._attributesProcessor=c,this._deltaMetricStorage=new Fg.DeltaMetricProcessor(o),this._temporalMetricStorage=new Kg.TemporalMetricProcessor(o,u)}record(r,o){let c=new Xg.AttributeHashMap;Array.from(r.entries()).forEach(([u,a])=>{c.set(this._attributesProcessor.process(u),a)}),this._deltaMetricStorage.batchCumulate(c,o)}collect(r,o){let c=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,c,o)}};vi.AsyncMetricStorage=La});var hd=d(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.getConflictResolutionRecipe=ie.getDescriptionResolutionRecipe=ie.getTypeConflictResolutionRecipe=ie.getUnitConflictResolutionRecipe=ie.getValueTypeConflictResolutionRecipe=ie.getIncompatibilityDetails=void 0;function zg(i,r){let o="";return i.unit!==r.unit&&(o+=` - Unit '${i.unit}' does not match '${r.unit}'
7
+ var w_=Object.create;var uu=Object.defineProperty;var M_=Object.getOwnPropertyDescriptor;var C_=Object.getOwnPropertyNames;var U_=Object.getPrototypeOf,D_=Object.prototype.hasOwnProperty;var K=(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 Bc=(i,r)=>()=>(i&&(r=i(i=0)),r);var d=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports);var sn=(i,r,o,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let u of C_(r))!D_.call(i,u)&&u!==o&&uu(i,u,{get:()=>r[u],enumerable:!(c=M_(r,u))||c.enumerable});return i},St=(i,r,o)=>(sn(i,r,"default"),o&&sn(o,r,"default")),J=(i,r,o)=>(o=i!=null?w_(U_(i)):{},sn(r||!i||!i.__esModule?uu(o,"default",{value:i,enumerable:!0}):o,i)),E=i=>sn(uu({},"__esModule",{value:!0}),i);var m={};import*as fb from"@opentelemetry/api";var y=Bc(()=>{St(m,fb)});var Sr=d(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.isTracingSuppressed=Ue.unsuppressTracing=Ue.suppressTracing=void 0;var B_=(y(),E(m)),su=(0,B_.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function V_(i){return i.setValue(su,!0)}Ue.suppressTracing=V_;function k_(i){return i.deleteValue(su)}Ue.unsuppressTracing=k_;function q_(i){return i.getValue(su)===!0}Ue.isTracingSuppressed=q_});var au=d(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.BAGGAGE_MAX_TOTAL_LENGTH=Q.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=Q.BAGGAGE_MAX_NAME_VALUE_PAIRS=Q.BAGGAGE_HEADER=Q.BAGGAGE_ITEMS_SEPARATOR=Q.BAGGAGE_PROPERTIES_SEPARATOR=Q.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;Q.BAGGAGE_KEY_PAIR_SEPARATOR="=";Q.BAGGAGE_PROPERTIES_SEPARATOR=";";Q.BAGGAGE_ITEMS_SEPARATOR=",";Q.BAGGAGE_HEADER="baggage";Q.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;Q.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;Q.BAGGAGE_MAX_TOTAL_LENGTH=8192});var cu=d(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.parseKeyPairsIntoRecord=Ae.parsePairKeyValue=Ae.getKeyPairs=Ae.serializeKeyPairs=void 0;var j_=(y(),E(m)),Je=au();function G_(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},"")}Ae.serializeKeyPairs=G_;function H_(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})}Ae.getKeyPairs=H_;function Vc(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 u=decodeURIComponent(o.substring(0,c).trim()),a=decodeURIComponent(o.substring(c+1).trim()),t;return r.length>0&&(t=(0,j_.baggageEntryMetadataFromString)(r.join(Je.BAGGAGE_PROPERTIES_SEPARATOR))),{key:u,value:a,metadata:t}}Ae.parsePairKeyValue=Vc;function F_(i){return typeof i!="string"||i.length===0?{}:i.split(Je.BAGGAGE_ITEMS_SEPARATOR).map(r=>Vc(r)).filter(r=>r!==void 0&&r.value.length>0).reduce((r,o)=>(r[o.key]=o.value,r),{})}Ae.parseKeyPairsIntoRecord=F_});var kc=d(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.W3CBaggagePropagator=void 0;var lu=(y(),E(m)),K_=Sr(),Qe=au(),pu=cu(),fu=class{inject(r,o,c){let u=lu.propagation.getBaggage(r);if(!u||(0,K_.isTracingSuppressed)(r))return;let a=(0,pu.getKeyPairs)(u).filter(e=>e.length<=Qe.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,Qe.BAGGAGE_MAX_NAME_VALUE_PAIRS),t=(0,pu.serializeKeyPairs)(a);t.length>0&&c.set(o,Qe.BAGGAGE_HEADER,t)}extract(r,o,c){let u=c.get(o,Qe.BAGGAGE_HEADER),a=Array.isArray(u)?u.join(Qe.BAGGAGE_ITEMS_SEPARATOR):u;if(!a)return r;let t={};return a.length===0||(a.split(Qe.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let s=(0,pu.parsePairKeyValue)(n);if(s){let l={value:s.value};s.metadata&&(l.metadata=s.metadata),t[s.key]=l}}),Object.entries(t).length===0)?r:lu.propagation.setBaggage(r,lu.propagation.createBaggage(t))}fields(){return[Qe.BAGGAGE_HEADER]}};an.W3CBaggagePropagator=fu});var qc=d(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.AnchoredClock=void 0;var du=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}};cn.AnchoredClock=du});var Kc=d(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.isAttributeValue=De.isAttributeKey=De.sanitizeAttributes=void 0;var jc=(y(),E(m));function X_(i){let r={};if(typeof i!="object"||i==null)return r;for(let[o,c]of Object.entries(i)){if(!Gc(o)){jc.diag.warn(`Invalid attribute key: ${o}`);continue}if(!Hc(c)){jc.diag.warn(`Invalid attribute value set for key: ${o}`);continue}Array.isArray(c)?r[o]=c.slice():r[o]=c}return r}De.sanitizeAttributes=X_;function Gc(i){return typeof i=="string"&&i.length>0}De.isAttributeKey=Gc;function Hc(i){return i==null?!0:Array.isArray(i)?z_(i):Fc(i)}De.isAttributeValue=Hc;function z_(i){let r;for(let o of i)if(o!=null){if(!r){if(Fc(o)){r=typeof o;continue}return!1}if(typeof o!==r)return!1}return!0}function Fc(i){switch(typeof i){case"number":case"boolean":case"string":return!0}return!1}});var hu=d(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.loggingErrorHandler=void 0;var $_=(y(),E(m));function Y_(){return i=>{$_.diag.error(W_(i))}}ln.loggingErrorHandler=Y_;function W_(i){return typeof i=="string"?i:JSON.stringify(J_(i))}function J_(i){let r={},o=i;for(;o!==null;)Object.getOwnPropertyNames(o).forEach(c=>{if(r[c])return;let u=o[c];u&&(r[c]=String(u))}),o=Object.getPrototypeOf(o);return r}});var _u=d(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.globalErrorHandler=bt.setGlobalErrorHandler=void 0;var Q_=hu(),Xc=(0,Q_.loggingErrorHandler)();function Z_(i){Xc=i}bt.setGlobalErrorHandler=Z_;function em(i){try{Xc(i)}catch{}}bt.globalErrorHandler=em});var mu=d(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.TracesSamplerValues=void 0;var tm;(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"})(tm=br.TracesSamplerValues||(br.TracesSamplerValues={}))});var zc=d(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn._globalThis=void 0;pn._globalThis=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});var fn=d(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.getEnvWithoutDefaults=U.parseEnvironment=U.DEFAULT_ENVIRONMENT=U.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=U.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=U.DEFAULT_ATTRIBUTE_COUNT_LIMIT=U.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=void 0;var Be=(y(),E(m)),rm=mu(),nm=zc(),om=",",im=["OTEL_SDK_DISABLED"];function um(i){return im.indexOf(i)>-1}var sm=["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 am(i){return sm.indexOf(i)>-1}var cm=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function lm(i){return cm.indexOf(i)>-1}U.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=1/0;U.DEFAULT_ATTRIBUTE_COUNT_LIMIT=128;U.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=128;U.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=128;U.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:Be.DiagLogLevel.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:U.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_ATTRIBUTE_COUNT_LIMIT:U.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:U.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:U.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:U.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:U.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:U.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:U.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:rm.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 pm(i,r,o){if(typeof o[i]>"u")return;let c=String(o[i]);r[i]=c.toLowerCase()==="true"}function fm(i,r,o,c=-1/0,u=1/0){if(typeof o[i]<"u"){let a=Number(o[i]);isNaN(a)||(a<c?r[i]=c:a>u?r[i]=u:r[i]=a)}}function dm(i,r,o,c=om){let u=o[i];typeof u=="string"&&(r[i]=u.split(c).map(a=>a.trim()))}var hm={ALL:Be.DiagLogLevel.ALL,VERBOSE:Be.DiagLogLevel.VERBOSE,DEBUG:Be.DiagLogLevel.DEBUG,INFO:Be.DiagLogLevel.INFO,WARN:Be.DiagLogLevel.WARN,ERROR:Be.DiagLogLevel.ERROR,NONE:Be.DiagLogLevel.NONE};function _m(i,r,o){let c=o[i];if(typeof c=="string"){let u=hm[c.toUpperCase()];u!=null&&(r[i]=u)}}function yu(i){let r={};for(let o in U.DEFAULT_ENVIRONMENT){let c=o;switch(c){case"OTEL_LOG_LEVEL":_m(c,r,i);break;default:if(um(c))pm(c,r,i);else if(am(c))fm(c,r,i);else if(lm(c))dm(c,r,i);else{let u=i[c];typeof u<"u"&&u!==null&&(r[c]=String(u))}}}return r}U.parseEnvironment=yu;function mm(){return typeof process<"u"&&process&&process.env?yu(process.env):yu(nm._globalThis)}U.getEnvWithoutDefaults=mm});var Yc=d(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.getEnv=void 0;var ym=K("os"),$c=fn();function Em(){let i=(0,$c.parseEnvironment)(process.env);return Object.assign({HOSTNAME:ym.hostname()},$c.DEFAULT_ENVIRONMENT,i)}dn.getEnv=Em});var Wc=d(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn._globalThis=void 0;hn._globalThis=typeof globalThis=="object"?globalThis:global});var Qc=d(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.hexToBase64=void 0;function Jc(i){return i>=48&&i<=57?i-48:i>=97&&i<=102?i-87:i-55}var vm=Buffer.alloc(8),gm=Buffer.alloc(16);function Tm(i){let r;i.length===16?r=vm:i.length===32?r=gm:r=Buffer.alloc(i.length/2);let o=0;for(let c=0;c<i.length;c+=2){let u=Jc(i.charCodeAt(c)),a=Jc(i.charCodeAt(c+1));r.writeUInt8(u<<4|a,o++)}return r.toString("base64")}_n.hexToBase64=Tm});var tl=d(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.RandomIdGenerator=void 0;var Sm=8,el=16,Eu=class{constructor(){this.generateTraceId=Zc(el),this.generateSpanId=Zc(Sm)}};yn.RandomIdGenerator=Eu;var mn=Buffer.allocUnsafe(el);function Zc(i){return function(){for(let o=0;o<i/4;o++)mn.writeUInt32BE(Math.random()*2**32>>>0,o*4);for(let o=0;o<i&&!(mn[o]>0);o++)o===i-1&&(mn[i-1]=1);return mn.toString("hex",0,i)}}});var rl=d(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.otperformance=void 0;var bm=K("perf_hooks");En.otperformance=bm.performance});var vu=d(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.VERSION=void 0;vn.VERSION="1.19.0"});var nl=d(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.MessageTypeValues=w.RpcGrpcStatusCodeValues=w.MessagingOperationValues=w.MessagingDestinationKindValues=w.HttpFlavorValues=w.NetHostConnectionSubtypeValues=w.NetHostConnectionTypeValues=w.NetTransportValues=w.FaasInvokedProviderValues=w.FaasDocumentOperationValues=w.FaasTriggerValues=w.DbCassandraConsistencyLevelValues=w.DbSystemValues=w.SemanticAttributes=void 0;w.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"};w.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"};w.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"};w.FaasTriggerValues={DATASOURCE:"datasource",HTTP:"http",PUBSUB:"pubsub",TIMER:"timer",OTHER:"other"};w.FaasDocumentOperationValues={INSERT:"insert",EDIT:"edit",DELETE:"delete"};w.FaasInvokedProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};w.NetTransportValues={IP_TCP:"ip_tcp",IP_UDP:"ip_udp",IP:"ip",UNIX:"unix",PIPE:"pipe",INPROC:"inproc",OTHER:"other"};w.NetHostConnectionTypeValues={WIFI:"wifi",WIRED:"wired",CELL:"cell",UNAVAILABLE:"unavailable",UNKNOWN:"unknown"};w.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"};w.HttpFlavorValues={HTTP_1_0:"1.0",HTTP_1_1:"1.1",HTTP_2_0:"2.0",SPDY:"SPDY",QUIC:"QUIC"};w.MessagingDestinationKindValues={QUEUE:"queue",TOPIC:"topic"};w.MessagingOperationValues={RECEIVE:"receive",PROCESS:"process"};w.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};w.MessageTypeValues={SENT:"SENT",RECEIVED:"RECEIVED"}});var ol=d(Ze=>{"use strict";var Om=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]}),Am=Ze&&Ze.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Om(r,i,o)};Object.defineProperty(Ze,"__esModule",{value:!0});Am(nl(),Ze)});var il=d(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.TelemetrySdkLanguageValues=Z.OsTypeValues=Z.HostArchValues=Z.AwsEcsLaunchtypeValues=Z.CloudPlatformValues=Z.CloudProviderValues=Z.SemanticResourceAttributes=void 0;Z.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"};Z.CloudProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};Z.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"};Z.AwsEcsLaunchtypeValues={EC2:"ec2",FARGATE:"fargate"};Z.HostArchValues={AMD64:"amd64",ARM32:"arm32",ARM64:"arm64",IA64:"ia64",PPC32:"ppc32",PPC64:"ppc64",X86:"x86"};Z.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"};Z.TelemetrySdkLanguageValues={CPP:"cpp",DOTNET:"dotnet",ERLANG:"erlang",GO:"go",JAVA:"java",NODEJS:"nodejs",PHP:"php",PYTHON:"python",RUBY:"ruby",WEBJS:"webjs"}});var ul=d(et=>{"use strict";var Pm=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]}),Nm=et&&et.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Pm(r,i,o)};Object.defineProperty(et,"__esModule",{value:!0});Nm(il(),et)});var fe=d(Ve=>{"use strict";var Rm=Ve&&Ve.__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]}),sl=Ve&&Ve.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Rm(r,i,o)};Object.defineProperty(Ve,"__esModule",{value:!0});sl(ol(),Ve);sl(ul(),Ve)});var al=d(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.SDK_INFO=void 0;var xm=vu(),Or=fe();gn.SDK_INFO={[Or.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:"opentelemetry",[Or.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"node",[Or.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:Or.TelemetrySdkLanguageValues.NODEJS,[Or.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:xm.VERSION}});var cl=d(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.unrefTimer=void 0;function Im(i){i.unref()}Tn.unrefTimer=Im});var ll=d(ae=>{"use strict";var Lm=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)&&Lm(r,i,o)};Object.defineProperty(ae,"__esModule",{value:!0});tt(Yc(),ae);tt(Wc(),ae);tt(Qc(),ae);tt(tl(),ae);tt(rl(),ae);tt(al(),ae);tt(cl(),ae)});var gu=d(rt=>{"use strict";var wm=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]}),Mm=rt&&rt.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&wm(r,i,o)};Object.defineProperty(rt,"__esModule",{value:!0});Mm(ll(),rt)});var hl=d(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.addHrTimes=C.isTimeInput=C.isTimeInputHrTime=C.hrTimeToMicroseconds=C.hrTimeToMilliseconds=C.hrTimeToNanoseconds=C.hrTimeToTimeStamp=C.hrTimeDuration=C.timeInputToHrTime=C.hrTime=C.getTimeOrigin=C.millisToHrTime=void 0;var Tu=gu(),pl=9,Cm=6,Um=Math.pow(10,Cm),Sn=Math.pow(10,pl);function Ar(i){let r=i/1e3,o=Math.trunc(r),c=Math.round(i%1e3*Um);return[o,c]}C.millisToHrTime=Ar;function Su(){let i=Tu.otperformance.timeOrigin;if(typeof i!="number"){let r=Tu.otperformance;i=r.timing&&r.timing.fetchStart}return i}C.getTimeOrigin=Su;function fl(i){let r=Ar(Su()),o=Ar(typeof i=="number"?i:Tu.otperformance.now());return dl(r,o)}C.hrTime=fl;function Dm(i){if(bu(i))return i;if(typeof i=="number")return i<Su()?fl(i):Ar(i);if(i instanceof Date)return Ar(i.getTime());throw TypeError("Invalid input type")}C.timeInputToHrTime=Dm;function Bm(i,r){let o=r[0]-i[0],c=r[1]-i[1];return c<0&&(o-=1,c+=Sn),[o,c]}C.hrTimeDuration=Bm;function Vm(i){let r=pl,o=`${"0".repeat(r)}${i[1]}Z`,c=o.substr(o.length-r-1);return new Date(i[0]*1e3).toISOString().replace("000Z",c)}C.hrTimeToTimeStamp=Vm;function km(i){return i[0]*Sn+i[1]}C.hrTimeToNanoseconds=km;function qm(i){return i[0]*1e3+i[1]/1e6}C.hrTimeToMilliseconds=qm;function jm(i){return i[0]*1e6+i[1]/1e3}C.hrTimeToMicroseconds=jm;function bu(i){return Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"}C.isTimeInputHrTime=bu;function Gm(i){return bu(i)||typeof i=="number"||i instanceof Date}C.isTimeInput=Gm;function dl(i,r){let o=[i[0]+r[0],i[1]+r[1]];return o[1]>=Sn&&(o[1]-=Sn,o[0]+=1),o}C.addHrTimes=dl});var ml=d(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0})});var yl=d(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.ExportResultCode=void 0;var Hm;(function(i){i[i.SUCCESS=0]="SUCCESS",i[i.FAILED=1]="FAILED"})(Hm=Pr.ExportResultCode||(Pr.ExportResultCode={}))});var vl=d(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.CompositePropagator=void 0;var El=(y(),E(m)),Ou=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,u)=>c.concat(u),[])))}inject(r,o,c){for(let u of this._propagators)try{u.inject(r,o,c)}catch(a){El.diag.warn(`Failed to inject with ${u.constructor.name}. Err: ${a.message}`)}}extract(r,o,c){return this._propagators.reduce((u,a)=>{try{return a.extract(u,o,c)}catch(t){El.diag.warn(`Failed to inject with ${a.constructor.name}. Err: ${t.message}`)}return u},r)}fields(){return this._fields.slice()}};bn.CompositePropagator=Ou});var gl=d(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.validateValue=Ot.validateKey=void 0;var Au="[_0-9a-z-*/]",Fm=`[a-z]${Au}{0,255}`,Km=`[a-z0-9]${Au}{0,240}@[a-z]${Au}{0,13}`,Xm=new RegExp(`^(?:${Fm}|${Km})$`),zm=/^[ -~]{0,255}[!-~]$/,$m=/,|=/;function Ym(i){return Xm.test(i)}Ot.validateKey=Ym;function Wm(i){return zm.test(i)&&!$m.test(i)}Ot.validateValue=Wm});var Nu=d(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.TraceState=void 0;var Tl=gl(),Sl=32,Jm=512,bl=",",Ol="=",Pu=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+Ol+this.get(o)),r),[]).join(bl)}_parse(r){r.length>Jm||(this._internalState=r.split(bl).reverse().reduce((o,c)=>{let u=c.trim(),a=u.indexOf(Ol);if(a!==-1){let t=u.slice(0,a),e=u.slice(a+1,c.length);(0,Tl.validateKey)(t)&&(0,Tl.validateValue)(e)&&o.set(t,e)}return o},new Map),this._internalState.size>Sl&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Sl))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let r=new i;return r._internalState=new Map(this._internalState),r}};On.TraceState=Pu});var Pl=d(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.W3CTraceContextPropagator=ee.parseTraceParent=ee.TRACE_STATE_HEADER=ee.TRACE_PARENT_HEADER=void 0;var An=(y(),E(m)),Qm=Sr(),Zm=Nu();ee.TRACE_PARENT_HEADER="traceparent";ee.TRACE_STATE_HEADER="tracestate";var ey="00",ty="(?!ff)[\\da-f]{2}",ry="(?![0]{32})[\\da-f]{32}",ny="(?![0]{16})[\\da-f]{16}",oy="[\\da-f]{2}",iy=new RegExp(`^\\s?(${ty})-(${ry})-(${ny})-(${oy})(-.*)?\\s?$`);function Al(i){let r=iy.exec(i);return!r||r[1]==="00"&&r[5]?null:{traceId:r[2],spanId:r[3],traceFlags:parseInt(r[4],16)}}ee.parseTraceParent=Al;var Ru=class{inject(r,o,c){let u=An.trace.getSpanContext(r);if(!u||(0,Qm.isTracingSuppressed)(r)||!(0,An.isSpanContextValid)(u))return;let a=`${ey}-${u.traceId}-${u.spanId}-0${Number(u.traceFlags||An.TraceFlags.NONE).toString(16)}`;c.set(o,ee.TRACE_PARENT_HEADER,a),u.traceState&&c.set(o,ee.TRACE_STATE_HEADER,u.traceState.serialize())}extract(r,o,c){let u=c.get(o,ee.TRACE_PARENT_HEADER);if(!u)return r;let a=Array.isArray(u)?u[0]:u;if(typeof a!="string")return r;let t=Al(a);if(!t)return r;t.isRemote=!0;let e=c.get(o,ee.TRACE_STATE_HEADER);if(e){let n=Array.isArray(e)?e.join(","):e;t.traceState=new Zm.TraceState(typeof n=="string"?n:void 0)}return An.trace.setSpanContext(r,t)}fields(){return[ee.TRACE_PARENT_HEADER,ee.TRACE_STATE_HEADER]}};ee.W3CTraceContextPropagator=Ru});var Rl=d(Nl=>{"use strict";Object.defineProperty(Nl,"__esModule",{value:!0})});var xl=d(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.getRPCMetadata=Ee.deleteRPCMetadata=Ee.setRPCMetadata=Ee.RPCType=void 0;var uy=(y(),E(m)),xu=(0,uy.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),sy;(function(i){i.HTTP="http"})(sy=Ee.RPCType||(Ee.RPCType={}));function ay(i,r){return i.setValue(xu,r)}Ee.setRPCMetadata=ay;function cy(i){return i.deleteValue(xu)}Ee.deleteRPCMetadata=cy;function ly(i){return i.getValue(xu)}Ee.getRPCMetadata=ly});var Lu=d(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.AlwaysOffSampler=void 0;var py=(y(),E(m)),Iu=class{shouldSample(){return{decision:py.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Pn.AlwaysOffSampler=Iu});var Mu=d(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.AlwaysOnSampler=void 0;var fy=(y(),E(m)),wu=class{shouldSample(){return{decision:fy.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};Nn.AlwaysOnSampler=wu});var Ll=d(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.ParentBasedSampler=void 0;var Rn=(y(),E(m)),dy=_u(),Il=Lu(),Cu=Mu(),Uu=class{constructor(r){var o,c,u,a;this._root=r.root,this._root||((0,dy.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Cu.AlwaysOnSampler),this._remoteParentSampled=(o=r.remoteParentSampled)!==null&&o!==void 0?o:new Cu.AlwaysOnSampler,this._remoteParentNotSampled=(c=r.remoteParentNotSampled)!==null&&c!==void 0?c:new Il.AlwaysOffSampler,this._localParentSampled=(u=r.localParentSampled)!==null&&u!==void 0?u:new Cu.AlwaysOnSampler,this._localParentNotSampled=(a=r.localParentNotSampled)!==null&&a!==void 0?a:new Il.AlwaysOffSampler}shouldSample(r,o,c,u,a,t){let e=Rn.trace.getSpanContext(r);return!e||!(0,Rn.isSpanContextValid)(e)?this._root.shouldSample(r,o,c,u,a,t):e.isRemote?e.traceFlags&Rn.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(r,o,c,u,a,t):this._remoteParentNotSampled.shouldSample(r,o,c,u,a,t):e.traceFlags&Rn.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(r,o,c,u,a,t):this._localParentNotSampled.shouldSample(r,o,c,u,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()}}`}};xn.ParentBasedSampler=Uu});var wl=d(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.TraceIdRatioBasedSampler=void 0;var Du=(y(),E(m)),Bu=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,Du.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?Du.SamplingDecision.RECORD_AND_SAMPLED:Du.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 u=c*8,a=parseInt(r.slice(u,u+8),16);o=(o^a)>>>0}return o}};In.TraceIdRatioBasedSampler=Bu});var Bl=d(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.isPlainObject=void 0;var hy="[object Object]",_y="[object Null]",my="[object Undefined]",yy=Function.prototype,Ml=yy.toString,Ey=Ml.call(Object),vy=gy(Object.getPrototypeOf,Object),Cl=Object.prototype,Ul=Cl.hasOwnProperty,nt=Symbol?Symbol.toStringTag:void 0,Dl=Cl.toString;function gy(i,r){return function(o){return i(r(o))}}function Ty(i){if(!Sy(i)||by(i)!==hy)return!1;let r=vy(i);if(r===null)return!0;let o=Ul.call(r,"constructor")&&r.constructor;return typeof o=="function"&&o instanceof o&&Ml.call(o)===Ey}Ln.isPlainObject=Ty;function Sy(i){return i!=null&&typeof i=="object"}function by(i){return i==null?i===void 0?my:_y:nt&&nt in Object(i)?Oy(i):Ay(i)}function Oy(i){let r=Ul.call(i,nt),o=i[nt],c=!1;try{i[nt]=void 0,c=!0}catch{}let u=Dl.call(i);return c&&(r?i[nt]=o:delete i[nt]),u}function Ay(i){return Dl.call(i)}});var Gl=d(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.merge=void 0;var Vl=Bl(),Py=20;function Ny(...i){let r=i.shift(),o=new WeakMap;for(;i.length>0;)r=ql(r,i.shift(),0,o);return r}Cn.merge=Ny;function Vu(i){return Mn(i)?i.slice():i}function ql(i,r,o=0,c){let u;if(!(o>Py)){if(o++,wn(i)||wn(r)||jl(r))u=Vu(r);else if(Mn(i)){if(u=i.slice(),Mn(r))for(let a=0,t=r.length;a<t;a++)u.push(Vu(r[a]));else if(Nr(r)){let a=Object.keys(r);for(let t=0,e=a.length;t<e;t++){let n=a[t];u[n]=Vu(r[n])}}}else if(Nr(i))if(Nr(r)){if(!Ry(i,r))return r;u=Object.assign({},i);let a=Object.keys(r);for(let t=0,e=a.length;t<e;t++){let n=a[t],s=r[n];if(wn(s))typeof s>"u"?delete u[n]:u[n]=s;else{let l=u[n],h=s;if(kl(i,n,c)||kl(r,n,c))delete u[n];else{if(Nr(l)&&Nr(h)){let T=c.get(l)||[],R=c.get(h)||[];T.push({obj:i,key:n}),R.push({obj:r,key:n}),c.set(l,T),c.set(h,R)}u[n]=ql(u[n],s,o,c)}}}}else u=r;return u}}function kl(i,r,o){let c=o.get(i[r])||[];for(let u=0,a=c.length;u<a;u++){let t=c[u];if(t.key===r&&t.obj===i)return!0}return!1}function Mn(i){return Array.isArray(i)}function jl(i){return typeof i=="function"}function Nr(i){return!wn(i)&&!Mn(i)&&!jl(i)&&typeof i=="object"}function wn(i){return typeof i=="string"||typeof i=="number"||typeof i=="boolean"||typeof i>"u"||i instanceof Date||i instanceof RegExp||i===null}function Ry(i,r){return!(!(0,Vl.isPlainObject)(i)||!(0,Vl.isPlainObject)(r))}});var Hl=d(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.callWithTimeout=At.TimeoutError=void 0;var Un=class i extends Error{constructor(r){super(r),Object.setPrototypeOf(this,i.prototype)}};At.TimeoutError=Un;function xy(i,r){let o,c=new Promise(function(a,t){o=setTimeout(function(){t(new Un("Operation timed out."))},r)});return Promise.race([i,c]).then(u=>(clearTimeout(o),u),u=>{throw clearTimeout(o),u})}At.callWithTimeout=xy});var Kl=d(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.isUrlIgnored=Pt.urlMatches=void 0;function Fl(i,r){return typeof r=="string"?i===r:!!i.match(r)}Pt.urlMatches=Fl;function Iy(i,r){if(!r)return!1;for(let o of r)if(Fl(i,o))return!0;return!1}Pt.isUrlIgnored=Iy});var Xl=d(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.isWrapped=void 0;function Ly(i){return typeof i=="function"&&typeof i.__original=="function"&&typeof i.__unwrap=="function"&&i.__wrapped===!0}Dn.isWrapped=Ly});var zl=d(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.Deferred=void 0;var ku=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)}};Bn.Deferred=ku});var $l=d(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.BindOnceFuture=void 0;var wy=zl(),qu=class{constructor(r,o){this._callback=r,this._that=o,this._isCalled=!1,this._deferred=new wy.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}};Vn.BindOnceFuture=qu});var Wl=d(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn._export=void 0;var Yl=(y(),E(m)),My=Sr();function Cy(i,r){return new Promise(o=>{Yl.context.with((0,My.suppressTracing)(Yl.context.active()),()=>{i.export(r,c=>{o(c)})})})}kn._export=Cy});var P=d(A=>{"use strict";var Uy=A&&A.__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]}),M=A&&A.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Uy(r,i,o)};Object.defineProperty(A,"__esModule",{value:!0});A.internal=A.baggageUtils=void 0;M(kc(),A);M(qc(),A);M(Kc(),A);M(_u(),A);M(hu(),A);M(hl(),A);M(ml(),A);M(yl(),A);A.baggageUtils=cu();M(gu(),A);M(vl(),A);M(Pl(),A);M(Rl(),A);M(xl(),A);M(Lu(),A);M(Mu(),A);M(Ll(),A);M(wl(),A);M(Sr(),A);M(Nu(),A);M(fn(),A);M(Gl(),A);M(mu(),A);M(Hl(),A);M(Kl(),A);M(Xl(),A);M($l(),A);M(vu(),A);var Dy=Wl();A.internal={_export:Dy._export}});var Jl=d(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.ExceptionEventName=void 0;qn.ExceptionEventName="exception"});var Gu=d(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.Span=void 0;var Pe=(y(),E(m)),te=P(),ot=fe(),By=Jl(),ju=class{constructor(r,o,c,u,a,t,e=[],n,s,l){this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:Pe.SpanStatusCode.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=c,this._spanContext=u,this.parentSpanId=t,this.kind=a,this.links=e;let h=Date.now();this._performanceStartTime=te.otperformance.now(),this._performanceOffset=h-(this._performanceStartTime+(0,te.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?(Pe.diag.warn(`Invalid attribute key: ${r}`),this):(0,te.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):(Pe.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 Pe.diag.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(Pe.diag.warn("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),(0,te.isTimeInput)(o)&&((0,te.isTimeInput)(c)||(c=o),o=void 0);let u=(0,te.sanitizeAttributes)(o);return this.events.push({name:r,attributes:u,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()){Pe.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,te.hrTimeDuration)(this.startTime,this.endTime),this._duration[0]<0&&(Pe.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<te.otperformance.now())return(0,te.hrTime)(r+this._performanceOffset);if(typeof r=="number")return(0,te.millisToHrTime)(r);if(r instanceof Date)return(0,te.millisToHrTime)(r.getTime());if((0,te.isTimeInputHrTime)(r))return r;if(this._startTimeProvided)return(0,te.millisToHrTime)(Date.now());let o=te.otperformance.now()-this._performanceStartTime;return(0,te.addHrTimes)(this.startTime,(0,te.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(By.ExceptionEventName,c,o):Pe.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&&Pe.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?(Pe.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}};jn.Span=ju});var xr=d(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.SamplingDecision=void 0;var Vy;(function(i){i[i.NOT_RECORD=0]="NOT_RECORD",i[i.RECORD=1]="RECORD",i[i.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Vy=Rr.SamplingDecision||(Rr.SamplingDecision={}))});var Hn=d(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.AlwaysOffSampler=void 0;var ky=xr(),Hu=class{shouldSample(){return{decision:ky.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Gn.AlwaysOffSampler=Hu});var Kn=d(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.AlwaysOnSampler=void 0;var qy=xr(),Fu=class{shouldSample(){return{decision:qy.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};Fn.AlwaysOnSampler=Fu});var zu=d(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.ParentBasedSampler=void 0;var Xn=(y(),E(m)),jy=P(),Ql=Hn(),Ku=Kn(),Xu=class{constructor(r){var o,c,u,a;this._root=r.root,this._root||((0,jy.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Ku.AlwaysOnSampler),this._remoteParentSampled=(o=r.remoteParentSampled)!==null&&o!==void 0?o:new Ku.AlwaysOnSampler,this._remoteParentNotSampled=(c=r.remoteParentNotSampled)!==null&&c!==void 0?c:new Ql.AlwaysOffSampler,this._localParentSampled=(u=r.localParentSampled)!==null&&u!==void 0?u:new Ku.AlwaysOnSampler,this._localParentNotSampled=(a=r.localParentNotSampled)!==null&&a!==void 0?a:new Ql.AlwaysOffSampler}shouldSample(r,o,c,u,a,t){let e=Xn.trace.getSpanContext(r);return!e||!(0,Xn.isSpanContextValid)(e)?this._root.shouldSample(r,o,c,u,a,t):e.isRemote?e.traceFlags&Xn.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(r,o,c,u,a,t):this._remoteParentNotSampled.shouldSample(r,o,c,u,a,t):e.traceFlags&Xn.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(r,o,c,u,a,t):this._localParentNotSampled.shouldSample(r,o,c,u,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()}}`}};zn.ParentBasedSampler=Xu});var Yu=d($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.TraceIdRatioBasedSampler=void 0;var Gy=(y(),E(m)),Zl=xr(),$u=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,Gy.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?Zl.SamplingDecision.RECORD_AND_SAMPLED:Zl.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 u=c*8,a=parseInt(r.slice(u,u+8),16);o=(o^a)>>>0}return o}};$n.TraceIdRatioBasedSampler=$u});var Qu=d(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.buildSamplerFromEnv=Rt.loadDefaultConfig=void 0;var Yn=(y(),E(m)),$=P(),ep=Hn(),Wu=Kn(),Ju=zu(),tp=Yu(),Hy=(0,$.getEnv)(),Fy=$.TracesSamplerValues.AlwaysOn,Nt=1;function Ky(){return{sampler:np(Hy),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,$.getEnv)().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,$.getEnv)().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:(0,$.getEnv)().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,$.getEnv)().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:(0,$.getEnv)().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:(0,$.getEnv)().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:(0,$.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:(0,$.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}Rt.loadDefaultConfig=Ky;function np(i=(0,$.getEnv)()){switch(i.OTEL_TRACES_SAMPLER){case $.TracesSamplerValues.AlwaysOn:return new Wu.AlwaysOnSampler;case $.TracesSamplerValues.AlwaysOff:return new ep.AlwaysOffSampler;case $.TracesSamplerValues.ParentBasedAlwaysOn:return new Ju.ParentBasedSampler({root:new Wu.AlwaysOnSampler});case $.TracesSamplerValues.ParentBasedAlwaysOff:return new Ju.ParentBasedSampler({root:new ep.AlwaysOffSampler});case $.TracesSamplerValues.TraceIdRatio:return new tp.TraceIdRatioBasedSampler(rp(i));case $.TracesSamplerValues.ParentBasedTraceIdRatio:return new Ju.ParentBasedSampler({root:new tp.TraceIdRatioBasedSampler(rp(i))});default:return Yn.diag.error(`OTEL_TRACES_SAMPLER value "${i.OTEL_TRACES_SAMPLER} invalid, defaulting to ${Fy}".`),new Wu.AlwaysOnSampler}}Rt.buildSamplerFromEnv=np;function rp(i){if(i.OTEL_TRACES_SAMPLER_ARG===void 0||i.OTEL_TRACES_SAMPLER_ARG==="")return Yn.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${Nt}.`),Nt;let r=Number(i.OTEL_TRACES_SAMPLER_ARG);return isNaN(r)?(Yn.diag.error(`OTEL_TRACES_SAMPLER_ARG=${i.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${Nt}.`),Nt):r<0||r>1?(Yn.diag.error(`OTEL_TRACES_SAMPLER_ARG=${i.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${Nt}.`),Nt):r}});var es=d(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.reconfigureLimits=xt.mergeConfig=void 0;var op=Qu(),Zu=P();function Xy(i){let r={sampler:(0,op.buildSamplerFromEnv)()},o=(0,op.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}xt.mergeConfig=Xy;function zy(i){var r,o,c,u,a,t,e,n,s,l,h,T;let R=Object.assign({},i.spanLimits),N=(0,Zu.getEnvWithoutDefaults)();return R.attributeCountLimit=(t=(a=(u=(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&&u!==void 0?u:N.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&a!==void 0?a:N.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&t!==void 0?t:Zu.DEFAULT_ATTRIBUTE_COUNT_LIMIT,R.attributeValueLengthLimit=(T=(h=(l=(n=(e=i.spanLimits)===null||e===void 0?void 0:e.attributeValueLengthLimit)!==null&&n!==void 0?n:(s=i.generalLimits)===null||s===void 0?void 0:s.attributeValueLengthLimit)!==null&&l!==void 0?l:N.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&h!==void 0?h:N.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&T!==void 0?T:Zu.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},i,{spanLimits:R})}xt.reconfigureLimits=zy});var ip=d(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.BatchSpanProcessorBase=void 0;var It=(y(),E(m)),it=P(),ts=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&&(It.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&It.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&&It.diag.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(It.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=[],u=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let a=0,t=u;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);It.context.with((0,it.suppressTracing)(It.context.active()),()=>{let u=this._finishedSpans.splice(0,this._maxExportBatchSize),a=()=>this._exporter.export(u,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=u.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)}};Wn.BatchSpanProcessorBase=ts});var up=d(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.BatchSpanProcessor=void 0;var $y=ip(),rs=class extends $y.BatchSpanProcessorBase{onShutdown(){}};Jn.BatchSpanProcessor=rs});var cp=d(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.RandomIdGenerator=void 0;var Yy=8,ap=16,ns=class{constructor(){this.generateTraceId=sp(ap),this.generateSpanId=sp(Yy)}};Zn.RandomIdGenerator=ns;var Qn=Buffer.allocUnsafe(ap);function sp(i){return function(){for(let o=0;o<i/4;o++)Qn.writeUInt32BE(Math.random()*2**32>>>0,o*4);for(let o=0;o<i&&!(Qn[o]>0);o++)o===i-1&&(Qn[i-1]=1);return Qn.toString("hex",0,i)}}});var pp=d(ke=>{"use strict";var Wy=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]}),lp=ke&&ke.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Wy(r,i,o)};Object.defineProperty(ke,"__esModule",{value:!0});lp(up(),ke);lp(cp(),ke)});var eo=d(ut=>{"use strict";var Jy=ut&&ut.__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]}),Qy=ut&&ut.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Jy(r,i,o)};Object.defineProperty(ut,"__esModule",{value:!0});Qy(pp(),ut)});var fp=d(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});ro.Tracer=void 0;var Y=(y(),E(m)),to=P(),Zy=Gu(),eE=es(),tE=eo(),os=class{constructor(r,o,c){this._tracerProvider=c;let u=(0,eE.mergeConfig)(o);this._sampler=u.sampler,this._generalLimits=u.generalLimits,this._spanLimits=u.spanLimits,this._idGenerator=o.idGenerator||new tE.RandomIdGenerator,this.resource=c.resource,this.instrumentationLibrary=r}startSpan(r,o={},c=Y.context.active()){var u,a,t;o.root&&(c=Y.trace.deleteSpan(c));let e=Y.trace.getSpan(c);if((0,to.isTracingSuppressed)(c))return Y.diag.debug("Instrumentation suppressed, returning Noop Span"),Y.trace.wrapSpanContext(Y.INVALID_SPAN_CONTEXT);let n=e?.spanContext(),s=this._idGenerator.generateSpanId(),l,h,T;!n||!Y.trace.isSpanContextValid(n)?l=this._idGenerator.generateTraceId():(l=n.traceId,h=n.traceState,T=n.spanId);let R=(u=o.kind)!==null&&u!==void 0?u:Y.SpanKind.INTERNAL,N=((a=o.links)!==null&&a!==void 0?a:[]).map(W=>({context:W.context,attributes:(0,to.sanitizeAttributes)(W.attributes)})),I=(0,to.sanitizeAttributes)(o.attributes),b=this._sampler.shouldSample(c,l,r,R,I,N);h=(t=b.traceState)!==null&&t!==void 0?t:h;let L=b.decision===Y.SamplingDecision.RECORD_AND_SAMPLED?Y.TraceFlags.SAMPLED:Y.TraceFlags.NONE,k={traceId:l,spanId:s,traceFlags:L,traceState:h};if(b.decision===Y.SamplingDecision.NOT_RECORD)return Y.diag.debug("Recording is off, propagating context in a non-recording span"),Y.trace.wrapSpanContext(k);let se=(0,to.sanitizeAttributes)(Object.assign(I,b.attributes));return new Zy.Span(this,c,r,k,R,T,N,o.startTime,void 0,se)}startActiveSpan(r,o,c,u){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=u);let n=t??Y.context.active(),s=this.startSpan(r,a,n),l=Y.trace.setSpan(n,s);return Y.context.with(l,e,void 0,s)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}getActiveSpanProcessor(){return this._tracerProvider.getActiveSpanProcessor()}};ro.Tracer=os});var dp=d(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.defaultServiceName=void 0;function rE(){return`unknown_service:${process.argv0}`}no.defaultServiceName=rE});var is=d(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.normalizeType=Lt.normalizeArch=void 0;var nE=i=>{switch(i){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return i}};Lt.normalizeArch=nE;var oE=i=>{switch(i){case"sunos":return"solaris";case"win32":return"windows";default:return i}};Lt.normalizeType=oE});var io=d(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.execAsync=void 0;var iE=K("child_process"),uE=K("util");oo.execAsync=uE.promisify(iE.exec)});var hp=d(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo.getMachineId=void 0;var sE=io(),aE=(y(),E(m));async function cE(){try{let r=(await(0,sE.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){aE.diag.debug(`error reading machine id: ${i}`)}return""}uo.getMachineId=cE});var _p=d(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.getMachineId=void 0;var lE=K("fs"),pE=(y(),E(m));async function fE(){let i=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let r of i)try{return(await lE.promises.readFile(r,{encoding:"utf8"})).trim()}catch(o){pE.diag.debug(`error reading machine id: ${o}`)}return""}so.getMachineId=fE});var yp=d(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.getMachineId=void 0;var dE=K("fs"),hE=io(),mp=(y(),E(m));async function _E(){try{return(await dE.promises.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(i){mp.diag.debug(`error reading machine id: ${i}`)}try{return(await(0,hE.execAsync)("kenv -q smbios.system.uuid")).stdout.trim()}catch(i){mp.diag.debug(`error reading machine id: ${i}`)}return""}ao.getMachineId=_E});var vp=d(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.getMachineId=void 0;var Ep=K("process"),mE=io(),yE=(y(),E(m));async function EE(){let i="QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",r="%windir%\\System32\\REG.exe";Ep.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in Ep.env&&(r="%windir%\\sysnative\\cmd.exe /c "+r);try{let c=(await(0,mE.execAsync)(`${r} ${i}`)).stdout.split("REG_SZ");if(c.length===2)return c[1].trim()}catch(o){yE.diag.debug(`error reading machine id: ${o}`)}return""}co.getMachineId=EE});var gp=d(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.getMachineId=void 0;var vE=(y(),E(m));async function gE(){return vE.diag.debug("could not read machine-id: unsupported platform"),""}lo.getMachineId=gE});var Tp=d(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.getMachineId=void 0;var TE=K("process"),wt;Le.getMachineId=wt;switch(TE.platform){case"darwin":Le.getMachineId=wt=hp().getMachineId;break;case"linux":Le.getMachineId=wt=_p().getMachineId;break;case"freebsd":Le.getMachineId=wt=yp().getMachineId;break;case"win32":Le.getMachineId=wt=vp().getMachineId;break;default:Le.getMachineId=wt=gp().getMachineId}});var as=d(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.hostDetectorSync=void 0;var us=fe(),SE=st(),Sp=K("os"),bE=is(),OE=Tp(),ss=class{detect(r){let o={[us.SemanticResourceAttributes.HOST_NAME]:(0,Sp.hostname)(),[us.SemanticResourceAttributes.HOST_ARCH]:(0,bE.normalizeArch)((0,Sp.arch)())};return new SE.Resource(o,this._getAsyncAttributes())}_getAsyncAttributes(){return(0,OE.getMachineId)().then(r=>{let o={};return r&&(o[us.SemanticResourceAttributes.HOST_ID]=r),o})}};po.hostDetectorSync=new ss});var bp=d(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.hostDetector=void 0;var AE=as(),cs=class{detect(r){return Promise.resolve(AE.hostDetectorSync.detect(r))}};fo.hostDetector=new cs});var ps=d(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.osDetectorSync=void 0;var Op=fe(),PE=st(),Ap=K("os"),NE=is(),ls=class{detect(r){let o={[Op.SemanticResourceAttributes.OS_TYPE]:(0,NE.normalizeType)((0,Ap.platform)()),[Op.SemanticResourceAttributes.OS_VERSION]:(0,Ap.release)()};return new PE.Resource(o)}};ho.osDetectorSync=new ls});var Pp=d(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.osDetector=void 0;var RE=ps(),fs=class{detect(r){return Promise.resolve(RE.osDetectorSync.detect(r))}};_o.osDetector=new fs});var hs=d(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.processDetectorSync=void 0;var xE=(y(),E(m)),we=fe(),IE=st(),LE=K("os"),ds=class{detect(r){let o={[we.SemanticResourceAttributes.PROCESS_PID]:process.pid,[we.SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME]:process.title,[we.SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH]:process.execPath,[we.SemanticResourceAttributes.PROCESS_COMMAND_ARGS]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[we.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]:process.versions.node,[we.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"nodejs",[we.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]:"Node.js"};process.argv.length>1&&(o[we.SemanticResourceAttributes.PROCESS_COMMAND]=process.argv[1]);try{let c=LE.userInfo();o[we.SemanticResourceAttributes.PROCESS_OWNER]=c.username}catch(c){xE.diag.debug(`error obtaining process owner: ${c}`)}return new IE.Resource(o)}};mo.processDetectorSync=new ds});var Np=d(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.processDetector=void 0;var wE=hs(),_s=class{detect(r){return Promise.resolve(wE.processDetectorSync.detect(r))}};yo.processDetector=new _s});var Rp=d(ce=>{"use strict";var ME=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)&&ME(r,i,o)};Object.defineProperty(ce,"__esModule",{value:!0});at(dp(),ce);at(bp(),ce);at(Pp(),ce);at(as(),ce);at(ps(),ce);at(Np(),ce);at(hs(),ce)});var ms=d(ct=>{"use strict";var CE=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]}),UE=ct&&ct.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&CE(r,i,o)};Object.defineProperty(ct,"__esModule",{value:!0});UE(Rp(),ct)});var st=d(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});Eo.Resource=void 0;var xp=(y(),E(m)),lt=fe(),ys=P(),DE=ms(),Ir=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(u=>(this._attributes=Object.assign({},this._attributes,u),this.asyncAttributesPending=!1,u),u=>(xp.diag.debug("a resource's async attributes promise rejected: %s",u),this.asyncAttributesPending=!1,{}))}static empty(){return i.EMPTY}static default(){return new i({[lt.SemanticResourceAttributes.SERVICE_NAME]:(0,DE.defaultServiceName)(),[lt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:ys.SDK_INFO[lt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE],[lt.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:ys.SDK_INFO[lt.SemanticResourceAttributes.TELEMETRY_SDK_NAME],[lt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:ys.SDK_INFO[lt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]})}get attributes(){var r;return this.asyncAttributesPending&&xp.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 u=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,u)}};Eo.Resource=Ir;Ir.EMPTY=new Ir({})});var Lp=d(Ip=>{"use strict";Object.defineProperty(Ip,"__esModule",{value:!0})});var Mp=d(wp=>{"use strict";Object.defineProperty(wp,"__esModule",{value:!0})});var Up=d(Cp=>{"use strict";Object.defineProperty(Cp,"__esModule",{value:!0})});var Dp=d(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.browserDetector=void 0;var BE=pt(),Es=class{detect(r){return Promise.resolve(BE.browserDetectorSync.detect(r))}};vo.browserDetector=new Es});var gs=d(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.envDetectorSync=void 0;var VE=(y(),E(m)),kE=P(),qE=fe(),jE=st(),vs=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,kE.getEnv)(),u=c.OTEL_RESOURCE_ATTRIBUTES,a=c.OTEL_SERVICE_NAME;if(u)try{let t=this._parseResourceAttributes(u);Object.assign(o,t)}catch(t){VE.diag.debug(`EnvDetector failed: ${t.message}`)}return a&&(o[qE.SemanticResourceAttributes.SERVICE_NAME]=a),new jE.Resource(o)}_parseResourceAttributes(r){if(!r)return{};let o={},c=r.split(this._COMMA_SEPARATOR,-1);for(let u of c){let a=u.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)}};go.envDetectorSync=new vs});var Bp=d(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.envDetector=void 0;var GE=gs(),Ts=class{detect(r){return Promise.resolve(GE.envDetectorSync.detect(r))}};To.envDetector=new Ts});var Vp=d(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.browserDetectorSync=void 0;var So=fe(),Ss=pt(),HE=(y(),E(m)),bs=class{detect(r){if(!(typeof navigator<"u"))return Ss.Resource.empty();let c={[So.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"browser",[So.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]:"Web Browser",[So.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]:navigator.userAgent};return this._getResourceAttributes(c,r)}_getResourceAttributes(r,o){return r[So.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]===""?(HE.diag.debug("BrowserDetector failed: Unable to find required browser resources. "),Ss.Resource.empty()):new Ss.Resource(Object.assign({},r))}};bo.browserDetectorSync=new bs});var kp=d(Ne=>{"use strict";var FE=Ne&&Ne.__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]}),Oo=Ne&&Ne.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&FE(r,i,o)};Object.defineProperty(Ne,"__esModule",{value:!0});Oo(Dp(),Ne);Oo(Bp(),Ne);Oo(Vp(),Ne);Oo(gs(),Ne)});var qp=d(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.isPromiseLike=void 0;var KE=i=>i!==null&&typeof i=="object"&&typeof i.then=="function";Ao.isPromiseLike=KE});var Gp=d(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.detectResourcesSync=Ct.detectResources=void 0;var Lr=st(),Mt=(y(),E(m)),XE=qp(),zE=async(i={})=>{let r=await Promise.all((i.detectors||[]).map(async o=>{try{let c=await o.detect(i);return Mt.diag.debug(`${o.constructor.name} found resource.`,c),c}catch(c){return Mt.diag.debug(`${o.constructor.name} failed: ${c.message}`),Lr.Resource.empty()}}));return jp(r),r.reduce((o,c)=>o.merge(c),Lr.Resource.empty())};Ct.detectResources=zE;var $E=(i={})=>{var r;let o=((r=i.detectors)!==null&&r!==void 0?r:[]).map(u=>{try{let a=u.detect(i),t;if((0,XE.isPromiseLike)(a)){let e=async()=>(await a).attributes;t=new Lr.Resource({},e())}else t=a;return t.waitForAsyncAttributes?t.waitForAsyncAttributes().then(()=>Mt.diag.debug(`${u.constructor.name} found resource.`,t)):Mt.diag.debug(`${u.constructor.name} found resource.`,t),t}catch(a){return Mt.diag.error(`${u.constructor.name} failed: ${a.message}`),Lr.Resource.empty()}}),c=o.reduce((u,a)=>u.merge(a),Lr.Resource.empty());return c.waitForAsyncAttributes&&c.waitForAsyncAttributes().then(()=>{jp(o)}),c};Ct.detectResourcesSync=$E;var jp=i=>{i.forEach(r=>{if(Object.keys(r.attributes).length>0){let o=JSON.stringify(r.attributes,null,4);Mt.diag.verbose(o)}})}});var pt=d(le=>{"use strict";var YE=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)&&YE(r,i,o)};Object.defineProperty(le,"__esModule",{value:!0});ft(st(),le);ft(Lp(),le);ft(ms(),le);ft(Mp(),le);ft(Up(),le);ft(kp(),le);ft(Gp(),le)});var Hp=d(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.MultiSpanProcessor=void 0;var WE=P(),Os=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,WE.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)})}};Po.MultiSpanProcessor=Os});var Ps=d(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.NoopSpanProcessor=void 0;var As=class{onStart(r,o){}onEnd(r){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}};No.NoopSpanProcessor=As});var Kp=d(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.BasicTracerProvider=dt.ForceFlushState=void 0;var Ut=(y(),E(m)),Bt=P(),Fp=pt(),JE=Ns(),QE=Qu(),ZE=Hp(),ev=Ps(),tv=eo(),rv=es(),Dt;(function(i){i[i.resolved=0]="resolved",i[i.timeout=1]="timeout",i[i.error=2]="error",i[i.unresolved=3]="unresolved"})(Dt=dt.ForceFlushState||(dt.ForceFlushState={}));var wr=class{constructor(r={}){var o;this._registeredSpanProcessors=[],this._tracers=new Map;let c=(0,Bt.merge)({},(0,QE.loadDefaultConfig)(),(0,rv.reconfigureLimits)(r));this.resource=(o=c.resource)!==null&&o!==void 0?o:Fp.Resource.empty(),this.resource=Fp.Resource.default().merge(this.resource),this._config=Object.assign({},c,{resource:this.resource});let u=this._buildExporterFromEnv();if(u!==void 0){let a=new tv.BatchSpanProcessor(u);this.activeSpanProcessor=a}else this.activeSpanProcessor=new ev.NoopSpanProcessor}getTracer(r,o,c){let u=`${r}@${o||""}:${c?.schemaUrl||""}`;return this._tracers.has(u)||this._tracers.set(u,new JE.Tracer({name:r,version:o,schemaUrl:c?.schemaUrl},this._config,this)),this._tracers.get(u)}addSpanProcessor(r){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(o=>Ut.diag.error("Error while trying to shutdown current span processor",o)),this._registeredSpanProcessors.push(r),this.activeSpanProcessor=new ZE.MultiSpanProcessor(this._registeredSpanProcessors)}getActiveSpanProcessor(){return this.activeSpanProcessor}register(r={}){Ut.trace.setGlobalTracerProvider(this),r.propagator===void 0&&(r.propagator=this._buildPropagatorFromEnv()),r.contextManager&&Ut.context.setGlobalContextManager(r.contextManager),r.propagator&&Ut.propagation.setGlobalPropagator(r.propagator)}forceFlush(){let r=this._config.forceFlushTimeoutMillis,o=this._registeredSpanProcessors.map(c=>new Promise(u=>{let a,t=setTimeout(()=>{u(new Error(`Span processor did not completed within timeout period of ${r} ms`)),a=Dt.timeout},r);c.forceFlush().then(()=>{clearTimeout(t),a!==Dt.timeout&&(a=Dt.resolved,u(a))}).catch(e=>{clearTimeout(t),a=Dt.error,u(e)})}));return new Promise((c,u)=>{Promise.all(o).then(a=>{let t=a.filter(e=>e!==Dt.resolved);t.length>0?u(t):c()}).catch(a=>u([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,Bt.getEnv)().OTEL_PROPAGATORS)),c=r.map(u=>{let a=this._getPropagator(u);return a||Ut.diag.warn(`Propagator "${u}" requested through environment variable is unavailable.`),a}).reduce((u,a)=>(a&&u.push(a),u),[]);if(c.length!==0)return r.length===1?c[0]:new Bt.CompositePropagator({propagators:c})}_buildExporterFromEnv(){let r=(0,Bt.getEnv)().OTEL_TRACES_EXPORTER;if(r==="none"||r==="")return;let o=this._getSpanExporter(r);return o||Ut.diag.error(`Exporter "${r}" requested through environment variable is unavailable.`),o}};dt.BasicTracerProvider=wr;wr._registeredPropagators=new Map([["tracecontext",()=>new Bt.W3CTraceContextPropagator],["baggage",()=>new Bt.W3CBaggagePropagator]]);wr._registeredExporters=new Map});var Xp=d(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.ConsoleSpanExporter=void 0;var Rs=P(),xs=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,Rs.hrTimeToMicroseconds)(r.startTime),duration:(0,Rs.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:Rs.ExportResultCode.SUCCESS})}};Ro.ConsoleSpanExporter=xs});var $p=d(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.InMemorySpanExporter=void 0;var zp=P(),Is=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}};xo.InMemorySpanExporter=Is});var Wp=d(Yp=>{"use strict";Object.defineProperty(Yp,"__esModule",{value:!0})});var Jp=d(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.SimpleSpanProcessor=void 0;var nv=(y(),E(m)),Vt=P(),Ls=class{constructor(r){this._exporter=r,this._shutdownOnce=new Vt.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&nv.TraceFlags.SAMPLED))return;let u=()=>Vt.internal._export(this._exporter,[r]).then(a=>{var t;a.code!==Vt.ExportResultCode.SUCCESS&&(0,Vt.globalErrorHandler)((t=a.error)!==null&&t!==void 0?t:new Error(`SimpleSpanProcessor: span export failed (status ${a})`))}).catch(a=>{(0,Vt.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),u()),t=>(0,Vt.globalErrorHandler)(t));a!=null&&this._unresolvedExports.add(a)}else u()}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}};Io.SimpleSpanProcessor=Ls});var Zp=d(Qp=>{"use strict";Object.defineProperty(Qp,"__esModule",{value:!0})});var tf=d(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0})});var nf=d(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0})});var uf=d(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0})});var af=d(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0})});var Ns=d(D=>{"use strict";var ov=D&&D.__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=D&&D.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&ov(r,i,o)};Object.defineProperty(D,"__esModule",{value:!0});F(fp(),D);F(Kp(),D);F(eo(),D);F(Xp(),D);F($p(),D);F(Wp(),D);F(Jp(),D);F(Zp(),D);F(Ps(),D);F(Hn(),D);F(Kn(),D);F(zu(),D);F(Yu(),D);F(xr(),D);F(Gu(),D);F(tf(),D);F(nf(),D);F(uf(),D);F(af(),D)});var ht={};import*as lA from"@opentelemetry/api-logs";var ws=Bc(()=>{St(ht,lA)});var lf=d(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.disableInstrumentations=qe.enableInstrumentations=qe.parseInstrumentationOptions=void 0;function cf(i=[]){let r=[];for(let o=0,c=i.length;o<c;o++){let u=i[o];if(Array.isArray(u)){let a=cf(u);r=r.concat(a.instrumentations)}else typeof u=="function"?r.push(new u):u.instrumentationName&&r.push(u)}return{instrumentations:r}}qe.parseInstrumentationOptions=cf;function iv(i,r,o){for(let c=0,u=i.length;c<u;c++){let a=i[c];r&&a.setTracerProvider(r),o&&a.setMeterProvider(o),a.getConfig().enabled||a.enable()}}qe.enableInstrumentations=iv;function uv(i){i.forEach(r=>r.disable())}qe.disableInstrumentations=uv});var ff=d(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.registerInstrumentations=void 0;var pf=(y(),E(m)),Ms=lf();function sv(i){let{instrumentations:r}=(0,Ms.parseInstrumentationOptions)(i.instrumentations),o=i.tracerProvider||pf.trace.getTracerProvider(),c=i.meterProvider||pf.metrics.getMeterProvider();return(0,Ms.enableInstrumentations)(r,o,c),()=>{(0,Ms.disableInstrumentations)(r)}}Lo.registerInstrumentations=sv});var Us=d(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.LogRecord=void 0;var av=(y(),E(m)),Mr=(y(),E(m)),wo=P(),Cs=class{constructor(r,o,c){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;let{timestamp:u,observedTimestamp:a,severityNumber:t,severityText:e,body:n,attributes:s={},context:l}=c,h=Date.now();if(this.hrTime=(0,wo.timeInputToHrTime)(u??h),this.hrTimeObserved=(0,wo.timeInputToHrTime)(a??h),l){let T=Mr.trace.getSpanContext(l);T&&Mr.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(s)}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?(Mr.diag.warn(`Invalid attribute key: ${r}`),this):!(0,wo.isAttributeValue)(o)&&!(typeof o=="object"&&!Array.isArray(o)&&Object.keys(o).length>0)?(Mr.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,wo.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?(Mr.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&&av.diag.warn("Can not execute the operation on emitted log record"),this._isReadonly}};Mo.LogRecord=Cs});var df=d(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.Logger=void 0;var cv=(y(),E(m)),lv=Us(),Ds=class{constructor(r,o){this.instrumentationScope=r,this._sharedState=o}emit(r){let o=r.context||cv.context.active(),c=new lv.LogRecord(this._sharedState,this.instrumentationScope,Object.assign({context:o},r));this._sharedState.activeProcessor.onEmit(c,o),c._makeReadonly()}};Co.Logger=Ds});var hf=d(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.reconfigureLimits=kt.loadDefaultConfig=void 0;var Cr=P();function pv(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:(0,Cr.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,Cr.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT},includeTraceContext:!0}}kt.loadDefaultConfig=pv;function fv(i){var r,o,c,u,a,t;let e=(0,Cr.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:Cr.DEFAULT_ATTRIBUTE_COUNT_LIMIT,attributeValueLengthLimit:(t=(a=(u=i.attributeValueLengthLimit)!==null&&u!==void 0?u:e.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&a!==void 0?a:e.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&t!==void 0?t:Cr.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT}}kt.reconfigureLimits=fv});var _f=d(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});Uo.MultiLogRecordProcessor=void 0;var dv=P(),Bs=class{constructor(r,o){this.processors=r,this.forceFlushTimeoutMillis=o}async forceFlush(){let r=this.forceFlushTimeoutMillis;await Promise.all(this.processors.map(o=>(0,dv.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()))}};Uo.MultiLogRecordProcessor=Bs});var ks=d(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.NoopLogRecordProcessor=void 0;var Vs=class{forceFlush(){return Promise.resolve()}onEmit(r,o){}shutdown(){return Promise.resolve()}};Do.NoopLogRecordProcessor=Vs});var mf=d(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});Bo.LoggerProviderSharedState=void 0;var hv=ks(),qs=class{constructor(r,o,c){this.resource=r,this.forceFlushTimeoutMillis=o,this.logRecordLimits=c,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new hv.NoopLogRecordProcessor}};Bo.LoggerProviderSharedState=qs});var vf=d(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.LoggerProvider=_t.DEFAULT_LOGGER_NAME=void 0;var Ur=(y(),E(m)),_v=(ws(),E(ht)),mv=pt(),yf=P(),yv=df(),Ef=hf(),Ev=_f(),vv=mf();_t.DEFAULT_LOGGER_NAME="unknown";var js=class{constructor(r={}){let{resource:o=mv.Resource.default(),logRecordLimits:c,forceFlushTimeoutMillis:u}=(0,yf.merge)({},(0,Ef.loadDefaultConfig)(),r);this._sharedState=new vv.LoggerProviderSharedState(o,u,(0,Ef.reconfigureLimits)(c)),this._shutdownOnce=new yf.BindOnceFuture(this._shutdown,this)}getLogger(r,o,c){if(this._shutdownOnce.isCalled)return Ur.diag.warn("A shutdown LoggerProvider cannot provide a Logger"),_v.NOOP_LOGGER;r||Ur.diag.warn("Logger requested without instrumentation scope name.");let u=r||_t.DEFAULT_LOGGER_NAME,a=`${u}@${o||""}:${c?.schemaUrl||""}`;return this._sharedState.loggers.has(a)||this._sharedState.loggers.set(a,new yv.Logger({name:u,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=>Ur.diag.error("Error while trying to shutdown current log record processor",o)),this._sharedState.registeredLogRecordProcessors.push(r),this._sharedState.activeProcessor=new Ev.MultiLogRecordProcessor(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)}forceFlush(){return this._shutdownOnce.isCalled?(Ur.diag.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()}shutdown(){return this._shutdownOnce.isCalled?(Ur.diag.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()}_shutdown(){return this._sharedState.activeProcessor.shutdown()}};_t.LoggerProvider=js});var gf=d(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.ConsoleLogRecordExporter=void 0;var gv=P(),Tv=P(),Gs=class{export(r,o){this._sendLogRecords(r,o)}shutdown(){return Promise.resolve()}_exportInfo(r){var o,c,u;return{timestamp:(0,gv.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:(u=r.spanContext)===null||u===void 0?void 0:u.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:Tv.ExportResultCode.SUCCESS})}};Vo.ConsoleLogRecordExporter=Gs});var Tf=d(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.SimpleLogRecordProcessor=void 0;var Hs=P(),Fs=class{constructor(r){this._exporter=r,this._shutdownOnce=new Hs.BindOnceFuture(this._shutdown,this)}onEmit(r){this._shutdownOnce.isCalled||this._exporter.export([r],o=>{var c;if(o.code!==Hs.ExportResultCode.SUCCESS){(0,Hs.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()}};ko.SimpleLogRecordProcessor=Fs});var bf=d(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});qo.InMemoryLogRecordExporter=void 0;var Sf=P(),Ks=class{constructor(){this._finishedLogRecords=[],this._stopped=!1}export(r,o){if(this._stopped)return o({code:Sf.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedLogRecords.push(...r),o({code:Sf.ExportResultCode.SUCCESS})}shutdown(){return this._stopped=!0,this.reset(),Promise.resolve()}getFinishedLogRecords(){return this._finishedLogRecords}reset(){this._finishedLogRecords=[]}};qo.InMemoryLogRecordExporter=Ks});var Of=d(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});jo.BatchLogRecordProcessorBase=void 0;var Sv=(y(),E(m)),qt=P(),Xs=class{constructor(r,o){var c,u,a,t;this._exporter=r,this._finishedLogRecords=[];let e=(0,qt.getEnv)();this._maxExportBatchSize=(c=o?.maxExportBatchSize)!==null&&c!==void 0?c:e.OTEL_BLRP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=(u=o?.maxQueueSize)!==null&&u!==void 0?u: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 qt.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(Sv.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=[],u=Math.ceil(this._finishedLogRecords.length/this._maxExportBatchSize);for(let a=0;a<u;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,qt.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,qt.globalErrorHandler)(r)})},this._scheduledDelayMillis),(0,qt.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,u=>{var a;if(u.code!==qt.ExportResultCode.SUCCESS){c((a=u.error)!==null&&a!==void 0?a:new Error(`BatchLogRecordProcessorBase: log record export failed (status ${u})`));return}o(u)})})}};jo.BatchLogRecordProcessorBase=Xs});var Af=d(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.BatchLogRecordProcessor=void 0;var bv=Of(),zs=class extends bv.BatchLogRecordProcessorBase{onShutdown(){}};Go.BatchLogRecordProcessor=zs});var Pf=d(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.BatchLogRecordProcessor=void 0;var Ov=Af();Object.defineProperty(Ho,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return Ov.BatchLogRecordProcessor}})});var Nf=d(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.BatchLogRecordProcessor=void 0;var Av=Pf();Object.defineProperty(Fo,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return Av.BatchLogRecordProcessor}})});var Rf=d(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.BatchLogRecordProcessor=re.InMemoryLogRecordExporter=re.SimpleLogRecordProcessor=re.ConsoleLogRecordExporter=re.NoopLogRecordProcessor=re.LogRecord=re.LoggerProvider=void 0;var Pv=vf();Object.defineProperty(re,"LoggerProvider",{enumerable:!0,get:function(){return Pv.LoggerProvider}});var Nv=Us();Object.defineProperty(re,"LogRecord",{enumerable:!0,get:function(){return Nv.LogRecord}});var Rv=ks();Object.defineProperty(re,"NoopLogRecordProcessor",{enumerable:!0,get:function(){return Rv.NoopLogRecordProcessor}});var xv=gf();Object.defineProperty(re,"ConsoleLogRecordExporter",{enumerable:!0,get:function(){return xv.ConsoleLogRecordExporter}});var Iv=Tf();Object.defineProperty(re,"SimpleLogRecordProcessor",{enumerable:!0,get:function(){return Iv.SimpleLogRecordProcessor}});var Lv=bf();Object.defineProperty(re,"InMemoryLogRecordExporter",{enumerable:!0,get:function(){return Lv.InMemoryLogRecordExporter}});var wv=Nf();Object.defineProperty(re,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return wv.BatchLogRecordProcessor}})});var Ko=d(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.AggregationTemporality=void 0;var Mv;(function(i){i[i.DELTA=0]="DELTA",i[i.CUMULATIVE=1]="CUMULATIVE"})(Mv=Dr.AggregationTemporality||(Dr.AggregationTemporality={}))});var jt=d(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.DataPointType=void 0;var Cv;(function(i){i[i.HISTOGRAM=0]="HISTOGRAM",i[i.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",i[i.GAUGE=2]="GAUGE",i[i.SUM=3]="SUM"})(Cv=Br.DataPointType||(Br.DataPointType={}))});var Re=d(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.equalsCaseInsensitive=B.binarySearchLB=B.setEquals=B.FlatMap=B.isPromiseAllSettledRejectionResult=B.PromiseAllSettled=B.callWithTimeout=B.TimeoutError=B.instrumentationScopeId=B.hashAttributes=B.isNotNullish=void 0;function Uv(i){return i!=null}B.isNotNullish=Uv;function Dv(i){let r=Object.keys(i);return r.length===0?"":(r=r.sort(),JSON.stringify(r.map(o=>[o,i[o]])))}B.hashAttributes=Dv;function Bv(i){var r,o;return`${i.name}:${(r=i.version)!==null&&r!==void 0?r:""}:${(o=i.schemaUrl)!==null&&o!==void 0?o:""}`}B.instrumentationScopeId=Bv;var Xo=class i extends Error{constructor(r){super(r),Object.setPrototypeOf(this,i.prototype)}};B.TimeoutError=Xo;function Vv(i,r){let o,c=new Promise(function(a,t){o=setTimeout(function(){t(new Xo("Operation timed out."))},r)});return Promise.race([i,c]).then(u=>(clearTimeout(o),u),u=>{throw clearTimeout(o),u})}B.callWithTimeout=Vv;async function kv(i){return Promise.all(i.map(async r=>{try{return{status:"fulfilled",value:await r}}catch(o){return{status:"rejected",reason:o}}}))}B.PromiseAllSettled=kv;function qv(i){return i.status==="rejected"}B.isPromiseAllSettledRejectionResult=qv;function jv(i,r){let o=[];return i.forEach(c=>{o.push(...r(c))}),o}B.FlatMap=jv;function Gv(i,r){if(i.size!==r.size)return!1;for(let o of i)if(!r.has(o))return!1;return!0}B.setEquals=Gv;function Hv(i,r){let o=0,c=i.length-1;for(;c-o>1;){let u=Math.trunc((c+o)/2);i[u]<=r?o=u:c=u-1}return i[c]<=r?c:i[o]<=r?o:-1}B.binarySearchLB=Hv;function Fv(i,r){return i.toLowerCase()===r.toLowerCase()}B.equalsCaseInsensitive=Fv});var Gt=d(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.AggregatorKind=void 0;var Kv;(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"})(Kv=Vr.AggregatorKind||(Vr.AggregatorKind={}))});var xf=d(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.DropAggregator=void 0;var Xv=Gt(),$s=class{constructor(){this.kind=Xv.AggregatorKind.DROP}createAccumulation(){}merge(r,o){}diff(r,o){}toMetricData(r,o,c,u){}};zo.DropAggregator=$s});var Me=d(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.isValidName=pe.isDescriptorCompatibleWith=pe.createInstrumentDescriptorWithView=pe.createInstrumentDescriptor=pe.InstrumentType=void 0;var If=(y(),E(m)),zv=Re(),$v;(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"})($v=pe.InstrumentType||(pe.InstrumentType={}));function Yv(i,r,o){var c,u,a,t;return Lf(i)||If.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:(u=o?.unit)!==null&&u!==void 0?u:"",valueType:(a=o?.valueType)!==null&&a!==void 0?a:If.ValueType.DOUBLE,advice:(t=o?.advice)!==null&&t!==void 0?t:{}}}pe.createInstrumentDescriptor=Yv;function Wv(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=Wv;function Jv(i,r){return(0,zv.equalsCaseInsensitive)(i.name,r.name)&&i.unit===r.unit&&i.type===r.type&&i.valueType===r.valueType}pe.isDescriptorCompatibleWith=Jv;var Qv=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Lf(i){return i.match(Qv)!=null}pe.isValidName=Lf});var wf=d(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.HistogramAggregator=Ft.HistogramAccumulation=void 0;var Zv=Gt(),eg=jt(),Ys=Me(),tg=Re();function rg(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 Ht=class{constructor(r,o,c=!0,u=rg(o)){this.startTime=r,this._boundaries=o,this._recordMinMax=c,this._current=u}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,tg.binarySearchLB)(this._boundaries,r);this._current.buckets.counts[o+1]+=1}setStartTime(r){this.startTime=r}toPointValue(){return this._current}};Ft.HistogramAccumulation=Ht;var Ws=class{constructor(r,o){this._boundaries=r,this._recordMinMax=o,this.kind=Zv.AggregatorKind.HISTOGRAM}createAccumulation(r){return new Ht(r,this._boundaries,this._recordMinMax)}merge(r,o){let c=r.toPointValue(),u=o.toPointValue(),a=c.buckets.counts,t=u.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,s=-1/0;return this._recordMinMax&&(c.hasMinMax&&u.hasMinMax?(n=Math.min(c.min,u.min),s=Math.max(c.max,u.max)):c.hasMinMax?(n=c.min,s=c.max):u.hasMinMax&&(n=u.min,s=u.max)),new Ht(r.startTime,c.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:c.buckets.boundaries,counts:e},count:c.count+u.count,sum:c.sum+u.sum,hasMinMax:this._recordMinMax&&(c.hasMinMax||u.hasMinMax),min:n,max:s})}diff(r,o){let c=r.toPointValue(),u=o.toPointValue(),a=c.buckets.counts,t=u.buckets.counts,e=new Array(a.length);for(let n=0;n<a.length;n++)e[n]=t[n]-a[n];return new Ht(o.startTime,c.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:c.buckets.boundaries,counts:e},count:u.count-c.count,sum:u.sum-c.sum,hasMinMax:!1,min:1/0,max:-1/0})}toMetricData(r,o,c,u){return{descriptor:r,aggregationTemporality:o,dataPointType:eg.DataPointType.HISTOGRAM,dataPoints:c.map(([a,t])=>{let e=t.toPointValue(),n=r.type===Ys.InstrumentType.UP_DOWN_COUNTER||r.type===Ys.InstrumentType.OBSERVABLE_GAUGE||r.type===Ys.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:t.startTime,endTime:u,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}}})}}};Ft.HistogramAggregator=Ws});var Mf=d($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});$o.Buckets=void 0;var Js=class i{constructor(r=new Qs,o=0,c=0,u=0){this.backing=r,this.indexBase=o,this.indexStart=c,this.indexEnd=u}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,u=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&&u<o;n++)this._relocateBucket(a,u),u++,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))}};$o.Buckets=Js;var Qs=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 u=new Array(r).fill(0);u.splice(c,this._counts.length-o,...this._counts.slice(o)),u.splice(0,o,...this._counts.slice(0,o)),this._counts=u}reverse(r,o){let c=Math.floor((r+o)/2)-r;for(let u=0;u<c;u++){let a=this._counts[r+u];this._counts[r+u]=this._counts[o-u-1],this._counts[o-u-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 ea=d(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.getSignificand=oe.getNormalBase2=oe.MIN_VALUE=oe.MAX_NORMAL_EXPONENT=oe.MIN_NORMAL_EXPONENT=oe.SIGNIFICAND_WIDTH=void 0;oe.SIGNIFICAND_WIDTH=52;var ng=2146435072,og=1048575,Zs=1023;oe.MIN_NORMAL_EXPONENT=-Zs+1;oe.MAX_NORMAL_EXPONENT=Zs;oe.MIN_VALUE=Math.pow(2,-1022);function ig(i){let r=new DataView(new ArrayBuffer(8));return r.setFloat64(0,i),((r.getUint32(0)&ng)>>20)-Zs}oe.getNormalBase2=ig;function ug(i){let r=new DataView(new ArrayBuffer(8));r.setFloat64(0,i);let o=r.getUint32(0),c=r.getUint32(4);return(o&og)*Math.pow(2,32)+c}oe.getSignificand=ug});var Yo=d(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.nextGreaterSquare=Kt.ldexp=void 0;function sg(i,r){return i===0||i===Number.POSITIVE_INFINITY||i===Number.NEGATIVE_INFINITY||Number.isNaN(i)?i:i*Math.pow(2,r)}Kt.ldexp=sg;function ag(i){return i--,i|=i>>1,i|=i>>2,i|=i>>4,i|=i>>8,i|=i>>16,i++,i}Kt.nextGreaterSquare=ag});var Jo=d(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.MappingError=void 0;var ta=class extends Error{};Wo.MappingError=ta});var Uf=d(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.ExponentMapping=void 0;var Xt=ea(),cg=Yo(),Cf=Jo(),ra=class{constructor(r){this._shift=-r}mapToIndex(r){if(r<Xt.MIN_VALUE)return this._minNormalLowerBoundaryIndex();let o=Xt.getNormalBase2(r),c=this._rightShift(Xt.getSignificand(r)-1,Xt.SIGNIFICAND_WIDTH);return o+c>>this._shift}lowerBoundary(r){let o=this._minNormalLowerBoundaryIndex();if(r<o)throw new Cf.MappingError(`underflow: ${r} is < minimum lower boundary: ${o}`);let c=this._maxNormalLowerBoundaryIndex();if(r>c)throw new Cf.MappingError(`overflow: ${r} is > maximum lower boundary: ${c}`);return cg.ldexp(1,r<<this._shift)}get scale(){return this._shift===0?0:-this._shift}_minNormalLowerBoundaryIndex(){let r=Xt.MIN_NORMAL_EXPONENT>>this._shift;return this._shift<2&&r--,r}_maxNormalLowerBoundaryIndex(){return Xt.MAX_NORMAL_EXPONENT>>this._shift}_rightShift(r,o){return Math.floor(r*Math.pow(2,-o))}};Qo.ExponentMapping=ra});var Vf=d(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.LogarithmMapping=void 0;var zt=ea(),Df=Yo(),Bf=Jo(),na=class{constructor(r){this._scale=r,this._scaleFactor=Df.ldexp(Math.LOG2E,r),this._inverseFactor=Df.ldexp(Math.LN2,-r)}mapToIndex(r){if(r<=zt.MIN_VALUE)return this._minNormalLowerBoundaryIndex()-1;if(zt.getSignificand(r)===0)return(zt.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 Bf.MappingError(`overflow: ${r} is > maximum lower boundary: ${o}`)}let c=this._minNormalLowerBoundaryIndex();if(r<=c){if(r===c)return zt.MIN_VALUE;if(r===c-1)return Math.exp((r+(1<<this._scale))/this._scaleFactor)/2;throw new Bf.MappingError(`overflow: ${r} is < minimum lower boundary: ${c}`)}return Math.exp(r*this._inverseFactor)}get scale(){return this._scale}_minNormalLowerBoundaryIndex(){return zt.MIN_NORMAL_EXPONENT<<this._scale}_maxNormalLowerBoundaryIndex(){return(zt.MAX_NORMAL_EXPONENT+1<<this._scale)-1}};Zo.LogarithmMapping=na});var jf=d(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.getMapping=void 0;var lg=Uf(),pg=Vf(),fg=Jo(),kf=-10,qf=20,dg=Array.from({length:31},(i,r)=>r>10?new pg.LogarithmMapping(r-10):new lg.ExponentMapping(r-10));function hg(i){if(i>qf||i<kf)throw new fg.MappingError(`expected scale >= ${kf} && <= ${qf}, got: ${i}`);return dg[i+10]}ei.getMapping=hg});var Ff=d(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.ExponentialHistogramAggregator=Yt.ExponentialHistogramAccumulation=void 0;var _g=Gt(),mg=jt(),yg=(y(),E(m)),oa=Me(),Gf=Mf(),Hf=jf(),Eg=Yo(),$t=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))}},vg=20,gg=160,ia=2,ti=class i{constructor(r=r,o=gg,c=!0,u=0,a=0,t=0,e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,s=new Gf.Buckets,l=new Gf.Buckets,h=(0,Hf.getMapping)(vg)){this.startTime=r,this._maxSize=o,this._recordMinMax=c,this._sum=u,this._count=a,this._zeroCount=t,this._min=e,this._max=n,this._positive=s,this._negative=l,this._mapping=h,this._maxSize<ia&&(yg.diag.warn(`Exponential Histogram Max Size set to ${this._maxSize}, changing to the minimum size of: ${ia}`),this._maxSize=ia)}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 u=this._mapping.mapToIndex(o),a=!1,t=0,e=0;if(r.length===0?(r.indexStart=u,r.indexEnd=r.indexStart,r.indexBase=r.indexStart):u<r.indexStart&&r.indexEnd-u>=this._maxSize?(a=!0,e=u,t=r.indexEnd):u>r.indexEnd&&u-r.indexStart>=this._maxSize&&(a=!0,e=r.indexStart,t=u),a){let n=this._changeScale(t,e);this._downscale(n),u=this._mapping.mapToIndex(o)}this._incrementIndexBy(r,u,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 u=o-r.indexBase;u<0&&(u+=r.backing.length),r.incrementBucket(u,c)}_grow(r,o){let c=r.backing.length,u=r.indexBase-r.indexStart,a=c-u,t=(0,Eg.nextGreaterSquare)(o);t>this._maxSize&&(t=this._maxSize);let e=t-u;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,Hf.getMapping)(o)}_minScale(r){let o=Math.min(this.scale,r.scale),c=$t.combine(this._highLowAtScale(this.positive,this.scale,o),this._highLowAtScale(r.positive,r.scale,o)),u=$t.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(u.high,u.low))}_highLowAtScale(r,o,c){if(r.length===0)return new $t(0,-1);let u=o-c;return new $t(r.indexStart>>u,r.indexEnd>>u)}_mergeBuckets(r,o,c,u){let a=c.offset,t=o.scale-u;for(let e=0;e<c.length;e++)this._incrementIndexBy(r,a+e>>t,c.at(e))}_diffBuckets(r,o,c,u){let a=c.offset,t=o.scale-u;for(let e=0;e<c.length;e++){let s=(a+e>>t)-r.indexBase;s<0&&(s+=r.backing.length),r.decrementBucket(s,c.at(e))}r.trim()}};Yt.ExponentialHistogramAccumulation=ti;var ua=class{constructor(r,o){this._maxSize=r,this._recordMinMax=o,this.kind=_g.AggregatorKind.EXPONENTIAL_HISTOGRAM}createAccumulation(r){return new ti(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,u){return{descriptor:r,aggregationTemporality:o,dataPointType:mg.DataPointType.EXPONENTIAL_HISTOGRAM,dataPoints:c.map(([a,t])=>{let e=t.toPointValue(),n=r.type===oa.InstrumentType.UP_DOWN_COUNTER||r.type===oa.InstrumentType.OBSERVABLE_GAUGE||r.type===oa.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:t.startTime,endTime:u,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}}})}}};Yt.ExponentialHistogramAggregator=ua});var Kf=d(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.LastValueAggregator=Jt.LastValueAccumulation=void 0;var Tg=Gt(),kr=P(),Sg=jt(),Wt=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,kr.millisToHrTime)(Date.now())}setStartTime(r){this.startTime=r}toPointValue(){return this._current}};Jt.LastValueAccumulation=Wt;var sa=class{constructor(){this.kind=Tg.AggregatorKind.LAST_VALUE}createAccumulation(r){return new Wt(r)}merge(r,o){let c=(0,kr.hrTimeToMicroseconds)(o.sampleTime)>=(0,kr.hrTimeToMicroseconds)(r.sampleTime)?o:r;return new Wt(r.startTime,c.toPointValue(),c.sampleTime)}diff(r,o){let c=(0,kr.hrTimeToMicroseconds)(o.sampleTime)>=(0,kr.hrTimeToMicroseconds)(r.sampleTime)?o:r;return new Wt(o.startTime,c.toPointValue(),c.sampleTime)}toMetricData(r,o,c,u){return{descriptor:r,aggregationTemporality:o,dataPointType:Sg.DataPointType.GAUGE,dataPoints:c.map(([a,t])=>({attributes:a,startTime:t.startTime,endTime:u,value:t.toPointValue()}))}}};Jt.LastValueAggregator=sa});var Xf=d(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.SumAggregator=Qt.SumAccumulation=void 0;var bg=Gt(),Og=jt(),je=class{constructor(r,o,c=0,u=!1){this.startTime=r,this.monotonic=o,this._current=c,this.reset=u}record(r){this.monotonic&&r<0||(this._current+=r)}setStartTime(r){this.startTime=r}toPointValue(){return this._current}};Qt.SumAccumulation=je;var aa=class{constructor(r){this.monotonic=r,this.kind=bg.AggregatorKind.SUM}createAccumulation(r){return new je(r,this.monotonic)}merge(r,o){let c=r.toPointValue(),u=o.toPointValue();return o.reset?new je(o.startTime,this.monotonic,u,o.reset):new je(r.startTime,this.monotonic,c+u)}diff(r,o){let c=r.toPointValue(),u=o.toPointValue();return this.monotonic&&c>u?new je(o.startTime,this.monotonic,u,!0):new je(o.startTime,this.monotonic,u-c)}toMetricData(r,o,c,u){return{descriptor:r,aggregationTemporality:o,dataPointType:Og.DataPointType.SUM,dataPoints:c.map(([a,t])=>({attributes:a,startTime:t.startTime,endTime:u,value:t.toPointValue()})),isMonotonic:this.monotonic}}};Qt.SumAggregator=aa});var zf=d(ve=>{"use strict";var Ag=ve&&ve.__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]}),qr=ve&&ve.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Ag(r,i,o)};Object.defineProperty(ve,"__esModule",{value:!0});qr(xf(),ve);qr(wf(),ve);qr(Ff(),ve);qr(Kf(),ve);qr(Xf(),ve)});var ii=d(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.DefaultAggregation=X.ExponentialHistogramAggregation=X.ExplicitBucketHistogramAggregation=X.HistogramAggregation=X.LastValueAggregation=X.SumAggregation=X.DropAggregation=X.Aggregation=void 0;var Pg=(y(),E(m)),mt=zf(),Ce=Me(),xe=class{static Drop(){return $f}static Sum(){return Yf}static LastValue(){return Wf}static Histogram(){return Jf}static ExponentialHistogram(){return Ng}static Default(){return Rg}};X.Aggregation=xe;var jr=class i extends xe{createAggregator(r){return i.DEFAULT_INSTANCE}};X.DropAggregation=jr;jr.DEFAULT_INSTANCE=new mt.DropAggregator;var Zt=class i extends xe{createAggregator(r){switch(r.type){case Ce.InstrumentType.COUNTER:case Ce.InstrumentType.OBSERVABLE_COUNTER:case Ce.InstrumentType.HISTOGRAM:return i.MONOTONIC_INSTANCE;default:return i.NON_MONOTONIC_INSTANCE}}};X.SumAggregation=Zt;Zt.MONOTONIC_INSTANCE=new mt.SumAggregator(!0);Zt.NON_MONOTONIC_INSTANCE=new mt.SumAggregator(!1);var Gr=class i extends xe{createAggregator(r){return i.DEFAULT_INSTANCE}};X.LastValueAggregation=Gr;Gr.DEFAULT_INSTANCE=new mt.LastValueAggregator;var Hr=class i extends xe{createAggregator(r){return i.DEFAULT_INSTANCE}};X.HistogramAggregation=Hr;Hr.DEFAULT_INSTANCE=new mt.HistogramAggregator([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0);var ri=class extends xe{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),u=r.indexOf(1/0);u===-1&&(u=void 0),this._boundaries=r.slice(c+1,u)}createAggregator(r){return new mt.HistogramAggregator(this._boundaries,this._recordMinMax)}};X.ExplicitBucketHistogramAggregation=ri;var ni=class extends xe{constructor(r=160,o=!0){super(),this._maxSize=r,this._recordMinMax=o}createAggregator(r){return new mt.ExponentialHistogramAggregator(this._maxSize,this._recordMinMax)}};X.ExponentialHistogramAggregation=ni;var oi=class extends xe{_resolve(r){switch(r.type){case Ce.InstrumentType.COUNTER:case Ce.InstrumentType.UP_DOWN_COUNTER:case Ce.InstrumentType.OBSERVABLE_COUNTER:case Ce.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:return Yf;case Ce.InstrumentType.OBSERVABLE_GAUGE:return Wf;case Ce.InstrumentType.HISTOGRAM:return r.advice.explicitBucketBoundaries?new ri(r.advice.explicitBucketBoundaries):Jf}return Pg.diag.warn(`Unable to recognize instrument type: ${r.type}`),$f}createAggregator(r){return this._resolve(r).createAggregator(r)}};X.DefaultAggregation=oi;var $f=new jr,Yf=new Zt,Wf=new Gr,Jf=new Hr,Ng=new ni,Rg=new oi});var ca=d(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=er.DEFAULT_AGGREGATION_SELECTOR=void 0;var xg=ii(),Ig=Ko(),Lg=i=>xg.Aggregation.Default();er.DEFAULT_AGGREGATION_SELECTOR=Lg;var wg=i=>Ig.AggregationTemporality.CUMULATIVE;er.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=wg});var pa=d(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.MetricReader=void 0;var Qf=(y(),E(m)),ui=Re(),Zf=ca(),la=class{constructor(r){var o,c,u;this._shutdown=!1,this._aggregationSelector=(o=r?.aggregationSelector)!==null&&o!==void 0?o:Zf.DEFAULT_AGGREGATION_SELECTOR,this._aggregationTemporalitySelector=(c=r?.aggregationTemporalitySelector)!==null&&c!==void 0?c:Zf.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR,this._metricProducers=(u=r?.metricProducers)!==null&&u!==void 0?u:[]}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}))]),u=o.errors.concat((0,ui.FlatMap)(c,e=>e.errors)),a=o.resourceMetrics.resource,t=o.resourceMetrics.scopeMetrics.concat((0,ui.FlatMap)(c,e=>e.resourceMetrics.scopeMetrics));return{resourceMetrics:{resource:a,scopeMetrics:t},errors:u}}async shutdown(r){if(this._shutdown){Qf.diag.error("Cannot call shutdown twice.");return}r?.timeoutMillis==null?await this.onShutdown():await(0,ui.callWithTimeout)(this.onShutdown(),r.timeoutMillis),this._shutdown=!0}async forceFlush(r){if(this._shutdown){Qf.diag.warn("Cannot forceFlush on already shutdown MetricReader.");return}if(r?.timeoutMillis==null){await this.onForceFlush();return}await(0,ui.callWithTimeout)(this.onForceFlush(),r.timeoutMillis)}};si.MetricReader=la});var rd=d(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.PeriodicExportingMetricReader=void 0;var ed=(y(),E(m)),ai=P(),Mg=pa(),td=Re(),Cg=(y(),E(m)),fa=class extends Mg.MetricReader{constructor(r){var o,c,u,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=(u=r.exportIntervalMillis)!==null&&u!==void 0?u:6e4,this._exportTimeout=(a=r.exportTimeoutMillis)!==null&&a!==void 0?a:3e4,this._exporter=r.exporter}async _runOnce(){try{await(0,td.callWithTimeout)(this._doRun(),this._exportTimeout)}catch(r){if(r instanceof td.TimeoutError){ed.diag.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout);return}(0,ai.globalErrorHandler)(r)}}async _doRun(){var r,o;let{resourceMetrics:c,errors:u}=await this.collect({timeoutMillis:this._exportTimeout});u.length>0&&ed.diag.error("PeriodicExportingMetricReader: metrics collection errors",...u);let a=async()=>{let t=await ai.internal._export(this._exporter,c);if(t.code!==ai.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=>Cg.diag.debug("Error while resolving async portion of resource: ",t)):await a()}onInitialized(){this._interval=setInterval(()=>{this._runOnce()},this._exportInterval),(0,ai.unrefTimer)(this._interval)}async onForceFlush(){await this._runOnce(),await this._exporter.forceFlush()}async onShutdown(){this._interval&&clearInterval(this._interval),await this._exporter.shutdown()}};ci.PeriodicExportingMetricReader=fa});var od=d(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.InMemoryMetricExporter=void 0;var nd=P(),da=class{constructor(r){this._shutdown=!1,this._metrics=[],this._aggregationTemporality=r}export(r,o){if(this._shutdown){setTimeout(()=>o({code:nd.ExportResultCode.FAILED}),0);return}this._metrics.push(r),setTimeout(()=>o({code:nd.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()}};li.InMemoryMetricExporter=da});var ud=d(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.ConsoleMetricExporter=void 0;var id=P(),Ug=ca(),ha=class i{constructor(r){var o;this._shutdown=!1,this._temporalitySelector=(o=r?.temporalitySelector)!==null&&o!==void 0?o:Ug.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR}export(r,o){if(this._shutdown){setImmediate(o,{code:id.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 u of c.metrics)console.dir({descriptor:u.descriptor,dataPointType:u.dataPointType,dataPoints:u.dataPoints});o({code:id.ExportResultCode.SUCCESS})}};pi.ConsoleMetricExporter=ha});var sd=d(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.ViewRegistry=void 0;var _a=class{constructor(){this._registeredViews=[]}addView(r){this._registeredViews.push(r)}findViews(r,o){return this._registeredViews.filter(u=>this._matchInstrument(u.instrumentSelector,r)&&this._matchMeter(u.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))}};fi.ViewRegistry=_a});var di=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 tr=(y(),E(m)),Dg=P(),rr=class{constructor(r,o){this._writableMetricStorage=r,this._descriptor=o}_record(r,o={},c=tr.context.active()){if(typeof r!="number"){tr.diag.warn(`non-number value provided to metric ${this._descriptor.name}: ${r}`);return}this._descriptor.valueType===tr.ValueType.INT&&!Number.isInteger(r)&&(tr.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,Dg.millisToHrTime)(Date.now()))}};H.SyncInstrument=rr;var ma=class extends rr{add(r,o,c){this._record(r,o,c)}};H.UpDownCounterInstrument=ma;var ya=class extends rr{add(r,o,c){if(r<0){tr.diag.warn(`negative value provided to counter ${this._descriptor.name}: ${r}`);return}this._record(r,o,c)}};H.CounterInstrument=ya;var Ea=class extends rr{record(r,o,c){if(r<0){tr.diag.warn(`negative value provided to histogram ${this._descriptor.name}: ${r}`);return}this._record(r,o,c)}};H.HistogramInstrument=Ea;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 va=class extends yt{};H.ObservableCounterInstrument=va;var ga=class extends yt{};H.ObservableGaugeInstrument=ga;var Ta=class extends yt{};H.ObservableUpDownCounterInstrument=Ta;function Bg(i){return i instanceof yt}H.isObservableInstrument=Bg});var ad=d(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.Meter=void 0;var de=Me(),nr=di(),Sa=class{constructor(r){this._meterSharedState=r}createHistogram(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.HISTOGRAM,o),u=this._meterSharedState.registerMetricStorage(c);return new nr.HistogramInstrument(u,c)}createCounter(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.COUNTER,o),u=this._meterSharedState.registerMetricStorage(c);return new nr.CounterInstrument(u,c)}createUpDownCounter(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.UP_DOWN_COUNTER,o),u=this._meterSharedState.registerMetricStorage(c);return new nr.UpDownCounterInstrument(u,c)}createObservableGauge(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.OBSERVABLE_GAUGE,o),u=this._meterSharedState.registerAsyncMetricStorage(c);return new nr.ObservableGaugeInstrument(c,u,this._meterSharedState.observableRegistry)}createObservableCounter(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.OBSERVABLE_COUNTER,o),u=this._meterSharedState.registerAsyncMetricStorage(c);return new nr.ObservableCounterInstrument(c,u,this._meterSharedState.observableRegistry)}createObservableUpDownCounter(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER,o),u=this._meterSharedState.registerAsyncMetricStorage(c);return new nr.ObservableUpDownCounterInstrument(c,u,this._meterSharedState.observableRegistry)}addBatchObservableCallback(r,o){this._meterSharedState.observableRegistry.addBatchCallback(r,o)}removeBatchObservableCallback(r,o){this._meterSharedState.observableRegistry.removeBatchCallback(r,o)}};hi.Meter=Sa});var Oa=d(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.MetricStorage=void 0;var Vg=Me(),ba=class{constructor(r){this._instrumentDescriptor=r}getInstrumentDescriptor(){return this._instrumentDescriptor}updateDescription(r){this._instrumentDescriptor=(0,Vg.createInstrumentDescriptor)(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:r,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})}};_i.MetricStorage=ba});var Fr=d(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.AttributeHashMap=or.HashMap=void 0;var kg=Re(),mi=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 u=o();return this._keyMap.has(c)||this._keyMap.set(c,r),this._valueMap.set(c,u),u}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}};or.HashMap=mi;var Aa=class extends mi{constructor(){super(kg.hashAttributes)}};or.AttributeHashMap=Aa});var Ra=d(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.DeltaMetricProcessor=void 0;var Pa=Fr(),Na=class{constructor(r){this._aggregator=r,this._activeCollectionStorage=new Pa.AttributeHashMap,this._cumulativeMemoStorage=new Pa.AttributeHashMap}record(r,o,c,u){let a=this._activeCollectionStorage.getOrDefault(o,()=>this._aggregator.createAccumulation(u));a?.record(r)}batchCumulate(r,o){Array.from(r.entries()).forEach(([c,u,a])=>{let t=this._aggregator.createAccumulation(o);t?.record(u);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 Pa.AttributeHashMap,r}};yi.DeltaMetricProcessor=Na});var Ia=d(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.TemporalMetricProcessor=void 0;var qg=Ko(),jg=Fr(),xa=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,u){this._stashAccumulations(c);let a=this._getMergedUnreportedAccumulations(r),t=a,e;if(this._reportHistory.has(r)){let s=this._reportHistory.get(r),l=s.collectionTime;e=s.aggregationTemporality,e===qg.AggregationTemporality.CUMULATIVE?t=i.merge(s.accumulations,a,this._aggregator):t=i.calibrateStartTime(s.accumulations,a,l)}else e=r.selectAggregationTemporality(o.type);this._reportHistory.set(r,{accumulations:t,collectionTime:u,aggregationTemporality:e});let n=Gg(t);if(n.length!==0)return this._aggregator.toMetricData(o,e,n,u)}_stashAccumulations(r){let o=this._unreportedAccumulations.keys();for(let c of o){let u=this._unreportedAccumulations.get(c);u===void 0&&(u=[],this._unreportedAccumulations.set(c,u)),u.push(r)}}_getMergedUnreportedAccumulations(r){let o=new jg.AttributeHashMap,c=this._unreportedAccumulations.get(r);if(this._unreportedAccumulations.set(r,[]),c===void 0)return o;for(let u of c)o=i.merge(o,u,this._aggregator);return o}static merge(r,o,c){let u=r,a=o.entries(),t=a.next();for(;t.done!==!0;){let[e,n,s]=t.value;if(r.has(e,s)){let l=r.get(e,s),h=c.merge(l,n);u.set(e,h,s)}else u.set(e,n,s);t=a.next()}return u}static calibrateStartTime(r,o,c){for(let[u,a]of r.keys()){let t=o.get(u,a);t?.setStartTime(c)}return o}};Ei.TemporalMetricProcessor=xa;function Gg(i){return Array.from(i.entries())}});var cd=d(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.AsyncMetricStorage=void 0;var Hg=Oa(),Fg=Ra(),Kg=Ia(),Xg=Fr(),La=class extends Hg.MetricStorage{constructor(r,o,c,u){super(r),this._attributesProcessor=c,this._deltaMetricStorage=new Fg.DeltaMetricProcessor(o),this._temporalMetricStorage=new Kg.TemporalMetricProcessor(o,u)}record(r,o){let c=new Xg.AttributeHashMap;Array.from(r.entries()).forEach(([u,a])=>{c.set(this._attributesProcessor.process(u),a)}),this._deltaMetricStorage.batchCumulate(c,o)}collect(r,o){let c=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,c,o)}};vi.AsyncMetricStorage=La});var hd=d(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.getConflictResolutionRecipe=ie.getDescriptionResolutionRecipe=ie.getTypeConflictResolutionRecipe=ie.getUnitConflictResolutionRecipe=ie.getValueTypeConflictResolutionRecipe=ie.getIncompatibilityDetails=void 0;function zg(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
12
  `),o}ie.getIncompatibilityDetails=zg;function ld(i,r){return` - use valueType '${i.valueType}' on instrument creation or use an instrument name other than '${r.name}'`}ie.getValueTypeConflictResolutionRecipe=ld;function pd(i,r){return` - use unit '${i.unit}' on instrument creation or use an instrument name other than '${r.name}'`}ie.getUnitConflictResolutionRecipe=pd;function fd(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}'`}ie.getTypeConflictResolutionRecipe=fd;function dd(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}`}ie.getDescriptionResolutionRecipe=dd;function $g(i,r){return i.valueType!==r.valueType?ld(i,r):i.unit!==r.unit?pd(i,r):i.type!==r.type?fd(i,r):i.description!==r.description?dd(i,r):""}ie.getConflictResolutionRecipe=$g});var md=d(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.MetricStorageRegistry=void 0;var Yg=we(),_d=(y(),E(m)),gi=hd(),wa=class i{constructor(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}static create(){return new i}getStorages(r){let o=[];for(let u of this._sharedRegistry.values())o=o.concat(u);let c=this._perCollectorRegistry.get(r);if(c!=null)for(let u of c.values())o=o.concat(u);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 u=c.get(o.name);return u===void 0?null:this._findOrUpdateCompatibleStorage(o,u)}_registerStorage(r,o){let c=r.getInstrumentDescriptor(),u=o.get(c.name);if(u===void 0){o.set(c.name,[r]);return}u.push(r)}_findOrUpdateCompatibleStorage(r,o){let c=null;for(let u of o){let a=u.getInstrumentDescriptor();(0,Yg.isDescriptorCompatibleWith)(a,r)?(a.description!==r.description&&(r.description.length>a.description.length&&u.updateDescription(r.description),_d.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.
14
+ - OR - create a new view with the name ${r.name} and description '${i.description}' and InstrumentSelector ${c}`}ie.getDescriptionResolutionRecipe=dd;function $g(i,r){return i.valueType!==r.valueType?ld(i,r):i.unit!==r.unit?pd(i,r):i.type!==r.type?fd(i,r):i.description!==r.description?dd(i,r):""}ie.getConflictResolutionRecipe=$g});var md=d(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.MetricStorageRegistry=void 0;var Yg=Me(),_d=(y(),E(m)),gi=hd(),wa=class i{constructor(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}static create(){return new i}getStorages(r){let o=[];for(let u of this._sharedRegistry.values())o=o.concat(u);let c=this._perCollectorRegistry.get(r);if(c!=null)for(let u of c.values())o=o.concat(u);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 u=c.get(o.name);return u===void 0?null:this._findOrUpdateCompatibleStorage(o,u)}_registerStorage(r,o){let c=r.getInstrumentDescriptor(),u=o.get(c.name);if(u===void 0){o.set(c.name,[r]);return}u.push(r)}_findOrUpdateCompatibleStorage(r,o){let c=null;for(let u of o){let a=u.getInstrumentDescriptor();(0,Yg.isDescriptorCompatibleWith)(a,r)?(a.description!==r.description&&(r.description.length>a.description.length&&u.updateDescription(r.description),_d.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,gi.getIncompatibilityDetails)(a,r),`The longer description will be used.
17
17
  To resolve the conflict:`,(0,gi.getConflictResolutionRecipe)(a,r))),c=u):_d.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,gi.getIncompatibilityDetails)(a,r),`To resolve the conflict:
20
- `,(0,gi.getConflictResolutionRecipe)(a,r))}return c}};Ti.MetricStorageRegistry=wa});var yd=d(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.MultiMetricStorage=void 0;var Ma=class{constructor(r){this._backingStorages=r}record(r,o,c,u){this._backingStorages.forEach(a=>{a.record(r,o,c,u)})}};Si.MultiMetricStorage=Ma});var vd=d(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.BatchObservableResultImpl=ir.ObservableResultImpl=void 0;var or=(y(),E(m)),Ed=Hr(),Wg=di(),Ca=class{constructor(r,o){this._instrumentName=r,this._valueType=o,this._buffer=new Ed.AttributeHashMap}observe(r,o={}){if(typeof r!="number"){or.diag.warn(`non-number value provided to metric ${this._instrumentName}: ${r}`);return}this._valueType===or.ValueType.INT&&!Number.isInteger(r)&&(or.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)}};ir.ObservableResultImpl=Ca;var Ua=class{constructor(){this._buffer=new Map}observe(r,o,c={}){if(!(0,Wg.isObservableInstrument)(r))return;let u=this._buffer.get(r);if(u==null&&(u=new Ed.AttributeHashMap,this._buffer.set(r,u)),typeof o!="number"){or.diag.warn(`non-number value provided to metric ${r._descriptor.name}: ${o}`);return}r._descriptor.valueType===or.ValueType.INT&&!Number.isInteger(o)&&(or.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))||u.set(c,o)}};ir.BatchObservableResultImpl=Ua});var Sd=d(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.ObservableRegistry=void 0;var Jg=(y(),E(m)),gd=di(),Td=vd(),Fr=Ne(),Da=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(gd.isObservableInstrument));if(c.size===0){Jg.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(gd.isObservableInstrument)),u=this._findBatchCallback(r,c);u<0||this._batchCallbacks.splice(u,1)}async observe(r,o){let c=this._observeCallbacks(r,o),u=this._observeBatchCallbacks(r,o);return(await(0,Fr.PromiseAllSettled)([...c,...u])).filter(Fr.isPromiseAllSettledRejectionResult).map(e=>e.reason)}_observeCallbacks(r,o){return this._callbacks.map(async({callback:c,instrument:u})=>{let a=new Td.ObservableResultImpl(u._descriptor.name,u._descriptor.valueType),t=Promise.resolve(c(a));o!=null&&(t=(0,Fr.callWithTimeout)(t,o)),await t,u._metricStorages.forEach(e=>{e.record(a._buffer,r)})})}_observeBatchCallbacks(r,o){return this._batchCallbacks.map(async({callback:c,instruments:u})=>{let a=new Td.BatchObservableResultImpl,t=Promise.resolve(c(a));o!=null&&(t=(0,Fr.callWithTimeout)(t,o)),await t,u.forEach(e=>{let n=a._buffer.get(e);n!=null&&e._metricStorages.forEach(s=>{s.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,Fr.setEquals)(c.instruments,o))}};bi.ObservableRegistry=Da});var bd=d(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.SyncMetricStorage=void 0;var Qg=Oa(),Zg=Ra(),eT=Ia(),Ba=class extends Qg.MetricStorage{constructor(r,o,c,u){super(r),this._attributesProcessor=c,this._deltaMetricStorage=new Zg.DeltaMetricProcessor(o),this._temporalMetricStorage=new eT.TemporalMetricProcessor(o,u)}record(r,o,c,u){o=this._attributesProcessor.process(o,c),this._deltaMetricStorage.record(r,o,c,u)}collect(r,o){let c=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,c,o)}};Oi.SyncMetricStorage=Ba});var ka=d(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.FilteringAttributesProcessor=je.NoopAttributesProcessor=je.AttributesProcessor=void 0;var Kr=class{static Noop(){return tT}};je.AttributesProcessor=Kr;var Ai=class extends Kr{process(r,o){return r}};je.NoopAttributesProcessor=Ai;var Va=class extends Kr{constructor(r){super(),this._allowedAttributeNames=r}process(r,o){let c={};return Object.keys(r).filter(u=>this._allowedAttributeNames.includes(u)).forEach(u=>c[u]=r[u]),c}};je.FilteringAttributesProcessor=Va;var tT=new Ai});var Od=d(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.MeterSharedState=void 0;var rT=we(),nT=ad(),oT=Ne(),iT=cd(),uT=md(),sT=yd(),aT=Sd(),cT=bd(),lT=ka(),qa=class{constructor(r,o){this._meterProviderSharedState=r,this._instrumentationScope=o,this.metricStorageRegistry=new uT.MetricStorageRegistry,this.observableRegistry=new aT.ObservableRegistry,this.meter=new nT.Meter(this)}registerMetricStorage(r){let o=this._registerMetricStorage(r,cT.SyncMetricStorage);return o.length===1?o[0]:new sT.MultiMetricStorage(o)}registerAsyncMetricStorage(r){return this._registerMetricStorage(r,iT.AsyncMetricStorage)}async collect(r,o,c){let u=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(oT.isNotNullish);return t.length===0?{errors:u}:{scopeMetrics:{scope:this._instrumentationScope,metrics:t},errors:u}}_registerMetricStorage(r,o){let u=this._meterProviderSharedState.viewRegistry.findViews(r,this._instrumentationScope).map(a=>{let t=(0,rT.createInstrumentDescriptorWithView)(a,r),e=this.metricStorageRegistry.findOrUpdateCompatibleStorage(t);if(e!=null)return e;let n=a.aggregation.createAggregator(t),s=new o(t,n,a.attributesProcessor,this._meterProviderSharedState.metricCollectors);return this.metricStorageRegistry.register(s),s});if(u.length===0){let t=this._meterProviderSharedState.selectAggregations(r.type).map(([e,n])=>{let s=this.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(e,r);if(s!=null)return s;let l=n.createAggregator(r),h=new o(r,l,lT.AttributesProcessor.Noop(),[e]);return this.metricStorageRegistry.registerForCollector(e,h),h});u=u.concat(t)}return u}};Pi.MeterSharedState=qa});var Ad=d(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.MeterProviderSharedState=void 0;var pT=Ne(),fT=sd(),dT=Od(),ja=class{constructor(r){this.resource=r,this.viewRegistry=new fT.ViewRegistry,this.metricCollectors=[],this.meterSharedStates=new Map}getMeterSharedState(r){let o=(0,pT.instrumentationScopeId)(r),c=this.meterSharedStates.get(o);return c==null&&(c=new dT.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}};Ni.MeterProviderSharedState=ja});var Pd=d(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.MetricCollector=void 0;var hT=N(),Ga=class{constructor(r,o){this._sharedState=r,this._metricReader=o}async collect(r){let o=(0,hT.millisToHrTime)(Date.now()),c=[],u=[],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&&u.push(...e.errors)});return await Promise.all(a),{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:c},errors:u}}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)}};Ri.MetricCollector=Ga});var Rd=d(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.MeterProvider=void 0;var xi=(y(),E(m)),Nd=lt(),_T=Ad(),mT=Pd(),Ha=class{constructor(r){var o;this._shutdown=!1;let c=Nd.Resource.default().merge((o=r?.resource)!==null&&o!==void 0?o:Nd.Resource.empty());if(this._sharedState=new _T.MeterProviderSharedState(c),r?.views!=null&&r.views.length>0)for(let u of r.views)this._sharedState.viewRegistry.addView(u)}getMeter(r,o="",c={}){return this._shutdown?(xi.diag.warn("A shutdown MeterProvider cannot provide a Meter"),(0,xi.createNoopMeter)()):this._sharedState.getMeterSharedState({name:r,version:o,schemaUrl:c.schemaUrl}).meter}addMetricReader(r){let o=new mT.MetricCollector(this._sharedState,r);r.setMetricProducer(o),this._sharedState.metricCollectors.push(o)}async shutdown(r){if(this._shutdown){xi.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){xi.diag.warn("invalid attempt to force flush after MeterProvider shutdown");return}await Promise.all(this._sharedState.metricCollectors.map(o=>o.forceFlush(r)))}};Ii.MeterProvider=Ha});var Li=d(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.ExactPredicate=ur.PatternPredicate=void 0;var yT=/[\^$\\.+?()[\]{}|]/g,Fa=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(yT,"\\$&").replace("*",".*")}$`}static hasWildcard(r){return r.includes("*")}};ur.PatternPredicate=Fa;var Ka=class{constructor(r){this._matchAll=r===void 0,this._pattern=r}match(r){return!!(this._matchAll||r===this._pattern)}};ur.ExactPredicate=Ka});var Id=d(wi=>{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});wi.InstrumentSelector=void 0;var xd=Li(),Xa=class{constructor(r){var o;this._nameFilter=new xd.PatternPredicate((o=r?.name)!==null&&o!==void 0?o:"*"),this._type=r?.type,this._unitFilter=new xd.ExactPredicate(r?.unit)}getType(){return this._type}getNameFilter(){return this._nameFilter}getUnitFilter(){return this._unitFilter}};wi.InstrumentSelector=Xa});var Ld=d(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});Mi.MeterSelector=void 0;var za=Li(),$a=class{constructor(r){this._nameFilter=new za.ExactPredicate(r?.name),this._versionFilter=new za.ExactPredicate(r?.version),this._schemaUrlFilter=new za.ExactPredicate(r?.schemaUrl)}getNameFilter(){return this._nameFilter}getVersionFilter(){return this._versionFilter}getSchemaUrlFilter(){return this._schemaUrlFilter}};Mi.MeterSelector=$a});var Md=d(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.View=void 0;var ET=Li(),wd=ka(),vT=Id(),gT=Ld(),TT=ii();function ST(i){return i.instrumentName==null&&i.instrumentType==null&&i.instrumentUnit==null&&i.meterName==null&&i.meterVersion==null&&i.meterSchemaUrl==null}var Ya=class{constructor(r){var o;if(ST(r))throw new Error("Cannot create view with no selector arguments supplied");if(r.name!=null&&(r?.instrumentName==null||ET.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 wd.FilteringAttributesProcessor(r.attributeKeys):this.attributesProcessor=wd.AttributesProcessor.Noop(),this.name=r.name,this.description=r.description,this.aggregation=(o=r.aggregation)!==null&&o!==void 0?o:TT.Aggregation.Default(),this.instrumentSelector=new vT.InstrumentSelector({name:r.instrumentName,type:r.instrumentType,unit:r.instrumentUnit}),this.meterSelector=new gT.MeterSelector({name:r.meterName,version:r.meterVersion,schemaUrl:r.meterSchemaUrl})}};Ci.View=Ya});var Cd=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 bT=Ko();Object.defineProperty(A,"AggregationTemporality",{enumerable:!0,get:function(){return bT.AggregationTemporality}});var OT=qt();Object.defineProperty(A,"DataPointType",{enumerable:!0,get:function(){return OT.DataPointType}});var AT=pa();Object.defineProperty(A,"MetricReader",{enumerable:!0,get:function(){return AT.MetricReader}});var PT=rd();Object.defineProperty(A,"PeriodicExportingMetricReader",{enumerable:!0,get:function(){return PT.PeriodicExportingMetricReader}});var NT=od();Object.defineProperty(A,"InMemoryMetricExporter",{enumerable:!0,get:function(){return NT.InMemoryMetricExporter}});var RT=ud();Object.defineProperty(A,"ConsoleMetricExporter",{enumerable:!0,get:function(){return RT.ConsoleMetricExporter}});var xT=we();Object.defineProperty(A,"InstrumentType",{enumerable:!0,get:function(){return xT.InstrumentType}});var IT=Rd();Object.defineProperty(A,"MeterProvider",{enumerable:!0,get:function(){return IT.MeterProvider}});var Ge=ii();Object.defineProperty(A,"DefaultAggregation",{enumerable:!0,get:function(){return Ge.DefaultAggregation}});Object.defineProperty(A,"ExplicitBucketHistogramAggregation",{enumerable:!0,get:function(){return Ge.ExplicitBucketHistogramAggregation}});Object.defineProperty(A,"ExponentialHistogramAggregation",{enumerable:!0,get:function(){return Ge.ExponentialHistogramAggregation}});Object.defineProperty(A,"DropAggregation",{enumerable:!0,get:function(){return Ge.DropAggregation}});Object.defineProperty(A,"HistogramAggregation",{enumerable:!0,get:function(){return Ge.HistogramAggregation}});Object.defineProperty(A,"LastValueAggregation",{enumerable:!0,get:function(){return Ge.LastValueAggregation}});Object.defineProperty(A,"SumAggregation",{enumerable:!0,get:function(){return Ge.SumAggregation}});Object.defineProperty(A,"Aggregation",{enumerable:!0,get:function(){return Ge.Aggregation}});var LT=Md();Object.defineProperty(A,"View",{enumerable:!0,get:function(){return LT.View}});var wT=Ne();Object.defineProperty(A,"TimeoutError",{enumerable:!0,get:function(){return wT.TimeoutError}})});var Ud=d(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.AbstractAsyncHooksContextManager=void 0;var MT=X("events"),CT=["addListener","on","once","prependListener","prependOnceListener"],Wa=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(r,o){return o instanceof MT.EventEmitter?this._bindEventEmitter(r,o):typeof o=="function"?this._bindFunction(r,o):o}_bindFunction(r,o){let c=this,u=function(...a){return c.with(r,()=>o.apply(this,a))};return Object.defineProperty(u,"length",{enumerable:!1,configurable:!0,writable:!1,value:o.length}),u}_bindEventEmitter(r,o){return this._getPatchMap(o)!==void 0||(this._createPatchMap(o),CT.forEach(u=>{o[u]!==void 0&&(o[u]=this._patchAddListener(o,o[u],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(u,a){var t;let e=(t=c._getPatchMap(r))===null||t===void 0?void 0:t[u];if(e===void 0)return o.call(this,u,a);let n=e.get(a);return o.call(this,u,n||a)}}_patchRemoveAllListeners(r,o){let c=this;return function(u){let a=c._getPatchMap(r);return a!==void 0&&(arguments.length===0?c._createPatchMap(r):a[u]!==void 0&&delete a[u]),o.apply(this,arguments)}}_patchAddListener(r,o,c){let u=this;return function(a,t){if(u._wrapped)return o.call(this,a,t);let e=u._getPatchMap(r);e===void 0&&(e=u._createPatchMap(r));let n=e[a];n===void 0&&(n=new WeakMap,e[a]=n);let s=u.bind(c,t);n.set(t,s),u._wrapped=!0;try{return o.call(this,a,s)}finally{u._wrapped=!1}}}_createPatchMap(r){let o=Object.create(null);return r[this._kOtListeners]=o,o}_getPatchMap(r){return r[this._kOtListeners]}};Ui.AbstractAsyncHooksContextManager=Wa});var Dd=d(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.AsyncLocalStorageContextManager=void 0;var UT=(y(),E(m)),DT=X("async_hooks"),BT=Ud(),Ja=class extends BT.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new DT.AsyncLocalStorage}active(){var r;return(r=this._asyncLocalStorage.getStore())!==null&&r!==void 0?r:UT.ROOT_CONTEXT}with(r,o,c,...u){let a=c==null?o:o.bind(c);return this._asyncLocalStorage.run(r,a,...u)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};Di.AsyncLocalStorageContextManager=Ja});var rc=d(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.toAnyValue=He.toKeyValue=He.toAttributes=void 0;function qT(i){return Object.keys(i).map(r=>ec(r,i[r]))}He.toAttributes=qT;function ec(i,r){return{key:i,value:tc(r)}}He.toKeyValue=ec;function tc(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(tc)}}:r==="object"&&i!=null?{kvlistValue:{values:Object.entries(i).map(([o,c])=>ec(o,c))}}:{}}He.toAnyValue=tc});var Gd=d(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.toOtlpSpanEvent=Fe.toOtlpLink=Fe.sdkSpanToOtlpSpan=void 0;var nc=rc();function jT(i,r){var o;let c=i.spanContext(),u=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,nc.toAttributes)(i.attributes),droppedAttributesCount:i.droppedAttributesCount,events:i.events.map(a=>jd(a,r)),droppedEventsCount:i.droppedEventsCount,status:{code:u.code,message:u.message},links:i.links.map(a=>qd(a,r)),droppedLinksCount:i.droppedLinksCount}}Fe.sdkSpanToOtlpSpan=jT;function qd(i,r){var o;return{attributes:i.attributes?(0,nc.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}}Fe.toOtlpLink=qd;function jd(i,r){return{attributes:i.attributes?(0,nc.toAttributes)(i.attributes):[],name:i.name,timeUnixNano:r.encodeHrTime(i.time),droppedAttributesCount:i.droppedAttributesCount||0}}Fe.toOtlpSpanEvent=jd});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 ki=N(),GT=BigInt(1e9);function oc(i){return BigInt(i[0])*GT+BigInt(i[1])}he.hrTimeToNanos=oc;function Fd(i){let r=Number(BigInt.asUintN(32,i)),o=Number(BigInt.asUintN(32,i>>BigInt(32)));return{low:r,high:o}}he.toLongBits=Fd;function ic(i){let r=oc(i);return Fd(r)}he.encodeAsLongBits=ic;function Kd(i){return oc(i).toString()}he.encodeAsString=Kd;var HT=typeof BigInt<"u"?Kd:ki.hrTimeToNanoseconds;function Hd(i){return i}function Xd(i){if(i!==void 0)return(0,ki.hexToBase64)(i)}var FT={encodeHrTime:ic,encodeSpanContext:ki.hexToBase64,encodeOptionalSpanContext:Xd};function KT(i){var r,o;if(i===void 0)return FT;let c=(r=i.useLongBits)!==null&&r!==void 0?r:!0,u=(o=i.useHex)!==null&&o!==void 0?o:!1;return{encodeHrTime:c?ic:HT,encodeSpanContext:u?Hd:ki.hexToBase64,encodeOptionalSpanContext:u?Hd:Xd}}he.getOtlpEncoder=KT});var uc=d(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.createExportTraceServiceRequest=void 0;var XT=rc(),zT=Gd(),$T=zd();function YT(i,r){let o=(0,$T.getOtlpEncoder)(r);return{resourceSpans:JT(i,o)}}qi.createExportTraceServiceRequest=YT;function WT(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 u=`${o.instrumentationLibrary.name}@${o.instrumentationLibrary.version||""}:${o.instrumentationLibrary.schemaUrl||""}`,a=c.get(u);a||(a=[],c.set(u,a)),a.push(o)}return r}function JT(i,r){let o=WT(i),c=[],u=o.entries(),a=u.next();for(;!a.done;){let[t,e]=a.value,n=[],s=e.values(),l=s.next();for(;!l.done;){let T=l.value;if(T.length>0){let{name:R,version:b,schemaUrl:O}=T[0].instrumentationLibrary,V=T.map(L=>(0,zT.sdkSpanToOtlpSpan)(L,r));n.push({scope:{name:R,version:b},spans:V,schemaUrl:O})}l=s.next()}let h={resource:{attributes:(0,XT.toAttributes)(t.attributes),droppedAttributesCount:0},scopeSpans:n,schemaUrl:void 0};c.push(h),a=u.next()}return c}});var yt=d(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.parseRetryAfterToMills=B.isExportRetryable=B.invalidTimeout=B.configureExporterTimeout=B.appendRootPathToUrlIfNeeded=B.appendResourcePathToUrl=B.parseHeaders=B.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=B.DEFAULT_EXPORT_MAX_BACKOFF=B.DEFAULT_EXPORT_INITIAL_BACKOFF=B.DEFAULT_EXPORT_MAX_ATTEMPTS=void 0;var sc=(y(),E(m)),$d=N(),Yd=1e4;B.DEFAULT_EXPORT_MAX_ATTEMPTS=5;B.DEFAULT_EXPORT_INITIAL_BACKOFF=1e3;B.DEFAULT_EXPORT_MAX_BACKOFF=5e3;B.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=1.5;function QT(i={}){let r={};return Object.entries(i).forEach(([o,c])=>{typeof c<"u"?r[o]=String(c):sc.diag.warn(`Header "${o}" has wrong value and will be ignored`)}),r}B.parseHeaders=QT;function ZT(i,r){return i.endsWith("/")||(i=i+"/"),i+r}B.appendResourcePathToUrl=ZT;function eS(i){try{let r=new URL(i);return r.pathname===""&&(r.pathname=r.pathname+"/"),r.toString()}catch{return sc.diag.warn(`Could not parse export URL: '${i}'`),i}}B.appendRootPathToUrlIfNeeded=eS;function tS(i){return typeof i=="number"?i<=0?ac(i,Yd):i:rS()}B.configureExporterTimeout=tS;function rS(){var i;let r=Number((i=(0,$d.getEnv)().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)!==null&&i!==void 0?i:(0,$d.getEnv)().OTEL_EXPORTER_OTLP_TIMEOUT);return r<=0?ac(r,Yd):r}function ac(i,r){return sc.diag.warn("Timeout must be greater than 0",i),r}B.invalidTimeout=ac;function nS(i){return[429,502,503,504].includes(i)}B.isExportRetryable=nS;function oS(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}B.parseRetryAfterToMills=oS});var $r=d(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.OTLPExporterBase=void 0;var Wd=(y(),E(m)),zr=N(),iS=yt(),cc=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 zr.BindOnceFuture(this._shutdown,this),this._concurrencyLimit=typeof r.concurrencyLimit=="number"?r.concurrencyLimit:30,this.timeoutMillis=(0,iS.configureExporterTimeout)(r.timeoutMillis),this.onInit(r)}export(r,o){if(this._shutdownOnce.isCalled){o({code:zr.ExportResultCode.FAILED,error:new Error("Exporter has been shutdown")});return}if(this._sendingPromises.length>=this._concurrencyLimit){o({code:zr.ExportResultCode.FAILED,error:new Error("Concurrent export limit reached")});return}this._export(r).then(()=>{o({code:zr.ExportResultCode.SUCCESS})}).catch(c=>{o({code:zr.ExportResultCode.FAILED,error:c})})}_export(r){return new Promise((o,c)=>{try{Wd.diag.debug("items to be sent",r),this.send(r,o,c)}catch(u){c(u)}})}shutdown(){return this._shutdownOnce.call()}forceFlush(){return Promise.all(this._sendingPromises).then(()=>{})}_shutdown(){return Wd.diag.debug("shutdown started"),this.onShutdown(),this.forceFlush()}};ji.OTLPExporterBase=cc});var lc=d(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.CompressionAlgorithm=void 0;var aS;(function(i){i.NONE="none",i.GZIP="gzip"})(aS=Yr.CompressionAlgorithm||(Yr.CompressionAlgorithm={}))});var Fi=d(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.OTLPExporterError=void 0;var pc=class extends Error{constructor(r,o,c){super(r),this.name="OTLPExporterError",this.data=c,this.code=o}};Hi.OTLPExporterError=pc});var dc=d(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.configureCompression=Ke.createHttpAgent=Ke.sendWithHttp=void 0;var eh=X("url"),th=X("http"),rh=X("https"),cS=X("zlib"),lS=X("stream"),fc=(y(),E(m)),Ki=lc(),Zd=N(),Wr=Fi(),lr=yt();function pS(i,r,o,c,u){let a=i.timeoutMillis,t=new eh.URL(i.url),e=Number(process.versions.node.split(".")[0]),n,s,l=!1,h=setTimeout(()=>{if(clearTimeout(n),l=!0,s.destroyed){let O=new Wr.OTLPExporterError("Request Timeout");u(O)}else e>=14?s.destroy():s.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},R=t.protocol==="http:"?th.request:rh.request,b=(O=lr.DEFAULT_EXPORT_MAX_ATTEMPTS,V=lr.DEFAULT_EXPORT_INITIAL_BACKOFF)=>{switch(s=R(T,L=>{let H="";L.on("data",k=>H+=k),L.on("aborted",()=>{if(l){let k=new Wr.OTLPExporterError("Request Timeout");u(k)}}),L.on("end",()=>{if(l===!1)if(L.statusCode&&L.statusCode<299)fc.diag.debug(`statusCode: ${L.statusCode}`,H),c(),clearTimeout(h),clearTimeout(n);else if(L.statusCode&&(0,lr.isExportRetryable)(L.statusCode)&&O>0){let k;V=lr.DEFAULT_EXPORT_BACKOFF_MULTIPLIER*V,L.headers["retry-after"]?k=(0,lr.parseRetryAfterToMills)(L.headers["retry-after"]):k=Math.round(Math.random()*(lr.DEFAULT_EXPORT_MAX_BACKOFF-V)+V),n=setTimeout(()=>{b(O-1,V)},k)}else{let k=new Wr.OTLPExporterError(L.statusMessage,L.statusCode,H);u(k),clearTimeout(h),clearTimeout(n)}})}),s.on("error",L=>{if(l){let H=new Wr.OTLPExporterError("Request Timeout",L.code);u(H)}else u(L);clearTimeout(h),clearTimeout(n)}),s.on("abort",()=>{if(l){let L=new Wr.OTLPExporterError("Request Timeout");u(L)}clearTimeout(h),clearTimeout(n)}),i.compression){case Ki.CompressionAlgorithm.GZIP:{s.setHeader("Content-Encoding","gzip"),fS(r).on("error",u).pipe(cS.createGzip()).on("error",u).pipe(s);break}default:s.end(r);break}};b()}Ke.sendWithHttp=pS;function fS(i){let r=new lS.Readable;return r.push(i),r.push(null),r}function dS(i){if(i.httpAgentOptions&&i.keepAlive===!1){fc.diag.warn("httpAgentOptions is used only when keepAlive is true");return}if(!(i.keepAlive===!1||!i.url))try{let o=new eh.URL(i.url).protocol==="http:"?th.Agent:rh.Agent;return new o(Object.assign({keepAlive:!0},i.httpAgentOptions))}catch(r){fc.diag.error(`collector exporter failed to create http agent. err: ${r.message}`);return}}Ke.createHttpAgent=dS;function hS(i){return i||(((0,Zd.getEnv)().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION||(0,Zd.getEnv)().OTEL_EXPORTER_OTLP_COMPRESSION)===Ki.CompressionAlgorithm.GZIP?Ki.CompressionAlgorithm.GZIP:Ki.CompressionAlgorithm.NONE)}Ke.configureCompression=hS});var ih=d(Xi=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});Xi.OTLPExporterNodeBase=void 0;var _S=$r(),mS=yt(),hc=dc(),nh=(y(),E(m)),oh=N(),_c=class extends _S.OTLPExporterBase{constructor(r={}){super(r),this.DEFAULT_HEADERS={},r.metadata&&nh.diag.warn("Metadata cannot be set when using http"),this.headers=Object.assign(this.DEFAULT_HEADERS,(0,mS.parseHeaders)(r.headers),oh.baggageUtils.parseKeyPairsIntoRecord((0,oh.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)),this.agent=(0,hc.createHttpAgent)(r),this.compression=(0,hc.configureCompression)(r.compression)}onInit(r){}send(r,o,c){if(this._shutdownOnce.isCalled){nh.diag.debug("Shutdown already started. Cannot send objects");return}let u=this.convert(r),a=new Promise((e,n)=>{(0,hc.sendWithHttp)(this,JSON.stringify(u),"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(){}};Xi.OTLPExporterNodeBase=_c});var uh=d(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.CompressionAlgorithm=_e.configureCompression=_e.createHttpAgent=_e.sendWithHttp=_e.OTLPExporterNodeBase=void 0;var yS=ih();Object.defineProperty(_e,"OTLPExporterNodeBase",{enumerable:!0,get:function(){return yS.OTLPExporterNodeBase}});var mc=dc();Object.defineProperty(_e,"sendWithHttp",{enumerable:!0,get:function(){return mc.sendWithHttp}});Object.defineProperty(_e,"createHttpAgent",{enumerable:!0,get:function(){return mc.createHttpAgent}});Object.defineProperty(_e,"configureCompression",{enumerable:!0,get:function(){return mc.configureCompression}});var ES=lc();Object.defineProperty(_e,"CompressionAlgorithm",{enumerable:!0,get:function(){return ES.CompressionAlgorithm}})});var yc=d(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.sendWithXhr=fr.sendWithBeacon=void 0;var sh=(y(),E(m)),Jr=Fi(),pr=yt();function vS(i,r,o,c,u){if(navigator.sendBeacon(r,new Blob([i],o)))sh.diag.debug("sendBeacon - can send",i),c();else{let a=new Jr.OTLPExporterError(`sendBeacon - cannot send ${i}`);u(a)}}fr.sendWithBeacon=vS;function gS(i,r,o,c,u,a){let t,e,n=!1,s=setTimeout(()=>{if(clearTimeout(t),n=!0,e.readyState===XMLHttpRequest.DONE){let h=new Jr.OTLPExporterError("Request Timeout");a(h)}else e.abort()},c),l=(h=pr.DEFAULT_EXPORT_MAX_ATTEMPTS,T=pr.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(([b,O])=>{e.setRequestHeader(b,O)}),e.send(i),e.onreadystatechange=()=>{if(e.readyState===XMLHttpRequest.DONE&&n===!1)if(e.status>=200&&e.status<=299)sh.diag.debug("xhr success",i),u(),clearTimeout(s),clearTimeout(t);else if(e.status&&(0,pr.isExportRetryable)(e.status)&&h>0){let b;T=pr.DEFAULT_EXPORT_BACKOFF_MULTIPLIER*T,e.getResponseHeader("Retry-After")?b=(0,pr.parseRetryAfterToMills)(e.getResponseHeader("Retry-After")):b=Math.round(Math.random()*(pr.DEFAULT_EXPORT_MAX_BACKOFF-T)+T),t=setTimeout(()=>{l(h-1,T)},b)}else{let b=new Jr.OTLPExporterError(`Failed to export with XHR (status: ${e.status})`,e.status);a(b),clearTimeout(s),clearTimeout(t)}},e.onabort=()=>{if(n){let b=new Jr.OTLPExporterError("Request Timeout");a(b)}clearTimeout(s),clearTimeout(t)},e.onerror=()=>{if(n){let b=new Jr.OTLPExporterError("Request Timeout");a(b)}clearTimeout(s),clearTimeout(t)}};l()}fr.sendWithXhr=gS});var ch=d($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.OTLPExporterBrowserBase=void 0;var TS=$r(),SS=yt(),ah=yc(),bS=(y(),E(m)),zi=N(),Ec=class extends TS.OTLPExporterBase{constructor(r={}){super(r),this._useXHR=!1,this._useXHR=!!r.headers||typeof navigator.sendBeacon!="function",this._useXHR?this._headers=Object.assign({},(0,SS.parseHeaders)(r.headers),zi.baggageUtils.parseKeyPairsIntoRecord((0,zi.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)):this._headers={}}onInit(){zi._globalThis.addEventListener("unload",this.shutdown)}onShutdown(){zi._globalThis.removeEventListener("unload",this.shutdown)}send(r,o,c){if(this._shutdownOnce.isCalled){bS.diag.debug("Shutdown already started. Cannot send objects");return}let u=this.convert(r),a=JSON.stringify(u),t=new Promise((n,s)=>{this._useXHR?(0,ah.sendWithXhr)(a,this.url,this._headers,this.timeoutMillis,n,s):(0,ah.sendWithBeacon)(a,this.url,{type:"application/json"},n,s)}).then(o,c);this._sendingPromises.push(t);let e=()=>{let n=this._sendingPromises.indexOf(t);this._sendingPromises.splice(n,1)};t.then(e,e)}};$i.OTLPExporterBrowserBase=Ec});var lh=d(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.sendWithXhr=dr.OTLPExporterBrowserBase=void 0;var OS=ch();Object.defineProperty(dr,"OTLPExporterBrowserBase",{enumerable:!0,get:function(){return OS.OTLPExporterBrowserBase}});var AS=yc();Object.defineProperty(dr,"sendWithXhr",{enumerable:!0,get:function(){return AS.sendWithXhr}})});var fh=d(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.sendWithXhr=ne.OTLPExporterBrowserBase=ne.CompressionAlgorithm=ne.configureCompression=ne.createHttpAgent=ne.sendWithHttp=ne.OTLPExporterNodeBase=void 0;var Qr=uh();Object.defineProperty(ne,"OTLPExporterNodeBase",{enumerable:!0,get:function(){return Qr.OTLPExporterNodeBase}});Object.defineProperty(ne,"sendWithHttp",{enumerable:!0,get:function(){return Qr.sendWithHttp}});Object.defineProperty(ne,"createHttpAgent",{enumerable:!0,get:function(){return Qr.createHttpAgent}});Object.defineProperty(ne,"configureCompression",{enumerable:!0,get:function(){return Qr.configureCompression}});Object.defineProperty(ne,"CompressionAlgorithm",{enumerable:!0,get:function(){return Qr.CompressionAlgorithm}});var ph=lh();Object.defineProperty(ne,"OTLPExporterBrowserBase",{enumerable:!0,get:function(){return ph.OTLPExporterBrowserBase}});Object.defineProperty(ne,"sendWithXhr",{enumerable:!0,get:function(){return ph.sendWithXhr}})});var Yi=d(q=>{"use strict";var PS=q&&q.__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]}),NS=q&&q.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&PS(r,i,o)};Object.defineProperty(q,"__esModule",{value:!0});q.invalidTimeout=q.configureExporterTimeout=q.appendRootPathToUrlIfNeeded=q.appendResourcePathToUrl=q.parseHeaders=q.OTLPExporterError=q.OTLPExporterBase=void 0;NS(fh(),q);var RS=$r();Object.defineProperty(q,"OTLPExporterBase",{enumerable:!0,get:function(){return RS.OTLPExporterBase}});var xS=Fi();Object.defineProperty(q,"OTLPExporterError",{enumerable:!0,get:function(){return xS.OTLPExporterError}});var Zr=yt();Object.defineProperty(q,"parseHeaders",{enumerable:!0,get:function(){return Zr.parseHeaders}});Object.defineProperty(q,"appendResourcePathToUrl",{enumerable:!0,get:function(){return Zr.appendResourcePathToUrl}});Object.defineProperty(q,"appendRootPathToUrlIfNeeded",{enumerable:!0,get:function(){return Zr.appendRootPathToUrlIfNeeded}});Object.defineProperty(q,"configureExporterTimeout",{enumerable:!0,get:function(){return Zr.configureExporterTimeout}});Object.defineProperty(q,"invalidTimeout",{enumerable:!0,get:function(){return Zr.invalidTimeout}})});var hh=d((uN,dh)=>{"use strict";dh.exports=IS;function IS(i,r){for(var o=new Array(arguments.length-1),c=0,u=2,a=!0;u<arguments.length;)o[c++]=arguments[u++];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(s){a&&(a=!1,n(s))}})}});var Eh=d(yh=>{"use strict";var Wi=yh;Wi.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 hr=new Array(64),mh=new Array(123);for(ge=0;ge<64;)mh[hr[ge]=ge<26?ge+65:ge<52?ge+71:ge<62?ge-4:ge-59|43]=ge++;var ge;Wi.encode=function(r,o,c){for(var u=null,a=[],t=0,e=0,n;o<c;){var s=r[o++];switch(e){case 0:a[t++]=hr[s>>2],n=(s&3)<<4,e=1;break;case 1:a[t++]=hr[n|s>>4],n=(s&15)<<2,e=2;break;case 2:a[t++]=hr[n|s>>6],a[t++]=hr[s&63],e=0;break}t>8191&&((u||(u=[])).push(String.fromCharCode.apply(String,a)),t=0)}return e&&(a[t++]=hr[n],a[t++]=61,e===1&&(a[t++]=61)),u?(t&&u.push(String.fromCharCode.apply(String,a.slice(0,t))),u.join("")):String.fromCharCode.apply(String,a.slice(0,t))};var _h="invalid encoding";Wi.decode=function(r,o,c){for(var u=c,a=0,t,e=0;e<r.length;){var n=r.charCodeAt(e++);if(n===61&&a>1)break;if((n=mh[n])===void 0)throw Error(_h);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(_h);return c-u};Wi.test=function(r){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r)}});var gh=d((aN,vh)=>{"use strict";vh.exports=Ji;function Ji(){this._listeners={}}Ji.prototype.on=function(r,o,c){return(this._listeners[r]||(this._listeners[r]=[])).push({fn:o,ctx:c||this}),this};Ji.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],u=0;u<c.length;)c[u].fn===o?c.splice(u,1):++u;return this};Ji.prototype.emit=function(r){var o=this._listeners[r];if(o){for(var c=[],u=1;u<arguments.length;)c.push(arguments[u++]);for(u=0;u<o.length;)o[u].fn.apply(o[u++].ctx,c)}return this}});var Nh=d((cN,Ph)=>{"use strict";Ph.exports=Th(Th);function Th(i){return typeof Float32Array<"u"?function(){var r=new Float32Array([-0]),o=new Uint8Array(r.buffer),c=o[3]===128;function u(n,s,l){r[0]=n,s[l]=o[0],s[l+1]=o[1],s[l+2]=o[2],s[l+3]=o[3]}function a(n,s,l){r[0]=n,s[l]=o[3],s[l+1]=o[2],s[l+2]=o[1],s[l+3]=o[0]}i.writeFloatLE=c?u:a,i.writeFloatBE=c?a:u;function t(n,s){return o[0]=n[s],o[1]=n[s+1],o[2]=n[s+2],o[3]=n[s+3],r[0]}function e(n,s){return o[3]=n[s],o[2]=n[s+1],o[1]=n[s+2],o[0]=n[s+3],r[0]}i.readFloatLE=c?t:e,i.readFloatBE=c?e:t}():function(){function r(c,u,a,t){var e=u<0?1:0;if(e&&(u=-u),u===0)c(1/u>0?0:2147483648,a,t);else if(isNaN(u))c(2143289344,a,t);else if(u>34028234663852886e22)c((e<<31|2139095040)>>>0,a,t);else if(u<11754943508222875e-54)c((e<<31|Math.round(u/1401298464324817e-60))>>>0,a,t);else{var n=Math.floor(Math.log(u)/Math.LN2),s=Math.round(u*Math.pow(2,-n)*8388608)&8388607;c((e<<31|n+127<<23|s)>>>0,a,t)}}i.writeFloatLE=r.bind(null,Sh),i.writeFloatBE=r.bind(null,bh);function o(c,u,a){var t=c(u,a),e=(t>>31)*2+1,n=t>>>23&255,s=t&8388607;return n===255?s?NaN:e*(1/0):n===0?e*1401298464324817e-60*s:e*Math.pow(2,n-150)*(s+8388608)}i.readFloatLE=o.bind(null,Oh),i.readFloatBE=o.bind(null,Ah)}(),typeof Float64Array<"u"?function(){var r=new Float64Array([-0]),o=new Uint8Array(r.buffer),c=o[7]===128;function u(n,s,l){r[0]=n,s[l]=o[0],s[l+1]=o[1],s[l+2]=o[2],s[l+3]=o[3],s[l+4]=o[4],s[l+5]=o[5],s[l+6]=o[6],s[l+7]=o[7]}function a(n,s,l){r[0]=n,s[l]=o[7],s[l+1]=o[6],s[l+2]=o[5],s[l+3]=o[4],s[l+4]=o[3],s[l+5]=o[2],s[l+6]=o[1],s[l+7]=o[0]}i.writeDoubleLE=c?u:a,i.writeDoubleBE=c?a:u;function t(n,s){return o[0]=n[s],o[1]=n[s+1],o[2]=n[s+2],o[3]=n[s+3],o[4]=n[s+4],o[5]=n[s+5],o[6]=n[s+6],o[7]=n[s+7],r[0]}function e(n,s){return o[7]=n[s],o[6]=n[s+1],o[5]=n[s+2],o[4]=n[s+3],o[3]=n[s+4],o[2]=n[s+5],o[1]=n[s+6],o[0]=n[s+7],r[0]}i.readDoubleLE=c?t:e,i.readDoubleBE=c?e:t}():function(){function r(c,u,a,t,e,n){var s=t<0?1:0;if(s&&(t=-t),t===0)c(0,e,n+u),c(1/t>0?0:2147483648,e,n+a);else if(isNaN(t))c(0,e,n+u),c(2146959360,e,n+a);else if(t>17976931348623157e292)c(0,e,n+u),c((s<<31|2146435072)>>>0,e,n+a);else{var l;if(t<22250738585072014e-324)l=t/5e-324,c(l>>>0,e,n+u),c((s<<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+u),c((s<<31|h+1023<<20|l*1048576&1048575)>>>0,e,n+a)}}}i.writeDoubleLE=r.bind(null,Sh,0,4),i.writeDoubleBE=r.bind(null,bh,4,0);function o(c,u,a,t,e){var n=c(t,e+u),s=c(t,e+a),l=(s>>31)*2+1,h=s>>>20&2047,T=4294967296*(s&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,Oh,0,4),i.readDoubleBE=o.bind(null,Ah,4,0)}(),i}function Sh(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 bh(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 Oh(i,r){return(i[r]|i[r+1]<<8|i[r+2]<<16|i[r+3]<<24)>>>0}function Ah(i,r){return(i[r]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3])>>>0}});var Rh=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 Ih=d(xh=>{"use strict";var vc=xh;vc.length=function(r){for(var o=0,c=0,u=0;u<r.length;++u)c=r.charCodeAt(u),c<128?o+=1:c<2048?o+=2:(c&64512)===55296&&(r.charCodeAt(u+1)&64512)===56320?(++u,o+=4):o+=3;return o};vc.read=function(r,o,c){var u=c-o;if(u<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))};vc.write=function(r,o,c){for(var u=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-u}});var wh=d((pN,Lh)=>{"use strict";Lh.exports=LS;function LS(i,r,o){var c=o||8192,u=c>>>1,a=null,t=c;return function(n){if(n<1||n>u)return i(n);t+n>c&&(a=i(c),t=0);var s=r.call(a,t,t+=n);return t&7&&(t=(t|7)+1),s}}});var Ch=d((fN,Mh)=>{"use strict";Mh.exports=$;var en=ze();function $(i,r){this.lo=i>>>0,this.hi=r>>>0}var Et=$.zero=new $(0,0);Et.toNumber=function(){return 0};Et.zzEncode=Et.zzDecode=function(){return this};Et.length=function(){return 1};var wS=$.zeroHash="\0\0\0\0\0\0\0\0";$.fromNumber=function(r){if(r===0)return Et;var o=r<0;o&&(r=-r);var c=r>>>0,u=(r-c)/4294967296>>>0;return o&&(u=~u>>>0,c=~c>>>0,++c>4294967295&&(c=0,++u>4294967295&&(u=0))),new $(c,u)};$.from=function(r){if(typeof r=="number")return $.fromNumber(r);if(en.isString(r))if(en.Long)r=en.Long.fromString(r);else return $.fromNumber(parseInt(r,10));return r.low||r.high?new $(r.low>>>0,r.high>>>0):Et};$.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 en.Long?new en.Long(this.lo|0,this.hi|0,!!r):{low:this.lo|0,high:this.hi|0,unsigned:!!r}};var Xe=String.prototype.charCodeAt;$.fromHash=function(r){return r===wS?Et:new $((Xe.call(r,0)|Xe.call(r,1)<<8|Xe.call(r,2)<<16|Xe.call(r,3)<<24)>>>0,(Xe.call(r,4)|Xe.call(r,5)<<8|Xe.call(r,6)<<16|Xe.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 ze=d(gc=>{"use strict";var v=gc;v.asPromise=hh();v.base64=Eh();v.EventEmitter=gh();v.float=Nh();v.inquire=Rh();v.utf8=Ih();v.pool=wh();v.LongBits=Ch();v.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);v.global=v.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||gc;v.emptyArray=Object.freeze?Object.freeze([]):[];v.emptyObject=Object.freeze?Object.freeze({}):{};v.isInteger=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r};v.isString=function(r){return typeof r=="string"||r instanceof String};v.isObject=function(r){return r&&typeof r=="object"};v.isset=v.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};v.Buffer=function(){try{var i=v.inquire("buffer").Buffer;return i.prototype.utf8Write?i:null}catch{return null}}();v._Buffer_from=null;v._Buffer_allocUnsafe=null;v.newBuffer=function(r){return typeof r=="number"?v.Buffer?v._Buffer_allocUnsafe(r):new v.Array(r):v.Buffer?v._Buffer_from(r):typeof Uint8Array>"u"?r:new Uint8Array(r)};v.Array=typeof Uint8Array<"u"?Uint8Array:Array;v.Long=v.global.dcodeIO&&v.global.dcodeIO.Long||v.global.Long||v.inquire("long");v.key2Re=/^true|false|0|1$/;v.key32Re=/^-?(?:0|[1-9][0-9]*)$/;v.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;v.longToHash=function(r){return r?v.LongBits.from(r).toHash():v.LongBits.zeroHash};v.longFromHash=function(r,o){var c=v.LongBits.fromHash(r);return v.Long?v.Long.fromBits(c.lo,c.hi,o):c.toNumber(!!o)};function Uh(i,r,o){for(var c=Object.keys(r),u=0;u<c.length;++u)(i[c[u]]===void 0||!o)&&(i[c[u]]=r[c[u]]);return i}v.merge=Uh;v.lcFirst=function(r){return r.charAt(0).toLowerCase()+r.substring(1)};function Dh(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&&Uh(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}v.newError=Dh;v.ProtocolError=Dh("ProtocolError");v.oneOfGetter=function(r){for(var o={},c=0;c<r.length;++c)o[r[c]]=1;return function(){for(var u=Object.keys(this),a=u.length-1;a>-1;--a)if(o[u[a]]===1&&this[u[a]]!==void 0&&this[u[a]]!==null)return u[a]}};v.oneOfSetter=function(r){return function(o){for(var c=0;c<r.length;++c)r[c]!==o&&delete this[r[c]]}};v.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};v._configure=function(){var i=v.Buffer;if(!i){v._Buffer_from=v._Buffer_allocUnsafe=null;return}v._Buffer_from=i.from!==Uint8Array.from&&i.from||function(o,c){return new i(o,c)},v._Buffer_allocUnsafe=i.allocUnsafe||function(o){return new i(o)}}});var Nc=d((hN,qh)=>{"use strict";qh.exports=x;var me=ze(),Tc,Qi=me.LongBits,Bh=me.base64,Vh=me.utf8;function tn(i,r,o){this.fn=i,this.len=r,this.next=void 0,this.val=o}function bc(){}function MS(i){this.head=i.head,this.tail=i.tail,this.len=i.len,this.next=i.states}function x(){this.len=0,this.head=new tn(bc,0,0),this.tail=this.head,this.states=null}var kh=function(){return me.Buffer?function(){return(x.create=function(){return new Tc})()}:function(){return new x}};x.create=kh();x.alloc=function(r){return new me.Array(r)};me.Array!==Array&&(x.alloc=me.pool(x.alloc,me.Array.prototype.subarray));x.prototype._push=function(r,o,c){return this.tail=this.tail.next=new tn(r,o,c),this.len+=o,this};function Oc(i,r,o){r[o]=i&255}function CS(i,r,o){for(;i>127;)r[o++]=i&127|128,i>>>=7;r[o]=i}function Ac(i,r){this.len=i,this.next=void 0,this.val=r}Ac.prototype=Object.create(tn.prototype);Ac.prototype.fn=CS;x.prototype.uint32=function(r){return this.len+=(this.tail=this.tail.next=new Ac((r=r>>>0)<128?1:r<16384?2:r<2097152?3:r<268435456?4:5,r)).len,this};x.prototype.int32=function(r){return r<0?this._push(Pc,10,Qi.fromNumber(r)):this.uint32(r)};x.prototype.sint32=function(r){return this.uint32((r<<1^r>>31)>>>0)};function Pc(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}x.prototype.uint64=function(r){var o=Qi.from(r);return this._push(Pc,o.length(),o)};x.prototype.int64=x.prototype.uint64;x.prototype.sint64=function(r){var o=Qi.from(r).zzEncode();return this._push(Pc,o.length(),o)};x.prototype.bool=function(r){return this._push(Oc,1,r?1:0)};function Sc(i,r,o){r[o]=i&255,r[o+1]=i>>>8&255,r[o+2]=i>>>16&255,r[o+3]=i>>>24}x.prototype.fixed32=function(r){return this._push(Sc,4,r>>>0)};x.prototype.sfixed32=x.prototype.fixed32;x.prototype.fixed64=function(r){var o=Qi.from(r);return this._push(Sc,4,o.lo)._push(Sc,4,o.hi)};x.prototype.sfixed64=x.prototype.fixed64;x.prototype.float=function(r){return this._push(me.float.writeFloatLE,4,r)};x.prototype.double=function(r){return this._push(me.float.writeDoubleLE,8,r)};var US=me.Array.prototype.set?function(r,o,c){o.set(r,c)}:function(r,o,c){for(var u=0;u<r.length;++u)o[c+u]=r[u]};x.prototype.bytes=function(r){var o=r.length>>>0;if(!o)return this._push(Oc,1,0);if(me.isString(r)){var c=x.alloc(o=Bh.length(r));Bh.decode(r,c,0),r=c}return this.uint32(o)._push(US,o,r)};x.prototype.string=function(r){var o=Vh.length(r);return o?this.uint32(o)._push(Vh.write,o,r):this._push(Oc,1,0)};x.prototype.fork=function(){return this.states=new MS(this),this.head=this.tail=new tn(bc,0,0),this.len=0,this};x.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 tn(bc,0,0),this.len=0),this};x.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};x.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};x._configure=function(i){Tc=i,x.create=kh(),Tc._configure()}});var Hh=d((_N,Gh)=>{"use strict";Gh.exports=xe;var jh=Nc();(xe.prototype=Object.create(jh.prototype)).constructor=xe;var $e=ze();function xe(){jh.call(this)}xe._configure=function(){xe.alloc=$e._Buffer_allocUnsafe,xe.writeBytesBuffer=$e.Buffer&&$e.Buffer.prototype instanceof Uint8Array&&$e.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 u=0;u<r.length;)o[c++]=r[u++]}};xe.prototype.bytes=function(r){$e.isString(r)&&(r=$e._Buffer_from(r,"base64"));var o=r.length>>>0;return this.uint32(o),o&&this._push(xe.writeBytesBuffer,o,r),this};function DS(i,r,o){i.length<40?$e.utf8.write(i,r,o):r.utf8Write?r.utf8Write(i,o):r.write(i,o)}xe.prototype.string=function(r){var o=$e.Buffer.byteLength(r);return this.uint32(o),o&&this._push(DS,o,r),this};xe._configure()});var Ic=d((mN,$h)=>{"use strict";$h.exports=j;var Te=ze(),xc,Xh=Te.LongBits,BS=Te.utf8;function Se(i,r){return RangeError("index out of range: "+i.pos+" + "+(r||1)+" > "+i.len)}function j(i){this.buf=i,this.pos=0,this.len=i.length}var Fh=typeof Uint8Array<"u"?function(r){if(r instanceof Uint8Array||Array.isArray(r))return new j(r);throw Error("illegal buffer")}:function(r){if(Array.isArray(r))return new j(r);throw Error("illegal buffer")},zh=function(){return Te.Buffer?function(o){return(j.create=function(u){return Te.Buffer.isBuffer(u)?new xc(u):Fh(u)})(o)}:Fh};j.create=zh();j.prototype._slice=Te.Array.prototype.subarray||Te.Array.prototype.slice;j.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}}();j.prototype.int32=function(){return this.uint32()|0};j.prototype.sint32=function(){var r=this.uint32();return r>>>1^-(r&1)|0};function Rc(){var i=new Xh(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")}j.prototype.bool=function(){return this.uint32()!==0};function Zi(i,r){return(i[r-4]|i[r-3]<<8|i[r-2]<<16|i[r-1]<<24)>>>0}j.prototype.fixed32=function(){if(this.pos+4>this.len)throw Se(this,4);return Zi(this.buf,this.pos+=4)};j.prototype.sfixed32=function(){if(this.pos+4>this.len)throw Se(this,4);return Zi(this.buf,this.pos+=4)|0};function Kh(){if(this.pos+8>this.len)throw Se(this,8);return new Xh(Zi(this.buf,this.pos+=4),Zi(this.buf,this.pos+=4))}j.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};j.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};j.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 u=Te.Buffer;return u?u.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,o,c)};j.prototype.string=function(){var r=this.bytes();return BS.read(r,0,r.length)};j.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};j.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};j._configure=function(i){xc=i,j.create=zh(),xc._configure();var r=Te.Long?"toLong":"toNumber";Te.merge(j.prototype,{int64:function(){return Rc.call(this)[r](!1)},uint64:function(){return Rc.call(this)[r](!0)},sint64:function(){return Rc.call(this).zzDecode()[r](!1)},fixed64:function(){return Kh.call(this)[r](!0)},sfixed64:function(){return Kh.call(this)[r](!1)}})}});var Qh=d((yN,Jh)=>{"use strict";Jh.exports=vt;var Wh=Ic();(vt.prototype=Object.create(Wh.prototype)).constructor=vt;var Yh=ze();function vt(i){Wh.call(this,i)}vt._configure=function(){Yh.Buffer&&(vt.prototype._slice=Yh.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 e_=d((EN,Zh)=>{"use strict";Zh.exports=rn;var Lc=ze();(rn.prototype=Object.create(Lc.EventEmitter.prototype)).constructor=rn;function rn(i,r,o){if(typeof i!="function")throw TypeError("rpcImpl must be a function");Lc.EventEmitter.call(this),this.rpcImpl=i,this.requestDelimited=!!r,this.responseDelimited=!!o}rn.prototype.rpcCall=function i(r,o,c,u,a){if(!u)throw TypeError("request must be specified");var t=this;if(!a)return Lc.asPromise(i,t,r,o,c,u);if(!t.rpcImpl){setTimeout(function(){a(Error("already ended"))},0);return}try{return t.rpcImpl(r,o[t.requestDelimited?"encodeDelimited":"encode"](u).finish(),function(n,s){if(n)return t.emit("error",n,r),a(n);if(s===null){t.end(!0);return}if(!(s instanceof c))try{s=c[t.responseDelimited?"decodeDelimited":"decode"](s)}catch(l){return t.emit("error",l,r),a(l)}return t.emit("data",s,r),a(null,s)})}catch(e){t.emit("error",e,r),setTimeout(function(){a(e)},0);return}};rn.prototype.end=function(r){return this.rpcImpl&&(r||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var r_=d(t_=>{"use strict";var VS=t_;VS.Service=e_()});var o_=d((gN,n_)=>{"use strict";n_.exports={}});var s_=d(u_=>{"use strict";var ue=u_;ue.build="minimal";ue.Writer=Nc();ue.BufferWriter=Hh();ue.Reader=Ic();ue.BufferReader=Qh();ue.util=ze();ue.rpc=r_();ue.roots=o_();ue.configure=i_;function i_(){ue.util._configure(),ue.Writer._configure(ue.BufferWriter),ue.Reader._configure(ue.BufferReader)}i_()});var c_=d((SN,a_)=>{"use strict";a_.exports=s_()});var p_=d((bN,l_)=>{"use strict";var g=c_(),_=g.Reader,S=g.Writer,f=g.util,p=g.roots.default||(g.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 u(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]])}u.prototype.stringValue=null,u.prototype.boolValue=null,u.prototype.intValue=null,u.prototype.doubleValue=null,u.prototype.arrayValue=null,u.prototype.kvlistValue=null,u.prototype.bytesValue=null;var a;return Object.defineProperty(u.prototype,"value",{get:f.oneOfGetter(a=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"]),set:f.oneOfSetter(a)}),u.create=function(e){return new u(e)},u.encode=function(e,n){return n||(n=S.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},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.common.v1.AnyValue;e.pos<s;){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},u.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},u.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 s=p.opentelemetry.proto.common.v1.ArrayValue.verify(e.arrayValue);if(s)return"arrayValue."+s}}if(e.kvlistValue!=null&&e.hasOwnProperty("kvlistValue")){if(n.value===1)return"value: multiple values";n.value=1;{var s=p.opentelemetry.proto.common.v1.KeyValueList.verify(e.kvlistValue);if(s)return"kvlistValue."+s}}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},u.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},u.toObject=function(e,n){n||(n={});var s={};return e.stringValue!=null&&e.hasOwnProperty("stringValue")&&(s.stringValue=e.stringValue,n.oneofs&&(s.value="stringValue")),e.boolValue!=null&&e.hasOwnProperty("boolValue")&&(s.boolValue=e.boolValue,n.oneofs&&(s.value="boolValue")),e.intValue!=null&&e.hasOwnProperty("intValue")&&(typeof e.intValue=="number"?s.intValue=n.longs===String?String(e.intValue):e.intValue:s.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&&(s.value="intValue")),e.doubleValue!=null&&e.hasOwnProperty("doubleValue")&&(s.doubleValue=n.json&&!isFinite(e.doubleValue)?String(e.doubleValue):e.doubleValue,n.oneofs&&(s.value="doubleValue")),e.arrayValue!=null&&e.hasOwnProperty("arrayValue")&&(s.arrayValue=p.opentelemetry.proto.common.v1.ArrayValue.toObject(e.arrayValue,n),n.oneofs&&(s.value="arrayValue")),e.kvlistValue!=null&&e.hasOwnProperty("kvlistValue")&&(s.kvlistValue=p.opentelemetry.proto.common.v1.KeyValueList.toObject(e.kvlistValue,n),n.oneofs&&(s.value="kvlistValue")),e.bytesValue!=null&&e.hasOwnProperty("bytesValue")&&(s.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&&(s.value="bytesValue")),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.AnyValue"},u}(),c.ArrayValue=function(){function u(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 u.prototype.values=f.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.ArrayValue;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.values&&s.values.length||(s.values=[]),s.values.push(p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.values=[]),t.values&&t.values.length){n.values=[];for(var s=0;s<t.values.length;++s)n.values[s]=p.opentelemetry.proto.common.v1.AnyValue.toObject(t.values[s],e)}return n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.ArrayValue"},u}(),c.KeyValueList=function(){function u(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 u.prototype.values=f.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.KeyValueList;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.values&&s.values.length||(s.values=[]),s.values.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.values=[]),t.values&&t.values.length){n.values=[];for(var s=0;s<t.values.length;++s)n.values[s]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.values[s],e)}return n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.KeyValueList"},u}(),c.KeyValue=function(){function u(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 u.prototype.key=null,u.prototype.value=null,u.create=function(t){return new u(t)},u.encode=function(t,e){return e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.KeyValue;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.key=t.string();break}case 2:{s.value=p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32());break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.KeyValue"},u}(),c.InstrumentationScope=function(){function u(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 u.prototype.name=null,u.prototype.version=null,u.prototype.attributes=f.emptyArray,u.prototype.droppedAttributesCount=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.InstrumentationScope;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.name=t.string();break}case 2:{s.version=t.string();break}case 3:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 4:{s.droppedAttributesCount=t.uint32();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=0;s<t.attributes.length;++s)n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[s],e)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.InstrumentationScope"},u}(),c}(),o}(),r.resource=function(){var o={};return o.v1=function(){var c={};return c.Resource=function(){function u(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 u.prototype.attributes=f.emptyArray,u.prototype.droppedAttributesCount=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.resource.v1.Resource;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{s.droppedAttributesCount=t.uint32();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=0;s<t.attributes.length;++s)n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[s],e)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.resource.v1.Resource"},u}(),c}(),o}(),r.trace=function(){var o={};return o.v1=function(){var c={};return c.TracesData=function(){function u(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 u.prototype.resourceSpans=f.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.TracesData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resourceSpans&&s.resourceSpans.length||(s.resourceSpans=[]),s.resourceSpans.push(p.opentelemetry.proto.trace.v1.ResourceSpans.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.resourceSpans=[]),t.resourceSpans&&t.resourceSpans.length){n.resourceSpans=[];for(var s=0;s<t.resourceSpans.length;++s)n.resourceSpans[s]=p.opentelemetry.proto.trace.v1.ResourceSpans.toObject(t.resourceSpans[s],e)}return n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.TracesData"},u}(),c.ResourceSpans=function(){function u(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 u.prototype.resource=null,u.prototype.scopeSpans=f.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.ResourceSpans;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{s.scopeSpans&&s.scopeSpans.length||(s.scopeSpans=[]),s.scopeSpans.push(p.opentelemetry.proto.trace.v1.ScopeSpans.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=0;s<t.scopeSpans.length;++s)n.scopeSpans[s]=p.opentelemetry.proto.trace.v1.ScopeSpans.toObject(t.scopeSpans[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.ResourceSpans"},u}(),c.ScopeSpans=function(){function u(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 u.prototype.scope=null,u.prototype.spans=f.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.ScopeSpans;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{s.spans&&s.spans.length||(s.spans=[]),s.spans.push(p.opentelemetry.proto.trace.v1.Span.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=0;s<t.spans.length;++s)n.spans[s]=p.opentelemetry.proto.trace.v1.Span.toObject(t.spans[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.ScopeSpans"},u}(),c.Span=function(){function u(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 u.prototype.traceId=null,u.prototype.spanId=null,u.prototype.traceState=null,u.prototype.parentSpanId=null,u.prototype.name=null,u.prototype.kind=null,u.prototype.startTimeUnixNano=null,u.prototype.endTimeUnixNano=null,u.prototype.attributes=f.emptyArray,u.prototype.droppedAttributesCount=null,u.prototype.events=f.emptyArray,u.prototype.droppedEventsCount=null,u.prototype.links=f.emptyArray,u.prototype.droppedLinksCount=null,u.prototype.status=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.Span;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.traceId=t.bytes();break}case 2:{s.spanId=t.bytes();break}case 3:{s.traceState=t.string();break}case 4:{s.parentSpanId=t.bytes();break}case 5:{s.name=t.string();break}case 6:{s.kind=t.int32();break}case 7:{s.startTimeUnixNano=t.fixed64();break}case 8:{s.endTimeUnixNano=t.fixed64();break}case 9:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 10:{s.droppedAttributesCount=t.uint32();break}case 11:{s.events&&s.events.length||(s.events=[]),s.events.push(p.opentelemetry.proto.trace.v1.Span.Event.decode(t,t.uint32()));break}case 12:{s.droppedEventsCount=t.uint32();break}case 13:{s.links&&s.links.length||(s.links=[]),s.links.push(p.opentelemetry.proto.trace.v1.Span.Link.decode(t,t.uint32()));break}case 14:{s.droppedLinksCount=t.uint32();break}case 15:{s.status=p.opentelemetry.proto.trace.v1.Status.decode(t,t.uint32());break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=new f.Long(0,0,!1);n.startTimeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}else n.startTimeUnixNano=e.longs===String?"0":0;if(f.Long){var s=new f.Long(0,0,!1);n.endTimeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}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},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Span"},u.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}(),u.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=S.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 s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.trace.v1.Span.Event;e.pos<s;){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 _||(e=new _(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 s=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[n]);if(s)return"attributes."+s}}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 s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}return e.droppedAttributesCount!=null&&(n.droppedAttributesCount=e.droppedAttributesCount>>>0),n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.attributes=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.timeUnixNano=n.longs===String?"0":0;s.name="",s.droppedAttributesCount=0}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?s.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:s.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")&&(s.name=e.name),e.attributes&&e.attributes.length){s.attributes=[];for(var h=0;h<e.attributes.length;++h)s.attributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[h],n)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(s.droppedAttributesCount=e.droppedAttributesCount),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span.Event"},a}(),u.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=S.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 s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.trace.v1.Span.Link;e.pos<s;){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 _||(e=new _(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 s=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[n]);if(s)return"attributes."+s}}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 s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}return e.droppedAttributesCount!=null&&(n.droppedAttributesCount=e.droppedAttributesCount>>>0),n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.attributes=[]),n.defaults&&(n.bytes===String?s.traceId="":(s.traceId=[],n.bytes!==Array&&(s.traceId=f.newBuffer(s.traceId))),n.bytes===String?s.spanId="":(s.spanId=[],n.bytes!==Array&&(s.spanId=f.newBuffer(s.spanId))),s.traceState="",s.droppedAttributesCount=0),e.traceId!=null&&e.hasOwnProperty("traceId")&&(s.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")&&(s.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")&&(s.traceState=e.traceState),e.attributes&&e.attributes.length){s.attributes=[];for(var l=0;l<e.attributes.length;++l)s.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[l],n)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(s.droppedAttributesCount=e.droppedAttributesCount),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span.Link"},a}(),u}(),c.Status=function(){function u(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 u.prototype.message=null,u.prototype.code=null,u.create=function(t){return new u(t)},u.encode=function(t,e){return e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.Status;t.pos<n;){var l=t.uint32();switch(l>>>3){case 2:{s.message=t.string();break}case 3:{s.code=t.int32();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Status"},u.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}(),u}(),c}(),o}(),r.collector=function(){var o={};return o.trace=function(){var c={};return c.v1=function(){var u={};return u.TraceService=function(){function a(t,e,n){g.rpc.Service.call(this,t,e,n)}return(a.prototype=Object.create(g.rpc.Service.prototype)).constructor=a,a.create=function(e,n,s){return new this(e,n,s)},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}(),u.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=S.create()),e.resourceSpans!=null&&e.resourceSpans.length)for(var s=0;s<e.resourceSpans.length;++s)p.opentelemetry.proto.trace.v1.ResourceSpans.encode(e.resourceSpans[s],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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;e.pos<s;){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 _||(e=new _(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 s=p.opentelemetry.proto.trace.v1.ResourceSpans.verify(e.resourceSpans[n]);if(s)return"resourceSpans."+s}}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 s=0;s<e.resourceSpans.length;++s){if(typeof e.resourceSpans[s]!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected");n.resourceSpans[s]=p.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(e.resourceSpans[s])}}return n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.resourceSpans=[]),e.resourceSpans&&e.resourceSpans.length){s.resourceSpans=[];for(var l=0;l<e.resourceSpans.length;++l)s.resourceSpans[l]=p.opentelemetry.proto.trace.v1.ResourceSpans.toObject(e.resourceSpans[l],n)}return s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"},a}(),u.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=S.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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;e.pos<s;){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 _||(e=new _(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 s={};return n.defaults&&(s.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(s.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(e.partialSuccess,n)),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},a}(),u.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=S.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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;e.pos<s;){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 _||(e=new _(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 s={};if(n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.rejectedSpans=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.rejectedSpans=n.longs===String?"0":0;s.errorMessage=""}return e.rejectedSpans!=null&&e.hasOwnProperty("rejectedSpans")&&(typeof e.rejectedSpans=="number"?s.rejectedSpans=n.longs===String?String(e.rejectedSpans):e.rejectedSpans:s.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")&&(s.errorMessage=e.errorMessage),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},a}(),u}(),c}(),o.metrics=function(){var c={};return c.v1=function(){var u={};return u.MetricsService=function(){function a(t,e,n){g.rpc.Service.call(this,t,e,n)}return(a.prototype=Object.create(g.rpc.Service.prototype)).constructor=a,a.create=function(e,n,s){return new this(e,n,s)},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}(),u.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=S.create()),e.resourceMetrics!=null&&e.resourceMetrics.length)for(var s=0;s<e.resourceMetrics.length;++s)p.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(e.resourceMetrics[s],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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;e.pos<s;){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 _||(e=new _(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 s=p.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(e.resourceMetrics[n]);if(s)return"resourceMetrics."+s}}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 s=0;s<e.resourceMetrics.length;++s){if(typeof e.resourceMetrics[s]!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected");n.resourceMetrics[s]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(e.resourceMetrics[s])}}return n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.resourceMetrics=[]),e.resourceMetrics&&e.resourceMetrics.length){s.resourceMetrics=[];for(var l=0;l<e.resourceMetrics.length;++l)s.resourceMetrics[l]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(e.resourceMetrics[l],n)}return s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"},a}(),u.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=S.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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;e.pos<s;){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 _||(e=new _(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 s={};return n.defaults&&(s.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(s.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(e.partialSuccess,n)),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},a}(),u.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=S.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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;e.pos<s;){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 _||(e=new _(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 s={};if(n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.rejectedDataPoints=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.rejectedDataPoints=n.longs===String?"0":0;s.errorMessage=""}return e.rejectedDataPoints!=null&&e.hasOwnProperty("rejectedDataPoints")&&(typeof e.rejectedDataPoints=="number"?s.rejectedDataPoints=n.longs===String?String(e.rejectedDataPoints):e.rejectedDataPoints:s.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")&&(s.errorMessage=e.errorMessage),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},a}(),u}(),c}(),o.logs=function(){var c={};return c.v1=function(){var u={};return u.LogsService=function(){function a(t,e,n){g.rpc.Service.call(this,t,e,n)}return(a.prototype=Object.create(g.rpc.Service.prototype)).constructor=a,a.create=function(e,n,s){return new this(e,n,s)},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}(),u.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=S.create()),e.resourceLogs!=null&&e.resourceLogs.length)for(var s=0;s<e.resourceLogs.length;++s)p.opentelemetry.proto.logs.v1.ResourceLogs.encode(e.resourceLogs[s],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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;e.pos<s;){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 _||(e=new _(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 s=p.opentelemetry.proto.logs.v1.ResourceLogs.verify(e.resourceLogs[n]);if(s)return"resourceLogs."+s}}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 s=0;s<e.resourceLogs.length;++s){if(typeof e.resourceLogs[s]!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected");n.resourceLogs[s]=p.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(e.resourceLogs[s])}}return n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.resourceLogs=[]),e.resourceLogs&&e.resourceLogs.length){s.resourceLogs=[];for(var l=0;l<e.resourceLogs.length;++l)s.resourceLogs[l]=p.opentelemetry.proto.logs.v1.ResourceLogs.toObject(e.resourceLogs[l],n)}return s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"},a}(),u.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=S.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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;e.pos<s;){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 _||(e=new _(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 s={};return n.defaults&&(s.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(s.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(e.partialSuccess,n)),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},a}(),u.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=S.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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;e.pos<s;){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 _||(e=new _(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 s={};if(n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.rejectedLogRecords=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.rejectedLogRecords=n.longs===String?"0":0;s.errorMessage=""}return e.rejectedLogRecords!=null&&e.hasOwnProperty("rejectedLogRecords")&&(typeof e.rejectedLogRecords=="number"?s.rejectedLogRecords=n.longs===String?String(e.rejectedLogRecords):e.rejectedLogRecords:s.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")&&(s.errorMessage=e.errorMessage),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},a}(),u}(),c}(),o}(),r.metrics=function(){var o={};return o.v1=function(){var c={};return c.MetricsData=function(){function u(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 u.prototype.resourceMetrics=f.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.MetricsData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resourceMetrics&&s.resourceMetrics.length||(s.resourceMetrics=[]),s.resourceMetrics.push(p.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.resourceMetrics=[]),t.resourceMetrics&&t.resourceMetrics.length){n.resourceMetrics=[];for(var s=0;s<t.resourceMetrics.length;++s)n.resourceMetrics[s]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(t.resourceMetrics[s],e)}return n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.MetricsData"},u}(),c.ResourceMetrics=function(){function u(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 u.prototype.resource=null,u.prototype.scopeMetrics=f.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.ResourceMetrics;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{s.scopeMetrics&&s.scopeMetrics.length||(s.scopeMetrics=[]),s.scopeMetrics.push(p.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=0;s<t.scopeMetrics.length;++s)n.scopeMetrics[s]=p.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(t.scopeMetrics[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ResourceMetrics"},u}(),c.ScopeMetrics=function(){function u(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 u.prototype.scope=null,u.prototype.metrics=f.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.ScopeMetrics;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{s.metrics&&s.metrics.length||(s.metrics=[]),s.metrics.push(p.opentelemetry.proto.metrics.v1.Metric.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=0;s<t.metrics.length;++s)n.metrics[s]=p.opentelemetry.proto.metrics.v1.Metric.toObject(t.metrics[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ScopeMetrics"},u}(),c.Metric=function(){function u(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]])}u.prototype.name=null,u.prototype.description=null,u.prototype.unit=null,u.prototype.gauge=null,u.prototype.sum=null,u.prototype.histogram=null,u.prototype.exponentialHistogram=null,u.prototype.summary=null;var a;return Object.defineProperty(u.prototype,"data",{get:f.oneOfGetter(a=["gauge","sum","histogram","exponentialHistogram","summary"]),set:f.oneOfSetter(a)}),u.create=function(e){return new u(e)},u.encode=function(e,n){return n||(n=S.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},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.Metric;e.pos<s;){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},u.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},u.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 s=p.opentelemetry.proto.metrics.v1.Gauge.verify(e.gauge);if(s)return"gauge."+s}}if(e.sum!=null&&e.hasOwnProperty("sum")){if(n.data===1)return"data: multiple values";n.data=1;{var s=p.opentelemetry.proto.metrics.v1.Sum.verify(e.sum);if(s)return"sum."+s}}if(e.histogram!=null&&e.hasOwnProperty("histogram")){if(n.data===1)return"data: multiple values";n.data=1;{var s=p.opentelemetry.proto.metrics.v1.Histogram.verify(e.histogram);if(s)return"histogram."+s}}if(e.exponentialHistogram!=null&&e.hasOwnProperty("exponentialHistogram")){if(n.data===1)return"data: multiple values";n.data=1;{var s=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(e.exponentialHistogram);if(s)return"exponentialHistogram."+s}}if(e.summary!=null&&e.hasOwnProperty("summary")){if(n.data===1)return"data: multiple values";n.data=1;{var s=p.opentelemetry.proto.metrics.v1.Summary.verify(e.summary);if(s)return"summary."+s}}return null},u.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},u.toObject=function(e,n){n||(n={});var s={};return n.defaults&&(s.name="",s.description="",s.unit=""),e.name!=null&&e.hasOwnProperty("name")&&(s.name=e.name),e.description!=null&&e.hasOwnProperty("description")&&(s.description=e.description),e.unit!=null&&e.hasOwnProperty("unit")&&(s.unit=e.unit),e.gauge!=null&&e.hasOwnProperty("gauge")&&(s.gauge=p.opentelemetry.proto.metrics.v1.Gauge.toObject(e.gauge,n),n.oneofs&&(s.data="gauge")),e.sum!=null&&e.hasOwnProperty("sum")&&(s.sum=p.opentelemetry.proto.metrics.v1.Sum.toObject(e.sum,n),n.oneofs&&(s.data="sum")),e.histogram!=null&&e.hasOwnProperty("histogram")&&(s.histogram=p.opentelemetry.proto.metrics.v1.Histogram.toObject(e.histogram,n),n.oneofs&&(s.data="histogram")),e.exponentialHistogram!=null&&e.hasOwnProperty("exponentialHistogram")&&(s.exponentialHistogram=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(e.exponentialHistogram,n),n.oneofs&&(s.data="exponentialHistogram")),e.summary!=null&&e.hasOwnProperty("summary")&&(s.summary=p.opentelemetry.proto.metrics.v1.Summary.toObject(e.summary,n),n.oneofs&&(s.data="summary")),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Metric"},u}(),c.Gauge=function(){function u(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 u.prototype.dataPoints=f.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Gauge;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var s=0;s<t.dataPoints.length;++s)n.dataPoints[s]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(t.dataPoints[s],e)}return n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Gauge"},u}(),c.Sum=function(){function u(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 u.prototype.dataPoints=f.emptyArray,u.prototype.aggregationTemporality=null,u.prototype.isMonotonic=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Sum;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(t,t.uint32()));break}case 2:{s.aggregationTemporality=t.int32();break}case 3:{s.isMonotonic=t.bool();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=0;s<t.dataPoints.length;++s)n.dataPoints[s]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(t.dataPoints[s],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},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Sum"},u}(),c.Histogram=function(){function u(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 u.prototype.dataPoints=f.emptyArray,u.prototype.aggregationTemporality=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Histogram;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(t,t.uint32()));break}case 2:{s.aggregationTemporality=t.int32();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=0;s<t.dataPoints.length;++s)n.dataPoints[s]=p.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(t.dataPoints[s],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},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Histogram"},u}(),c.ExponentialHistogram=function(){function u(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 u.prototype.dataPoints=f.emptyArray,u.prototype.aggregationTemporality=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.ExponentialHistogram;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(t,t.uint32()));break}case 2:{s.aggregationTemporality=t.int32();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=0;s<t.dataPoints.length;++s)n.dataPoints[s]=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(t.dataPoints[s],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},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ExponentialHistogram"},u}(),c.Summary=function(){function u(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 u.prototype.dataPoints=f.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Summary;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var s=0;s<t.dataPoints.length;++s)n.dataPoints[s]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(t.dataPoints[s],e)}return n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Summary"},u}(),c.AggregationTemporality=function(){var u={},a=Object.create(u);return a[u[0]="AGGREGATION_TEMPORALITY_UNSPECIFIED"]=0,a[u[1]="AGGREGATION_TEMPORALITY_DELTA"]=1,a[u[2]="AGGREGATION_TEMPORALITY_CUMULATIVE"]=2,a}(),c.DataPointFlags=function(){var u={},a=Object.create(u);return a[u[0]="DATA_POINT_FLAGS_DO_NOT_USE"]=0,a[u[1]="DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"]=1,a}(),c.NumberDataPoint=function(){function u(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]])}u.prototype.attributes=f.emptyArray,u.prototype.startTimeUnixNano=null,u.prototype.timeUnixNano=null,u.prototype.asDouble=null,u.prototype.asInt=null,u.prototype.exemplars=f.emptyArray,u.prototype.flags=null;var a;return Object.defineProperty(u.prototype,"value",{get:f.oneOfGetter(a=["asDouble","asInt"]),set:f.oneOfSetter(a)}),u.create=function(e){return new u(e)},u.encode=function(e,n){if(n||(n=S.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 s=0;s<e.exemplars.length;++s)p.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[s],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 s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],n.uint32(58).fork()).ldelim();return e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&n.uint32(64).uint32(e.flags),n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.NumberDataPoint;e.pos<s;){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},u.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},u.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 s=0;s<e.attributes.length;++s){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[s]);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 s=0;s<e.exemplars.length;++s){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[s]);if(l)return"exemplars."+l}}return e.flags!=null&&e.hasOwnProperty("flags")&&!f.isInteger(e.flags)?"flags: integer expected":null},u.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 s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}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 s=0;s<e.exemplars.length;++s){if(typeof e.exemplars[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected");n.exemplars[s]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[s])}}return e.flags!=null&&(n.flags=e.flags>>>0),n},u.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.exemplars=[],s.attributes=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.startTimeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.startTimeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);s.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.timeUnixNano=n.longs===String?"0":0;s.flags=0}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?s.startTimeUnixNano=n.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:s.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"?s.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:s.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")&&(s.asDouble=n.json&&!isFinite(e.asDouble)?String(e.asDouble):e.asDouble,n.oneofs&&(s.value="asDouble")),e.exemplars&&e.exemplars.length){s.exemplars=[];for(var h=0;h<e.exemplars.length;++h)s.exemplars[h]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[h],n)}if(e.asInt!=null&&e.hasOwnProperty("asInt")&&(typeof e.asInt=="number"?s.asInt=n.longs===String?String(e.asInt):e.asInt:s.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&&(s.value="asInt")),e.attributes&&e.attributes.length){s.attributes=[];for(var h=0;h<e.attributes.length;++h)s.attributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[h],n)}return e.flags!=null&&e.hasOwnProperty("flags")&&(s.flags=e.flags),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.NumberDataPoint"},u}(),c.HistogramDataPoint=function(){function u(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]])}u.prototype.attributes=f.emptyArray,u.prototype.startTimeUnixNano=null,u.prototype.timeUnixNano=null,u.prototype.count=null,u.prototype.sum=null,u.prototype.bucketCounts=f.emptyArray,u.prototype.explicitBounds=f.emptyArray,u.prototype.exemplars=f.emptyArray,u.prototype.flags=null,u.prototype.min=null,u.prototype.max=null;var a;return Object.defineProperty(u.prototype,"_sum",{get:f.oneOfGetter(a=["sum"]),set:f.oneOfSetter(a)}),Object.defineProperty(u.prototype,"_min",{get:f.oneOfGetter(a=["min"]),set:f.oneOfSetter(a)}),Object.defineProperty(u.prototype,"_max",{get:f.oneOfGetter(a=["max"]),set:f.oneOfSetter(a)}),u.create=function(e){return new u(e)},u.encode=function(e,n){if(n||(n=S.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 s=0;s<e.bucketCounts.length;++s)n.fixed64(e.bucketCounts[s]);n.ldelim()}if(e.explicitBounds!=null&&e.explicitBounds.length){n.uint32(58).fork();for(var s=0;s<e.explicitBounds.length;++s)n.double(e.explicitBounds[s]);n.ldelim()}if(e.exemplars!=null&&e.exemplars.length)for(var s=0;s<e.exemplars.length;++s)p.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[s],n.uint32(66).fork()).ldelim();if(e.attributes!=null&&e.attributes.length)for(var s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],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},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.HistogramDataPoint;e.pos<s;){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},u.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},u.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 s=0;s<e.attributes.length;++s){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[s]);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 s=0;s<e.bucketCounts.length;++s)if(!f.isInteger(e.bucketCounts[s])&&!(e.bucketCounts[s]&&f.isInteger(e.bucketCounts[s].low)&&f.isInteger(e.bucketCounts[s].high)))return"bucketCounts: integer|Long[] expected"}if(e.explicitBounds!=null&&e.hasOwnProperty("explicitBounds")){if(!Array.isArray(e.explicitBounds))return"explicitBounds: array expected";for(var s=0;s<e.explicitBounds.length;++s)if(typeof e.explicitBounds[s]!="number")return"explicitBounds: number[] expected"}if(e.exemplars!=null&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(var s=0;s<e.exemplars.length;++s){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[s]);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},u.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 s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}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 s=0;s<e.bucketCounts.length;++s)f.Long?(n.bucketCounts[s]=f.Long.fromValue(e.bucketCounts[s])).unsigned=!1:typeof e.bucketCounts[s]=="string"?n.bucketCounts[s]=parseInt(e.bucketCounts[s],10):typeof e.bucketCounts[s]=="number"?n.bucketCounts[s]=e.bucketCounts[s]:typeof e.bucketCounts[s]=="object"&&(n.bucketCounts[s]=new f.LongBits(e.bucketCounts[s].low>>>0,e.bucketCounts[s].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 s=0;s<e.explicitBounds.length;++s)n.explicitBounds[s]=Number(e.explicitBounds[s])}if(e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected");n.exemplars=[];for(var s=0;s<e.exemplars.length;++s){if(typeof e.exemplars[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected");n.exemplars[s]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[s])}}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},u.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.bucketCounts=[],s.explicitBounds=[],s.exemplars=[],s.attributes=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.startTimeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.startTimeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);s.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.timeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);s.count=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.count=n.longs===String?"0":0;s.flags=0}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?s.startTimeUnixNano=n.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:s.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"?s.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:s.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"?s.count=n.longs===String?String(e.count):e.count:s.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")&&(s.sum=n.json&&!isFinite(e.sum)?String(e.sum):e.sum,n.oneofs&&(s._sum="sum")),e.bucketCounts&&e.bucketCounts.length){s.bucketCounts=[];for(var h=0;h<e.bucketCounts.length;++h)typeof e.bucketCounts[h]=="number"?s.bucketCounts[h]=n.longs===String?String(e.bucketCounts[h]):e.bucketCounts[h]:s.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){s.explicitBounds=[];for(var h=0;h<e.explicitBounds.length;++h)s.explicitBounds[h]=n.json&&!isFinite(e.explicitBounds[h])?String(e.explicitBounds[h]):e.explicitBounds[h]}if(e.exemplars&&e.exemplars.length){s.exemplars=[];for(var h=0;h<e.exemplars.length;++h)s.exemplars[h]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[h],n)}if(e.attributes&&e.attributes.length){s.attributes=[];for(var h=0;h<e.attributes.length;++h)s.attributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[h],n)}return e.flags!=null&&e.hasOwnProperty("flags")&&(s.flags=e.flags),e.min!=null&&e.hasOwnProperty("min")&&(s.min=n.json&&!isFinite(e.min)?String(e.min):e.min,n.oneofs&&(s._min="min")),e.max!=null&&e.hasOwnProperty("max")&&(s.max=n.json&&!isFinite(e.max)?String(e.max):e.max,n.oneofs&&(s._max="max")),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.HistogramDataPoint"},u}(),c.ExponentialHistogramDataPoint=function(){function u(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]])}u.prototype.attributes=f.emptyArray,u.prototype.startTimeUnixNano=null,u.prototype.timeUnixNano=null,u.prototype.count=null,u.prototype.sum=null,u.prototype.scale=null,u.prototype.zeroCount=null,u.prototype.positive=null,u.prototype.negative=null,u.prototype.flags=null,u.prototype.exemplars=f.emptyArray,u.prototype.min=null,u.prototype.max=null,u.prototype.zeroThreshold=null;var a;return Object.defineProperty(u.prototype,"_sum",{get:f.oneOfGetter(a=["sum"]),set:f.oneOfSetter(a)}),Object.defineProperty(u.prototype,"_min",{get:f.oneOfGetter(a=["min"]),set:f.oneOfSetter(a)}),Object.defineProperty(u.prototype,"_max",{get:f.oneOfGetter(a=["max"]),set:f.oneOfSetter(a)}),u.create=function(e){return new u(e)},u.encode=function(e,n){if(n||(n=S.create()),e.attributes!=null&&e.attributes.length)for(var s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],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 s=0;s<e.exemplars.length;++s)p.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[s],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},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;e.pos<s;){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},u.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},u.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 s=0;s<e.attributes.length;++s){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[s]);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 s=0;s<e.exemplars.length;++s){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[s]);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},u.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 s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}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 s=0;s<e.exemplars.length;++s){if(typeof e.exemplars[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected");n.exemplars[s]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[s])}}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},u.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.attributes=[],s.exemplars=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.startTimeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.startTimeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);s.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.timeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);s.count=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.count=n.longs===String?"0":0;if(s.scale=0,f.Long){var l=new f.Long(0,0,!1);s.zeroCount=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.zeroCount=n.longs===String?"0":0;s.positive=null,s.negative=null,s.flags=0,s.zeroThreshold=0}if(e.attributes&&e.attributes.length){s.attributes=[];for(var h=0;h<e.attributes.length;++h)s.attributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[h],n)}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?s.startTimeUnixNano=n.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:s.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"?s.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:s.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"?s.count=n.longs===String?String(e.count):e.count:s.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")&&(s.sum=n.json&&!isFinite(e.sum)?String(e.sum):e.sum,n.oneofs&&(s._sum="sum")),e.scale!=null&&e.hasOwnProperty("scale")&&(s.scale=e.scale),e.zeroCount!=null&&e.hasOwnProperty("zeroCount")&&(typeof e.zeroCount=="number"?s.zeroCount=n.longs===String?String(e.zeroCount):e.zeroCount:s.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")&&(s.positive=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(e.positive,n)),e.negative!=null&&e.hasOwnProperty("negative")&&(s.negative=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(e.negative,n)),e.flags!=null&&e.hasOwnProperty("flags")&&(s.flags=e.flags),e.exemplars&&e.exemplars.length){s.exemplars=[];for(var h=0;h<e.exemplars.length;++h)s.exemplars[h]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[h],n)}return e.min!=null&&e.hasOwnProperty("min")&&(s.min=n.json&&!isFinite(e.min)?String(e.min):e.min,n.oneofs&&(s._min="min")),e.max!=null&&e.hasOwnProperty("max")&&(s.max=n.json&&!isFinite(e.max)?String(e.max):e.max,n.oneofs&&(s._max="max")),e.zeroThreshold!=null&&e.hasOwnProperty("zeroThreshold")&&(s.zeroThreshold=n.json&&!isFinite(e.zeroThreshold)?String(e.zeroThreshold):e.zeroThreshold),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"},u.Buckets=function(){function t(e){if(this.bucketCounts=[],e)for(var n=Object.keys(e),s=0;s<n.length;++s)e[n[s]]!=null&&(this[n[s]]=e[n[s]])}return t.prototype.offset=null,t.prototype.bucketCounts=f.emptyArray,t.create=function(n){return new t(n)},t.encode=function(n,s){if(s||(s=S.create()),n.offset!=null&&Object.hasOwnProperty.call(n,"offset")&&s.uint32(8).sint32(n.offset),n.bucketCounts!=null&&n.bucketCounts.length){s.uint32(18).fork();for(var l=0;l<n.bucketCounts.length;++l)s.uint64(n.bucketCounts[l]);s.ldelim()}return s},t.encodeDelimited=function(n,s){return this.encode(n,s).ldelim()},t.decode=function(n,s){n instanceof _||(n=_.create(n));for(var l=s===void 0?n.len:n.pos+s,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 R=n.uint32()+n.pos;n.pos<R;)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 _||(n=new _(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 s=0;s<n.bucketCounts.length;++s)if(!f.isInteger(n.bucketCounts[s])&&!(n.bucketCounts[s]&&f.isInteger(n.bucketCounts[s].low)&&f.isInteger(n.bucketCounts[s].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 s=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;if(n.offset!=null&&(s.offset=n.offset|0),n.bucketCounts){if(!Array.isArray(n.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected");s.bucketCounts=[];for(var l=0;l<n.bucketCounts.length;++l)f.Long?(s.bucketCounts[l]=f.Long.fromValue(n.bucketCounts[l])).unsigned=!0:typeof n.bucketCounts[l]=="string"?s.bucketCounts[l]=parseInt(n.bucketCounts[l],10):typeof n.bucketCounts[l]=="number"?s.bucketCounts[l]=n.bucketCounts[l]:typeof n.bucketCounts[l]=="object"&&(s.bucketCounts[l]=new f.LongBits(n.bucketCounts[l].low>>>0,n.bucketCounts[l].high>>>0).toNumber(!0))}return s},t.toObject=function(n,s){s||(s={});var l={};if((s.arrays||s.defaults)&&(l.bucketCounts=[]),s.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]=s.longs===String?String(n.bucketCounts[h]):n.bucketCounts[h]:l.bucketCounts[h]=s.longs===String?f.Long.prototype.toString.call(n.bucketCounts[h]):s.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,g.util.toJSONOptions)},t.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},t}(),u}(),c.SummaryDataPoint=function(){function u(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 u.prototype.attributes=f.emptyArray,u.prototype.startTimeUnixNano=null,u.prototype.timeUnixNano=null,u.prototype.count=null,u.prototype.sum=null,u.prototype.quantileValues=f.emptyArray,u.prototype.flags=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint;t.pos<n;){var l=t.uint32();switch(l>>>3){case 7:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{s.startTimeUnixNano=t.fixed64();break}case 3:{s.timeUnixNano=t.fixed64();break}case 4:{s.count=t.fixed64();break}case 5:{s.sum=t.double();break}case 6:{s.quantileValues&&s.quantileValues.length||(s.quantileValues=[]),s.quantileValues.push(p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(t,t.uint32()));break}case 8:{s.flags=t.uint32();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.quantileValues=[],n.attributes=[]),e.defaults){if(f.Long){var s=new f.Long(0,0,!1);n.startTimeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}else n.startTimeUnixNano=e.longs===String?"0":0;if(f.Long){var s=new f.Long(0,0,!1);n.timeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}else n.timeUnixNano=e.longs===String?"0":0;if(f.Long){var s=new f.Long(0,0,!1);n.count=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}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},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.SummaryDataPoint"},u.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=S.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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;e.pos<s;){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 _||(e=new _(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 s={};return n.defaults&&(s.quantile=0,s.value=0),e.quantile!=null&&e.hasOwnProperty("quantile")&&(s.quantile=n.json&&!isFinite(e.quantile)?String(e.quantile):e.quantile),e.value!=null&&e.hasOwnProperty("value")&&(s.value=n.json&&!isFinite(e.value)?String(e.value):e.value),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},a}(),u}(),c.Exemplar=function(){function u(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]])}u.prototype.filteredAttributes=f.emptyArray,u.prototype.timeUnixNano=null,u.prototype.asDouble=null,u.prototype.asInt=null,u.prototype.spanId=null,u.prototype.traceId=null;var a;return Object.defineProperty(u.prototype,"value",{get:f.oneOfGetter(a=["asDouble","asInt"]),set:f.oneOfSetter(a)}),u.create=function(e){return new u(e)},u.encode=function(e,n){if(n||(n=S.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 s=0;s<e.filteredAttributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.filteredAttributes[s],n.uint32(58).fork()).ldelim();return n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.Exemplar;e.pos<s;){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},u.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},u.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 s=0;s<e.filteredAttributes.length;++s){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.filteredAttributes[s]);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},u.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 s=0;s<e.filteredAttributes.length;++s){if(typeof e.filteredAttributes[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected");n.filteredAttributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.filteredAttributes[s])}}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},u.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.filteredAttributes=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.timeUnixNano=n.longs===String?"0":0;n.bytes===String?s.spanId="":(s.spanId=[],n.bytes!==Array&&(s.spanId=f.newBuffer(s.spanId))),n.bytes===String?s.traceId="":(s.traceId=[],n.bytes!==Array&&(s.traceId=f.newBuffer(s.traceId)))}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?s.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:s.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")&&(s.asDouble=n.json&&!isFinite(e.asDouble)?String(e.asDouble):e.asDouble,n.oneofs&&(s.value="asDouble")),e.spanId!=null&&e.hasOwnProperty("spanId")&&(s.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")&&(s.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"?s.asInt=n.longs===String?String(e.asInt):e.asInt:s.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&&(s.value="asInt")),e.filteredAttributes&&e.filteredAttributes.length){s.filteredAttributes=[];for(var h=0;h<e.filteredAttributes.length;++h)s.filteredAttributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.filteredAttributes[h],n)}return s},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Exemplar"},u}(),c}(),o}(),r.logs=function(){var o={};return o.v1=function(){var c={};return c.LogsData=function(){function u(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 u.prototype.resourceLogs=f.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.LogsData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resourceLogs&&s.resourceLogs.length||(s.resourceLogs=[]),s.resourceLogs.push(p.opentelemetry.proto.logs.v1.ResourceLogs.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.resourceLogs=[]),t.resourceLogs&&t.resourceLogs.length){n.resourceLogs=[];for(var s=0;s<t.resourceLogs.length;++s)n.resourceLogs[s]=p.opentelemetry.proto.logs.v1.ResourceLogs.toObject(t.resourceLogs[s],e)}return n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.LogsData"},u}(),c.ResourceLogs=function(){function u(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 u.prototype.resource=null,u.prototype.scopeLogs=f.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.ResourceLogs;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{s.scopeLogs&&s.scopeLogs.length||(s.scopeLogs=[]),s.scopeLogs.push(p.opentelemetry.proto.logs.v1.ScopeLogs.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=0;s<t.scopeLogs.length;++s)n.scopeLogs[s]=p.opentelemetry.proto.logs.v1.ScopeLogs.toObject(t.scopeLogs[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.ResourceLogs"},u}(),c.ScopeLogs=function(){function u(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 u.prototype.scope=null,u.prototype.logRecords=f.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.ScopeLogs;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{s.logRecords&&s.logRecords.length||(s.logRecords=[]),s.logRecords.push(p.opentelemetry.proto.logs.v1.LogRecord.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=0;s<t.logRecords.length;++s)n.logRecords[s]=p.opentelemetry.proto.logs.v1.LogRecord.toObject(t.logRecords[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.ScopeLogs"},u}(),c.SeverityNumber=function(){var u={},a=Object.create(u);return a[u[0]="SEVERITY_NUMBER_UNSPECIFIED"]=0,a[u[1]="SEVERITY_NUMBER_TRACE"]=1,a[u[2]="SEVERITY_NUMBER_TRACE2"]=2,a[u[3]="SEVERITY_NUMBER_TRACE3"]=3,a[u[4]="SEVERITY_NUMBER_TRACE4"]=4,a[u[5]="SEVERITY_NUMBER_DEBUG"]=5,a[u[6]="SEVERITY_NUMBER_DEBUG2"]=6,a[u[7]="SEVERITY_NUMBER_DEBUG3"]=7,a[u[8]="SEVERITY_NUMBER_DEBUG4"]=8,a[u[9]="SEVERITY_NUMBER_INFO"]=9,a[u[10]="SEVERITY_NUMBER_INFO2"]=10,a[u[11]="SEVERITY_NUMBER_INFO3"]=11,a[u[12]="SEVERITY_NUMBER_INFO4"]=12,a[u[13]="SEVERITY_NUMBER_WARN"]=13,a[u[14]="SEVERITY_NUMBER_WARN2"]=14,a[u[15]="SEVERITY_NUMBER_WARN3"]=15,a[u[16]="SEVERITY_NUMBER_WARN4"]=16,a[u[17]="SEVERITY_NUMBER_ERROR"]=17,a[u[18]="SEVERITY_NUMBER_ERROR2"]=18,a[u[19]="SEVERITY_NUMBER_ERROR3"]=19,a[u[20]="SEVERITY_NUMBER_ERROR4"]=20,a[u[21]="SEVERITY_NUMBER_FATAL"]=21,a[u[22]="SEVERITY_NUMBER_FATAL2"]=22,a[u[23]="SEVERITY_NUMBER_FATAL3"]=23,a[u[24]="SEVERITY_NUMBER_FATAL4"]=24,a}(),c.LogRecordFlags=function(){var u={},a=Object.create(u);return a[u[0]="LOG_RECORD_FLAGS_DO_NOT_USE"]=0,a[u[255]="LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"]=255,a}(),c.LogRecord=function(){function u(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 u.prototype.timeUnixNano=null,u.prototype.observedTimeUnixNano=null,u.prototype.severityNumber=null,u.prototype.severityText=null,u.prototype.body=null,u.prototype.attributes=f.emptyArray,u.prototype.droppedAttributesCount=null,u.prototype.flags=null,u.prototype.traceId=null,u.prototype.spanId=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.LogRecord;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.timeUnixNano=t.fixed64();break}case 11:{s.observedTimeUnixNano=t.fixed64();break}case 2:{s.severityNumber=t.int32();break}case 3:{s.severityText=t.string();break}case 5:{s.body=p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32());break}case 6:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 7:{s.droppedAttributesCount=t.uint32();break}case 8:{s.flags=t.fixed32();break}case 9:{s.traceId=t.bytes();break}case 10:{s.spanId=t.bytes();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),e.defaults){if(f.Long){var s=new f.Long(0,0,!1);n.timeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}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 s=new f.Long(0,0,!1);n.observedTimeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}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},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.LogRecord"},u}(),c}(),o}(),r}(),i}();l_.exports=p});var eu=d(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.ServiceClientType=void 0;var kS;(function(i){i[i.SPANS=0]="SPANS",i[i.METRICS=1]="METRICS",i[i.LOGS=2]="LOGS"})(kS=nn.ServiceClientType||(nn.ServiceClientType={}))});var on=d(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});tu.getExportRequestProto=void 0;var wc=p_(),f_=eu();function qS(i){return i===f_.ServiceClientType.SPANS?wc.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest:i===f_.ServiceClientType.LOGS?wc.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest:wc.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest}tu.getExportRequestProto=qS});var Mc=d(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.send=void 0;var d_=Yi(),jS=on();function GS(i,r,o,c,u){let a=i.convert(r),t=(0,jS.getExportRequestProto)(i.getServiceClientType()),e=t.create(a);if(e){let n=t.encode(e).finish();n&&(0,d_.sendWithHttp)(i,Buffer.from(n),"application/x-protobuf",c,u)}else u(new d_.OTLPExporterError("No proto"))}ru.send=GS});var h_=d(nu=>{"use strict";Object.defineProperty(nu,"__esModule",{value:!0});nu.OTLPProtoExporterNodeBase=void 0;var HS=(y(),E(m)),FS=Yi(),Cc=class extends FS.OTLPExporterNodeBase{constructor(r={}){super(r)}_sendPromise(r,o,c){let u=new Promise((t,e)=>{this._send(this,r,this.compression,t,e)}).then(o,c);this._sendingPromises.push(u);let a=()=>{let t=this._sendingPromises.indexOf(u);this._sendingPromises.splice(t,1)};u.then(a,a)}send(r,o,c){if(this._shutdownOnce.isCalled){HS.diag.debug("Shutdown already started. Cannot send objects");return}this._send?this._sendPromise(r,o,c):setImmediate(()=>{let{send:u}=Mc();this._send=u,this._sendPromise(r,o,c)})}};nu.OTLPProtoExporterNodeBase=Cc});var __=d(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.send=_r.OTLPProtoExporterNodeBase=void 0;var KS=h_();Object.defineProperty(_r,"OTLPProtoExporterNodeBase",{enumerable:!0,get:function(){return KS.OTLPProtoExporterNodeBase}});var XS=Mc();Object.defineProperty(_r,"send",{enumerable:!0,get:function(){return XS.send}})});var m_=d(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.OTLPProtoExporterBrowserBase=void 0;var zS=(y(),E(m)),Uc=Yi(),$S=on(),Dc=class extends Uc.OTLPExporterBrowserBase{constructor(r={}){super(r)}send(r,o,c){if(this._shutdownOnce.isCalled){zS.diag.debug("Shutdown already started. Cannot send objects");return}let u=this.convert(r),a=(0,$S.getExportRequestProto)(this.getServiceClientType()),t=a.create(u);if(t){let e=a.encode(t).finish();e&&(0,Uc.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 Uc.OTLPExporterError("No proto"))}};ou.OTLPProtoExporterBrowserBase=Dc});var y_=d(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.ServiceClientType=mr.OTLPProtoExporterBrowserBase=void 0;var YS=m_();Object.defineProperty(mr,"OTLPProtoExporterBrowserBase",{enumerable:!0,get:function(){return YS.OTLPProtoExporterBrowserBase}});var WS=eu();Object.defineProperty(mr,"ServiceClientType",{enumerable:!0,get:function(){return WS.ServiceClientType}})});var v_=d(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.getExportRequestProto=ye.ServiceClientType=ye.OTLPProtoExporterBrowserBase=ye.send=ye.OTLPProtoExporterNodeBase=void 0;var E_=__();Object.defineProperty(ye,"OTLPProtoExporterNodeBase",{enumerable:!0,get:function(){return E_.OTLPProtoExporterNodeBase}});Object.defineProperty(ye,"send",{enumerable:!0,get:function(){return E_.send}});var JS=y_();Object.defineProperty(ye,"OTLPProtoExporterBrowserBase",{enumerable:!0,get:function(){return JS.OTLPProtoExporterBrowserBase}});var QS=eu();Object.defineProperty(ye,"ServiceClientType",{enumerable:!0,get:function(){return QS.ServiceClientType}});var ZS=on();Object.defineProperty(ye,"getExportRequestProto",{enumerable:!0,get:function(){return ZS.getExportRequestProto}})});var G=J(Ns(),1);y();ws();var P_=J(ff(),1),vr=J(lt(),1),N_=J(Rf(),1),R_=J(Cd(),1),x_=J(fe(),1),gr=J(fn(),1),I_=J(Dd(),1),be=J(N(),1);y();var VT=Symbol.for("@vercel/request-context");function sr(){return globalThis[VT]?.get()}var Qa=J(fe(),1);function Bi(i){return Object.fromEntries(Object.entries(i).filter(([r,o])=>o!==void 0))}function Bd(i){return i?i.split("::").at(-1):void 0}function Vd(i=sr()){if(i)return Bi({[Qa.SemanticAttributes.HTTP_HOST]:i.headers.host,[Qa.SemanticAttributes.HTTP_USER_AGENT]:i.headers["user-agent"],"http.referer":i.headers.referer,"vercel.request_id":Bd(i.headers["x-vercel-id"]),"vercel.matched_path":i.headers["x-matched-path"],"vercel.edge_region":i.headers["x-vercel-edge-region"]})}y();function Xr(i){return(i&m.TraceFlags.SAMPLED)!==0}var Vi=class{constructor(r){this.processors=r;this.rootSpanIds=new Map;this.waitSpanEnd=new Map}forceFlush(){return Promise.all(this.processors.map(r=>r.forceFlush().catch(o=>{m.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:u,traceFlags:a}=r.spanContext(),t=!r.parentSpanId||!this.rootSpanIds.has(c);if(t&&this.rootSpanIds.set(c,u),t&&Xr(a)){let e=Vd();e&&r.setAttributes(e);let n=sr();n&&n.waitUntil(async()=>{if(this.rootSpanIds.has(c)){let s=new Promise(h=>{this.waitSpanEnd.set(c,h)}),l;await Promise.race([s,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:u}=r.spanContext(),a=Xr(u),t=this.rootSpanIds.get(o)===c;if(a){let e=kT(r);e&&Object.assign(r.attributes,e)}for(let e of this.processors)e.onEnd(r);if(t){this.rootSpanIds.delete(o);let e=this.waitSpanEnd.get(o);e&&(this.waitSpanEnd.delete(o),e())}}},kd={[m.SpanKind.INTERNAL]:"internal",[m.SpanKind.SERVER]:"server",[m.SpanKind.CLIENT]:"client",[m.SpanKind.PRODUCER]:"producer",[m.SpanKind.CONSUMER]:"consumer"};function kT(i){let{kind:r,attributes:o}=i,{"operation.name":c,"resouce.name":u,"span.type":a,"next.span_type":t,"next.route":e,"http.method":n,"http.route":s}=o;if(c)return;let l=i.instrumentationLibrary.name,h=t??a;if(h&&typeof h=="string"){let T=Za(l,h);return e?{"operation.name":T,"resource.name":u??e}:{"operation.name":T}}return n&&s&&typeof n=="string"&&typeof s=="string"?{"operation.name":Za(l,`http.${kd[r]||"internal"}.${n}`),"resource.name":u??s}:{"operation.name":Za(l,r===m.SpanKind.INTERNAL?"":kd[r])}}function Za(i,r){if(!i)return r;let o=i.replace(/[ @./]/g,"_");return o.startsWith("_")&&(o=o.slice(1)),r?`${o}.${r}`:o}var Qd=J(uc(),1);var Jd=J($r(),1);y();var ar=class extends Jd.OTLPExporterBase{constructor(r={}){super(r),r.headers&&(this._headers=r.headers)}onShutdown(){m.diag.debug("@vercel/otel/otlp: onShutdown")}onInit(){m.diag.debug("@vercel/otel/otlp: onInit")}send(r,o,c){if(this._shutdownOnce.isCalled){m.diag.debug("@vercel/otel/otlp: Shutdown already started. Cannot send objects");return}let u=this.convert(r),a,t,e;try{({body:a,contentType:t,headers:e}=this.toMessage(u))}catch(s){m.diag.warn("@vercel/otel/otlp: no proto",s);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(s=>{m.diag.debug("@vercel/otel/otlp: onSuccess",s.status,s.statusText),o(),s.arrayBuffer().catch(()=>{})}).catch(s=>{m.diag.error("@vercel/otel/otlp: onError",s),c(s)}).finally(()=>{let s=this._sendingPromises.indexOf(n);this._sendingPromises.splice(s,1)});this._sendingPromises.push(n)}getDefaultUrl(r){throw new Error("Method not implemented.")}};var uS="v1/traces",sS=`http://localhost:4318/${uS}`;function Gi(i){return typeof i.url=="string"?i.url:sS}var cr=class extends ar{convert(r){return(0,Qd.createExportTraceServiceRequest)(r,{useHex:!0,useLongBits:!1})}toMessage(r){return{body:JSON.stringify(r),contentType:"application/json"}}getDefaultUrl(r){return Gi(r)}};var g_=J(uc(),1),T_=J(v_(),1),S_=J(on(),1);var gt=class extends ar{convert(r){return(0,g_.createExportTraceServiceRequest)(r,void 0)}toMessage(r){let o=T_.ServiceClientType.SPANS,c=(0,S_.getExportRequestProto)(o),u=c.create(r);return{body:c.encode(u).finish(),contentType:"application/x-protobuf",headers:{accept:"application/x-protobuf"}}}getDefaultUrl(r){return Gi(r)}};y();var Ye=J(fe(),1);function b_(i,r){return i.replace(/\{(?<temp1>[^{}]+)\}/g,(o,c)=>{let u=r[c];return u!==void 0?String(u):o})}var yr=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??[],u=R=>{if(c.length===0)return!1;let b=R.toString();return c.some(O=>typeof O=="string"?O==="*"?!0:b.startsWith(O):O.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??[],s=this.config.resourceNameTemplate,l=R=>{let b=R.toString();return n.length>0&&n.some(O=>typeof O=="string"?O==="*"?!0:b.startsWith(O):O.test(b))?!1:a&&R.protocol==="https:"&&(R.host===a||R.host===t||R.host===sr()?.headers.host)||!a&&R.protocol==="http:"&&R.hostname==="localhost"?!0:e.some(O=>typeof O=="string"?O==="*"?!0:b.startsWith(O):O.test(b))};process.env.NEXT_OTEL_FETCH_DISABLED="1";let h=globalThis.fetch;this.originalFetch=h;let T=(R,b)=>{if(b?.next?.internal)return h(R,b);let O=new Request(R,b),V=new URL(O.url);if(u(V))return h(R,b);let L={[Ye.SemanticAttributes.HTTP_METHOD]:O.method,[Ye.SemanticAttributes.HTTP_URL]:O.url,[Ye.SemanticAttributes.HTTP_HOST]:V.host,[Ye.SemanticAttributes.HTTP_SCHEME]:V.protocol.replace(":",""),[Ye.SemanticAttributes.NET_PEER_NAME]:V.hostname,[Ye.SemanticAttributes.NET_PEER_PORT]:V.port},H=s?b_(s,L):tb(O.url);return o.startActiveSpan(`fetch ${O.method} ${O.url}`,{kind:m.SpanKind.CLIENT,attributes:{...L,"operation.name":`fetch.${O.method}`,"resource.name":H}},async k=>{k.isRecording()&&Xr(k.spanContext().traceFlags)&&l(V)&&m.propagation.inject(m.context.active(),O.headers,eb);try{let pe=await h(R,{...b,headers:O.headers});return k.setAttribute(Ye.SemanticAttributes.HTTP_STATUS_CODE,pe.status),pe.status>=500&&k.setStatus({code:m.SpanStatusCode.ERROR,message:`Status: ${pe.status} (${pe.statusText})`}),k.end(),pe}catch(pe){throw pe instanceof Error?(k.recordException(pe),k.setStatus({code:m.SpanStatusCode.ERROR,message:pe.message})):k.setStatus({code:m.SpanStatusCode.ERROR,message:String(pe)}),k.end(),pe}})};globalThis.fetch=T}disable(){this.originalFetch&&(globalThis.fetch=this.originalFetch)}},eb={set(i,r,o){i.set(r,o)}};function tb(i){let r=i.indexOf("?");return r===-1?i:i.substring(0,r)}var iu=class{constructor(r={}){this.configuration=r}start(){let r=rb(),o=(0,gr.getEnvWithoutDefaults)(),c=this.configuration,u=process.env.NEXT_RUNTIME||"nodejs",a=!!r.OTEL_SDK_DISABLED;if(o.OTEL_LOG_LEVEL&&m.diag.setLogger(new m.DiagConsoleLogger,{logLevel:o.OTEL_LOG_LEVEL}),a)return;let t=c.idGenerator??new G.RandomIdGenerator,e=c.contextManager??new I_.AsyncLocalStorageContextManager;e.enable(),this.contextManager=e;let n=r.OTEL_SERVICE_NAME||c.serviceName||"app",s=new vr.Resource(Bi({[x_.SemanticResourceAttributes.SERVICE_NAME]:n,"node.ci":process.env.CI?!0:void 0,"node.env":process.env.NODE_ENV,"vercel.env":process.env.VERCEL_ENV||process.env.NEXT_PUBLIC_VERCEL_ENV,"vercel.region":process.env.VERCEL_REGION,"vercel.runtime":u,"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??[vr.envDetectorSync];if(c.autoDetectResources??!0){let H={detectors:l};s=s.merge((0,vr.detectResourcesSync)(H))}let T=ob(c.propagators,r),R=ib(c.traceSampler,r),b=ub(c.spanProcessors,c,r);b.length===0&&m.diag.warn("@vercel/otel: No span processors configured. No spans will be exported.");let O=c.spanLimits,V=new G.BasicTracerProvider({resource:s,idGenerator:t,sampler:R,spanLimits:O});if(V.addSpanProcessor(new Vi(b)),V.register({contextManager:e,propagator:new be.CompositePropagator({propagators:T})}),this.tracerProvider=V,c.logRecordProcessor){let H=new N_.LoggerProvider({resource:s});this.loggerProvider=H,H.addLogRecordProcessor(c.logRecordProcessor),dt.logs.setGlobalLoggerProvider(H)}if(c.metricReader||c.views){let H=new R_.MeterProvider({resource:s,views:c.views??[]});c.metricReader&&H.addMetricReader(c.metricReader),m.metrics.setGlobalMeterProvider(H),this.meterProvider=H}let L=nb(c.instrumentations,c.instrumentationConfig);this.disableInstumentations=(0,P_.registerInstrumentations)({instrumentations:L}),m.diag.info("@vercel/otel: started",n,u)}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()),m.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 rb(){let i=(0,gr.parseEnvironment)(process.env);return{...gr.DEFAULT_ENVIRONMENT,...i}}function nb(i,r){return(i??["auto"]).map(o=>o==="auto"?(m.diag.debug("@vercel/otel: Configure instrumentations: fetch",r?.fetch),[new yr(r?.fetch)]):o==="fetch"?(m.diag.debug("@vercel/otel: Configure instrumentations: fetch",r?.fetch),new yr(r?.fetch)):o).flat()}function ob(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 m.diag.debug("@vercel/otel: Configure propagators: tracecontext, baggage"),[new be.W3CTraceContextPropagator,new be.W3CBaggagePropagator];if(c==="tracecontext")return m.diag.debug("@vercel/otel: Configure propagator: tracecontext"),new be.W3CTraceContextPropagator;if(c==="baggage")return m.diag.debug("@vercel/otel: Configure propagator: baggage"),new be.W3CBaggagePropagator;if(typeof c=="string")throw new Error(`Unknown propagator: "${c}"`);return c}).flat()}var O_="always_on",Er=1;function ib(i,r){if(i&&typeof i!="string")return i;let o=i&&i!=="auto"?i:r.OTEL_TRACES_SAMPLER||O_;switch(m.diag.debug("@vercel/otel: Configure sampler: ",o),o){case"always_on":return new G.AlwaysOnSampler;case"always_off":return new G.AlwaysOffSampler;case"parentbased_always_on":return new G.ParentBasedSampler({root:new G.AlwaysOnSampler});case"parentbased_always_off":return new G.ParentBasedSampler({root:new G.AlwaysOffSampler});case"traceidratio":return new G.TraceIdRatioBasedSampler(A_(r));case"parentbased_traceidratio":return new G.ParentBasedSampler({root:new G.TraceIdRatioBasedSampler(A_(r))});default:return m.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER value "${String(r.OTEL_TRACES_SAMPLER)} invalid, defaulting to ${O_}".`),new G.AlwaysOnSampler}}function A_(i){if(i.OTEL_TRACES_SAMPLER_ARG===void 0||i.OTEL_TRACES_SAMPLER_ARG==="")return m.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${Er}.`),Er;m.diag.debug("@vercel/otel: Configure sampler probability: ",i.OTEL_TRACES_SAMPLER_ARG);let r=Number(i.OTEL_TRACES_SAMPLER_ARG);return isNaN(r)?(m.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${i.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${Er}.`),Er):r<0||r>1?(m.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 ${Er}.`),Er):r}function ub(i,r,o){return(i??["auto"]).map(c=>{if(c==="auto"){if(process.env.VERCEL_OTEL_ENDPOINTS){let u=process.env.VERCEL_OTEL_ENDPOINTS_PORT||"4318",a=process.env.VERCEL_OTEL_ENDPOINTS_PROTOCOL||"http/protobuf";m.diag.debug("@vercel/otel: Configure vercel otel collector on port: ",u,a);let t={url:`http://localhost:${u}/v1/traces`,headers:{}},e=a==="http/protobuf"?new gt(t):new cr(t);return new G.BatchSpanProcessor(e)}return r.traceExporter||o.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT||o.OTEL_EXPORTER_OTLP_ENDPOINT?new G.BatchSpanProcessor(sb(r.traceExporter,o)):void 0}return c}).filter(lb)}function sb(i,r){if(i&&i!=="auto")return i;let o=process.env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL??process.env.OTEL_EXPORTER_OTLP_PROTOCOL??"http/protobuf",c=cb(r),u={...be.baggageUtils.parseKeyPairsIntoRecord(r.OTEL_EXPORTER_OTLP_HEADERS),...be.baggageUtils.parseKeyPairsIntoRecord(r.OTEL_EXPORTER_OTLP_TRACES_HEADERS)};switch(m.diag.debug("@vercel/otel: Configure trace exporter: ",o,c,`headers: ${Object.keys(u).join(",")||"<none>"}`),o){case"http/json":return new cr({url:c,headers:u});case"http/protobuf":return new gt({url:c,headers:u});default:return m.diag.warn(`@vercel/otel: Unsupported OTLP traces protocol: ${o}. Using http/protobuf.`),new gt}}var L_="v1/traces",ab=`http://localhost:4318/${L_}`;function cb(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}/${L_}`:ab}function lb(i){return i!=null}function WN(i){let r;i?typeof i=="string"?r={serviceName:i}:r=i:r={},new iu(r).start()}export{yr as FetchInstrumentation,cr as OTLPHttpJsonTraceExporter,gt as OTLPHttpProtoTraceExporter,WN as registerOTel};
20
+ `,(0,gi.getConflictResolutionRecipe)(a,r))}return c}};Ti.MetricStorageRegistry=wa});var yd=d(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.MultiMetricStorage=void 0;var Ma=class{constructor(r){this._backingStorages=r}record(r,o,c,u){this._backingStorages.forEach(a=>{a.record(r,o,c,u)})}};Si.MultiMetricStorage=Ma});var vd=d(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.BatchObservableResultImpl=ur.ObservableResultImpl=void 0;var ir=(y(),E(m)),Ed=Fr(),Wg=di(),Ca=class{constructor(r,o){this._instrumentName=r,this._valueType=o,this._buffer=new Ed.AttributeHashMap}observe(r,o={}){if(typeof r!="number"){ir.diag.warn(`non-number value provided to metric ${this._instrumentName}: ${r}`);return}this._valueType===ir.ValueType.INT&&!Number.isInteger(r)&&(ir.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=Ca;var Ua=class{constructor(){this._buffer=new Map}observe(r,o,c={}){if(!(0,Wg.isObservableInstrument)(r))return;let u=this._buffer.get(r);if(u==null&&(u=new Ed.AttributeHashMap,this._buffer.set(r,u)),typeof o!="number"){ir.diag.warn(`non-number value provided to metric ${r._descriptor.name}: ${o}`);return}r._descriptor.valueType===ir.ValueType.INT&&!Number.isInteger(o)&&(ir.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))||u.set(c,o)}};ur.BatchObservableResultImpl=Ua});var Sd=d(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.ObservableRegistry=void 0;var Jg=(y(),E(m)),gd=di(),Td=vd(),Kr=Re(),Da=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(gd.isObservableInstrument));if(c.size===0){Jg.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(gd.isObservableInstrument)),u=this._findBatchCallback(r,c);u<0||this._batchCallbacks.splice(u,1)}async observe(r,o){let c=this._observeCallbacks(r,o),u=this._observeBatchCallbacks(r,o);return(await(0,Kr.PromiseAllSettled)([...c,...u])).filter(Kr.isPromiseAllSettledRejectionResult).map(e=>e.reason)}_observeCallbacks(r,o){return this._callbacks.map(async({callback:c,instrument:u})=>{let a=new Td.ObservableResultImpl(u._descriptor.name,u._descriptor.valueType),t=Promise.resolve(c(a));o!=null&&(t=(0,Kr.callWithTimeout)(t,o)),await t,u._metricStorages.forEach(e=>{e.record(a._buffer,r)})})}_observeBatchCallbacks(r,o){return this._batchCallbacks.map(async({callback:c,instruments:u})=>{let a=new Td.BatchObservableResultImpl,t=Promise.resolve(c(a));o!=null&&(t=(0,Kr.callWithTimeout)(t,o)),await t,u.forEach(e=>{let n=a._buffer.get(e);n!=null&&e._metricStorages.forEach(s=>{s.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,Kr.setEquals)(c.instruments,o))}};bi.ObservableRegistry=Da});var bd=d(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.SyncMetricStorage=void 0;var Qg=Oa(),Zg=Ra(),eT=Ia(),Ba=class extends Qg.MetricStorage{constructor(r,o,c,u){super(r),this._attributesProcessor=c,this._deltaMetricStorage=new Zg.DeltaMetricProcessor(o),this._temporalMetricStorage=new eT.TemporalMetricProcessor(o,u)}record(r,o,c,u){o=this._attributesProcessor.process(o,c),this._deltaMetricStorage.record(r,o,c,u)}collect(r,o){let c=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,c,o)}};Oi.SyncMetricStorage=Ba});var ka=d(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.FilteringAttributesProcessor=Ge.NoopAttributesProcessor=Ge.AttributesProcessor=void 0;var Xr=class{static Noop(){return tT}};Ge.AttributesProcessor=Xr;var Ai=class extends Xr{process(r,o){return r}};Ge.NoopAttributesProcessor=Ai;var Va=class extends Xr{constructor(r){super(),this._allowedAttributeNames=r}process(r,o){let c={};return Object.keys(r).filter(u=>this._allowedAttributeNames.includes(u)).forEach(u=>c[u]=r[u]),c}};Ge.FilteringAttributesProcessor=Va;var tT=new Ai});var Od=d(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.MeterSharedState=void 0;var rT=Me(),nT=ad(),oT=Re(),iT=cd(),uT=md(),sT=yd(),aT=Sd(),cT=bd(),lT=ka(),qa=class{constructor(r,o){this._meterProviderSharedState=r,this._instrumentationScope=o,this.metricStorageRegistry=new uT.MetricStorageRegistry,this.observableRegistry=new aT.ObservableRegistry,this.meter=new nT.Meter(this)}registerMetricStorage(r){let o=this._registerMetricStorage(r,cT.SyncMetricStorage);return o.length===1?o[0]:new sT.MultiMetricStorage(o)}registerAsyncMetricStorage(r){return this._registerMetricStorage(r,iT.AsyncMetricStorage)}async collect(r,o,c){let u=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(oT.isNotNullish);return t.length===0?{errors:u}:{scopeMetrics:{scope:this._instrumentationScope,metrics:t},errors:u}}_registerMetricStorage(r,o){let u=this._meterProviderSharedState.viewRegistry.findViews(r,this._instrumentationScope).map(a=>{let t=(0,rT.createInstrumentDescriptorWithView)(a,r),e=this.metricStorageRegistry.findOrUpdateCompatibleStorage(t);if(e!=null)return e;let n=a.aggregation.createAggregator(t),s=new o(t,n,a.attributesProcessor,this._meterProviderSharedState.metricCollectors);return this.metricStorageRegistry.register(s),s});if(u.length===0){let t=this._meterProviderSharedState.selectAggregations(r.type).map(([e,n])=>{let s=this.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(e,r);if(s!=null)return s;let l=n.createAggregator(r),h=new o(r,l,lT.AttributesProcessor.Noop(),[e]);return this.metricStorageRegistry.registerForCollector(e,h),h});u=u.concat(t)}return u}};Pi.MeterSharedState=qa});var Ad=d(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.MeterProviderSharedState=void 0;var pT=Re(),fT=sd(),dT=Od(),ja=class{constructor(r){this.resource=r,this.viewRegistry=new fT.ViewRegistry,this.metricCollectors=[],this.meterSharedStates=new Map}getMeterSharedState(r){let o=(0,pT.instrumentationScopeId)(r),c=this.meterSharedStates.get(o);return c==null&&(c=new dT.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}};Ni.MeterProviderSharedState=ja});var Pd=d(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.MetricCollector=void 0;var hT=P(),Ga=class{constructor(r,o){this._sharedState=r,this._metricReader=o}async collect(r){let o=(0,hT.millisToHrTime)(Date.now()),c=[],u=[],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&&u.push(...e.errors)});return await Promise.all(a),{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:c},errors:u}}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)}};Ri.MetricCollector=Ga});var Rd=d(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.MeterProvider=void 0;var xi=(y(),E(m)),Nd=pt(),_T=Ad(),mT=Pd(),Ha=class{constructor(r){var o;this._shutdown=!1;let c=Nd.Resource.default().merge((o=r?.resource)!==null&&o!==void 0?o:Nd.Resource.empty());if(this._sharedState=new _T.MeterProviderSharedState(c),r?.views!=null&&r.views.length>0)for(let u of r.views)this._sharedState.viewRegistry.addView(u)}getMeter(r,o="",c={}){return this._shutdown?(xi.diag.warn("A shutdown MeterProvider cannot provide a Meter"),(0,xi.createNoopMeter)()):this._sharedState.getMeterSharedState({name:r,version:o,schemaUrl:c.schemaUrl}).meter}addMetricReader(r){let o=new mT.MetricCollector(this._sharedState,r);r.setMetricProducer(o),this._sharedState.metricCollectors.push(o)}async shutdown(r){if(this._shutdown){xi.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){xi.diag.warn("invalid attempt to force flush after MeterProvider shutdown");return}await Promise.all(this._sharedState.metricCollectors.map(o=>o.forceFlush(r)))}};Ii.MeterProvider=Ha});var Li=d(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.ExactPredicate=sr.PatternPredicate=void 0;var yT=/[\^$\\.+?()[\]{}|]/g,Fa=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(yT,"\\$&").replace("*",".*")}$`}static hasWildcard(r){return r.includes("*")}};sr.PatternPredicate=Fa;var Ka=class{constructor(r){this._matchAll=r===void 0,this._pattern=r}match(r){return!!(this._matchAll||r===this._pattern)}};sr.ExactPredicate=Ka});var Id=d(wi=>{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});wi.InstrumentSelector=void 0;var xd=Li(),Xa=class{constructor(r){var o;this._nameFilter=new xd.PatternPredicate((o=r?.name)!==null&&o!==void 0?o:"*"),this._type=r?.type,this._unitFilter=new xd.ExactPredicate(r?.unit)}getType(){return this._type}getNameFilter(){return this._nameFilter}getUnitFilter(){return this._unitFilter}};wi.InstrumentSelector=Xa});var Ld=d(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});Mi.MeterSelector=void 0;var za=Li(),$a=class{constructor(r){this._nameFilter=new za.ExactPredicate(r?.name),this._versionFilter=new za.ExactPredicate(r?.version),this._schemaUrlFilter=new za.ExactPredicate(r?.schemaUrl)}getNameFilter(){return this._nameFilter}getVersionFilter(){return this._versionFilter}getSchemaUrlFilter(){return this._schemaUrlFilter}};Mi.MeterSelector=$a});var Md=d(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.View=void 0;var ET=Li(),wd=ka(),vT=Id(),gT=Ld(),TT=ii();function ST(i){return i.instrumentName==null&&i.instrumentType==null&&i.instrumentUnit==null&&i.meterName==null&&i.meterVersion==null&&i.meterSchemaUrl==null}var Ya=class{constructor(r){var o;if(ST(r))throw new Error("Cannot create view with no selector arguments supplied");if(r.name!=null&&(r?.instrumentName==null||ET.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 wd.FilteringAttributesProcessor(r.attributeKeys):this.attributesProcessor=wd.AttributesProcessor.Noop(),this.name=r.name,this.description=r.description,this.aggregation=(o=r.aggregation)!==null&&o!==void 0?o:TT.Aggregation.Default(),this.instrumentSelector=new vT.InstrumentSelector({name:r.instrumentName,type:r.instrumentType,unit:r.instrumentUnit}),this.meterSelector=new gT.MeterSelector({name:r.meterName,version:r.meterVersion,schemaUrl:r.meterSchemaUrl})}};Ci.View=Ya});var Cd=d(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.TimeoutError=O.View=O.Aggregation=O.SumAggregation=O.LastValueAggregation=O.HistogramAggregation=O.DropAggregation=O.ExponentialHistogramAggregation=O.ExplicitBucketHistogramAggregation=O.DefaultAggregation=O.MeterProvider=O.InstrumentType=O.ConsoleMetricExporter=O.InMemoryMetricExporter=O.PeriodicExportingMetricReader=O.MetricReader=O.DataPointType=O.AggregationTemporality=void 0;var bT=Ko();Object.defineProperty(O,"AggregationTemporality",{enumerable:!0,get:function(){return bT.AggregationTemporality}});var OT=jt();Object.defineProperty(O,"DataPointType",{enumerable:!0,get:function(){return OT.DataPointType}});var AT=pa();Object.defineProperty(O,"MetricReader",{enumerable:!0,get:function(){return AT.MetricReader}});var PT=rd();Object.defineProperty(O,"PeriodicExportingMetricReader",{enumerable:!0,get:function(){return PT.PeriodicExportingMetricReader}});var NT=od();Object.defineProperty(O,"InMemoryMetricExporter",{enumerable:!0,get:function(){return NT.InMemoryMetricExporter}});var RT=ud();Object.defineProperty(O,"ConsoleMetricExporter",{enumerable:!0,get:function(){return RT.ConsoleMetricExporter}});var xT=Me();Object.defineProperty(O,"InstrumentType",{enumerable:!0,get:function(){return xT.InstrumentType}});var IT=Rd();Object.defineProperty(O,"MeterProvider",{enumerable:!0,get:function(){return IT.MeterProvider}});var He=ii();Object.defineProperty(O,"DefaultAggregation",{enumerable:!0,get:function(){return He.DefaultAggregation}});Object.defineProperty(O,"ExplicitBucketHistogramAggregation",{enumerable:!0,get:function(){return He.ExplicitBucketHistogramAggregation}});Object.defineProperty(O,"ExponentialHistogramAggregation",{enumerable:!0,get:function(){return He.ExponentialHistogramAggregation}});Object.defineProperty(O,"DropAggregation",{enumerable:!0,get:function(){return He.DropAggregation}});Object.defineProperty(O,"HistogramAggregation",{enumerable:!0,get:function(){return He.HistogramAggregation}});Object.defineProperty(O,"LastValueAggregation",{enumerable:!0,get:function(){return He.LastValueAggregation}});Object.defineProperty(O,"SumAggregation",{enumerable:!0,get:function(){return He.SumAggregation}});Object.defineProperty(O,"Aggregation",{enumerable:!0,get:function(){return He.Aggregation}});var LT=Md();Object.defineProperty(O,"View",{enumerable:!0,get:function(){return LT.View}});var wT=Re();Object.defineProperty(O,"TimeoutError",{enumerable:!0,get:function(){return wT.TimeoutError}})});var Ud=d(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.AbstractAsyncHooksContextManager=void 0;var MT=K("events"),CT=["addListener","on","once","prependListener","prependOnceListener"],Wa=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(r,o){return o instanceof MT.EventEmitter?this._bindEventEmitter(r,o):typeof o=="function"?this._bindFunction(r,o):o}_bindFunction(r,o){let c=this,u=function(...a){return c.with(r,()=>o.apply(this,a))};return Object.defineProperty(u,"length",{enumerable:!1,configurable:!0,writable:!1,value:o.length}),u}_bindEventEmitter(r,o){return this._getPatchMap(o)!==void 0||(this._createPatchMap(o),CT.forEach(u=>{o[u]!==void 0&&(o[u]=this._patchAddListener(o,o[u],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(u,a){var t;let e=(t=c._getPatchMap(r))===null||t===void 0?void 0:t[u];if(e===void 0)return o.call(this,u,a);let n=e.get(a);return o.call(this,u,n||a)}}_patchRemoveAllListeners(r,o){let c=this;return function(u){let a=c._getPatchMap(r);return a!==void 0&&(arguments.length===0?c._createPatchMap(r):a[u]!==void 0&&delete a[u]),o.apply(this,arguments)}}_patchAddListener(r,o,c){let u=this;return function(a,t){if(u._wrapped)return o.call(this,a,t);let e=u._getPatchMap(r);e===void 0&&(e=u._createPatchMap(r));let n=e[a];n===void 0&&(n=new WeakMap,e[a]=n);let s=u.bind(c,t);n.set(t,s),u._wrapped=!0;try{return o.call(this,a,s)}finally{u._wrapped=!1}}}_createPatchMap(r){let o=Object.create(null);return r[this._kOtListeners]=o,o}_getPatchMap(r){return r[this._kOtListeners]}};Ui.AbstractAsyncHooksContextManager=Wa});var Dd=d(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.AsyncLocalStorageContextManager=void 0;var UT=(y(),E(m)),DT=K("async_hooks"),BT=Ud(),Ja=class extends BT.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new DT.AsyncLocalStorage}active(){var r;return(r=this._asyncLocalStorage.getStore())!==null&&r!==void 0?r:UT.ROOT_CONTEXT}with(r,o,c,...u){let a=c==null?o:o.bind(c);return this._asyncLocalStorage.run(r,a,...u)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};Di.AsyncLocalStorageContextManager=Ja});var rc=d(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.toAnyValue=Fe.toKeyValue=Fe.toAttributes=void 0;function qT(i){return Object.keys(i).map(r=>ec(r,i[r]))}Fe.toAttributes=qT;function ec(i,r){return{key:i,value:tc(r)}}Fe.toKeyValue=ec;function tc(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(tc)}}:r==="object"&&i!=null?{kvlistValue:{values:Object.entries(i).map(([o,c])=>ec(o,c))}}:{}}Fe.toAnyValue=tc});var Gd=d(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.toOtlpSpanEvent=Ke.toOtlpLink=Ke.sdkSpanToOtlpSpan=void 0;var nc=rc();function jT(i,r){var o;let c=i.spanContext(),u=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,nc.toAttributes)(i.attributes),droppedAttributesCount:i.droppedAttributesCount,events:i.events.map(a=>jd(a,r)),droppedEventsCount:i.droppedEventsCount,status:{code:u.code,message:u.message},links:i.links.map(a=>qd(a,r)),droppedLinksCount:i.droppedLinksCount}}Ke.sdkSpanToOtlpSpan=jT;function qd(i,r){var o;return{attributes:i.attributes?(0,nc.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}}Ke.toOtlpLink=qd;function jd(i,r){return{attributes:i.attributes?(0,nc.toAttributes)(i.attributes):[],name:i.name,timeUnixNano:r.encodeHrTime(i.time),droppedAttributesCount:i.droppedAttributesCount||0}}Ke.toOtlpSpanEvent=jd});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 ki=P(),GT=BigInt(1e9);function oc(i){return BigInt(i[0])*GT+BigInt(i[1])}he.hrTimeToNanos=oc;function Fd(i){let r=Number(BigInt.asUintN(32,i)),o=Number(BigInt.asUintN(32,i>>BigInt(32)));return{low:r,high:o}}he.toLongBits=Fd;function ic(i){let r=oc(i);return Fd(r)}he.encodeAsLongBits=ic;function Kd(i){return oc(i).toString()}he.encodeAsString=Kd;var HT=typeof BigInt<"u"?Kd:ki.hrTimeToNanoseconds;function Hd(i){return i}function Xd(i){if(i!==void 0)return(0,ki.hexToBase64)(i)}var FT={encodeHrTime:ic,encodeSpanContext:ki.hexToBase64,encodeOptionalSpanContext:Xd};function KT(i){var r,o;if(i===void 0)return FT;let c=(r=i.useLongBits)!==null&&r!==void 0?r:!0,u=(o=i.useHex)!==null&&o!==void 0?o:!1;return{encodeHrTime:c?ic:HT,encodeSpanContext:u?Hd:ki.hexToBase64,encodeOptionalSpanContext:u?Hd:Xd}}he.getOtlpEncoder=KT});var uc=d(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.createExportTraceServiceRequest=void 0;var XT=rc(),zT=Gd(),$T=zd();function YT(i,r){let o=(0,$T.getOtlpEncoder)(r);return{resourceSpans:JT(i,o)}}qi.createExportTraceServiceRequest=YT;function WT(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 u=`${o.instrumentationLibrary.name}@${o.instrumentationLibrary.version||""}:${o.instrumentationLibrary.schemaUrl||""}`,a=c.get(u);a||(a=[],c.set(u,a)),a.push(o)}return r}function JT(i,r){let o=WT(i),c=[],u=o.entries(),a=u.next();for(;!a.done;){let[t,e]=a.value,n=[],s=e.values(),l=s.next();for(;!l.done;){let T=l.value;if(T.length>0){let{name:R,version:N,schemaUrl:I}=T[0].instrumentationLibrary,b=T.map(L=>(0,zT.sdkSpanToOtlpSpan)(L,r));n.push({scope:{name:R,version:N},spans:b,schemaUrl:I})}l=s.next()}let h={resource:{attributes:(0,XT.toAttributes)(t.attributes),droppedAttributesCount:0},scopeSpans:n,schemaUrl:void 0};c.push(h),a=u.next()}return c}});var Et=d(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.parseRetryAfterToMills=V.isExportRetryable=V.invalidTimeout=V.configureExporterTimeout=V.appendRootPathToUrlIfNeeded=V.appendResourcePathToUrl=V.parseHeaders=V.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=V.DEFAULT_EXPORT_MAX_BACKOFF=V.DEFAULT_EXPORT_INITIAL_BACKOFF=V.DEFAULT_EXPORT_MAX_ATTEMPTS=void 0;var sc=(y(),E(m)),$d=P(),Yd=1e4;V.DEFAULT_EXPORT_MAX_ATTEMPTS=5;V.DEFAULT_EXPORT_INITIAL_BACKOFF=1e3;V.DEFAULT_EXPORT_MAX_BACKOFF=5e3;V.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=1.5;function QT(i={}){let r={};return Object.entries(i).forEach(([o,c])=>{typeof c<"u"?r[o]=String(c):sc.diag.warn(`Header "${o}" has wrong value and will be ignored`)}),r}V.parseHeaders=QT;function ZT(i,r){return i.endsWith("/")||(i=i+"/"),i+r}V.appendResourcePathToUrl=ZT;function eS(i){try{let r=new URL(i);return r.pathname===""&&(r.pathname=r.pathname+"/"),r.toString()}catch{return sc.diag.warn(`Could not parse export URL: '${i}'`),i}}V.appendRootPathToUrlIfNeeded=eS;function tS(i){return typeof i=="number"?i<=0?ac(i,Yd):i:rS()}V.configureExporterTimeout=tS;function rS(){var i;let r=Number((i=(0,$d.getEnv)().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)!==null&&i!==void 0?i:(0,$d.getEnv)().OTEL_EXPORTER_OTLP_TIMEOUT);return r<=0?ac(r,Yd):r}function ac(i,r){return sc.diag.warn("Timeout must be greater than 0",i),r}V.invalidTimeout=ac;function nS(i){return[429,502,503,504].includes(i)}V.isExportRetryable=nS;function oS(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}V.parseRetryAfterToMills=oS});var Yr=d(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.OTLPExporterBase=void 0;var Wd=(y(),E(m)),$r=P(),iS=Et(),cc=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 $r.BindOnceFuture(this._shutdown,this),this._concurrencyLimit=typeof r.concurrencyLimit=="number"?r.concurrencyLimit:30,this.timeoutMillis=(0,iS.configureExporterTimeout)(r.timeoutMillis),this.onInit(r)}export(r,o){if(this._shutdownOnce.isCalled){o({code:$r.ExportResultCode.FAILED,error:new Error("Exporter has been shutdown")});return}if(this._sendingPromises.length>=this._concurrencyLimit){o({code:$r.ExportResultCode.FAILED,error:new Error("Concurrent export limit reached")});return}this._export(r).then(()=>{o({code:$r.ExportResultCode.SUCCESS})}).catch(c=>{o({code:$r.ExportResultCode.FAILED,error:c})})}_export(r){return new Promise((o,c)=>{try{Wd.diag.debug("items to be sent",r),this.send(r,o,c)}catch(u){c(u)}})}shutdown(){return this._shutdownOnce.call()}forceFlush(){return Promise.all(this._sendingPromises).then(()=>{})}_shutdown(){return Wd.diag.debug("shutdown started"),this.onShutdown(),this.forceFlush()}};ji.OTLPExporterBase=cc});var lc=d(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.CompressionAlgorithm=void 0;var aS;(function(i){i.NONE="none",i.GZIP="gzip"})(aS=Wr.CompressionAlgorithm||(Wr.CompressionAlgorithm={}))});var Fi=d(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.OTLPExporterError=void 0;var pc=class extends Error{constructor(r,o,c){super(r),this.name="OTLPExporterError",this.data=c,this.code=o}};Hi.OTLPExporterError=pc});var dc=d(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.configureCompression=Xe.createHttpAgent=Xe.sendWithHttp=void 0;var eh=K("url"),th=K("http"),rh=K("https"),cS=K("zlib"),lS=K("stream"),fc=(y(),E(m)),Ki=lc(),Zd=P(),Jr=Fi(),pr=Et();function pS(i,r,o,c,u){let a=i.timeoutMillis,t=new eh.URL(i.url),e=Number(process.versions.node.split(".")[0]),n,s,l=!1,h=setTimeout(()=>{if(clearTimeout(n),l=!0,s.destroyed){let I=new Jr.OTLPExporterError("Request Timeout");u(I)}else e>=14?s.destroy():s.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},R=t.protocol==="http:"?th.request:rh.request,N=(I=pr.DEFAULT_EXPORT_MAX_ATTEMPTS,b=pr.DEFAULT_EXPORT_INITIAL_BACKOFF)=>{switch(s=R(T,L=>{let k="";L.on("data",se=>k+=se),L.on("aborted",()=>{if(l){let se=new Jr.OTLPExporterError("Request Timeout");u(se)}}),L.on("end",()=>{if(l===!1)if(L.statusCode&&L.statusCode<299)fc.diag.debug(`statusCode: ${L.statusCode}`,k),c(),clearTimeout(h),clearTimeout(n);else if(L.statusCode&&(0,pr.isExportRetryable)(L.statusCode)&&I>0){let se;b=pr.DEFAULT_EXPORT_BACKOFF_MULTIPLIER*b,L.headers["retry-after"]?se=(0,pr.parseRetryAfterToMills)(L.headers["retry-after"]):se=Math.round(Math.random()*(pr.DEFAULT_EXPORT_MAX_BACKOFF-b)+b),n=setTimeout(()=>{N(I-1,b)},se)}else{let se=new Jr.OTLPExporterError(L.statusMessage,L.statusCode,k);u(se),clearTimeout(h),clearTimeout(n)}})}),s.on("error",L=>{if(l){let k=new Jr.OTLPExporterError("Request Timeout",L.code);u(k)}else u(L);clearTimeout(h),clearTimeout(n)}),s.on("abort",()=>{if(l){let L=new Jr.OTLPExporterError("Request Timeout");u(L)}clearTimeout(h),clearTimeout(n)}),i.compression){case Ki.CompressionAlgorithm.GZIP:{s.setHeader("Content-Encoding","gzip"),fS(r).on("error",u).pipe(cS.createGzip()).on("error",u).pipe(s);break}default:s.end(r);break}};N()}Xe.sendWithHttp=pS;function fS(i){let r=new lS.Readable;return r.push(i),r.push(null),r}function dS(i){if(i.httpAgentOptions&&i.keepAlive===!1){fc.diag.warn("httpAgentOptions is used only when keepAlive is true");return}if(!(i.keepAlive===!1||!i.url))try{let o=new eh.URL(i.url).protocol==="http:"?th.Agent:rh.Agent;return new o(Object.assign({keepAlive:!0},i.httpAgentOptions))}catch(r){fc.diag.error(`collector exporter failed to create http agent. err: ${r.message}`);return}}Xe.createHttpAgent=dS;function hS(i){return i||(((0,Zd.getEnv)().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION||(0,Zd.getEnv)().OTEL_EXPORTER_OTLP_COMPRESSION)===Ki.CompressionAlgorithm.GZIP?Ki.CompressionAlgorithm.GZIP:Ki.CompressionAlgorithm.NONE)}Xe.configureCompression=hS});var ih=d(Xi=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});Xi.OTLPExporterNodeBase=void 0;var _S=Yr(),mS=Et(),hc=dc(),nh=(y(),E(m)),oh=P(),_c=class extends _S.OTLPExporterBase{constructor(r={}){super(r),this.DEFAULT_HEADERS={},r.metadata&&nh.diag.warn("Metadata cannot be set when using http"),this.headers=Object.assign(this.DEFAULT_HEADERS,(0,mS.parseHeaders)(r.headers),oh.baggageUtils.parseKeyPairsIntoRecord((0,oh.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)),this.agent=(0,hc.createHttpAgent)(r),this.compression=(0,hc.configureCompression)(r.compression)}onInit(r){}send(r,o,c){if(this._shutdownOnce.isCalled){nh.diag.debug("Shutdown already started. Cannot send objects");return}let u=this.convert(r),a=new Promise((e,n)=>{(0,hc.sendWithHttp)(this,JSON.stringify(u),"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(){}};Xi.OTLPExporterNodeBase=_c});var uh=d(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.CompressionAlgorithm=_e.configureCompression=_e.createHttpAgent=_e.sendWithHttp=_e.OTLPExporterNodeBase=void 0;var yS=ih();Object.defineProperty(_e,"OTLPExporterNodeBase",{enumerable:!0,get:function(){return yS.OTLPExporterNodeBase}});var mc=dc();Object.defineProperty(_e,"sendWithHttp",{enumerable:!0,get:function(){return mc.sendWithHttp}});Object.defineProperty(_e,"createHttpAgent",{enumerable:!0,get:function(){return mc.createHttpAgent}});Object.defineProperty(_e,"configureCompression",{enumerable:!0,get:function(){return mc.configureCompression}});var ES=lc();Object.defineProperty(_e,"CompressionAlgorithm",{enumerable:!0,get:function(){return ES.CompressionAlgorithm}})});var yc=d(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.sendWithXhr=dr.sendWithBeacon=void 0;var sh=(y(),E(m)),Qr=Fi(),fr=Et();function vS(i,r,o,c,u){if(navigator.sendBeacon(r,new Blob([i],o)))sh.diag.debug("sendBeacon - can send",i),c();else{let a=new Qr.OTLPExporterError(`sendBeacon - cannot send ${i}`);u(a)}}dr.sendWithBeacon=vS;function gS(i,r,o,c,u,a){let t,e,n=!1,s=setTimeout(()=>{if(clearTimeout(t),n=!0,e.readyState===XMLHttpRequest.DONE){let h=new Qr.OTLPExporterError("Request Timeout");a(h)}else e.abort()},c),l=(h=fr.DEFAULT_EXPORT_MAX_ATTEMPTS,T=fr.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(([N,I])=>{e.setRequestHeader(N,I)}),e.send(i),e.onreadystatechange=()=>{if(e.readyState===XMLHttpRequest.DONE&&n===!1)if(e.status>=200&&e.status<=299)sh.diag.debug("xhr success",i),u(),clearTimeout(s),clearTimeout(t);else if(e.status&&(0,fr.isExportRetryable)(e.status)&&h>0){let N;T=fr.DEFAULT_EXPORT_BACKOFF_MULTIPLIER*T,e.getResponseHeader("Retry-After")?N=(0,fr.parseRetryAfterToMills)(e.getResponseHeader("Retry-After")):N=Math.round(Math.random()*(fr.DEFAULT_EXPORT_MAX_BACKOFF-T)+T),t=setTimeout(()=>{l(h-1,T)},N)}else{let N=new Qr.OTLPExporterError(`Failed to export with XHR (status: ${e.status})`,e.status);a(N),clearTimeout(s),clearTimeout(t)}},e.onabort=()=>{if(n){let N=new Qr.OTLPExporterError("Request Timeout");a(N)}clearTimeout(s),clearTimeout(t)},e.onerror=()=>{if(n){let N=new Qr.OTLPExporterError("Request Timeout");a(N)}clearTimeout(s),clearTimeout(t)}};l()}dr.sendWithXhr=gS});var ch=d($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.OTLPExporterBrowserBase=void 0;var TS=Yr(),SS=Et(),ah=yc(),bS=(y(),E(m)),zi=P(),Ec=class extends TS.OTLPExporterBase{constructor(r={}){super(r),this._useXHR=!1,this._useXHR=!!r.headers||typeof navigator.sendBeacon!="function",this._useXHR?this._headers=Object.assign({},(0,SS.parseHeaders)(r.headers),zi.baggageUtils.parseKeyPairsIntoRecord((0,zi.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)):this._headers={}}onInit(){zi._globalThis.addEventListener("unload",this.shutdown)}onShutdown(){zi._globalThis.removeEventListener("unload",this.shutdown)}send(r,o,c){if(this._shutdownOnce.isCalled){bS.diag.debug("Shutdown already started. Cannot send objects");return}let u=this.convert(r),a=JSON.stringify(u),t=new Promise((n,s)=>{this._useXHR?(0,ah.sendWithXhr)(a,this.url,this._headers,this.timeoutMillis,n,s):(0,ah.sendWithBeacon)(a,this.url,{type:"application/json"},n,s)}).then(o,c);this._sendingPromises.push(t);let e=()=>{let n=this._sendingPromises.indexOf(t);this._sendingPromises.splice(n,1)};t.then(e,e)}};$i.OTLPExporterBrowserBase=Ec});var lh=d(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.sendWithXhr=hr.OTLPExporterBrowserBase=void 0;var OS=ch();Object.defineProperty(hr,"OTLPExporterBrowserBase",{enumerable:!0,get:function(){return OS.OTLPExporterBrowserBase}});var AS=yc();Object.defineProperty(hr,"sendWithXhr",{enumerable:!0,get:function(){return AS.sendWithXhr}})});var fh=d(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.sendWithXhr=ne.OTLPExporterBrowserBase=ne.CompressionAlgorithm=ne.configureCompression=ne.createHttpAgent=ne.sendWithHttp=ne.OTLPExporterNodeBase=void 0;var Zr=uh();Object.defineProperty(ne,"OTLPExporterNodeBase",{enumerable:!0,get:function(){return Zr.OTLPExporterNodeBase}});Object.defineProperty(ne,"sendWithHttp",{enumerable:!0,get:function(){return Zr.sendWithHttp}});Object.defineProperty(ne,"createHttpAgent",{enumerable:!0,get:function(){return Zr.createHttpAgent}});Object.defineProperty(ne,"configureCompression",{enumerable:!0,get:function(){return Zr.configureCompression}});Object.defineProperty(ne,"CompressionAlgorithm",{enumerable:!0,get:function(){return Zr.CompressionAlgorithm}});var ph=lh();Object.defineProperty(ne,"OTLPExporterBrowserBase",{enumerable:!0,get:function(){return ph.OTLPExporterBrowserBase}});Object.defineProperty(ne,"sendWithXhr",{enumerable:!0,get:function(){return ph.sendWithXhr}})});var Yi=d(q=>{"use strict";var PS=q&&q.__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]}),NS=q&&q.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&PS(r,i,o)};Object.defineProperty(q,"__esModule",{value:!0});q.invalidTimeout=q.configureExporterTimeout=q.appendRootPathToUrlIfNeeded=q.appendResourcePathToUrl=q.parseHeaders=q.OTLPExporterError=q.OTLPExporterBase=void 0;NS(fh(),q);var RS=Yr();Object.defineProperty(q,"OTLPExporterBase",{enumerable:!0,get:function(){return RS.OTLPExporterBase}});var xS=Fi();Object.defineProperty(q,"OTLPExporterError",{enumerable:!0,get:function(){return xS.OTLPExporterError}});var en=Et();Object.defineProperty(q,"parseHeaders",{enumerable:!0,get:function(){return en.parseHeaders}});Object.defineProperty(q,"appendResourcePathToUrl",{enumerable:!0,get:function(){return en.appendResourcePathToUrl}});Object.defineProperty(q,"appendRootPathToUrlIfNeeded",{enumerable:!0,get:function(){return en.appendRootPathToUrlIfNeeded}});Object.defineProperty(q,"configureExporterTimeout",{enumerable:!0,get:function(){return en.configureExporterTimeout}});Object.defineProperty(q,"invalidTimeout",{enumerable:!0,get:function(){return en.invalidTimeout}})});var hh=d((uN,dh)=>{"use strict";dh.exports=IS;function IS(i,r){for(var o=new Array(arguments.length-1),c=0,u=2,a=!0;u<arguments.length;)o[c++]=arguments[u++];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(s){a&&(a=!1,n(s))}})}});var Eh=d(yh=>{"use strict";var Wi=yh;Wi.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),mh=new Array(123);for(ge=0;ge<64;)mh[_r[ge]=ge<26?ge+65:ge<52?ge+71:ge<62?ge-4:ge-59|43]=ge++;var ge;Wi.encode=function(r,o,c){for(var u=null,a=[],t=0,e=0,n;o<c;){var s=r[o++];switch(e){case 0:a[t++]=_r[s>>2],n=(s&3)<<4,e=1;break;case 1:a[t++]=_r[n|s>>4],n=(s&15)<<2,e=2;break;case 2:a[t++]=_r[n|s>>6],a[t++]=_r[s&63],e=0;break}t>8191&&((u||(u=[])).push(String.fromCharCode.apply(String,a)),t=0)}return e&&(a[t++]=_r[n],a[t++]=61,e===1&&(a[t++]=61)),u?(t&&u.push(String.fromCharCode.apply(String,a.slice(0,t))),u.join("")):String.fromCharCode.apply(String,a.slice(0,t))};var _h="invalid encoding";Wi.decode=function(r,o,c){for(var u=c,a=0,t,e=0;e<r.length;){var n=r.charCodeAt(e++);if(n===61&&a>1)break;if((n=mh[n])===void 0)throw Error(_h);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(_h);return c-u};Wi.test=function(r){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r)}});var gh=d((aN,vh)=>{"use strict";vh.exports=Ji;function Ji(){this._listeners={}}Ji.prototype.on=function(r,o,c){return(this._listeners[r]||(this._listeners[r]=[])).push({fn:o,ctx:c||this}),this};Ji.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],u=0;u<c.length;)c[u].fn===o?c.splice(u,1):++u;return this};Ji.prototype.emit=function(r){var o=this._listeners[r];if(o){for(var c=[],u=1;u<arguments.length;)c.push(arguments[u++]);for(u=0;u<o.length;)o[u].fn.apply(o[u++].ctx,c)}return this}});var Nh=d((cN,Ph)=>{"use strict";Ph.exports=Th(Th);function Th(i){return typeof Float32Array<"u"?function(){var r=new Float32Array([-0]),o=new Uint8Array(r.buffer),c=o[3]===128;function u(n,s,l){r[0]=n,s[l]=o[0],s[l+1]=o[1],s[l+2]=o[2],s[l+3]=o[3]}function a(n,s,l){r[0]=n,s[l]=o[3],s[l+1]=o[2],s[l+2]=o[1],s[l+3]=o[0]}i.writeFloatLE=c?u:a,i.writeFloatBE=c?a:u;function t(n,s){return o[0]=n[s],o[1]=n[s+1],o[2]=n[s+2],o[3]=n[s+3],r[0]}function e(n,s){return o[3]=n[s],o[2]=n[s+1],o[1]=n[s+2],o[0]=n[s+3],r[0]}i.readFloatLE=c?t:e,i.readFloatBE=c?e:t}():function(){function r(c,u,a,t){var e=u<0?1:0;if(e&&(u=-u),u===0)c(1/u>0?0:2147483648,a,t);else if(isNaN(u))c(2143289344,a,t);else if(u>34028234663852886e22)c((e<<31|2139095040)>>>0,a,t);else if(u<11754943508222875e-54)c((e<<31|Math.round(u/1401298464324817e-60))>>>0,a,t);else{var n=Math.floor(Math.log(u)/Math.LN2),s=Math.round(u*Math.pow(2,-n)*8388608)&8388607;c((e<<31|n+127<<23|s)>>>0,a,t)}}i.writeFloatLE=r.bind(null,Sh),i.writeFloatBE=r.bind(null,bh);function o(c,u,a){var t=c(u,a),e=(t>>31)*2+1,n=t>>>23&255,s=t&8388607;return n===255?s?NaN:e*(1/0):n===0?e*1401298464324817e-60*s:e*Math.pow(2,n-150)*(s+8388608)}i.readFloatLE=o.bind(null,Oh),i.readFloatBE=o.bind(null,Ah)}(),typeof Float64Array<"u"?function(){var r=new Float64Array([-0]),o=new Uint8Array(r.buffer),c=o[7]===128;function u(n,s,l){r[0]=n,s[l]=o[0],s[l+1]=o[1],s[l+2]=o[2],s[l+3]=o[3],s[l+4]=o[4],s[l+5]=o[5],s[l+6]=o[6],s[l+7]=o[7]}function a(n,s,l){r[0]=n,s[l]=o[7],s[l+1]=o[6],s[l+2]=o[5],s[l+3]=o[4],s[l+4]=o[3],s[l+5]=o[2],s[l+6]=o[1],s[l+7]=o[0]}i.writeDoubleLE=c?u:a,i.writeDoubleBE=c?a:u;function t(n,s){return o[0]=n[s],o[1]=n[s+1],o[2]=n[s+2],o[3]=n[s+3],o[4]=n[s+4],o[5]=n[s+5],o[6]=n[s+6],o[7]=n[s+7],r[0]}function e(n,s){return o[7]=n[s],o[6]=n[s+1],o[5]=n[s+2],o[4]=n[s+3],o[3]=n[s+4],o[2]=n[s+5],o[1]=n[s+6],o[0]=n[s+7],r[0]}i.readDoubleLE=c?t:e,i.readDoubleBE=c?e:t}():function(){function r(c,u,a,t,e,n){var s=t<0?1:0;if(s&&(t=-t),t===0)c(0,e,n+u),c(1/t>0?0:2147483648,e,n+a);else if(isNaN(t))c(0,e,n+u),c(2146959360,e,n+a);else if(t>17976931348623157e292)c(0,e,n+u),c((s<<31|2146435072)>>>0,e,n+a);else{var l;if(t<22250738585072014e-324)l=t/5e-324,c(l>>>0,e,n+u),c((s<<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+u),c((s<<31|h+1023<<20|l*1048576&1048575)>>>0,e,n+a)}}}i.writeDoubleLE=r.bind(null,Sh,0,4),i.writeDoubleBE=r.bind(null,bh,4,0);function o(c,u,a,t,e){var n=c(t,e+u),s=c(t,e+a),l=(s>>31)*2+1,h=s>>>20&2047,T=4294967296*(s&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,Oh,0,4),i.readDoubleBE=o.bind(null,Ah,4,0)}(),i}function Sh(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 bh(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 Oh(i,r){return(i[r]|i[r+1]<<8|i[r+2]<<16|i[r+3]<<24)>>>0}function Ah(i,r){return(i[r]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3])>>>0}});var Rh=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 Ih=d(xh=>{"use strict";var vc=xh;vc.length=function(r){for(var o=0,c=0,u=0;u<r.length;++u)c=r.charCodeAt(u),c<128?o+=1:c<2048?o+=2:(c&64512)===55296&&(r.charCodeAt(u+1)&64512)===56320?(++u,o+=4):o+=3;return o};vc.read=function(r,o,c){var u=c-o;if(u<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))};vc.write=function(r,o,c){for(var u=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-u}});var wh=d((pN,Lh)=>{"use strict";Lh.exports=LS;function LS(i,r,o){var c=o||8192,u=c>>>1,a=null,t=c;return function(n){if(n<1||n>u)return i(n);t+n>c&&(a=i(c),t=0);var s=r.call(a,t,t+=n);return t&7&&(t=(t|7)+1),s}}});var Ch=d((fN,Mh)=>{"use strict";Mh.exports=z;var tn=$e();function z(i,r){this.lo=i>>>0,this.hi=r>>>0}var vt=z.zero=new z(0,0);vt.toNumber=function(){return 0};vt.zzEncode=vt.zzDecode=function(){return this};vt.length=function(){return 1};var wS=z.zeroHash="\0\0\0\0\0\0\0\0";z.fromNumber=function(r){if(r===0)return vt;var o=r<0;o&&(r=-r);var c=r>>>0,u=(r-c)/4294967296>>>0;return o&&(u=~u>>>0,c=~c>>>0,++c>4294967295&&(c=0,++u>4294967295&&(u=0))),new z(c,u)};z.from=function(r){if(typeof r=="number")return z.fromNumber(r);if(tn.isString(r))if(tn.Long)r=tn.Long.fromString(r);else return z.fromNumber(parseInt(r,10));return r.low||r.high?new z(r.low>>>0,r.high>>>0):vt};z.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};z.prototype.toLong=function(r){return tn.Long?new tn.Long(this.lo|0,this.hi|0,!!r):{low:this.lo|0,high:this.hi|0,unsigned:!!r}};var ze=String.prototype.charCodeAt;z.fromHash=function(r){return r===wS?vt:new z((ze.call(r,0)|ze.call(r,1)<<8|ze.call(r,2)<<16|ze.call(r,3)<<24)>>>0,(ze.call(r,4)|ze.call(r,5)<<8|ze.call(r,6)<<16|ze.call(r,7)<<24)>>>0)};z.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)};z.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};z.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};z.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 $e=d(gc=>{"use strict";var v=gc;v.asPromise=hh();v.base64=Eh();v.EventEmitter=gh();v.float=Nh();v.inquire=Rh();v.utf8=Ih();v.pool=wh();v.LongBits=Ch();v.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);v.global=v.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||gc;v.emptyArray=Object.freeze?Object.freeze([]):[];v.emptyObject=Object.freeze?Object.freeze({}):{};v.isInteger=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r};v.isString=function(r){return typeof r=="string"||r instanceof String};v.isObject=function(r){return r&&typeof r=="object"};v.isset=v.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};v.Buffer=function(){try{var i=v.inquire("buffer").Buffer;return i.prototype.utf8Write?i:null}catch{return null}}();v._Buffer_from=null;v._Buffer_allocUnsafe=null;v.newBuffer=function(r){return typeof r=="number"?v.Buffer?v._Buffer_allocUnsafe(r):new v.Array(r):v.Buffer?v._Buffer_from(r):typeof Uint8Array>"u"?r:new Uint8Array(r)};v.Array=typeof Uint8Array<"u"?Uint8Array:Array;v.Long=v.global.dcodeIO&&v.global.dcodeIO.Long||v.global.Long||v.inquire("long");v.key2Re=/^true|false|0|1$/;v.key32Re=/^-?(?:0|[1-9][0-9]*)$/;v.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;v.longToHash=function(r){return r?v.LongBits.from(r).toHash():v.LongBits.zeroHash};v.longFromHash=function(r,o){var c=v.LongBits.fromHash(r);return v.Long?v.Long.fromBits(c.lo,c.hi,o):c.toNumber(!!o)};function Uh(i,r,o){for(var c=Object.keys(r),u=0;u<c.length;++u)(i[c[u]]===void 0||!o)&&(i[c[u]]=r[c[u]]);return i}v.merge=Uh;v.lcFirst=function(r){return r.charAt(0).toLowerCase()+r.substring(1)};function Dh(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&&Uh(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}v.newError=Dh;v.ProtocolError=Dh("ProtocolError");v.oneOfGetter=function(r){for(var o={},c=0;c<r.length;++c)o[r[c]]=1;return function(){for(var u=Object.keys(this),a=u.length-1;a>-1;--a)if(o[u[a]]===1&&this[u[a]]!==void 0&&this[u[a]]!==null)return u[a]}};v.oneOfSetter=function(r){return function(o){for(var c=0;c<r.length;++c)r[c]!==o&&delete this[r[c]]}};v.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};v._configure=function(){var i=v.Buffer;if(!i){v._Buffer_from=v._Buffer_allocUnsafe=null;return}v._Buffer_from=i.from!==Uint8Array.from&&i.from||function(o,c){return new i(o,c)},v._Buffer_allocUnsafe=i.allocUnsafe||function(o){return new i(o)}}});var Nc=d((hN,qh)=>{"use strict";qh.exports=x;var me=$e(),Tc,Qi=me.LongBits,Bh=me.base64,Vh=me.utf8;function rn(i,r,o){this.fn=i,this.len=r,this.next=void 0,this.val=o}function bc(){}function MS(i){this.head=i.head,this.tail=i.tail,this.len=i.len,this.next=i.states}function x(){this.len=0,this.head=new rn(bc,0,0),this.tail=this.head,this.states=null}var kh=function(){return me.Buffer?function(){return(x.create=function(){return new Tc})()}:function(){return new x}};x.create=kh();x.alloc=function(r){return new me.Array(r)};me.Array!==Array&&(x.alloc=me.pool(x.alloc,me.Array.prototype.subarray));x.prototype._push=function(r,o,c){return this.tail=this.tail.next=new rn(r,o,c),this.len+=o,this};function Oc(i,r,o){r[o]=i&255}function CS(i,r,o){for(;i>127;)r[o++]=i&127|128,i>>>=7;r[o]=i}function Ac(i,r){this.len=i,this.next=void 0,this.val=r}Ac.prototype=Object.create(rn.prototype);Ac.prototype.fn=CS;x.prototype.uint32=function(r){return this.len+=(this.tail=this.tail.next=new Ac((r=r>>>0)<128?1:r<16384?2:r<2097152?3:r<268435456?4:5,r)).len,this};x.prototype.int32=function(r){return r<0?this._push(Pc,10,Qi.fromNumber(r)):this.uint32(r)};x.prototype.sint32=function(r){return this.uint32((r<<1^r>>31)>>>0)};function Pc(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}x.prototype.uint64=function(r){var o=Qi.from(r);return this._push(Pc,o.length(),o)};x.prototype.int64=x.prototype.uint64;x.prototype.sint64=function(r){var o=Qi.from(r).zzEncode();return this._push(Pc,o.length(),o)};x.prototype.bool=function(r){return this._push(Oc,1,r?1:0)};function Sc(i,r,o){r[o]=i&255,r[o+1]=i>>>8&255,r[o+2]=i>>>16&255,r[o+3]=i>>>24}x.prototype.fixed32=function(r){return this._push(Sc,4,r>>>0)};x.prototype.sfixed32=x.prototype.fixed32;x.prototype.fixed64=function(r){var o=Qi.from(r);return this._push(Sc,4,o.lo)._push(Sc,4,o.hi)};x.prototype.sfixed64=x.prototype.fixed64;x.prototype.float=function(r){return this._push(me.float.writeFloatLE,4,r)};x.prototype.double=function(r){return this._push(me.float.writeDoubleLE,8,r)};var US=me.Array.prototype.set?function(r,o,c){o.set(r,c)}:function(r,o,c){for(var u=0;u<r.length;++u)o[c+u]=r[u]};x.prototype.bytes=function(r){var o=r.length>>>0;if(!o)return this._push(Oc,1,0);if(me.isString(r)){var c=x.alloc(o=Bh.length(r));Bh.decode(r,c,0),r=c}return this.uint32(o)._push(US,o,r)};x.prototype.string=function(r){var o=Vh.length(r);return o?this.uint32(o)._push(Vh.write,o,r):this._push(Oc,1,0)};x.prototype.fork=function(){return this.states=new MS(this),this.head=this.tail=new rn(bc,0,0),this.len=0,this};x.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 rn(bc,0,0),this.len=0),this};x.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};x.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};x._configure=function(i){Tc=i,x.create=kh(),Tc._configure()}});var Hh=d((_N,Gh)=>{"use strict";Gh.exports=Ie;var jh=Nc();(Ie.prototype=Object.create(jh.prototype)).constructor=Ie;var Ye=$e();function Ie(){jh.call(this)}Ie._configure=function(){Ie.alloc=Ye._Buffer_allocUnsafe,Ie.writeBytesBuffer=Ye.Buffer&&Ye.Buffer.prototype instanceof Uint8Array&&Ye.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 u=0;u<r.length;)o[c++]=r[u++]}};Ie.prototype.bytes=function(r){Ye.isString(r)&&(r=Ye._Buffer_from(r,"base64"));var o=r.length>>>0;return this.uint32(o),o&&this._push(Ie.writeBytesBuffer,o,r),this};function DS(i,r,o){i.length<40?Ye.utf8.write(i,r,o):r.utf8Write?r.utf8Write(i,o):r.write(i,o)}Ie.prototype.string=function(r){var o=Ye.Buffer.byteLength(r);return this.uint32(o),o&&this._push(DS,o,r),this};Ie._configure()});var Ic=d((mN,$h)=>{"use strict";$h.exports=j;var Te=$e(),xc,Xh=Te.LongBits,BS=Te.utf8;function Se(i,r){return RangeError("index out of range: "+i.pos+" + "+(r||1)+" > "+i.len)}function j(i){this.buf=i,this.pos=0,this.len=i.length}var Fh=typeof Uint8Array<"u"?function(r){if(r instanceof Uint8Array||Array.isArray(r))return new j(r);throw Error("illegal buffer")}:function(r){if(Array.isArray(r))return new j(r);throw Error("illegal buffer")},zh=function(){return Te.Buffer?function(o){return(j.create=function(u){return Te.Buffer.isBuffer(u)?new xc(u):Fh(u)})(o)}:Fh};j.create=zh();j.prototype._slice=Te.Array.prototype.subarray||Te.Array.prototype.slice;j.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}}();j.prototype.int32=function(){return this.uint32()|0};j.prototype.sint32=function(){var r=this.uint32();return r>>>1^-(r&1)|0};function Rc(){var i=new Xh(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")}j.prototype.bool=function(){return this.uint32()!==0};function Zi(i,r){return(i[r-4]|i[r-3]<<8|i[r-2]<<16|i[r-1]<<24)>>>0}j.prototype.fixed32=function(){if(this.pos+4>this.len)throw Se(this,4);return Zi(this.buf,this.pos+=4)};j.prototype.sfixed32=function(){if(this.pos+4>this.len)throw Se(this,4);return Zi(this.buf,this.pos+=4)|0};function Kh(){if(this.pos+8>this.len)throw Se(this,8);return new Xh(Zi(this.buf,this.pos+=4),Zi(this.buf,this.pos+=4))}j.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};j.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};j.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 u=Te.Buffer;return u?u.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,o,c)};j.prototype.string=function(){var r=this.bytes();return BS.read(r,0,r.length)};j.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};j.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};j._configure=function(i){xc=i,j.create=zh(),xc._configure();var r=Te.Long?"toLong":"toNumber";Te.merge(j.prototype,{int64:function(){return Rc.call(this)[r](!1)},uint64:function(){return Rc.call(this)[r](!0)},sint64:function(){return Rc.call(this).zzDecode()[r](!1)},fixed64:function(){return Kh.call(this)[r](!0)},sfixed64:function(){return Kh.call(this)[r](!1)}})}});var Qh=d((yN,Jh)=>{"use strict";Jh.exports=gt;var Wh=Ic();(gt.prototype=Object.create(Wh.prototype)).constructor=gt;var Yh=$e();function gt(i){Wh.call(this,i)}gt._configure=function(){Yh.Buffer&&(gt.prototype._slice=Yh.Buffer.prototype.slice)};gt.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))};gt._configure()});var e_=d((EN,Zh)=>{"use strict";Zh.exports=nn;var Lc=$e();(nn.prototype=Object.create(Lc.EventEmitter.prototype)).constructor=nn;function nn(i,r,o){if(typeof i!="function")throw TypeError("rpcImpl must be a function");Lc.EventEmitter.call(this),this.rpcImpl=i,this.requestDelimited=!!r,this.responseDelimited=!!o}nn.prototype.rpcCall=function i(r,o,c,u,a){if(!u)throw TypeError("request must be specified");var t=this;if(!a)return Lc.asPromise(i,t,r,o,c,u);if(!t.rpcImpl){setTimeout(function(){a(Error("already ended"))},0);return}try{return t.rpcImpl(r,o[t.requestDelimited?"encodeDelimited":"encode"](u).finish(),function(n,s){if(n)return t.emit("error",n,r),a(n);if(s===null){t.end(!0);return}if(!(s instanceof c))try{s=c[t.responseDelimited?"decodeDelimited":"decode"](s)}catch(l){return t.emit("error",l,r),a(l)}return t.emit("data",s,r),a(null,s)})}catch(e){t.emit("error",e,r),setTimeout(function(){a(e)},0);return}};nn.prototype.end=function(r){return this.rpcImpl&&(r||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var r_=d(t_=>{"use strict";var VS=t_;VS.Service=e_()});var o_=d((gN,n_)=>{"use strict";n_.exports={}});var s_=d(u_=>{"use strict";var ue=u_;ue.build="minimal";ue.Writer=Nc();ue.BufferWriter=Hh();ue.Reader=Ic();ue.BufferReader=Qh();ue.util=$e();ue.rpc=r_();ue.roots=o_();ue.configure=i_;function i_(){ue.util._configure(),ue.Writer._configure(ue.BufferWriter),ue.Reader._configure(ue.BufferReader)}i_()});var c_=d((SN,a_)=>{"use strict";a_.exports=s_()});var p_=d((bN,l_)=>{"use strict";var g=c_(),_=g.Reader,S=g.Writer,f=g.util,p=g.roots.default||(g.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 u(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]])}u.prototype.stringValue=null,u.prototype.boolValue=null,u.prototype.intValue=null,u.prototype.doubleValue=null,u.prototype.arrayValue=null,u.prototype.kvlistValue=null,u.prototype.bytesValue=null;var a;return Object.defineProperty(u.prototype,"value",{get:f.oneOfGetter(a=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"]),set:f.oneOfSetter(a)}),u.create=function(e){return new u(e)},u.encode=function(e,n){return n||(n=S.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},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.common.v1.AnyValue;e.pos<s;){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},u.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},u.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 s=p.opentelemetry.proto.common.v1.ArrayValue.verify(e.arrayValue);if(s)return"arrayValue."+s}}if(e.kvlistValue!=null&&e.hasOwnProperty("kvlistValue")){if(n.value===1)return"value: multiple values";n.value=1;{var s=p.opentelemetry.proto.common.v1.KeyValueList.verify(e.kvlistValue);if(s)return"kvlistValue."+s}}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},u.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},u.toObject=function(e,n){n||(n={});var s={};return e.stringValue!=null&&e.hasOwnProperty("stringValue")&&(s.stringValue=e.stringValue,n.oneofs&&(s.value="stringValue")),e.boolValue!=null&&e.hasOwnProperty("boolValue")&&(s.boolValue=e.boolValue,n.oneofs&&(s.value="boolValue")),e.intValue!=null&&e.hasOwnProperty("intValue")&&(typeof e.intValue=="number"?s.intValue=n.longs===String?String(e.intValue):e.intValue:s.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&&(s.value="intValue")),e.doubleValue!=null&&e.hasOwnProperty("doubleValue")&&(s.doubleValue=n.json&&!isFinite(e.doubleValue)?String(e.doubleValue):e.doubleValue,n.oneofs&&(s.value="doubleValue")),e.arrayValue!=null&&e.hasOwnProperty("arrayValue")&&(s.arrayValue=p.opentelemetry.proto.common.v1.ArrayValue.toObject(e.arrayValue,n),n.oneofs&&(s.value="arrayValue")),e.kvlistValue!=null&&e.hasOwnProperty("kvlistValue")&&(s.kvlistValue=p.opentelemetry.proto.common.v1.KeyValueList.toObject(e.kvlistValue,n),n.oneofs&&(s.value="kvlistValue")),e.bytesValue!=null&&e.hasOwnProperty("bytesValue")&&(s.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&&(s.value="bytesValue")),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.AnyValue"},u}(),c.ArrayValue=function(){function u(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 u.prototype.values=f.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.ArrayValue;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.values&&s.values.length||(s.values=[]),s.values.push(p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.values=[]),t.values&&t.values.length){n.values=[];for(var s=0;s<t.values.length;++s)n.values[s]=p.opentelemetry.proto.common.v1.AnyValue.toObject(t.values[s],e)}return n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.ArrayValue"},u}(),c.KeyValueList=function(){function u(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 u.prototype.values=f.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.KeyValueList;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.values&&s.values.length||(s.values=[]),s.values.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.values=[]),t.values&&t.values.length){n.values=[];for(var s=0;s<t.values.length;++s)n.values[s]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.values[s],e)}return n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.KeyValueList"},u}(),c.KeyValue=function(){function u(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 u.prototype.key=null,u.prototype.value=null,u.create=function(t){return new u(t)},u.encode=function(t,e){return e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.KeyValue;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.key=t.string();break}case 2:{s.value=p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32());break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.KeyValue"},u}(),c.InstrumentationScope=function(){function u(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 u.prototype.name=null,u.prototype.version=null,u.prototype.attributes=f.emptyArray,u.prototype.droppedAttributesCount=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.InstrumentationScope;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.name=t.string();break}case 2:{s.version=t.string();break}case 3:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 4:{s.droppedAttributesCount=t.uint32();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=0;s<t.attributes.length;++s)n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[s],e)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.InstrumentationScope"},u}(),c}(),o}(),r.resource=function(){var o={};return o.v1=function(){var c={};return c.Resource=function(){function u(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 u.prototype.attributes=f.emptyArray,u.prototype.droppedAttributesCount=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.resource.v1.Resource;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{s.droppedAttributesCount=t.uint32();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=0;s<t.attributes.length;++s)n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[s],e)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.resource.v1.Resource"},u}(),c}(),o}(),r.trace=function(){var o={};return o.v1=function(){var c={};return c.TracesData=function(){function u(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 u.prototype.resourceSpans=f.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.TracesData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resourceSpans&&s.resourceSpans.length||(s.resourceSpans=[]),s.resourceSpans.push(p.opentelemetry.proto.trace.v1.ResourceSpans.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.resourceSpans=[]),t.resourceSpans&&t.resourceSpans.length){n.resourceSpans=[];for(var s=0;s<t.resourceSpans.length;++s)n.resourceSpans[s]=p.opentelemetry.proto.trace.v1.ResourceSpans.toObject(t.resourceSpans[s],e)}return n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.TracesData"},u}(),c.ResourceSpans=function(){function u(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 u.prototype.resource=null,u.prototype.scopeSpans=f.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.ResourceSpans;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{s.scopeSpans&&s.scopeSpans.length||(s.scopeSpans=[]),s.scopeSpans.push(p.opentelemetry.proto.trace.v1.ScopeSpans.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=0;s<t.scopeSpans.length;++s)n.scopeSpans[s]=p.opentelemetry.proto.trace.v1.ScopeSpans.toObject(t.scopeSpans[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.ResourceSpans"},u}(),c.ScopeSpans=function(){function u(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 u.prototype.scope=null,u.prototype.spans=f.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.ScopeSpans;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{s.spans&&s.spans.length||(s.spans=[]),s.spans.push(p.opentelemetry.proto.trace.v1.Span.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=0;s<t.spans.length;++s)n.spans[s]=p.opentelemetry.proto.trace.v1.Span.toObject(t.spans[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.ScopeSpans"},u}(),c.Span=function(){function u(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 u.prototype.traceId=null,u.prototype.spanId=null,u.prototype.traceState=null,u.prototype.parentSpanId=null,u.prototype.name=null,u.prototype.kind=null,u.prototype.startTimeUnixNano=null,u.prototype.endTimeUnixNano=null,u.prototype.attributes=f.emptyArray,u.prototype.droppedAttributesCount=null,u.prototype.events=f.emptyArray,u.prototype.droppedEventsCount=null,u.prototype.links=f.emptyArray,u.prototype.droppedLinksCount=null,u.prototype.status=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.Span;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.traceId=t.bytes();break}case 2:{s.spanId=t.bytes();break}case 3:{s.traceState=t.string();break}case 4:{s.parentSpanId=t.bytes();break}case 5:{s.name=t.string();break}case 6:{s.kind=t.int32();break}case 7:{s.startTimeUnixNano=t.fixed64();break}case 8:{s.endTimeUnixNano=t.fixed64();break}case 9:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 10:{s.droppedAttributesCount=t.uint32();break}case 11:{s.events&&s.events.length||(s.events=[]),s.events.push(p.opentelemetry.proto.trace.v1.Span.Event.decode(t,t.uint32()));break}case 12:{s.droppedEventsCount=t.uint32();break}case 13:{s.links&&s.links.length||(s.links=[]),s.links.push(p.opentelemetry.proto.trace.v1.Span.Link.decode(t,t.uint32()));break}case 14:{s.droppedLinksCount=t.uint32();break}case 15:{s.status=p.opentelemetry.proto.trace.v1.Status.decode(t,t.uint32());break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=new f.Long(0,0,!1);n.startTimeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}else n.startTimeUnixNano=e.longs===String?"0":0;if(f.Long){var s=new f.Long(0,0,!1);n.endTimeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}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},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Span"},u.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}(),u.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=S.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 s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.trace.v1.Span.Event;e.pos<s;){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 _||(e=new _(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 s=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[n]);if(s)return"attributes."+s}}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 s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}return e.droppedAttributesCount!=null&&(n.droppedAttributesCount=e.droppedAttributesCount>>>0),n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.attributes=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.timeUnixNano=n.longs===String?"0":0;s.name="",s.droppedAttributesCount=0}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?s.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:s.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")&&(s.name=e.name),e.attributes&&e.attributes.length){s.attributes=[];for(var h=0;h<e.attributes.length;++h)s.attributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[h],n)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(s.droppedAttributesCount=e.droppedAttributesCount),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span.Event"},a}(),u.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=S.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 s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.trace.v1.Span.Link;e.pos<s;){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 _||(e=new _(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 s=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[n]);if(s)return"attributes."+s}}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 s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}return e.droppedAttributesCount!=null&&(n.droppedAttributesCount=e.droppedAttributesCount>>>0),n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.attributes=[]),n.defaults&&(n.bytes===String?s.traceId="":(s.traceId=[],n.bytes!==Array&&(s.traceId=f.newBuffer(s.traceId))),n.bytes===String?s.spanId="":(s.spanId=[],n.bytes!==Array&&(s.spanId=f.newBuffer(s.spanId))),s.traceState="",s.droppedAttributesCount=0),e.traceId!=null&&e.hasOwnProperty("traceId")&&(s.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")&&(s.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")&&(s.traceState=e.traceState),e.attributes&&e.attributes.length){s.attributes=[];for(var l=0;l<e.attributes.length;++l)s.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[l],n)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(s.droppedAttributesCount=e.droppedAttributesCount),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span.Link"},a}(),u}(),c.Status=function(){function u(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 u.prototype.message=null,u.prototype.code=null,u.create=function(t){return new u(t)},u.encode=function(t,e){return e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.Status;t.pos<n;){var l=t.uint32();switch(l>>>3){case 2:{s.message=t.string();break}case 3:{s.code=t.int32();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Status"},u.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}(),u}(),c}(),o}(),r.collector=function(){var o={};return o.trace=function(){var c={};return c.v1=function(){var u={};return u.TraceService=function(){function a(t,e,n){g.rpc.Service.call(this,t,e,n)}return(a.prototype=Object.create(g.rpc.Service.prototype)).constructor=a,a.create=function(e,n,s){return new this(e,n,s)},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}(),u.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=S.create()),e.resourceSpans!=null&&e.resourceSpans.length)for(var s=0;s<e.resourceSpans.length;++s)p.opentelemetry.proto.trace.v1.ResourceSpans.encode(e.resourceSpans[s],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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;e.pos<s;){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 _||(e=new _(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 s=p.opentelemetry.proto.trace.v1.ResourceSpans.verify(e.resourceSpans[n]);if(s)return"resourceSpans."+s}}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 s=0;s<e.resourceSpans.length;++s){if(typeof e.resourceSpans[s]!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected");n.resourceSpans[s]=p.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(e.resourceSpans[s])}}return n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.resourceSpans=[]),e.resourceSpans&&e.resourceSpans.length){s.resourceSpans=[];for(var l=0;l<e.resourceSpans.length;++l)s.resourceSpans[l]=p.opentelemetry.proto.trace.v1.ResourceSpans.toObject(e.resourceSpans[l],n)}return s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"},a}(),u.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=S.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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;e.pos<s;){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 _||(e=new _(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 s={};return n.defaults&&(s.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(s.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(e.partialSuccess,n)),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},a}(),u.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=S.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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;e.pos<s;){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 _||(e=new _(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 s={};if(n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.rejectedSpans=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.rejectedSpans=n.longs===String?"0":0;s.errorMessage=""}return e.rejectedSpans!=null&&e.hasOwnProperty("rejectedSpans")&&(typeof e.rejectedSpans=="number"?s.rejectedSpans=n.longs===String?String(e.rejectedSpans):e.rejectedSpans:s.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")&&(s.errorMessage=e.errorMessage),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},a}(),u}(),c}(),o.metrics=function(){var c={};return c.v1=function(){var u={};return u.MetricsService=function(){function a(t,e,n){g.rpc.Service.call(this,t,e,n)}return(a.prototype=Object.create(g.rpc.Service.prototype)).constructor=a,a.create=function(e,n,s){return new this(e,n,s)},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}(),u.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=S.create()),e.resourceMetrics!=null&&e.resourceMetrics.length)for(var s=0;s<e.resourceMetrics.length;++s)p.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(e.resourceMetrics[s],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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;e.pos<s;){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 _||(e=new _(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 s=p.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(e.resourceMetrics[n]);if(s)return"resourceMetrics."+s}}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 s=0;s<e.resourceMetrics.length;++s){if(typeof e.resourceMetrics[s]!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected");n.resourceMetrics[s]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(e.resourceMetrics[s])}}return n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.resourceMetrics=[]),e.resourceMetrics&&e.resourceMetrics.length){s.resourceMetrics=[];for(var l=0;l<e.resourceMetrics.length;++l)s.resourceMetrics[l]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(e.resourceMetrics[l],n)}return s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"},a}(),u.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=S.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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;e.pos<s;){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 _||(e=new _(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 s={};return n.defaults&&(s.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(s.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(e.partialSuccess,n)),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},a}(),u.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=S.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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;e.pos<s;){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 _||(e=new _(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 s={};if(n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.rejectedDataPoints=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.rejectedDataPoints=n.longs===String?"0":0;s.errorMessage=""}return e.rejectedDataPoints!=null&&e.hasOwnProperty("rejectedDataPoints")&&(typeof e.rejectedDataPoints=="number"?s.rejectedDataPoints=n.longs===String?String(e.rejectedDataPoints):e.rejectedDataPoints:s.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")&&(s.errorMessage=e.errorMessage),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},a}(),u}(),c}(),o.logs=function(){var c={};return c.v1=function(){var u={};return u.LogsService=function(){function a(t,e,n){g.rpc.Service.call(this,t,e,n)}return(a.prototype=Object.create(g.rpc.Service.prototype)).constructor=a,a.create=function(e,n,s){return new this(e,n,s)},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}(),u.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=S.create()),e.resourceLogs!=null&&e.resourceLogs.length)for(var s=0;s<e.resourceLogs.length;++s)p.opentelemetry.proto.logs.v1.ResourceLogs.encode(e.resourceLogs[s],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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;e.pos<s;){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 _||(e=new _(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 s=p.opentelemetry.proto.logs.v1.ResourceLogs.verify(e.resourceLogs[n]);if(s)return"resourceLogs."+s}}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 s=0;s<e.resourceLogs.length;++s){if(typeof e.resourceLogs[s]!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected");n.resourceLogs[s]=p.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(e.resourceLogs[s])}}return n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.resourceLogs=[]),e.resourceLogs&&e.resourceLogs.length){s.resourceLogs=[];for(var l=0;l<e.resourceLogs.length;++l)s.resourceLogs[l]=p.opentelemetry.proto.logs.v1.ResourceLogs.toObject(e.resourceLogs[l],n)}return s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"},a}(),u.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=S.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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;e.pos<s;){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 _||(e=new _(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 s={};return n.defaults&&(s.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(s.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(e.partialSuccess,n)),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},a}(),u.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=S.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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;e.pos<s;){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 _||(e=new _(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 s={};if(n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.rejectedLogRecords=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.rejectedLogRecords=n.longs===String?"0":0;s.errorMessage=""}return e.rejectedLogRecords!=null&&e.hasOwnProperty("rejectedLogRecords")&&(typeof e.rejectedLogRecords=="number"?s.rejectedLogRecords=n.longs===String?String(e.rejectedLogRecords):e.rejectedLogRecords:s.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")&&(s.errorMessage=e.errorMessage),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},a}(),u}(),c}(),o}(),r.metrics=function(){var o={};return o.v1=function(){var c={};return c.MetricsData=function(){function u(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 u.prototype.resourceMetrics=f.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.MetricsData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resourceMetrics&&s.resourceMetrics.length||(s.resourceMetrics=[]),s.resourceMetrics.push(p.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.resourceMetrics=[]),t.resourceMetrics&&t.resourceMetrics.length){n.resourceMetrics=[];for(var s=0;s<t.resourceMetrics.length;++s)n.resourceMetrics[s]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(t.resourceMetrics[s],e)}return n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.MetricsData"},u}(),c.ResourceMetrics=function(){function u(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 u.prototype.resource=null,u.prototype.scopeMetrics=f.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.ResourceMetrics;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{s.scopeMetrics&&s.scopeMetrics.length||(s.scopeMetrics=[]),s.scopeMetrics.push(p.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=0;s<t.scopeMetrics.length;++s)n.scopeMetrics[s]=p.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(t.scopeMetrics[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ResourceMetrics"},u}(),c.ScopeMetrics=function(){function u(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 u.prototype.scope=null,u.prototype.metrics=f.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.ScopeMetrics;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{s.metrics&&s.metrics.length||(s.metrics=[]),s.metrics.push(p.opentelemetry.proto.metrics.v1.Metric.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=0;s<t.metrics.length;++s)n.metrics[s]=p.opentelemetry.proto.metrics.v1.Metric.toObject(t.metrics[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ScopeMetrics"},u}(),c.Metric=function(){function u(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]])}u.prototype.name=null,u.prototype.description=null,u.prototype.unit=null,u.prototype.gauge=null,u.prototype.sum=null,u.prototype.histogram=null,u.prototype.exponentialHistogram=null,u.prototype.summary=null;var a;return Object.defineProperty(u.prototype,"data",{get:f.oneOfGetter(a=["gauge","sum","histogram","exponentialHistogram","summary"]),set:f.oneOfSetter(a)}),u.create=function(e){return new u(e)},u.encode=function(e,n){return n||(n=S.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},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.Metric;e.pos<s;){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},u.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},u.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 s=p.opentelemetry.proto.metrics.v1.Gauge.verify(e.gauge);if(s)return"gauge."+s}}if(e.sum!=null&&e.hasOwnProperty("sum")){if(n.data===1)return"data: multiple values";n.data=1;{var s=p.opentelemetry.proto.metrics.v1.Sum.verify(e.sum);if(s)return"sum."+s}}if(e.histogram!=null&&e.hasOwnProperty("histogram")){if(n.data===1)return"data: multiple values";n.data=1;{var s=p.opentelemetry.proto.metrics.v1.Histogram.verify(e.histogram);if(s)return"histogram."+s}}if(e.exponentialHistogram!=null&&e.hasOwnProperty("exponentialHistogram")){if(n.data===1)return"data: multiple values";n.data=1;{var s=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(e.exponentialHistogram);if(s)return"exponentialHistogram."+s}}if(e.summary!=null&&e.hasOwnProperty("summary")){if(n.data===1)return"data: multiple values";n.data=1;{var s=p.opentelemetry.proto.metrics.v1.Summary.verify(e.summary);if(s)return"summary."+s}}return null},u.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},u.toObject=function(e,n){n||(n={});var s={};return n.defaults&&(s.name="",s.description="",s.unit=""),e.name!=null&&e.hasOwnProperty("name")&&(s.name=e.name),e.description!=null&&e.hasOwnProperty("description")&&(s.description=e.description),e.unit!=null&&e.hasOwnProperty("unit")&&(s.unit=e.unit),e.gauge!=null&&e.hasOwnProperty("gauge")&&(s.gauge=p.opentelemetry.proto.metrics.v1.Gauge.toObject(e.gauge,n),n.oneofs&&(s.data="gauge")),e.sum!=null&&e.hasOwnProperty("sum")&&(s.sum=p.opentelemetry.proto.metrics.v1.Sum.toObject(e.sum,n),n.oneofs&&(s.data="sum")),e.histogram!=null&&e.hasOwnProperty("histogram")&&(s.histogram=p.opentelemetry.proto.metrics.v1.Histogram.toObject(e.histogram,n),n.oneofs&&(s.data="histogram")),e.exponentialHistogram!=null&&e.hasOwnProperty("exponentialHistogram")&&(s.exponentialHistogram=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(e.exponentialHistogram,n),n.oneofs&&(s.data="exponentialHistogram")),e.summary!=null&&e.hasOwnProperty("summary")&&(s.summary=p.opentelemetry.proto.metrics.v1.Summary.toObject(e.summary,n),n.oneofs&&(s.data="summary")),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Metric"},u}(),c.Gauge=function(){function u(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 u.prototype.dataPoints=f.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Gauge;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var s=0;s<t.dataPoints.length;++s)n.dataPoints[s]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(t.dataPoints[s],e)}return n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Gauge"},u}(),c.Sum=function(){function u(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 u.prototype.dataPoints=f.emptyArray,u.prototype.aggregationTemporality=null,u.prototype.isMonotonic=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Sum;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(t,t.uint32()));break}case 2:{s.aggregationTemporality=t.int32();break}case 3:{s.isMonotonic=t.bool();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=0;s<t.dataPoints.length;++s)n.dataPoints[s]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(t.dataPoints[s],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},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Sum"},u}(),c.Histogram=function(){function u(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 u.prototype.dataPoints=f.emptyArray,u.prototype.aggregationTemporality=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Histogram;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(t,t.uint32()));break}case 2:{s.aggregationTemporality=t.int32();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=0;s<t.dataPoints.length;++s)n.dataPoints[s]=p.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(t.dataPoints[s],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},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Histogram"},u}(),c.ExponentialHistogram=function(){function u(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 u.prototype.dataPoints=f.emptyArray,u.prototype.aggregationTemporality=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.ExponentialHistogram;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(t,t.uint32()));break}case 2:{s.aggregationTemporality=t.int32();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=0;s<t.dataPoints.length;++s)n.dataPoints[s]=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(t.dataPoints[s],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},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ExponentialHistogram"},u}(),c.Summary=function(){function u(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 u.prototype.dataPoints=f.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Summary;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var s=0;s<t.dataPoints.length;++s)n.dataPoints[s]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(t.dataPoints[s],e)}return n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Summary"},u}(),c.AggregationTemporality=function(){var u={},a=Object.create(u);return a[u[0]="AGGREGATION_TEMPORALITY_UNSPECIFIED"]=0,a[u[1]="AGGREGATION_TEMPORALITY_DELTA"]=1,a[u[2]="AGGREGATION_TEMPORALITY_CUMULATIVE"]=2,a}(),c.DataPointFlags=function(){var u={},a=Object.create(u);return a[u[0]="DATA_POINT_FLAGS_DO_NOT_USE"]=0,a[u[1]="DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"]=1,a}(),c.NumberDataPoint=function(){function u(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]])}u.prototype.attributes=f.emptyArray,u.prototype.startTimeUnixNano=null,u.prototype.timeUnixNano=null,u.prototype.asDouble=null,u.prototype.asInt=null,u.prototype.exemplars=f.emptyArray,u.prototype.flags=null;var a;return Object.defineProperty(u.prototype,"value",{get:f.oneOfGetter(a=["asDouble","asInt"]),set:f.oneOfSetter(a)}),u.create=function(e){return new u(e)},u.encode=function(e,n){if(n||(n=S.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 s=0;s<e.exemplars.length;++s)p.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[s],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 s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],n.uint32(58).fork()).ldelim();return e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&n.uint32(64).uint32(e.flags),n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.NumberDataPoint;e.pos<s;){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},u.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},u.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 s=0;s<e.attributes.length;++s){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[s]);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 s=0;s<e.exemplars.length;++s){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[s]);if(l)return"exemplars."+l}}return e.flags!=null&&e.hasOwnProperty("flags")&&!f.isInteger(e.flags)?"flags: integer expected":null},u.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 s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}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 s=0;s<e.exemplars.length;++s){if(typeof e.exemplars[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected");n.exemplars[s]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[s])}}return e.flags!=null&&(n.flags=e.flags>>>0),n},u.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.exemplars=[],s.attributes=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.startTimeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.startTimeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);s.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.timeUnixNano=n.longs===String?"0":0;s.flags=0}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?s.startTimeUnixNano=n.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:s.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"?s.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:s.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")&&(s.asDouble=n.json&&!isFinite(e.asDouble)?String(e.asDouble):e.asDouble,n.oneofs&&(s.value="asDouble")),e.exemplars&&e.exemplars.length){s.exemplars=[];for(var h=0;h<e.exemplars.length;++h)s.exemplars[h]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[h],n)}if(e.asInt!=null&&e.hasOwnProperty("asInt")&&(typeof e.asInt=="number"?s.asInt=n.longs===String?String(e.asInt):e.asInt:s.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&&(s.value="asInt")),e.attributes&&e.attributes.length){s.attributes=[];for(var h=0;h<e.attributes.length;++h)s.attributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[h],n)}return e.flags!=null&&e.hasOwnProperty("flags")&&(s.flags=e.flags),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.NumberDataPoint"},u}(),c.HistogramDataPoint=function(){function u(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]])}u.prototype.attributes=f.emptyArray,u.prototype.startTimeUnixNano=null,u.prototype.timeUnixNano=null,u.prototype.count=null,u.prototype.sum=null,u.prototype.bucketCounts=f.emptyArray,u.prototype.explicitBounds=f.emptyArray,u.prototype.exemplars=f.emptyArray,u.prototype.flags=null,u.prototype.min=null,u.prototype.max=null;var a;return Object.defineProperty(u.prototype,"_sum",{get:f.oneOfGetter(a=["sum"]),set:f.oneOfSetter(a)}),Object.defineProperty(u.prototype,"_min",{get:f.oneOfGetter(a=["min"]),set:f.oneOfSetter(a)}),Object.defineProperty(u.prototype,"_max",{get:f.oneOfGetter(a=["max"]),set:f.oneOfSetter(a)}),u.create=function(e){return new u(e)},u.encode=function(e,n){if(n||(n=S.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 s=0;s<e.bucketCounts.length;++s)n.fixed64(e.bucketCounts[s]);n.ldelim()}if(e.explicitBounds!=null&&e.explicitBounds.length){n.uint32(58).fork();for(var s=0;s<e.explicitBounds.length;++s)n.double(e.explicitBounds[s]);n.ldelim()}if(e.exemplars!=null&&e.exemplars.length)for(var s=0;s<e.exemplars.length;++s)p.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[s],n.uint32(66).fork()).ldelim();if(e.attributes!=null&&e.attributes.length)for(var s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],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},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.HistogramDataPoint;e.pos<s;){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},u.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},u.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 s=0;s<e.attributes.length;++s){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[s]);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 s=0;s<e.bucketCounts.length;++s)if(!f.isInteger(e.bucketCounts[s])&&!(e.bucketCounts[s]&&f.isInteger(e.bucketCounts[s].low)&&f.isInteger(e.bucketCounts[s].high)))return"bucketCounts: integer|Long[] expected"}if(e.explicitBounds!=null&&e.hasOwnProperty("explicitBounds")){if(!Array.isArray(e.explicitBounds))return"explicitBounds: array expected";for(var s=0;s<e.explicitBounds.length;++s)if(typeof e.explicitBounds[s]!="number")return"explicitBounds: number[] expected"}if(e.exemplars!=null&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(var s=0;s<e.exemplars.length;++s){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[s]);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},u.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 s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}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 s=0;s<e.bucketCounts.length;++s)f.Long?(n.bucketCounts[s]=f.Long.fromValue(e.bucketCounts[s])).unsigned=!1:typeof e.bucketCounts[s]=="string"?n.bucketCounts[s]=parseInt(e.bucketCounts[s],10):typeof e.bucketCounts[s]=="number"?n.bucketCounts[s]=e.bucketCounts[s]:typeof e.bucketCounts[s]=="object"&&(n.bucketCounts[s]=new f.LongBits(e.bucketCounts[s].low>>>0,e.bucketCounts[s].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 s=0;s<e.explicitBounds.length;++s)n.explicitBounds[s]=Number(e.explicitBounds[s])}if(e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected");n.exemplars=[];for(var s=0;s<e.exemplars.length;++s){if(typeof e.exemplars[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected");n.exemplars[s]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[s])}}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},u.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.bucketCounts=[],s.explicitBounds=[],s.exemplars=[],s.attributes=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.startTimeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.startTimeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);s.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.timeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);s.count=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.count=n.longs===String?"0":0;s.flags=0}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?s.startTimeUnixNano=n.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:s.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"?s.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:s.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"?s.count=n.longs===String?String(e.count):e.count:s.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")&&(s.sum=n.json&&!isFinite(e.sum)?String(e.sum):e.sum,n.oneofs&&(s._sum="sum")),e.bucketCounts&&e.bucketCounts.length){s.bucketCounts=[];for(var h=0;h<e.bucketCounts.length;++h)typeof e.bucketCounts[h]=="number"?s.bucketCounts[h]=n.longs===String?String(e.bucketCounts[h]):e.bucketCounts[h]:s.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){s.explicitBounds=[];for(var h=0;h<e.explicitBounds.length;++h)s.explicitBounds[h]=n.json&&!isFinite(e.explicitBounds[h])?String(e.explicitBounds[h]):e.explicitBounds[h]}if(e.exemplars&&e.exemplars.length){s.exemplars=[];for(var h=0;h<e.exemplars.length;++h)s.exemplars[h]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[h],n)}if(e.attributes&&e.attributes.length){s.attributes=[];for(var h=0;h<e.attributes.length;++h)s.attributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[h],n)}return e.flags!=null&&e.hasOwnProperty("flags")&&(s.flags=e.flags),e.min!=null&&e.hasOwnProperty("min")&&(s.min=n.json&&!isFinite(e.min)?String(e.min):e.min,n.oneofs&&(s._min="min")),e.max!=null&&e.hasOwnProperty("max")&&(s.max=n.json&&!isFinite(e.max)?String(e.max):e.max,n.oneofs&&(s._max="max")),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.HistogramDataPoint"},u}(),c.ExponentialHistogramDataPoint=function(){function u(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]])}u.prototype.attributes=f.emptyArray,u.prototype.startTimeUnixNano=null,u.prototype.timeUnixNano=null,u.prototype.count=null,u.prototype.sum=null,u.prototype.scale=null,u.prototype.zeroCount=null,u.prototype.positive=null,u.prototype.negative=null,u.prototype.flags=null,u.prototype.exemplars=f.emptyArray,u.prototype.min=null,u.prototype.max=null,u.prototype.zeroThreshold=null;var a;return Object.defineProperty(u.prototype,"_sum",{get:f.oneOfGetter(a=["sum"]),set:f.oneOfSetter(a)}),Object.defineProperty(u.prototype,"_min",{get:f.oneOfGetter(a=["min"]),set:f.oneOfSetter(a)}),Object.defineProperty(u.prototype,"_max",{get:f.oneOfGetter(a=["max"]),set:f.oneOfSetter(a)}),u.create=function(e){return new u(e)},u.encode=function(e,n){if(n||(n=S.create()),e.attributes!=null&&e.attributes.length)for(var s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],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 s=0;s<e.exemplars.length;++s)p.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[s],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},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;e.pos<s;){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},u.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},u.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 s=0;s<e.attributes.length;++s){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[s]);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 s=0;s<e.exemplars.length;++s){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[s]);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},u.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 s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}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 s=0;s<e.exemplars.length;++s){if(typeof e.exemplars[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected");n.exemplars[s]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[s])}}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},u.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.attributes=[],s.exemplars=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.startTimeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.startTimeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);s.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.timeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);s.count=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.count=n.longs===String?"0":0;if(s.scale=0,f.Long){var l=new f.Long(0,0,!1);s.zeroCount=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.zeroCount=n.longs===String?"0":0;s.positive=null,s.negative=null,s.flags=0,s.zeroThreshold=0}if(e.attributes&&e.attributes.length){s.attributes=[];for(var h=0;h<e.attributes.length;++h)s.attributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[h],n)}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?s.startTimeUnixNano=n.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:s.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"?s.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:s.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"?s.count=n.longs===String?String(e.count):e.count:s.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")&&(s.sum=n.json&&!isFinite(e.sum)?String(e.sum):e.sum,n.oneofs&&(s._sum="sum")),e.scale!=null&&e.hasOwnProperty("scale")&&(s.scale=e.scale),e.zeroCount!=null&&e.hasOwnProperty("zeroCount")&&(typeof e.zeroCount=="number"?s.zeroCount=n.longs===String?String(e.zeroCount):e.zeroCount:s.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")&&(s.positive=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(e.positive,n)),e.negative!=null&&e.hasOwnProperty("negative")&&(s.negative=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(e.negative,n)),e.flags!=null&&e.hasOwnProperty("flags")&&(s.flags=e.flags),e.exemplars&&e.exemplars.length){s.exemplars=[];for(var h=0;h<e.exemplars.length;++h)s.exemplars[h]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[h],n)}return e.min!=null&&e.hasOwnProperty("min")&&(s.min=n.json&&!isFinite(e.min)?String(e.min):e.min,n.oneofs&&(s._min="min")),e.max!=null&&e.hasOwnProperty("max")&&(s.max=n.json&&!isFinite(e.max)?String(e.max):e.max,n.oneofs&&(s._max="max")),e.zeroThreshold!=null&&e.hasOwnProperty("zeroThreshold")&&(s.zeroThreshold=n.json&&!isFinite(e.zeroThreshold)?String(e.zeroThreshold):e.zeroThreshold),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"},u.Buckets=function(){function t(e){if(this.bucketCounts=[],e)for(var n=Object.keys(e),s=0;s<n.length;++s)e[n[s]]!=null&&(this[n[s]]=e[n[s]])}return t.prototype.offset=null,t.prototype.bucketCounts=f.emptyArray,t.create=function(n){return new t(n)},t.encode=function(n,s){if(s||(s=S.create()),n.offset!=null&&Object.hasOwnProperty.call(n,"offset")&&s.uint32(8).sint32(n.offset),n.bucketCounts!=null&&n.bucketCounts.length){s.uint32(18).fork();for(var l=0;l<n.bucketCounts.length;++l)s.uint64(n.bucketCounts[l]);s.ldelim()}return s},t.encodeDelimited=function(n,s){return this.encode(n,s).ldelim()},t.decode=function(n,s){n instanceof _||(n=_.create(n));for(var l=s===void 0?n.len:n.pos+s,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 R=n.uint32()+n.pos;n.pos<R;)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 _||(n=new _(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 s=0;s<n.bucketCounts.length;++s)if(!f.isInteger(n.bucketCounts[s])&&!(n.bucketCounts[s]&&f.isInteger(n.bucketCounts[s].low)&&f.isInteger(n.bucketCounts[s].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 s=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;if(n.offset!=null&&(s.offset=n.offset|0),n.bucketCounts){if(!Array.isArray(n.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected");s.bucketCounts=[];for(var l=0;l<n.bucketCounts.length;++l)f.Long?(s.bucketCounts[l]=f.Long.fromValue(n.bucketCounts[l])).unsigned=!0:typeof n.bucketCounts[l]=="string"?s.bucketCounts[l]=parseInt(n.bucketCounts[l],10):typeof n.bucketCounts[l]=="number"?s.bucketCounts[l]=n.bucketCounts[l]:typeof n.bucketCounts[l]=="object"&&(s.bucketCounts[l]=new f.LongBits(n.bucketCounts[l].low>>>0,n.bucketCounts[l].high>>>0).toNumber(!0))}return s},t.toObject=function(n,s){s||(s={});var l={};if((s.arrays||s.defaults)&&(l.bucketCounts=[]),s.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]=s.longs===String?String(n.bucketCounts[h]):n.bucketCounts[h]:l.bucketCounts[h]=s.longs===String?f.Long.prototype.toString.call(n.bucketCounts[h]):s.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,g.util.toJSONOptions)},t.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},t}(),u}(),c.SummaryDataPoint=function(){function u(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 u.prototype.attributes=f.emptyArray,u.prototype.startTimeUnixNano=null,u.prototype.timeUnixNano=null,u.prototype.count=null,u.prototype.sum=null,u.prototype.quantileValues=f.emptyArray,u.prototype.flags=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint;t.pos<n;){var l=t.uint32();switch(l>>>3){case 7:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{s.startTimeUnixNano=t.fixed64();break}case 3:{s.timeUnixNano=t.fixed64();break}case 4:{s.count=t.fixed64();break}case 5:{s.sum=t.double();break}case 6:{s.quantileValues&&s.quantileValues.length||(s.quantileValues=[]),s.quantileValues.push(p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(t,t.uint32()));break}case 8:{s.flags=t.uint32();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.quantileValues=[],n.attributes=[]),e.defaults){if(f.Long){var s=new f.Long(0,0,!1);n.startTimeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}else n.startTimeUnixNano=e.longs===String?"0":0;if(f.Long){var s=new f.Long(0,0,!1);n.timeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}else n.timeUnixNano=e.longs===String?"0":0;if(f.Long){var s=new f.Long(0,0,!1);n.count=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}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},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.SummaryDataPoint"},u.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=S.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 _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;e.pos<s;){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 _||(e=new _(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 s={};return n.defaults&&(s.quantile=0,s.value=0),e.quantile!=null&&e.hasOwnProperty("quantile")&&(s.quantile=n.json&&!isFinite(e.quantile)?String(e.quantile):e.quantile),e.value!=null&&e.hasOwnProperty("value")&&(s.value=n.json&&!isFinite(e.value)?String(e.value):e.value),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},a}(),u}(),c.Exemplar=function(){function u(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]])}u.prototype.filteredAttributes=f.emptyArray,u.prototype.timeUnixNano=null,u.prototype.asDouble=null,u.prototype.asInt=null,u.prototype.spanId=null,u.prototype.traceId=null;var a;return Object.defineProperty(u.prototype,"value",{get:f.oneOfGetter(a=["asDouble","asInt"]),set:f.oneOfSetter(a)}),u.create=function(e){return new u(e)},u.encode=function(e,n){if(n||(n=S.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 s=0;s<e.filteredAttributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.filteredAttributes[s],n.uint32(58).fork()).ldelim();return n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.Exemplar;e.pos<s;){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},u.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},u.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 s=0;s<e.filteredAttributes.length;++s){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.filteredAttributes[s]);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},u.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 s=0;s<e.filteredAttributes.length;++s){if(typeof e.filteredAttributes[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected");n.filteredAttributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.filteredAttributes[s])}}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},u.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.filteredAttributes=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.timeUnixNano=n.longs===String?"0":0;n.bytes===String?s.spanId="":(s.spanId=[],n.bytes!==Array&&(s.spanId=f.newBuffer(s.spanId))),n.bytes===String?s.traceId="":(s.traceId=[],n.bytes!==Array&&(s.traceId=f.newBuffer(s.traceId)))}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?s.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:s.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")&&(s.asDouble=n.json&&!isFinite(e.asDouble)?String(e.asDouble):e.asDouble,n.oneofs&&(s.value="asDouble")),e.spanId!=null&&e.hasOwnProperty("spanId")&&(s.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")&&(s.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"?s.asInt=n.longs===String?String(e.asInt):e.asInt:s.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&&(s.value="asInt")),e.filteredAttributes&&e.filteredAttributes.length){s.filteredAttributes=[];for(var h=0;h<e.filteredAttributes.length;++h)s.filteredAttributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.filteredAttributes[h],n)}return s},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Exemplar"},u}(),c}(),o}(),r.logs=function(){var o={};return o.v1=function(){var c={};return c.LogsData=function(){function u(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 u.prototype.resourceLogs=f.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.LogsData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resourceLogs&&s.resourceLogs.length||(s.resourceLogs=[]),s.resourceLogs.push(p.opentelemetry.proto.logs.v1.ResourceLogs.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.resourceLogs=[]),t.resourceLogs&&t.resourceLogs.length){n.resourceLogs=[];for(var s=0;s<t.resourceLogs.length;++s)n.resourceLogs[s]=p.opentelemetry.proto.logs.v1.ResourceLogs.toObject(t.resourceLogs[s],e)}return n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.LogsData"},u}(),c.ResourceLogs=function(){function u(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 u.prototype.resource=null,u.prototype.scopeLogs=f.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.ResourceLogs;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{s.scopeLogs&&s.scopeLogs.length||(s.scopeLogs=[]),s.scopeLogs.push(p.opentelemetry.proto.logs.v1.ScopeLogs.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=0;s<t.scopeLogs.length;++s)n.scopeLogs[s]=p.opentelemetry.proto.logs.v1.ScopeLogs.toObject(t.scopeLogs[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.ResourceLogs"},u}(),c.ScopeLogs=function(){function u(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 u.prototype.scope=null,u.prototype.logRecords=f.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.ScopeLogs;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{s.logRecords&&s.logRecords.length||(s.logRecords=[]),s.logRecords.push(p.opentelemetry.proto.logs.v1.LogRecord.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.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 s=0;s<t.logRecords.length;++s)n.logRecords[s]=p.opentelemetry.proto.logs.v1.LogRecord.toObject(t.logRecords[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.ScopeLogs"},u}(),c.SeverityNumber=function(){var u={},a=Object.create(u);return a[u[0]="SEVERITY_NUMBER_UNSPECIFIED"]=0,a[u[1]="SEVERITY_NUMBER_TRACE"]=1,a[u[2]="SEVERITY_NUMBER_TRACE2"]=2,a[u[3]="SEVERITY_NUMBER_TRACE3"]=3,a[u[4]="SEVERITY_NUMBER_TRACE4"]=4,a[u[5]="SEVERITY_NUMBER_DEBUG"]=5,a[u[6]="SEVERITY_NUMBER_DEBUG2"]=6,a[u[7]="SEVERITY_NUMBER_DEBUG3"]=7,a[u[8]="SEVERITY_NUMBER_DEBUG4"]=8,a[u[9]="SEVERITY_NUMBER_INFO"]=9,a[u[10]="SEVERITY_NUMBER_INFO2"]=10,a[u[11]="SEVERITY_NUMBER_INFO3"]=11,a[u[12]="SEVERITY_NUMBER_INFO4"]=12,a[u[13]="SEVERITY_NUMBER_WARN"]=13,a[u[14]="SEVERITY_NUMBER_WARN2"]=14,a[u[15]="SEVERITY_NUMBER_WARN3"]=15,a[u[16]="SEVERITY_NUMBER_WARN4"]=16,a[u[17]="SEVERITY_NUMBER_ERROR"]=17,a[u[18]="SEVERITY_NUMBER_ERROR2"]=18,a[u[19]="SEVERITY_NUMBER_ERROR3"]=19,a[u[20]="SEVERITY_NUMBER_ERROR4"]=20,a[u[21]="SEVERITY_NUMBER_FATAL"]=21,a[u[22]="SEVERITY_NUMBER_FATAL2"]=22,a[u[23]="SEVERITY_NUMBER_FATAL3"]=23,a[u[24]="SEVERITY_NUMBER_FATAL4"]=24,a}(),c.LogRecordFlags=function(){var u={},a=Object.create(u);return a[u[0]="LOG_RECORD_FLAGS_DO_NOT_USE"]=0,a[u[255]="LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"]=255,a}(),c.LogRecord=function(){function u(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 u.prototype.timeUnixNano=null,u.prototype.observedTimeUnixNano=null,u.prototype.severityNumber=null,u.prototype.severityText=null,u.prototype.body=null,u.prototype.attributes=f.emptyArray,u.prototype.droppedAttributesCount=null,u.prototype.flags=null,u.prototype.traceId=null,u.prototype.spanId=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(e||(e=S.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},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.LogRecord;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.timeUnixNano=t.fixed64();break}case 11:{s.observedTimeUnixNano=t.fixed64();break}case 2:{s.severityNumber=t.int32();break}case 3:{s.severityText=t.string();break}case 5:{s.body=p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32());break}case 6:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 7:{s.droppedAttributesCount=t.uint32();break}case 8:{s.flags=t.fixed32();break}case 9:{s.traceId=t.bytes();break}case 10:{s.spanId=t.bytes();break}default:t.skipType(l&7);break}}return s},u.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},u.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},u.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},u.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),e.defaults){if(f.Long){var s=new f.Long(0,0,!1);n.timeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}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 s=new f.Long(0,0,!1);n.observedTimeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}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},u.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},u.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.LogRecord"},u}(),c}(),o}(),r}(),i}();l_.exports=p});var eu=d(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.ServiceClientType=void 0;var kS;(function(i){i[i.SPANS=0]="SPANS",i[i.METRICS=1]="METRICS",i[i.LOGS=2]="LOGS"})(kS=on.ServiceClientType||(on.ServiceClientType={}))});var un=d(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});tu.getExportRequestProto=void 0;var wc=p_(),f_=eu();function qS(i){return i===f_.ServiceClientType.SPANS?wc.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest:i===f_.ServiceClientType.LOGS?wc.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest:wc.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest}tu.getExportRequestProto=qS});var Mc=d(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.send=void 0;var d_=Yi(),jS=un();function GS(i,r,o,c,u){let a=i.convert(r),t=(0,jS.getExportRequestProto)(i.getServiceClientType()),e=t.create(a);if(e){let n=t.encode(e).finish();n&&(0,d_.sendWithHttp)(i,Buffer.from(n),"application/x-protobuf",c,u)}else u(new d_.OTLPExporterError("No proto"))}ru.send=GS});var h_=d(nu=>{"use strict";Object.defineProperty(nu,"__esModule",{value:!0});nu.OTLPProtoExporterNodeBase=void 0;var HS=(y(),E(m)),FS=Yi(),Cc=class extends FS.OTLPExporterNodeBase{constructor(r={}){super(r)}_sendPromise(r,o,c){let u=new Promise((t,e)=>{this._send(this,r,this.compression,t,e)}).then(o,c);this._sendingPromises.push(u);let a=()=>{let t=this._sendingPromises.indexOf(u);this._sendingPromises.splice(t,1)};u.then(a,a)}send(r,o,c){if(this._shutdownOnce.isCalled){HS.diag.debug("Shutdown already started. Cannot send objects");return}this._send?this._sendPromise(r,o,c):setImmediate(()=>{let{send:u}=Mc();this._send=u,this._sendPromise(r,o,c)})}};nu.OTLPProtoExporterNodeBase=Cc});var __=d(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.send=mr.OTLPProtoExporterNodeBase=void 0;var KS=h_();Object.defineProperty(mr,"OTLPProtoExporterNodeBase",{enumerable:!0,get:function(){return KS.OTLPProtoExporterNodeBase}});var XS=Mc();Object.defineProperty(mr,"send",{enumerable:!0,get:function(){return XS.send}})});var m_=d(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.OTLPProtoExporterBrowserBase=void 0;var zS=(y(),E(m)),Uc=Yi(),$S=un(),Dc=class extends Uc.OTLPExporterBrowserBase{constructor(r={}){super(r)}send(r,o,c){if(this._shutdownOnce.isCalled){zS.diag.debug("Shutdown already started. Cannot send objects");return}let u=this.convert(r),a=(0,$S.getExportRequestProto)(this.getServiceClientType()),t=a.create(u);if(t){let e=a.encode(t).finish();e&&(0,Uc.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 Uc.OTLPExporterError("No proto"))}};ou.OTLPProtoExporterBrowserBase=Dc});var y_=d(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.ServiceClientType=yr.OTLPProtoExporterBrowserBase=void 0;var YS=m_();Object.defineProperty(yr,"OTLPProtoExporterBrowserBase",{enumerable:!0,get:function(){return YS.OTLPProtoExporterBrowserBase}});var WS=eu();Object.defineProperty(yr,"ServiceClientType",{enumerable:!0,get:function(){return WS.ServiceClientType}})});var v_=d(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.getExportRequestProto=ye.ServiceClientType=ye.OTLPProtoExporterBrowserBase=ye.send=ye.OTLPProtoExporterNodeBase=void 0;var E_=__();Object.defineProperty(ye,"OTLPProtoExporterNodeBase",{enumerable:!0,get:function(){return E_.OTLPProtoExporterNodeBase}});Object.defineProperty(ye,"send",{enumerable:!0,get:function(){return E_.send}});var JS=y_();Object.defineProperty(ye,"OTLPProtoExporterBrowserBase",{enumerable:!0,get:function(){return JS.OTLPProtoExporterBrowserBase}});var QS=eu();Object.defineProperty(ye,"ServiceClientType",{enumerable:!0,get:function(){return QS.ServiceClientType}});var ZS=un();Object.defineProperty(ye,"getExportRequestProto",{enumerable:!0,get:function(){return ZS.getExportRequestProto}})});var G=J(Ns(),1);y();ws();var P_=J(ff(),1),gr=J(pt(),1),N_=J(Rf(),1),R_=J(Cd(),1),x_=J(fe(),1),Tr=J(fn(),1),I_=J(Dd(),1),be=J(P(),1);y();var VT=Symbol.for("@vercel/request-context");function ar(){return globalThis[VT]?.get()}var Qa=J(fe(),1);function Bi(i){return Object.fromEntries(Object.entries(i).filter(([r,o])=>o!==void 0))}function Bd(i){return i?i.split("::").at(-1):void 0}function Vd(i=ar()){if(i)return Bi({[Qa.SemanticAttributes.HTTP_HOST]:i.headers.host,[Qa.SemanticAttributes.HTTP_USER_AGENT]:i.headers["user-agent"],"http.referer":i.headers.referer,"vercel.request_id":Bd(i.headers["x-vercel-id"]),"vercel.matched_path":i.headers["x-matched-path"],"vercel.edge_region":i.headers["x-vercel-edge-region"]})}y();function zr(i){return(i&m.TraceFlags.SAMPLED)!==0}var Vi=class{constructor(r){this.processors=r;this.rootSpanIds=new Map;this.waitSpanEnd=new Map}forceFlush(){return Promise.all(this.processors.map(r=>r.forceFlush().catch(o=>{m.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:u,traceFlags:a}=r.spanContext(),t=!r.parentSpanId||!this.rootSpanIds.has(c);if(t&&this.rootSpanIds.set(c,u),t&&zr(a)){let e=Vd();e&&r.setAttributes(e);let n=ar();n&&n.waitUntil(async()=>{if(this.rootSpanIds.has(c)){let s=new Promise(h=>{this.waitSpanEnd.set(c,h)}),l;await Promise.race([s,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:u}=r.spanContext(),a=zr(u),t=this.rootSpanIds.get(o)===c;if(a){let e=kT(r);e&&Object.assign(r.attributes,e)}for(let e of this.processors)e.onEnd(r);if(t){this.rootSpanIds.delete(o);let e=this.waitSpanEnd.get(o);e&&(this.waitSpanEnd.delete(o),e())}}},kd={[m.SpanKind.INTERNAL]:"internal",[m.SpanKind.SERVER]:"server",[m.SpanKind.CLIENT]:"client",[m.SpanKind.PRODUCER]:"producer",[m.SpanKind.CONSUMER]:"consumer"};function kT(i){let{kind:r,attributes:o}=i,{"operation.name":c,"resouce.name":u,"span.type":a,"next.span_type":t,"next.route":e,"http.method":n,"http.route":s}=o;if(c)return;let l=i.instrumentationLibrary.name,h=t??a;if(h&&typeof h=="string"){let T=Za(l,h);return e?{"operation.name":T,"resource.name":u??e}:{"operation.name":T}}return n&&s&&typeof n=="string"&&typeof s=="string"?{"operation.name":Za(l,`http.${kd[r]||"internal"}.${n}`),"resource.name":u??s}:{"operation.name":Za(l,r===m.SpanKind.INTERNAL?"":kd[r])}}function Za(i,r){if(!i)return r;let o=i.replace(/[ @./]/g,"_");return o.startsWith("_")&&(o=o.slice(1)),r?`${o}.${r}`:o}var Qd=J(uc(),1);var Jd=J(Yr(),1);y();var cr=class extends Jd.OTLPExporterBase{constructor(r={}){super(r),r.headers&&(this._headers=r.headers)}onShutdown(){m.diag.debug("@vercel/otel/otlp: onShutdown")}onInit(){m.diag.debug("@vercel/otel/otlp: onInit")}send(r,o,c){if(this._shutdownOnce.isCalled){m.diag.debug("@vercel/otel/otlp: Shutdown already started. Cannot send objects");return}let u=this.convert(r),a,t,e;try{({body:a,contentType:t,headers:e}=this.toMessage(u))}catch(s){m.diag.warn("@vercel/otel/otlp: no proto",s);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(s=>{m.diag.debug("@vercel/otel/otlp: onSuccess",s.status,s.statusText),o(),s.arrayBuffer().catch(()=>{})}).catch(s=>{m.diag.error("@vercel/otel/otlp: onError",s),c(s)}).finally(()=>{let s=this._sendingPromises.indexOf(n);this._sendingPromises.splice(s,1)});this._sendingPromises.push(n)}getDefaultUrl(r){throw new Error("Method not implemented.")}};var uS="v1/traces",sS=`http://localhost:4318/${uS}`;function Gi(i){return typeof i.url=="string"?i.url:sS}var lr=class extends cr{convert(r){return(0,Qd.createExportTraceServiceRequest)(r,{useHex:!0,useLongBits:!1})}toMessage(r){return{body:JSON.stringify(r),contentType:"application/json"}}getDefaultUrl(r){return Gi(r)}};var g_=J(uc(),1),T_=J(v_(),1),S_=J(un(),1);var Tt=class extends cr{convert(r){return(0,g_.createExportTraceServiceRequest)(r,void 0)}toMessage(r){let o=T_.ServiceClientType.SPANS,c=(0,S_.getExportRequestProto)(o),u=c.create(r);return{body:c.encode(u).finish(),contentType:"application/x-protobuf",headers:{accept:"application/x-protobuf"}}}getDefaultUrl(r){return Gi(r)}};y();var We=J(fe(),1);function b_(i,r){return i.replace(/\{(?<temp1>[^{}]+)\}/g,(o,c)=>{let u=r[c];return u!==void 0?String(u):o})}var Er=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??[],u=(R,N)=>{if(N?.opentelemetry?.ignore!==void 0)return N.opentelemetry.ignore;if(c.length===0)return!1;let I=R.toString();return c.some(b=>typeof b=="string"?b==="*"?!0:I.startsWith(b):b.test(I))},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??[],s=this.config.resourceNameTemplate,l=(R,N)=>{if(N?.opentelemetry?.propagateContext)return N.opentelemetry.propagateContext;let I=R.toString();return n.length>0&&n.some(b=>typeof b=="string"?b==="*"?!0:I.startsWith(b):b.test(I))?!1:a&&R.protocol==="https:"&&(R.host===a||R.host===t||R.host===ar()?.headers.host)||!a&&R.protocol==="http:"&&R.hostname==="localhost"?!0:e.some(b=>typeof b=="string"?b==="*"?!0:I.startsWith(b):b.test(I))};process.env.NEXT_OTEL_FETCH_DISABLED="1";let h=globalThis.fetch;this.originalFetch=h;let T=(R,N)=>{let I=N;if(I?.next?.internal)return h(R,I);let b=new Request(R,I),L=new URL(b.url);if(u(L,I))return h(R,I);let k={[We.SemanticAttributes.HTTP_METHOD]:b.method,[We.SemanticAttributes.HTTP_URL]:b.url,[We.SemanticAttributes.HTTP_HOST]:L.host,[We.SemanticAttributes.HTTP_SCHEME]:L.protocol.replace(":",""),[We.SemanticAttributes.NET_PEER_NAME]:L.hostname,[We.SemanticAttributes.NET_PEER_PORT]:L.port},se=s?b_(s,k):tb(b.url);return o.startActiveSpan(I?.opentelemetry?.spanName??`fetch ${b.method} ${b.url}`,{kind:m.SpanKind.CLIENT,attributes:{...k,"operation.name":`fetch.${b.method}`,"resource.name":se,...I?.opentelemetry?.attributes}},async Oe=>{Oe.isRecording()&&zr(Oe.spanContext().traceFlags)&&l(L,I)&&m.propagation.inject(m.context.active(),b.headers,eb);try{let W=await h(R,{...I,headers:b.headers});return Oe.setAttribute(We.SemanticAttributes.HTTP_STATUS_CODE,W.status),W.status>=500&&Oe.setStatus({code:m.SpanStatusCode.ERROR,message:`Status: ${W.status} (${W.statusText})`}),Oe.end(),W}catch(W){throw W instanceof Error?(Oe.recordException(W),Oe.setStatus({code:m.SpanStatusCode.ERROR,message:W.message})):Oe.setStatus({code:m.SpanStatusCode.ERROR,message:String(W)}),Oe.end(),W}})};globalThis.fetch=T}disable(){this.originalFetch&&(globalThis.fetch=this.originalFetch)}},eb={set(i,r,o){i.set(r,o)}};function tb(i){let r=i.indexOf("?");return r===-1?i:i.substring(0,r)}var iu=class{constructor(r={}){this.configuration=r}start(){let r=rb(),o=(0,Tr.getEnvWithoutDefaults)(),c=this.configuration,u=process.env.NEXT_RUNTIME||"nodejs",a=!!r.OTEL_SDK_DISABLED;if(o.OTEL_LOG_LEVEL&&m.diag.setLogger(new m.DiagConsoleLogger,{logLevel:o.OTEL_LOG_LEVEL}),a)return;let t=c.idGenerator??new G.RandomIdGenerator,e=c.contextManager??new I_.AsyncLocalStorageContextManager;e.enable(),this.contextManager=e;let n=r.OTEL_SERVICE_NAME||c.serviceName||"app",s=new gr.Resource(Bi({[x_.SemanticResourceAttributes.SERVICE_NAME]:n,"node.ci":process.env.CI?!0:void 0,"node.env":process.env.NODE_ENV,"vercel.env":process.env.VERCEL_ENV||process.env.NEXT_PUBLIC_VERCEL_ENV,"vercel.region":process.env.VERCEL_REGION,"vercel.runtime":u,"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??[gr.envDetectorSync];if(c.autoDetectResources??!0){let k={detectors:l};s=s.merge((0,gr.detectResourcesSync)(k))}let T=ob(c.propagators,r),R=ib(c.traceSampler,r),N=ub(c.spanProcessors,c,r);N.length===0&&m.diag.warn("@vercel/otel: No span processors configured. No spans will be exported.");let I=c.spanLimits,b=new G.BasicTracerProvider({resource:s,idGenerator:t,sampler:R,spanLimits:I});if(b.addSpanProcessor(new Vi(N)),b.register({contextManager:e,propagator:new be.CompositePropagator({propagators:T})}),this.tracerProvider=b,c.logRecordProcessor){let k=new N_.LoggerProvider({resource:s});this.loggerProvider=k,k.addLogRecordProcessor(c.logRecordProcessor),ht.logs.setGlobalLoggerProvider(k)}if(c.metricReader||c.views){let k=new R_.MeterProvider({resource:s,views:c.views??[]});c.metricReader&&k.addMetricReader(c.metricReader),m.metrics.setGlobalMeterProvider(k),this.meterProvider=k}let L=nb(c.instrumentations,c.instrumentationConfig);this.disableInstumentations=(0,P_.registerInstrumentations)({instrumentations:L}),m.diag.info("@vercel/otel: started",n,u)}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()),m.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 rb(){let i=(0,Tr.parseEnvironment)(process.env);return{...Tr.DEFAULT_ENVIRONMENT,...i}}function nb(i,r){return(i??["auto"]).map(o=>o==="auto"?(m.diag.debug("@vercel/otel: Configure instrumentations: fetch",r?.fetch),[new Er(r?.fetch)]):o==="fetch"?(m.diag.debug("@vercel/otel: Configure instrumentations: fetch",r?.fetch),new Er(r?.fetch)):o).flat()}function ob(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 m.diag.debug("@vercel/otel: Configure propagators: tracecontext, baggage"),[new be.W3CTraceContextPropagator,new be.W3CBaggagePropagator];if(c==="tracecontext")return m.diag.debug("@vercel/otel: Configure propagator: tracecontext"),new be.W3CTraceContextPropagator;if(c==="baggage")return m.diag.debug("@vercel/otel: Configure propagator: baggage"),new be.W3CBaggagePropagator;if(typeof c=="string")throw new Error(`Unknown propagator: "${c}"`);return c}).flat()}var O_="always_on",vr=1;function ib(i,r){if(i&&typeof i!="string")return i;let o=i&&i!=="auto"?i:r.OTEL_TRACES_SAMPLER||O_;switch(m.diag.debug("@vercel/otel: Configure sampler: ",o),o){case"always_on":return new G.AlwaysOnSampler;case"always_off":return new G.AlwaysOffSampler;case"parentbased_always_on":return new G.ParentBasedSampler({root:new G.AlwaysOnSampler});case"parentbased_always_off":return new G.ParentBasedSampler({root:new G.AlwaysOffSampler});case"traceidratio":return new G.TraceIdRatioBasedSampler(A_(r));case"parentbased_traceidratio":return new G.ParentBasedSampler({root:new G.TraceIdRatioBasedSampler(A_(r))});default:return m.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER value "${String(r.OTEL_TRACES_SAMPLER)} invalid, defaulting to ${O_}".`),new G.AlwaysOnSampler}}function A_(i){if(i.OTEL_TRACES_SAMPLER_ARG===void 0||i.OTEL_TRACES_SAMPLER_ARG==="")return m.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${vr}.`),vr;m.diag.debug("@vercel/otel: Configure sampler probability: ",i.OTEL_TRACES_SAMPLER_ARG);let r=Number(i.OTEL_TRACES_SAMPLER_ARG);return isNaN(r)?(m.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?(m.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 ub(i,r,o){return(i??["auto"]).map(c=>{if(c==="auto"){if(process.env.VERCEL_OTEL_ENDPOINTS){let u=process.env.VERCEL_OTEL_ENDPOINTS_PORT||"4318",a=process.env.VERCEL_OTEL_ENDPOINTS_PROTOCOL||"http/protobuf";m.diag.debug("@vercel/otel: Configure vercel otel collector on port: ",u,a);let t={url:`http://localhost:${u}/v1/traces`,headers:{}},e=a==="http/protobuf"?new Tt(t):new lr(t);return new G.BatchSpanProcessor(e)}return r.traceExporter||o.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT||o.OTEL_EXPORTER_OTLP_ENDPOINT?new G.BatchSpanProcessor(sb(r.traceExporter,o)):void 0}return c}).filter(lb)}function sb(i,r){if(i&&i!=="auto")return i;let o=process.env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL??process.env.OTEL_EXPORTER_OTLP_PROTOCOL??"http/protobuf",c=cb(r),u={...be.baggageUtils.parseKeyPairsIntoRecord(r.OTEL_EXPORTER_OTLP_HEADERS),...be.baggageUtils.parseKeyPairsIntoRecord(r.OTEL_EXPORTER_OTLP_TRACES_HEADERS)};switch(m.diag.debug("@vercel/otel: Configure trace exporter: ",o,c,`headers: ${Object.keys(u).join(",")||"<none>"}`),o){case"http/json":return new lr({url:c,headers:u});case"http/protobuf":return new Tt({url:c,headers:u});default:return m.diag.warn(`@vercel/otel: Unsupported OTLP traces protocol: ${o}. Using http/protobuf.`),new Tt}}var L_="v1/traces",ab=`http://localhost:4318/${L_}`;function cb(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}/${L_}`:ab}function lb(i){return i!=null}function WN(i){let r;i?typeof i=="string"?r={serviceName:i}:r=i:r={},new iu(r).start()}export{Er as FetchInstrumentation,lr as OTLPHttpJsonTraceExporter,Tt as OTLPHttpProtoTraceExporter,WN as registerOTel};