@vercel/otel 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/edge/index.js +1 -1
- package/dist/node/index.js +3 -3
- package/package.json +1 -1
package/dist/node/index.js
CHANGED
|
@@ -4,8 +4,8 @@ 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 km=Object.create;var au=Object.defineProperty;var qm=Object.getOwnPropertyDescriptor;var jm=Object.getOwnPropertyNames;var Gm=Object.getPrototypeOf,Hm=Object.prototype.hasOwnProperty;var X=(i=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(i,{get:(r,o)=>(typeof require<"u"?require:r)[o]}):i)(function(i){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+i+'" is not supported')});var Hc=(i,r)=>()=>(i&&(r=i(i=0)),r);var d=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports);var an=(i,r,o,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let u of jm(r))!Hm.call(i,u)&&u!==o&&au(i,u,{get:()=>r[u],enumerable:!(c=qm(r,u))||c.enumerable});return i},St=(i,r,o)=>(an(i,r,"default"),o&&an(o,r,"default")),J=(i,r,o)=>(o=i!=null?km(Gm(i)):{},an(r||!i||!i.__esModule?au(o,"default",{value:i,enumerable:!0}):o,i)),E=i=>an(au({},"__esModule",{value:!0}),i);var _={};import*as gb from"@opentelemetry/api";var y=Hc(()=>{St(_,gb)});var Sr=d(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.isTracingSuppressed=Ue.unsuppressTracing=Ue.suppressTracing=void 0;var Fm=(y(),E(_)),cu=(0,Fm.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Km(i){return i.setValue(cu,!0)}Ue.suppressTracing=Km;function Xm(i){return i.deleteValue(cu)}Ue.unsuppressTracing=Xm;function zm(i){return i.getValue(cu)===!0}Ue.isTracingSuppressed=zm});var lu=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 pu=d(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.parseKeyPairsIntoRecord=Oe.parsePairKeyValue=Oe.getKeyPairs=Oe.serializeKeyPairs=void 0;var $m=(y(),E(_)),Je=lu();function Ym(i){return i.reduce((r,o)=>{let c=`${r}${r!==""?Je.BAGGAGE_ITEMS_SEPARATOR:""}${o}`;return c.length>Je.BAGGAGE_MAX_TOTAL_LENGTH?r:c},"")}Oe.serializeKeyPairs=Ym;function Wm(i){return i.getAllEntries().map(([r,o])=>{let c=`${encodeURIComponent(r)}=${encodeURIComponent(o.value)}`;return o.metadata!==void 0&&(c+=Je.BAGGAGE_PROPERTIES_SEPARATOR+o.metadata.toString()),c})}Oe.getKeyPairs=Wm;function Fc(i){let r=i.split(Je.BAGGAGE_PROPERTIES_SEPARATOR);if(r.length<=0)return;let o=r.shift();if(!o)return;let c=o.indexOf(Je.BAGGAGE_KEY_PAIR_SEPARATOR);if(c<=0)return;let u=decodeURIComponent(o.substring(0,c).trim()),a=decodeURIComponent(o.substring(c+1).trim()),t;return r.length>0&&(t=(0,$m.baggageEntryMetadataFromString)(r.join(Je.BAGGAGE_PROPERTIES_SEPARATOR))),{key:u,value:a,metadata:t}}Oe.parsePairKeyValue=Fc;function Jm(i){return typeof i!="string"||i.length===0?{}:i.split(Je.BAGGAGE_ITEMS_SEPARATOR).map(r=>Fc(r)).filter(r=>r!==void 0&&r.value.length>0).reduce((r,o)=>(r[o.key]=o.value,r),{})}Oe.parseKeyPairsIntoRecord=Jm});var Kc=d(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.W3CBaggagePropagator=void 0;var fu=(y(),E(_)),Qm=Sr(),Qe=lu(),du=pu(),hu=class{inject(r,o,c){let u=fu.propagation.getBaggage(r);if(!u||(0,Qm.isTracingSuppressed)(r))return;let a=(0,du.getKeyPairs)(u).filter(e=>e.length<=Qe.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,Qe.BAGGAGE_MAX_NAME_VALUE_PAIRS),t=(0,du.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,du.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:fu.propagation.setBaggage(r,fu.propagation.createBaggage(t))}fields(){return[Qe.BAGGAGE_HEADER]}};cn.W3CBaggagePropagator=hu});var Xc=d(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.AnchoredClock=void 0;var mu=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}};ln.AnchoredClock=mu});var Jc=d(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.isAttributeValue=De.isAttributeKey=De.sanitizeAttributes=void 0;var zc=(y(),E(_));function Zm(i){let r={};if(typeof i!="object"||i==null)return r;for(let[o,c]of Object.entries(i)){if(!$c(o)){zc.diag.warn(`Invalid attribute key: ${o}`);continue}if(!Yc(c)){zc.diag.warn(`Invalid attribute value set for key: ${o}`);continue}Array.isArray(c)?r[o]=c.slice():r[o]=c}return r}De.sanitizeAttributes=Zm;function $c(i){return typeof i=="string"&&i.length>0}De.isAttributeKey=$c;function Yc(i){return i==null?!0:Array.isArray(i)?e_(i):Wc(i)}De.isAttributeValue=Yc;function e_(i){let r;for(let o of i)if(o!=null){if(!r){if(Wc(o)){r=typeof o;continue}return!1}if(typeof o!==r)return!1}return!0}function Wc(i){switch(typeof i){case"number":case"boolean":case"string":return!0}return!1}});var _u=d(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.loggingErrorHandler=void 0;var t_=(y(),E(_));function r_(){return i=>{t_.diag.error(n_(i))}}pn.loggingErrorHandler=r_;function n_(i){return typeof i=="string"?i:JSON.stringify(o_(i))}function o_(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 yu=d(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.globalErrorHandler=bt.setGlobalErrorHandler=void 0;var i_=_u(),Qc=(0,i_.loggingErrorHandler)();function u_(i){Qc=i}bt.setGlobalErrorHandler=u_;function s_(i){try{Qc(i)}catch{}}bt.globalErrorHandler=s_});var Eu=d(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.TracesSamplerValues=void 0;var a_;(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"})(a_=br.TracesSamplerValues||(br.TracesSamplerValues={}))});var Zc=d(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn._globalThis=void 0;fn._globalThis=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});var dn=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(_)),c_=Eu(),l_=Zc(),p_=",",f_=["OTEL_SDK_DISABLED"];function d_(i){return f_.indexOf(i)>-1}var h_=["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 m_(i){return h_.indexOf(i)>-1}var __=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function y_(i){return __.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:c_.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 E_(i,r,o){if(typeof o[i]>"u")return;let c=String(o[i]);r[i]=c.toLowerCase()==="true"}function v_(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 g_(i,r,o,c=p_){let u=o[i];typeof u=="string"&&(r[i]=u.split(c).map(a=>a.trim()))}var T_={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 S_(i,r,o){let c=o[i];if(typeof c=="string"){let u=T_[c.toUpperCase()];u!=null&&(r[i]=u)}}function vu(i){let r={};for(let o in U.DEFAULT_ENVIRONMENT){let c=o;switch(c){case"OTEL_LOG_LEVEL":S_(c,r,i);break;default:if(d_(c))E_(c,r,i);else if(m_(c))v_(c,r,i);else if(y_(c))g_(c,r,i);else{let u=i[c];typeof u<"u"&&u!==null&&(r[c]=String(u))}}}return r}U.parseEnvironment=vu;function b_(){return typeof process<"u"&&process&&process.env?vu(process.env):vu(l_._globalThis)}U.getEnvWithoutDefaults=b_});var tl=d(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.getEnv=void 0;var O_=X("os"),el=dn();function A_(){let i=(0,el.parseEnvironment)(process.env);return Object.assign({HOSTNAME:O_.hostname()},el.DEFAULT_ENVIRONMENT,i)}hn.getEnv=A_});var rl=d(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn._globalThis=void 0;mn._globalThis=typeof globalThis=="object"?globalThis:global});var ol=d(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.hexToBase64=void 0;function nl(i){return i>=48&&i<=57?i-48:i>=97&&i<=102?i-87:i-55}var P_=Buffer.alloc(8),N_=Buffer.alloc(16);function R_(i){let r;i.length===16?r=P_:i.length===32?r=N_:r=Buffer.alloc(i.length/2);let o=0;for(let c=0;c<i.length;c+=2){let u=nl(i.charCodeAt(c)),a=nl(i.charCodeAt(c+1));r.writeUInt8(u<<4|a,o++)}return r.toString("base64")}_n.hexToBase64=R_});var sl=d(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.RandomIdGenerator=void 0;var x_=8,ul=16,gu=class{constructor(){this.generateTraceId=il(ul),this.generateSpanId=il(x_)}};En.RandomIdGenerator=gu;var yn=Buffer.allocUnsafe(ul);function il(i){return function(){for(let o=0;o<i/4;o++)yn.writeUInt32BE(Math.random()*2**32>>>0,o*4);for(let o=0;o<i&&!(yn[o]>0);o++)o===i-1&&(yn[i-1]=1);return yn.toString("hex",0,i)}}});var al=d(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.otperformance=void 0;var I_=X("perf_hooks");vn.otperformance=I_.performance});var Tu=d(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.VERSION=void 0;gn.VERSION="1.19.0"});var cl=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 ll=d(Ze=>{"use strict";var L_=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]}),w_=Ze&&Ze.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&L_(r,i,o)};Object.defineProperty(Ze,"__esModule",{value:!0});w_(cl(),Ze)});var pl=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 fl=d(et=>{"use strict";var M_=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]}),C_=et&&et.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&M_(r,i,o)};Object.defineProperty(et,"__esModule",{value:!0});C_(pl(),et)});var fe=d(Ve=>{"use strict";var U_=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]}),dl=Ve&&Ve.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&U_(r,i,o)};Object.defineProperty(Ve,"__esModule",{value:!0});dl(ll(),Ve);dl(fl(),Ve)});var hl=d(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.SDK_INFO=void 0;var D_=Tu(),Or=fe();Tn.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]:D_.VERSION}});var ml=d(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.unrefTimer=void 0;function B_(i){i.unref()}Sn.unrefTimer=B_});var _l=d(ae=>{"use strict";var V_=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)&&V_(r,i,o)};Object.defineProperty(ae,"__esModule",{value:!0});tt(tl(),ae);tt(rl(),ae);tt(ol(),ae);tt(sl(),ae);tt(al(),ae);tt(hl(),ae);tt(ml(),ae)});var Su=d(rt=>{"use strict";var k_=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]}),q_=rt&&rt.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&k_(r,i,o)};Object.defineProperty(rt,"__esModule",{value:!0});q_(_l(),rt)});var gl=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 bu=Su(),yl=9,j_=6,G_=Math.pow(10,j_),bn=Math.pow(10,yl);function Ar(i){let r=i/1e3,o=Math.trunc(r),c=Math.round(i%1e3*G_);return[o,c]}C.millisToHrTime=Ar;function Ou(){let i=bu.otperformance.timeOrigin;if(typeof i!="number"){let r=bu.otperformance;i=r.timing&&r.timing.fetchStart}return i}C.getTimeOrigin=Ou;function El(i){let r=Ar(Ou()),o=Ar(typeof i=="number"?i:bu.otperformance.now());return vl(r,o)}C.hrTime=El;function H_(i){if(Au(i))return i;if(typeof i=="number")return i<Ou()?El(i):Ar(i);if(i instanceof Date)return Ar(i.getTime());throw TypeError("Invalid input type")}C.timeInputToHrTime=H_;function F_(i,r){let o=r[0]-i[0],c=r[1]-i[1];return c<0&&(o-=1,c+=bn),[o,c]}C.hrTimeDuration=F_;function K_(i){let r=yl,o=`${"0".repeat(r)}${i[1]}Z`,c=o.substr(o.length-r-1);return new Date(i[0]*1e3).toISOString().replace("000Z",c)}C.hrTimeToTimeStamp=K_;function X_(i){return i[0]*bn+i[1]}C.hrTimeToNanoseconds=X_;function z_(i){return i[0]*1e3+i[1]/1e6}C.hrTimeToMilliseconds=z_;function $_(i){return i[0]*1e6+i[1]/1e3}C.hrTimeToMicroseconds=$_;function Au(i){return Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"}C.isTimeInputHrTime=Au;function Y_(i){return Au(i)||typeof i=="number"||i instanceof Date}C.isTimeInput=Y_;function vl(i,r){let o=[i[0]+r[0],i[1]+r[1]];return o[1]>=bn&&(o[1]-=bn,o[0]+=1),o}C.addHrTimes=vl});var Sl=d(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0})});var bl=d(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.ExportResultCode=void 0;var W_;(function(i){i[i.SUCCESS=0]="SUCCESS",i[i.FAILED=1]="FAILED"})(W_=Pr.ExportResultCode||(Pr.ExportResultCode={}))});var Al=d(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.CompositePropagator=void 0;var Ol=(y(),E(_)),Pu=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){Ol.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){Ol.diag.warn(`Failed to inject with ${a.constructor.name}. Err: ${t.message}`)}return u},r)}fields(){return this._fields.slice()}};On.CompositePropagator=Pu});var Pl=d(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.validateValue=Ot.validateKey=void 0;var Nu="[_0-9a-z-*/]",J_=`[a-z]${Nu}{0,255}`,Q_=`[a-z0-9]${Nu}{0,240}@[a-z]${Nu}{0,13}`,Z_=new RegExp(`^(?:${J_}|${Q_})$`),ey=/^[ -~]{0,255}[!-~]$/,ty=/,|=/;function ry(i){return Z_.test(i)}Ot.validateKey=ry;function ny(i){return ey.test(i)&&!ty.test(i)}Ot.validateValue=ny});var xu=d(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.TraceState=void 0;var Nl=Pl(),Rl=32,oy=512,xl=",",Il="=",Ru=class i{constructor(r){this._internalState=new Map,r&&this._parse(r)}set(r,o){let c=this._clone();return c._internalState.has(r)&&c._internalState.delete(r),c._internalState.set(r,o),c}unset(r){let o=this._clone();return o._internalState.delete(r),o}get(r){return this._internalState.get(r)}serialize(){return this._keys().reduce((r,o)=>(r.push(o+Il+this.get(o)),r),[]).join(xl)}_parse(r){r.length>oy||(this._internalState=r.split(xl).reverse().reduce((o,c)=>{let u=c.trim(),a=u.indexOf(Il);if(a!==-1){let t=u.slice(0,a),e=u.slice(a+1,c.length);(0,Nl.validateKey)(t)&&(0,Nl.validateValue)(e)&&o.set(t,e)}return o},new Map),this._internalState.size>Rl&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Rl))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let r=new i;return r._internalState=new Map(this._internalState),r}};An.TraceState=Ru});var wl=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 Pn=(y(),E(_)),iy=Sr(),uy=xu();ee.TRACE_PARENT_HEADER="traceparent";ee.TRACE_STATE_HEADER="tracestate";var sy="00",ay="(?!ff)[\\da-f]{2}",cy="(?![0]{32})[\\da-f]{32}",ly="(?![0]{16})[\\da-f]{16}",py="[\\da-f]{2}",fy=new RegExp(`^\\s?(${ay})-(${cy})-(${ly})-(${py})(-.*)?\\s?$`);function Ll(i){let r=fy.exec(i);return!r||r[1]==="00"&&r[5]?null:{traceId:r[2],spanId:r[3],traceFlags:parseInt(r[4],16)}}ee.parseTraceParent=Ll;var Iu=class{inject(r,o,c){let u=Pn.trace.getSpanContext(r);if(!u||(0,iy.isTracingSuppressed)(r)||!(0,Pn.isSpanContextValid)(u))return;let a=`${sy}-${u.traceId}-${u.spanId}-0${Number(u.traceFlags||Pn.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=Ll(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 uy.TraceState(typeof n=="string"?n:void 0)}return Pn.trace.setSpanContext(r,t)}fields(){return[ee.TRACE_PARENT_HEADER,ee.TRACE_STATE_HEADER]}};ee.W3CTraceContextPropagator=Iu});var Cl=d(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0})});var Ul=d(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.getRPCMetadata=Ee.deleteRPCMetadata=Ee.setRPCMetadata=Ee.RPCType=void 0;var dy=(y(),E(_)),Lu=(0,dy.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),hy;(function(i){i.HTTP="http"})(hy=Ee.RPCType||(Ee.RPCType={}));function my(i,r){return i.setValue(Lu,r)}Ee.setRPCMetadata=my;function _y(i){return i.deleteValue(Lu)}Ee.deleteRPCMetadata=_y;function yy(i){return i.getValue(Lu)}Ee.getRPCMetadata=yy});var Mu=d(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.AlwaysOffSampler=void 0;var Ey=(y(),E(_)),wu=class{shouldSample(){return{decision:Ey.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Nn.AlwaysOffSampler=wu});var Uu=d(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.AlwaysOnSampler=void 0;var vy=(y(),E(_)),Cu=class{shouldSample(){return{decision:vy.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};Rn.AlwaysOnSampler=Cu});var Bl=d(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.ParentBasedSampler=void 0;var xn=(y(),E(_)),gy=yu(),Dl=Mu(),Du=Uu(),Bu=class{constructor(r){var o,c,u,a;this._root=r.root,this._root||((0,gy.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Du.AlwaysOnSampler),this._remoteParentSampled=(o=r.remoteParentSampled)!==null&&o!==void 0?o:new Du.AlwaysOnSampler,this._remoteParentNotSampled=(c=r.remoteParentNotSampled)!==null&&c!==void 0?c:new Dl.AlwaysOffSampler,this._localParentSampled=(u=r.localParentSampled)!==null&&u!==void 0?u:new Du.AlwaysOnSampler,this._localParentNotSampled=(a=r.localParentNotSampled)!==null&&a!==void 0?a:new Dl.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()}}`}};In.ParentBasedSampler=Bu});var Vl=d(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.TraceIdRatioBasedSampler=void 0;var Vu=(y(),E(_)),ku=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,Vu.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?Vu.SamplingDecision.RECORD_AND_SAMPLED:Vu.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}};Ln.TraceIdRatioBasedSampler=ku});var Hl=d(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.isPlainObject=void 0;var Ty="[object Object]",Sy="[object Null]",by="[object Undefined]",Oy=Function.prototype,kl=Oy.toString,Ay=kl.call(Object),Py=Ny(Object.getPrototypeOf,Object),ql=Object.prototype,jl=ql.hasOwnProperty,nt=Symbol?Symbol.toStringTag:void 0,Gl=ql.toString;function Ny(i,r){return function(o){return i(r(o))}}function Ry(i){if(!xy(i)||Iy(i)!==Ty)return!1;let r=Py(i);if(r===null)return!0;let o=jl.call(r,"constructor")&&r.constructor;return typeof o=="function"&&o instanceof o&&kl.call(o)===Ay}wn.isPlainObject=Ry;function xy(i){return i!=null&&typeof i=="object"}function Iy(i){return i==null?i===void 0?by:Sy:nt&&nt in Object(i)?Ly(i):wy(i)}function Ly(i){let r=jl.call(i,nt),o=i[nt],c=!1;try{i[nt]=void 0,c=!0}catch{}let u=Gl.call(i);return c&&(r?i[nt]=o:delete i[nt]),u}function wy(i){return Gl.call(i)}});var $l=d(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.merge=void 0;var Fl=Hl(),My=20;function Cy(...i){let r=i.shift(),o=new WeakMap;for(;i.length>0;)r=Xl(r,i.shift(),0,o);return r}Un.merge=Cy;function qu(i){return Cn(i)?i.slice():i}function Xl(i,r,o=0,c){let u;if(!(o>My)){if(o++,Mn(i)||Mn(r)||zl(r))u=qu(r);else if(Cn(i)){if(u=i.slice(),Cn(r))for(let a=0,t=r.length;a<t;a++)u.push(qu(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]=qu(r[n])}}}else if(Nr(i))if(Nr(r)){if(!Uy(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(Mn(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]=Xl(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 Cn(i){return Array.isArray(i)}function zl(i){return typeof i=="function"}function Nr(i){return!Mn(i)&&!Cn(i)&&!zl(i)&&typeof i=="object"}function Mn(i){return typeof i=="string"||typeof i=="number"||typeof i=="boolean"||typeof i>"u"||i instanceof Date||i instanceof RegExp||i===null}function Uy(i,r){return!(!(0,Fl.isPlainObject)(i)||!(0,Fl.isPlainObject)(r))}});var Yl=d(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.callWithTimeout=At.TimeoutError=void 0;var Dn=class i extends Error{constructor(r){super(r),Object.setPrototypeOf(this,i.prototype)}};At.TimeoutError=Dn;function Dy(i,r){let o,c=new Promise(function(a,t){o=setTimeout(function(){t(new Dn("Operation timed out."))},r)});return Promise.race([i,c]).then(u=>(clearTimeout(o),u),u=>{throw clearTimeout(o),u})}At.callWithTimeout=Dy});var Jl=d(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.isUrlIgnored=Pt.urlMatches=void 0;function Wl(i,r){return typeof r=="string"?i===r:!!i.match(r)}Pt.urlMatches=Wl;function By(i,r){if(!r)return!1;for(let o of r)if(Wl(i,o))return!0;return!1}Pt.isUrlIgnored=By});var Ql=d(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.isWrapped=void 0;function Vy(i){return typeof i=="function"&&typeof i.__original=="function"&&typeof i.__unwrap=="function"&&i.__wrapped===!0}Bn.isWrapped=Vy});var Zl=d(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.Deferred=void 0;var ju=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)}};Vn.Deferred=ju});var ep=d(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.BindOnceFuture=void 0;var ky=Zl(),Gu=class{constructor(r,o){this._callback=r,this._that=o,this._isCalled=!1,this._deferred=new ky.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}};kn.BindOnceFuture=Gu});var rp=d(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn._export=void 0;var tp=(y(),E(_)),qy=Sr();function jy(i,r){return new Promise(o=>{tp.context.with((0,qy.suppressTracing)(tp.context.active()),()=>{i.export(r,c=>{o(c)})})})}qn._export=jy});var P=d(A=>{"use strict";var Gy=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)&&Gy(r,i,o)};Object.defineProperty(A,"__esModule",{value:!0});A.internal=A.baggageUtils=void 0;M(Kc(),A);M(Xc(),A);M(Jc(),A);M(yu(),A);M(_u(),A);M(gl(),A);M(Sl(),A);M(bl(),A);A.baggageUtils=pu();M(Su(),A);M(Al(),A);M(wl(),A);M(Cl(),A);M(Ul(),A);M(Mu(),A);M(Uu(),A);M(Bl(),A);M(Vl(),A);M(Sr(),A);M(xu(),A);M(dn(),A);M($l(),A);M(Eu(),A);M(Yl(),A);M(Jl(),A);M(Ql(),A);M(ep(),A);M(Tu(),A);var Hy=rp();A.internal={_export:Hy._export}});var np=d(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.ExceptionEventName=void 0;jn.ExceptionEventName="exception"});var Fu=d(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.Span=void 0;var Ae=(y(),E(_)),te=P(),ot=fe(),Fy=np(),Hu=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[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(Fy.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}};Gn.Span=Hu});var xr=d(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.SamplingDecision=void 0;var Ky;(function(i){i[i.NOT_RECORD=0]="NOT_RECORD",i[i.RECORD=1]="RECORD",i[i.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Ky=Rr.SamplingDecision||(Rr.SamplingDecision={}))});var Fn=d(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.AlwaysOffSampler=void 0;var Xy=xr(),Ku=class{shouldSample(){return{decision:Xy.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Hn.AlwaysOffSampler=Ku});var Xn=d(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.AlwaysOnSampler=void 0;var zy=xr(),Xu=class{shouldSample(){return{decision:zy.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};Kn.AlwaysOnSampler=Xu});var Yu=d($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.ParentBasedSampler=void 0;var zn=(y(),E(_)),$y=P(),op=Fn(),zu=Xn(),$u=class{constructor(r){var o,c,u,a;this._root=r.root,this._root||((0,$y.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new zu.AlwaysOnSampler),this._remoteParentSampled=(o=r.remoteParentSampled)!==null&&o!==void 0?o:new zu.AlwaysOnSampler,this._remoteParentNotSampled=(c=r.remoteParentNotSampled)!==null&&c!==void 0?c:new op.AlwaysOffSampler,this._localParentSampled=(u=r.localParentSampled)!==null&&u!==void 0?u:new zu.AlwaysOnSampler,this._localParentNotSampled=(a=r.localParentNotSampled)!==null&&a!==void 0?a:new op.AlwaysOffSampler}shouldSample(r,o,c,u,a,t){let e=zn.trace.getSpanContext(r);return!e||!(0,zn.isSpanContextValid)(e)?this._root.shouldSample(r,o,c,u,a,t):e.isRemote?e.traceFlags&zn.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(r,o,c,u,a,t):this._remoteParentNotSampled.shouldSample(r,o,c,u,a,t):e.traceFlags&zn.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()}}`}};$n.ParentBasedSampler=$u});var Ju=d(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.TraceIdRatioBasedSampler=void 0;var Yy=(y(),E(_)),ip=xr(),Wu=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,Yy.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?ip.SamplingDecision.RECORD_AND_SAMPLED:ip.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(r){return typeof r!="number"||isNaN(r)?0:r>=1?1:r<=0?0:r}_accumulate(r){let o=0;for(let c=0;c<r.length/8;c++){let u=c*8,a=parseInt(r.slice(u,u+8),16);o=(o^a)>>>0}return o}};Yn.TraceIdRatioBasedSampler=Wu});var es=d(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.buildSamplerFromEnv=Rt.loadDefaultConfig=void 0;var Wn=(y(),E(_)),Y=P(),up=Fn(),Qu=Xn(),Zu=Yu(),sp=Ju(),Wy=(0,Y.getEnv)(),Jy=Y.TracesSamplerValues.AlwaysOn,Nt=1;function Qy(){return{sampler:cp(Wy),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}}}Rt.loadDefaultConfig=Qy;function cp(i=(0,Y.getEnv)()){switch(i.OTEL_TRACES_SAMPLER){case Y.TracesSamplerValues.AlwaysOn:return new Qu.AlwaysOnSampler;case Y.TracesSamplerValues.AlwaysOff:return new up.AlwaysOffSampler;case Y.TracesSamplerValues.ParentBasedAlwaysOn:return new Zu.ParentBasedSampler({root:new Qu.AlwaysOnSampler});case Y.TracesSamplerValues.ParentBasedAlwaysOff:return new Zu.ParentBasedSampler({root:new up.AlwaysOffSampler});case Y.TracesSamplerValues.TraceIdRatio:return new sp.TraceIdRatioBasedSampler(ap(i));case Y.TracesSamplerValues.ParentBasedTraceIdRatio:return new Zu.ParentBasedSampler({root:new sp.TraceIdRatioBasedSampler(ap(i))});default:return Wn.diag.error(`OTEL_TRACES_SAMPLER value "${i.OTEL_TRACES_SAMPLER} invalid, defaulting to ${Jy}".`),new Qu.AlwaysOnSampler}}Rt.buildSamplerFromEnv=cp;function ap(i){if(i.OTEL_TRACES_SAMPLER_ARG===void 0||i.OTEL_TRACES_SAMPLER_ARG==="")return Wn.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${Nt}.`),Nt;let r=Number(i.OTEL_TRACES_SAMPLER_ARG);return isNaN(r)?(Wn.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?(Wn.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 rs=d(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.reconfigureLimits=xt.mergeConfig=void 0;var lp=es(),ts=P();function Zy(i){let r={sampler:(0,lp.buildSamplerFromEnv)()},o=(0,lp.loadDefaultConfig)(),c=Object.assign({},o,r,i);return c.generalLimits=Object.assign({},o.generalLimits,i.generalLimits||{}),c.spanLimits=Object.assign({},o.spanLimits,i.spanLimits||{}),c}xt.mergeConfig=Zy;function eE(i){var r,o,c,u,a,t,e,n,s,l,h,T;let R=Object.assign({},i.spanLimits),N=(0,ts.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:ts.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:ts.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},i,{spanLimits:R})}xt.reconfigureLimits=eE});var pp=d(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.BatchSpanProcessorBase=void 0;var It=(y(),E(_)),it=P(),ns=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)}};Jn.BatchSpanProcessorBase=ns});var fp=d(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.BatchSpanProcessor=void 0;var tE=pp(),os=class extends tE.BatchSpanProcessorBase{onShutdown(){}};Qn.BatchSpanProcessor=os});var mp=d(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.RandomIdGenerator=void 0;var rE=8,hp=16,is=class{constructor(){this.generateTraceId=dp(hp),this.generateSpanId=dp(rE)}};eo.RandomIdGenerator=is;var Zn=Buffer.allocUnsafe(hp);function dp(i){return function(){for(let o=0;o<i/4;o++)Zn.writeUInt32BE(Math.random()*2**32>>>0,o*4);for(let o=0;o<i&&!(Zn[o]>0);o++)o===i-1&&(Zn[i-1]=1);return Zn.toString("hex",0,i)}}});var yp=d(ke=>{"use strict";var nE=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]}),_p=ke&&ke.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&nE(r,i,o)};Object.defineProperty(ke,"__esModule",{value:!0});_p(fp(),ke);_p(mp(),ke)});var to=d(ut=>{"use strict";var oE=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]}),iE=ut&&ut.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&oE(r,i,o)};Object.defineProperty(ut,"__esModule",{value:!0});iE(yp(),ut)});var Ep=d(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.Tracer=void 0;var W=(y(),E(_)),ro=P(),uE=Fu(),sE=rs(),aE=to(),us=class{constructor(r,o,c){this._tracerProvider=c;let u=(0,sE.mergeConfig)(o);this._sampler=u.sampler,this._generalLimits=u.generalLimits,this._spanLimits=u.spanLimits,this._idGenerator=o.idGenerator||new aE.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,ro.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,N=((a=o.links)!==null&&a!==void 0?a:[]).map(H=>({context:H.context,attributes:(0,ro.sanitizeAttributes)(H.attributes)})),I=(0,ro.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===W.SamplingDecision.RECORD_AND_SAMPLED?W.TraceFlags.SAMPLED:W.TraceFlags.NONE,k={traceId:l,spanId:s,traceFlags:L,traceState:h};if(b.decision===W.SamplingDecision.NOT_RECORD)return W.diag.debug("Recording is off, propagating context in a non-recording span"),W.trace.wrapSpanContext(k);let se=(0,ro.sanitizeAttributes)(Object.assign(I,b.attributes));return new uE.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??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()}};no.Tracer=us});var vp=d(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.defaultServiceName=void 0;function cE(){return`unknown_service:${process.argv0}`}oo.defaultServiceName=cE});var ss=d(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.normalizeType=Lt.normalizeArch=void 0;var lE=i=>{switch(i){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return i}};Lt.normalizeArch=lE;var pE=i=>{switch(i){case"sunos":return"solaris";case"win32":return"windows";default:return i}};Lt.normalizeType=pE});var uo=d(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.execAsync=void 0;var fE=X("child_process"),dE=X("util");io.execAsync=dE.promisify(fE.exec)});var gp=d(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.getMachineId=void 0;var hE=uo(),mE=(y(),E(_));async function _E(){try{let r=(await(0,hE.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){mE.diag.debug(`error reading machine id: ${i}`)}return""}so.getMachineId=_E});var Tp=d(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.getMachineId=void 0;var yE=X("fs"),EE=(y(),E(_));async function vE(){let i=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let r of i)try{return(await yE.promises.readFile(r,{encoding:"utf8"})).trim()}catch(o){EE.diag.debug(`error reading machine id: ${o}`)}return""}ao.getMachineId=vE});var bp=d(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.getMachineId=void 0;var gE=X("fs"),TE=uo(),Sp=(y(),E(_));async function SE(){try{return(await gE.promises.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(i){Sp.diag.debug(`error reading machine id: ${i}`)}try{return(await(0,TE.execAsync)("kenv -q smbios.system.uuid")).stdout.trim()}catch(i){Sp.diag.debug(`error reading machine id: ${i}`)}return""}co.getMachineId=SE});var Ap=d(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.getMachineId=void 0;var Op=X("process"),bE=uo(),OE=(y(),E(_));async function AE(){let i="QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",r="%windir%\\System32\\REG.exe";Op.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in Op.env&&(r="%windir%\\sysnative\\cmd.exe /c "+r);try{let c=(await(0,bE.execAsync)(`${r} ${i}`)).stdout.split("REG_SZ");if(c.length===2)return c[1].trim()}catch(o){OE.diag.debug(`error reading machine id: ${o}`)}return""}lo.getMachineId=AE});var Pp=d(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.getMachineId=void 0;var PE=(y(),E(_));async function NE(){return PE.diag.debug("could not read machine-id: unsupported platform"),""}po.getMachineId=NE});var Np=d(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.getMachineId=void 0;var RE=X("process"),wt;Ie.getMachineId=wt;switch(RE.platform){case"darwin":Ie.getMachineId=wt=gp().getMachineId;break;case"linux":Ie.getMachineId=wt=Tp().getMachineId;break;case"freebsd":Ie.getMachineId=wt=bp().getMachineId;break;case"win32":Ie.getMachineId=wt=Ap().getMachineId;break;default:Ie.getMachineId=wt=Pp().getMachineId}});var ls=d(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.hostDetectorSync=void 0;var as=fe(),xE=st(),Rp=X("os"),IE=ss(),LE=Np(),cs=class{detect(r){let o={[as.SemanticResourceAttributes.HOST_NAME]:(0,Rp.hostname)(),[as.SemanticResourceAttributes.HOST_ARCH]:(0,IE.normalizeArch)((0,Rp.arch)())};return new xE.Resource(o,this._getAsyncAttributes())}_getAsyncAttributes(){return(0,LE.getMachineId)().then(r=>{let o={};return r&&(o[as.SemanticResourceAttributes.HOST_ID]=r),o})}};fo.hostDetectorSync=new cs});var xp=d(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.hostDetector=void 0;var wE=ls(),ps=class{detect(r){return Promise.resolve(wE.hostDetectorSync.detect(r))}};ho.hostDetector=new ps});var ds=d(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.osDetectorSync=void 0;var Ip=fe(),ME=st(),Lp=X("os"),CE=ss(),fs=class{detect(r){let o={[Ip.SemanticResourceAttributes.OS_TYPE]:(0,CE.normalizeType)((0,Lp.platform)()),[Ip.SemanticResourceAttributes.OS_VERSION]:(0,Lp.release)()};return new ME.Resource(o)}};mo.osDetectorSync=new fs});var wp=d(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.osDetector=void 0;var UE=ds(),hs=class{detect(r){return Promise.resolve(UE.osDetectorSync.detect(r))}};_o.osDetector=new hs});var _s=d(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.processDetectorSync=void 0;var DE=(y(),E(_)),Le=fe(),BE=st(),VE=X("os"),ms=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=VE.userInfo();o[Le.SemanticResourceAttributes.PROCESS_OWNER]=c.username}catch(c){DE.diag.debug(`error obtaining process owner: ${c}`)}return new BE.Resource(o)}};yo.processDetectorSync=new ms});var Mp=d(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});Eo.processDetector=void 0;var kE=_s(),ys=class{detect(r){return Promise.resolve(kE.processDetectorSync.detect(r))}};Eo.processDetector=new ys});var Cp=d(ce=>{"use strict";var qE=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)&&qE(r,i,o)};Object.defineProperty(ce,"__esModule",{value:!0});at(vp(),ce);at(xp(),ce);at(wp(),ce);at(ls(),ce);at(ds(),ce);at(Mp(),ce);at(_s(),ce)});var Es=d(ct=>{"use strict";var jE=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]}),GE=ct&&ct.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&jE(r,i,o)};Object.defineProperty(ct,"__esModule",{value:!0});GE(Cp(),ct)});var st=d(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.Resource=void 0;var Up=(y(),E(_)),lt=fe(),vs=P(),HE=Es(),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=>(Up.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,HE.defaultServiceName)(),[lt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:vs.SDK_INFO[lt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE],[lt.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:vs.SDK_INFO[lt.SemanticResourceAttributes.TELEMETRY_SDK_NAME],[lt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:vs.SDK_INFO[lt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]})}get attributes(){var r;return this.asyncAttributesPending&&Up.diag.error("Accessing resource attributes before async attributes settled"),(r=this._attributes)!==null&&r!==void 0?r:{}}async waitForAsyncAttributes(){this.asyncAttributesPending&&await this._asyncAttributesPromise}merge(r){var o;if(!r)return this;let c=Object.assign(Object.assign({},this._syncAttributes),(o=r._syncAttributes)!==null&&o!==void 0?o:r.attributes);if(!this._asyncAttributesPromise&&!r._asyncAttributesPromise)return new i(c);let 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)}};vo.Resource=Ir;Ir.EMPTY=new Ir({})});var Bp=d(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0})});var kp=d(Vp=>{"use strict";Object.defineProperty(Vp,"__esModule",{value:!0})});var jp=d(qp=>{"use strict";Object.defineProperty(qp,"__esModule",{value:!0})});var Gp=d(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.browserDetector=void 0;var FE=pt(),gs=class{detect(r){return Promise.resolve(FE.browserDetectorSync.detect(r))}};go.browserDetector=new gs});var Ss=d(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.envDetectorSync=void 0;var KE=(y(),E(_)),XE=P(),zE=fe(),$E=st(),Ts=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,XE.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){KE.diag.debug(`EnvDetector failed: ${t.message}`)}return a&&(o[zE.SemanticResourceAttributes.SERVICE_NAME]=a),new $E.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)}};To.envDetectorSync=new Ts});var Hp=d(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.envDetector=void 0;var YE=Ss(),bs=class{detect(r){return Promise.resolve(YE.envDetectorSync.detect(r))}};So.envDetector=new bs});var Fp=d(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.browserDetectorSync=void 0;var bo=fe(),Os=pt(),WE=(y(),E(_)),As=class{detect(r){if(!(typeof navigator<"u"))return Os.Resource.empty();let c={[bo.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"browser",[bo.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]:"Web Browser",[bo.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]:navigator.userAgent};return this._getResourceAttributes(c,r)}_getResourceAttributes(r,o){return r[bo.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]===""?(WE.diag.debug("BrowserDetector failed: Unable to find required browser resources. "),Os.Resource.empty()):new Os.Resource(Object.assign({},r))}};Oo.browserDetectorSync=new As});var Kp=d(Pe=>{"use strict";var JE=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]}),Ao=Pe&&Pe.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&JE(r,i,o)};Object.defineProperty(Pe,"__esModule",{value:!0});Ao(Gp(),Pe);Ao(Hp(),Pe);Ao(Fp(),Pe);Ao(Ss(),Pe)});var Xp=d(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.isPromiseLike=void 0;var QE=i=>i!==null&&typeof i=="object"&&typeof i.then=="function";Po.isPromiseLike=QE});var $p=d(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.detectResourcesSync=Ct.detectResources=void 0;var Lr=st(),Mt=(y(),E(_)),ZE=Xp(),ev=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 zp(r),r.reduce((o,c)=>o.merge(c),Lr.Resource.empty())};Ct.detectResources=ev;var tv=(i={})=>{var r;let o=((r=i.detectors)!==null&&r!==void 0?r:[]).map(u=>{try{let a=u.detect(i),t;if((0,ZE.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(()=>{zp(o)}),c};Ct.detectResourcesSync=tv;var zp=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 rv=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)&&rv(r,i,o)};Object.defineProperty(le,"__esModule",{value:!0});ft(st(),le);ft(Bp(),le);ft(Es(),le);ft(kp(),le);ft(jp(),le);ft(Kp(),le);ft($p(),le)});var Yp=d(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.MultiSpanProcessor=void 0;var nv=P(),Ps=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,nv.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)})}};No.MultiSpanProcessor=Ps});var Rs=d(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.NoopSpanProcessor=void 0;var Ns=class{onStart(r,o){}onEnd(r){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}};Ro.NoopSpanProcessor=Ns});var Jp=d(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.BasicTracerProvider=dt.ForceFlushState=void 0;var Ut=(y(),E(_)),Bt=P(),Wp=pt(),ov=xs(),iv=es(),uv=Yp(),sv=Rs(),av=to(),cv=rs(),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,iv.loadDefaultConfig)(),(0,cv.reconfigureLimits)(r));this.resource=(o=c.resource)!==null&&o!==void 0?o:Wp.Resource.empty(),this.resource=Wp.Resource.default().merge(this.resource),this._config=Object.assign({},c,{resource:this.resource});let u=this._buildExporterFromEnv();if(u!==void 0){let a=new av.BatchSpanProcessor(u);this.activeSpanProcessor=a}else this.activeSpanProcessor=new sv.NoopSpanProcessor}getTracer(r,o,c){let u=`${r}@${o||""}:${c?.schemaUrl||""}`;return this._tracers.has(u)||this._tracers.set(u,new ov.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 uv.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 Qp=d(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.ConsoleSpanExporter=void 0;var Is=P(),Ls=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,Is.hrTimeToMicroseconds)(r.startTime),duration:(0,Is.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:Is.ExportResultCode.SUCCESS})}};xo.ConsoleSpanExporter=Ls});var ef=d(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.InMemorySpanExporter=void 0;var Zp=P(),ws=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}};Io.InMemorySpanExporter=ws});var rf=d(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0})});var nf=d(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.SimpleSpanProcessor=void 0;var lv=(y(),E(_)),Vt=P(),Ms=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&lv.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()}};Lo.SimpleSpanProcessor=Ms});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 lf=d(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0})});var ff=d(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0})});var hf=d(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0})});var xs=d(D=>{"use strict";var pv=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]}),K=D&&D.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&pv(r,i,o)};Object.defineProperty(D,"__esModule",{value:!0});K(Ep(),D);K(Jp(),D);K(to(),D);K(Qp(),D);K(ef(),D);K(rf(),D);K(nf(),D);K(uf(),D);K(Rs(),D);K(Fn(),D);K(Xn(),D);K(Yu(),D);K(Ju(),D);K(xr(),D);K(Fu(),D);K(af(),D);K(lf(),D);K(ff(),D);K(hf(),D)});var ht={};import*as EA from"@opentelemetry/api-logs";var Cs=Hc(()=>{St(ht,EA)});var _f=d(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.disableInstrumentations=qe.enableInstrumentations=qe.parseInstrumentationOptions=void 0;function mf(i=[]){let r=[];for(let o=0,c=i.length;o<c;o++){let u=i[o];if(Array.isArray(u)){let a=mf(u);r=r.concat(a.instrumentations)}else typeof u=="function"?r.push(new u):u.instrumentationName&&r.push(u)}return{instrumentations:r}}qe.parseInstrumentationOptions=mf;function fv(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=fv;function dv(i){i.forEach(r=>r.disable())}qe.disableInstrumentations=dv});var Ef=d(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.registerInstrumentations=void 0;var yf=(y(),E(_)),Us=_f();function hv(i){let{instrumentations:r}=(0,Us.parseInstrumentationOptions)(i.instrumentations),o=i.tracerProvider||yf.trace.getTracerProvider(),c=i.meterProvider||yf.metrics.getMeterProvider();return(0,Us.enableInstrumentations)(r,o,c),()=>{(0,Us.disableInstrumentations)(r)}}wo.registerInstrumentations=hv});var Bs=d(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.LogRecord=void 0;var mv=(y(),E(_)),Mr=(y(),E(_)),Mo=P(),Ds=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,Mo.timeInputToHrTime)(u??h),this.hrTimeObserved=(0,Mo.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,Mo.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,Mo.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&&mv.diag.warn("Can not execute the operation on emitted log record"),this._isReadonly}};Co.LogRecord=Ds});var vf=d(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});Uo.Logger=void 0;var _v=(y(),E(_)),yv=Bs(),Vs=class{constructor(r,o){this.instrumentationScope=r,this._sharedState=o}emit(r){let o=r.context||_v.context.active(),c=new yv.LogRecord(this._sharedState,this.instrumentationScope,Object.assign({context:o},r));this._sharedState.activeProcessor.onEmit(c,o),c._makeReadonly()}};Uo.Logger=Vs});var gf=d(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.reconfigureLimits=kt.loadDefaultConfig=void 0;var Cr=P();function Ev(){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=Ev;function vv(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=vv});var Tf=d(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.MultiLogRecordProcessor=void 0;var gv=P(),ks=class{constructor(r,o){this.processors=r,this.forceFlushTimeoutMillis=o}async forceFlush(){let r=this.forceFlushTimeoutMillis;await Promise.all(this.processors.map(o=>(0,gv.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()))}};Do.MultiLogRecordProcessor=ks});var js=d(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});Bo.NoopLogRecordProcessor=void 0;var qs=class{forceFlush(){return Promise.resolve()}onEmit(r,o){}shutdown(){return Promise.resolve()}};Bo.NoopLogRecordProcessor=qs});var Sf=d(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.LoggerProviderSharedState=void 0;var Tv=js(),Gs=class{constructor(r,o,c){this.resource=r,this.forceFlushTimeoutMillis=o,this.logRecordLimits=c,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new Tv.NoopLogRecordProcessor}};Vo.LoggerProviderSharedState=Gs});var Af=d(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.LoggerProvider=mt.DEFAULT_LOGGER_NAME=void 0;var Ur=(y(),E(_)),Sv=(Cs(),E(ht)),bv=pt(),bf=P(),Ov=vf(),Of=gf(),Av=Tf(),Pv=Sf();mt.DEFAULT_LOGGER_NAME="unknown";var Hs=class{constructor(r={}){let{resource:o=bv.Resource.default(),logRecordLimits:c,forceFlushTimeoutMillis:u}=(0,bf.merge)({},(0,Of.loadDefaultConfig)(),r);this._sharedState=new Pv.LoggerProviderSharedState(o,u,(0,Of.reconfigureLimits)(c)),this._shutdownOnce=new bf.BindOnceFuture(this._shutdown,this)}getLogger(r,o,c){if(this._shutdownOnce.isCalled)return Ur.diag.warn("A shutdown LoggerProvider cannot provide a Logger"),Sv.NOOP_LOGGER;r||Ur.diag.warn("Logger requested without instrumentation scope name.");let u=r||mt.DEFAULT_LOGGER_NAME,a=`${u}@${o||""}:${c?.schemaUrl||""}`;return this._sharedState.loggers.has(a)||this._sharedState.loggers.set(a,new Ov.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 Av.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()}};mt.LoggerProvider=Hs});var Pf=d(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.ConsoleLogRecordExporter=void 0;var Nv=P(),Rv=P(),Fs=class{export(r,o){this._sendLogRecords(r,o)}shutdown(){return Promise.resolve()}_exportInfo(r){var o,c,u;return{timestamp:(0,Nv.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:Rv.ExportResultCode.SUCCESS})}};ko.ConsoleLogRecordExporter=Fs});var Nf=d(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});qo.SimpleLogRecordProcessor=void 0;var Ks=P(),Xs=class{constructor(r){this._exporter=r,this._shutdownOnce=new Ks.BindOnceFuture(this._shutdown,this)}onEmit(r){this._shutdownOnce.isCalled||this._exporter.export([r],o=>{var c;if(o.code!==Ks.ExportResultCode.SUCCESS){(0,Ks.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()}};qo.SimpleLogRecordProcessor=Xs});var xf=d(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});jo.InMemoryLogRecordExporter=void 0;var Rf=P(),zs=class{constructor(){this._finishedLogRecords=[],this._stopped=!1}export(r,o){if(this._stopped)return o({code:Rf.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedLogRecords.push(...r),o({code:Rf.ExportResultCode.SUCCESS})}shutdown(){return this._stopped=!0,this.reset(),Promise.resolve()}getFinishedLogRecords(){return this._finishedLogRecords}reset(){this._finishedLogRecords=[]}};jo.InMemoryLogRecordExporter=zs});var If=d(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.BatchLogRecordProcessorBase=void 0;var xv=(y(),E(_)),qt=P(),$s=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&&(xv.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)})})}};Go.BatchLogRecordProcessorBase=$s});var Lf=d(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.BatchLogRecordProcessor=void 0;var Iv=If(),Ys=class extends Iv.BatchLogRecordProcessorBase{onShutdown(){}};Ho.BatchLogRecordProcessor=Ys});var wf=d(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.BatchLogRecordProcessor=void 0;var Lv=Lf();Object.defineProperty(Fo,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return Lv.BatchLogRecordProcessor}})});var Mf=d(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});Ko.BatchLogRecordProcessor=void 0;var wv=wf();Object.defineProperty(Ko,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return wv.BatchLogRecordProcessor}})});var Cf=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 Mv=Af();Object.defineProperty(re,"LoggerProvider",{enumerable:!0,get:function(){return Mv.LoggerProvider}});var Cv=Bs();Object.defineProperty(re,"LogRecord",{enumerable:!0,get:function(){return Cv.LogRecord}});var Uv=js();Object.defineProperty(re,"NoopLogRecordProcessor",{enumerable:!0,get:function(){return Uv.NoopLogRecordProcessor}});var Dv=Pf();Object.defineProperty(re,"ConsoleLogRecordExporter",{enumerable:!0,get:function(){return Dv.ConsoleLogRecordExporter}});var Bv=Nf();Object.defineProperty(re,"SimpleLogRecordProcessor",{enumerable:!0,get:function(){return Bv.SimpleLogRecordProcessor}});var Vv=xf();Object.defineProperty(re,"InMemoryLogRecordExporter",{enumerable:!0,get:function(){return Vv.InMemoryLogRecordExporter}});var kv=Mf();Object.defineProperty(re,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return kv.BatchLogRecordProcessor}})});var Xo=d(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.AggregationTemporality=void 0;var qv;(function(i){i[i.DELTA=0]="DELTA",i[i.CUMULATIVE=1]="CUMULATIVE"})(qv=Dr.AggregationTemporality||(Dr.AggregationTemporality={}))});var jt=d(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.DataPointType=void 0;var jv;(function(i){i[i.HISTOGRAM=0]="HISTOGRAM",i[i.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",i[i.GAUGE=2]="GAUGE",i[i.SUM=3]="SUM"})(jv=Br.DataPointType||(Br.DataPointType={}))});var Ne=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 Gv(i){return i!=null}B.isNotNullish=Gv;function Hv(i){let r=Object.keys(i);return r.length===0?"":(r=r.sort(),JSON.stringify(r.map(o=>[o,i[o]])))}B.hashAttributes=Hv;function Fv(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=Fv;var zo=class i extends Error{constructor(r){super(r),Object.setPrototypeOf(this,i.prototype)}};B.TimeoutError=zo;function Kv(i,r){let o,c=new Promise(function(a,t){o=setTimeout(function(){t(new zo("Operation timed out."))},r)});return Promise.race([i,c]).then(u=>(clearTimeout(o),u),u=>{throw clearTimeout(o),u})}B.callWithTimeout=Kv;async function Xv(i){return Promise.all(i.map(async r=>{try{return{status:"fulfilled",value:await r}}catch(o){return{status:"rejected",reason:o}}}))}B.PromiseAllSettled=Xv;function zv(i){return i.status==="rejected"}B.isPromiseAllSettledRejectionResult=zv;function $v(i,r){let o=[];return i.forEach(c=>{o.push(...r(c))}),o}B.FlatMap=$v;function Yv(i,r){if(i.size!==r.size)return!1;for(let o of i)if(!r.has(o))return!1;return!0}B.setEquals=Yv;function Wv(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=Wv;function Jv(i,r){return i.toLowerCase()===r.toLowerCase()}B.equalsCaseInsensitive=Jv});var Gt=d(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.AggregatorKind=void 0;var Qv;(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"})(Qv=Vr.AggregatorKind||(Vr.AggregatorKind={}))});var Uf=d($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});$o.DropAggregator=void 0;var Zv=Gt(),Ws=class{constructor(){this.kind=Zv.AggregatorKind.DROP}createAccumulation(){}merge(r,o){}diff(r,o){}toMetricData(r,o,c,u){}};$o.DropAggregator=Ws});var we=d(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.isValidName=pe.isDescriptorCompatibleWith=pe.createInstrumentDescriptorWithView=pe.createInstrumentDescriptor=pe.InstrumentType=void 0;var Df=(y(),E(_)),eg=Ne(),tg;(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"})(tg=pe.InstrumentType||(pe.InstrumentType={}));function rg(i,r,o){var c,u,a,t;return Bf(i)||Df.diag.warn(`Invalid metric name: "${i}". The metric name should be a ASCII string with a length no greater than 255 characters.`),{name:i,type:r,description:(c=o?.description)!==null&&c!==void 0?c:"",unit:(u=o?.unit)!==null&&u!==void 0?u:"",valueType:(a=o?.valueType)!==null&&a!==void 0?a:Df.ValueType.DOUBLE,advice:(t=o?.advice)!==null&&t!==void 0?t:{}}}pe.createInstrumentDescriptor=rg;function ng(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=ng;function og(i,r){return(0,eg.equalsCaseInsensitive)(i.name,r.name)&&i.unit===r.unit&&i.type===r.type&&i.valueType===r.valueType}pe.isDescriptorCompatibleWith=og;var ig=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Bf(i){return i.match(ig)!=null}pe.isValidName=Bf});var Vf=d(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.HistogramAggregator=Ft.HistogramAccumulation=void 0;var ug=Gt(),sg=jt(),Js=we(),ag=Ne();function cg(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=cg(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,ag.binarySearchLB)(this._boundaries,r);this._current.buckets.counts[o+1]+=1}setStartTime(r){this.startTime=r}toPointValue(){return this._current}};Ft.HistogramAccumulation=Ht;var Qs=class{constructor(r,o){this._boundaries=r,this._recordMinMax=o,this.kind=ug.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:sg.DataPointType.HISTOGRAM,dataPoints:c.map(([a,t])=>{let e=t.toPointValue(),n=r.type===Js.InstrumentType.UP_DOWN_COUNTER||r.type===Js.InstrumentType.OBSERVABLE_GAUGE||r.type===Js.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=Qs});var kf=d(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.Buckets=void 0;var Zs=class i{constructor(r=new ea,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))}};Yo.Buckets=Zs;var ea=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 ra=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 lg=2146435072,pg=1048575,ta=1023;oe.MIN_NORMAL_EXPONENT=-ta+1;oe.MAX_NORMAL_EXPONENT=ta;oe.MIN_VALUE=Math.pow(2,-1022);function fg(i){let r=new DataView(new ArrayBuffer(8));return r.setFloat64(0,i),((r.getUint32(0)&lg)>>20)-ta}oe.getNormalBase2=fg;function dg(i){let r=new DataView(new ArrayBuffer(8));r.setFloat64(0,i);let o=r.getUint32(0),c=r.getUint32(4);return(o&pg)*Math.pow(2,32)+c}oe.getSignificand=dg});var Wo=d(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.nextGreaterSquare=Kt.ldexp=void 0;function hg(i,r){return i===0||i===Number.POSITIVE_INFINITY||i===Number.NEGATIVE_INFINITY||Number.isNaN(i)?i:i*Math.pow(2,r)}Kt.ldexp=hg;function mg(i){return i--,i|=i>>1,i|=i>>2,i|=i>>4,i|=i>>8,i|=i>>16,i++,i}Kt.nextGreaterSquare=mg});var Qo=d(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});Jo.MappingError=void 0;var na=class extends Error{};Jo.MappingError=na});var jf=d(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.ExponentMapping=void 0;var Xt=ra(),_g=Wo(),qf=Qo(),oa=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 qf.MappingError(`underflow: ${r} is < minimum lower boundary: ${o}`);let c=this._maxNormalLowerBoundaryIndex();if(r>c)throw new qf.MappingError(`overflow: ${r} is > maximum lower boundary: ${c}`);return _g.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))}};Zo.ExponentMapping=oa});var Ff=d(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.LogarithmMapping=void 0;var zt=ra(),Gf=Wo(),Hf=Qo(),ia=class{constructor(r){this._scale=r,this._scaleFactor=Gf.ldexp(Math.LOG2E,r),this._inverseFactor=Gf.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 Hf.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 Hf.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}};ei.LogarithmMapping=ia});var zf=d(ti=>{"use strict";Object.defineProperty(ti,"__esModule",{value:!0});ti.getMapping=void 0;var yg=jf(),Eg=Ff(),vg=Qo(),Kf=-10,Xf=20,gg=Array.from({length:31},(i,r)=>r>10?new Eg.LogarithmMapping(r-10):new yg.ExponentMapping(r-10));function Tg(i){if(i>Xf||i<Kf)throw new vg.MappingError(`expected scale >= ${Kf} && <= ${Xf}, got: ${i}`);return gg[i+10]}ti.getMapping=Tg});var Wf=d(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.ExponentialHistogramAggregator=Yt.ExponentialHistogramAccumulation=void 0;var Sg=Gt(),bg=jt(),Og=(y(),E(_)),ua=we(),$f=kf(),Yf=zf(),Ag=Wo(),$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))}},Pg=20,Ng=160,sa=2,ri=class i{constructor(r=r,o=Ng,c=!0,u=0,a=0,t=0,e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,s=new $f.Buckets,l=new $f.Buckets,h=(0,Yf.getMapping)(Pg)){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<sa&&(Og.diag.warn(`Exponential Histogram Max Size set to ${this._maxSize}, changing to the minimum size of: ${sa}`),this._maxSize=sa)}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,Ag.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,Yf.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=ri;var aa=class{constructor(r,o){this._maxSize=r,this._recordMinMax=o,this.kind=Sg.AggregatorKind.EXPONENTIAL_HISTOGRAM}createAccumulation(r){return new ri(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:bg.DataPointType.EXPONENTIAL_HISTOGRAM,dataPoints:c.map(([a,t])=>{let e=t.toPointValue(),n=r.type===ua.InstrumentType.UP_DOWN_COUNTER||r.type===ua.InstrumentType.OBSERVABLE_GAUGE||r.type===ua.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=aa});var Jf=d(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.LastValueAggregator=Jt.LastValueAccumulation=void 0;var Rg=Gt(),kr=P(),xg=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 ca=class{constructor(){this.kind=Rg.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:xg.DataPointType.GAUGE,dataPoints:c.map(([a,t])=>({attributes:a,startTime:t.startTime,endTime:u,value:t.toPointValue()}))}}};Jt.LastValueAggregator=ca});var Qf=d(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.SumAggregator=Qt.SumAccumulation=void 0;var Ig=Gt(),Lg=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 la=class{constructor(r){this.monotonic=r,this.kind=Ig.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:Lg.DataPointType.SUM,dataPoints:c.map(([a,t])=>({attributes:a,startTime:t.startTime,endTime:u,value:t.toPointValue()})),isMonotonic:this.monotonic}}};Qt.SumAggregator=la});var Zf=d(ve=>{"use strict";var wg=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)&&wg(r,i,o)};Object.defineProperty(ve,"__esModule",{value:!0});qr(Uf(),ve);qr(Vf(),ve);qr(Wf(),ve);qr(Jf(),ve);qr(Qf(),ve)});var ui=d(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.DefaultAggregation=z.ExponentialHistogramAggregation=z.ExplicitBucketHistogramAggregation=z.HistogramAggregation=z.LastValueAggregation=z.SumAggregation=z.DropAggregation=z.Aggregation=void 0;var Mg=(y(),E(_)),_t=Zf(),Me=we(),Re=class{static Drop(){return ed}static Sum(){return td}static LastValue(){return rd}static Histogram(){return nd}static ExponentialHistogram(){return Cg}static Default(){return Ug}};z.Aggregation=Re;var jr=class i extends Re{createAggregator(r){return i.DEFAULT_INSTANCE}};z.DropAggregation=jr;jr.DEFAULT_INSTANCE=new _t.DropAggregator;var Zt=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=Zt;Zt.MONOTONIC_INSTANCE=new _t.SumAggregator(!0);Zt.NON_MONOTONIC_INSTANCE=new _t.SumAggregator(!1);var Gr=class i extends Re{createAggregator(r){return i.DEFAULT_INSTANCE}};z.LastValueAggregation=Gr;Gr.DEFAULT_INSTANCE=new _t.LastValueAggregator;var Hr=class i extends Re{createAggregator(r){return i.DEFAULT_INSTANCE}};z.HistogramAggregation=Hr;Hr.DEFAULT_INSTANCE=new _t.HistogramAggregator([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0);var ni=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=ni;var oi=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=oi;var ii=class extends Re{_resolve(r){switch(r.type){case Me.InstrumentType.COUNTER:case Me.InstrumentType.UP_DOWN_COUNTER:case Me.InstrumentType.OBSERVABLE_COUNTER:case Me.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:return td;case Me.InstrumentType.OBSERVABLE_GAUGE:return rd;case Me.InstrumentType.HISTOGRAM:return r.advice.explicitBucketBoundaries?new ni(r.advice.explicitBucketBoundaries):nd}return Mg.diag.warn(`Unable to recognize instrument type: ${r.type}`),ed}createAggregator(r){return this._resolve(r).createAggregator(r)}};z.DefaultAggregation=ii;var ed=new jr,td=new Zt,rd=new Gr,nd=new Hr,Cg=new oi,Ug=new ii});var pa=d(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=er.DEFAULT_AGGREGATION_SELECTOR=void 0;var Dg=ui(),Bg=Xo(),Vg=i=>Dg.Aggregation.Default();er.DEFAULT_AGGREGATION_SELECTOR=Vg;var kg=i=>Bg.AggregationTemporality.CUMULATIVE;er.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=kg});var da=d(ai=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0});ai.MetricReader=void 0;var od=(y(),E(_)),si=Ne(),id=pa(),fa=class{constructor(r){var o,c,u;this._shutdown=!1,this._aggregationSelector=(o=r?.aggregationSelector)!==null&&o!==void 0?o:id.DEFAULT_AGGREGATION_SELECTOR,this._aggregationTemporalitySelector=(c=r?.aggregationTemporalitySelector)!==null&&c!==void 0?c:id.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR,this._metricProducers=(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,si.FlatMap)(c,e=>e.errors)),a=o.resourceMetrics.resource,t=o.resourceMetrics.scopeMetrics.concat((0,si.FlatMap)(c,e=>e.resourceMetrics.scopeMetrics));return{resourceMetrics:{resource:a,scopeMetrics:t},errors:u}}async shutdown(r){if(this._shutdown){od.diag.error("Cannot call shutdown twice.");return}r?.timeoutMillis==null?await this.onShutdown():await(0,si.callWithTimeout)(this.onShutdown(),r.timeoutMillis),this._shutdown=!0}async forceFlush(r){if(this._shutdown){od.diag.warn("Cannot forceFlush on already shutdown MetricReader.");return}if(r?.timeoutMillis==null){await this.onForceFlush();return}await(0,si.callWithTimeout)(this.onForceFlush(),r.timeoutMillis)}};ai.MetricReader=fa});var ad=d(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.PeriodicExportingMetricReader=void 0;var ud=(y(),E(_)),ci=P(),qg=da(),sd=Ne(),jg=(y(),E(_)),ha=class extends qg.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,sd.callWithTimeout)(this._doRun(),this._exportTimeout)}catch(r){if(r instanceof sd.TimeoutError){ud.diag.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout);return}(0,ci.globalErrorHandler)(r)}}async _doRun(){var r,o;let{resourceMetrics:c,errors:u}=await this.collect({timeoutMillis:this._exportTimeout});u.length>0&&ud.diag.error("PeriodicExportingMetricReader: metrics collection errors",...u);let a=async()=>{let t=await ci.internal._export(this._exporter,c);if(t.code!==ci.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=>jg.diag.debug("Error while resolving async portion of resource: ",t)):await a()}onInitialized(){this._interval=setInterval(()=>{this._runOnce()},this._exportInterval),(0,ci.unrefTimer)(this._interval)}async onForceFlush(){await this._runOnce(),await this._exporter.forceFlush()}async onShutdown(){this._interval&&clearInterval(this._interval),await this._exporter.shutdown()}};li.PeriodicExportingMetricReader=ha});var ld=d(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.InMemoryMetricExporter=void 0;var cd=P(),ma=class{constructor(r){this._shutdown=!1,this._metrics=[],this._aggregationTemporality=r}export(r,o){if(this._shutdown){setTimeout(()=>o({code:cd.ExportResultCode.FAILED}),0);return}this._metrics.push(r),setTimeout(()=>o({code:cd.ExportResultCode.SUCCESS}),0)}getMetrics(){return this._metrics}forceFlush(){return Promise.resolve()}reset(){this._metrics=[]}selectAggregationTemporality(r){return this._aggregationTemporality}shutdown(){return this._shutdown=!0,Promise.resolve()}};pi.InMemoryMetricExporter=ma});var fd=d(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.ConsoleMetricExporter=void 0;var pd=P(),Gg=pa(),_a=class i{constructor(r){var o;this._shutdown=!1,this._temporalitySelector=(o=r?.temporalitySelector)!==null&&o!==void 0?o:Gg.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR}export(r,o){if(this._shutdown){setImmediate(o,{code:pd.ExportResultCode.FAILED});return}return i._sendMetrics(r,o)}forceFlush(){return Promise.resolve()}selectAggregationTemporality(r){return this._temporalitySelector(r)}shutdown(){return this._shutdown=!0,Promise.resolve()}static _sendMetrics(r,o){for(let c of r.scopeMetrics)for(let u of c.metrics)console.dir({descriptor:u.descriptor,dataPointType:u.dataPointType,dataPoints:u.dataPoints});o({code:pd.ExportResultCode.SUCCESS})}};fi.ConsoleMetricExporter=_a});var dd=d(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.ViewRegistry=void 0;var ya=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))}};di.ViewRegistry=ya});var hi=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 tr=(y(),E(_)),Hg=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,Hg.millisToHrTime)(Date.now()))}};F.SyncInstrument=rr;var Ea=class extends rr{add(r,o,c){this._record(r,o,c)}};F.UpDownCounterInstrument=Ea;var va=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)}};F.CounterInstrument=va;var ga=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)}};F.HistogramInstrument=ga;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)}};F.ObservableInstrument=yt;var Ta=class extends yt{};F.ObservableCounterInstrument=Ta;var Sa=class extends yt{};F.ObservableGaugeInstrument=Sa;var ba=class extends yt{};F.ObservableUpDownCounterInstrument=ba;function Fg(i){return i instanceof yt}F.isObservableInstrument=Fg});var hd=d(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.Meter=void 0;var de=we(),nr=hi(),Oa=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)}};mi.Meter=Oa});var Pa=d(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.MetricStorage=void 0;var Kg=we(),Aa=class{constructor(r){this._instrumentDescriptor=r}getInstrumentDescriptor(){return this._instrumentDescriptor}updateDescription(r){this._instrumentDescriptor=(0,Kg.createInstrumentDescriptor)(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:r,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})}};_i.MetricStorage=Aa});var Fr=d(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.AttributeHashMap=or.HashMap=void 0;var Xg=Ne(),yi=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=yi;var Na=class extends yi{constructor(){super(Xg.hashAttributes)}};or.AttributeHashMap=Na});var Ia=d(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.DeltaMetricProcessor=void 0;var Ra=Fr(),xa=class{constructor(r){this._aggregator=r,this._activeCollectionStorage=new Ra.AttributeHashMap,this._cumulativeMemoStorage=new Ra.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 Ra.AttributeHashMap,r}};Ei.DeltaMetricProcessor=xa});var wa=d(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.TemporalMetricProcessor=void 0;var zg=Xo(),$g=Fr(),La=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===zg.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=Yg(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 $g.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}};vi.TemporalMetricProcessor=La;function Yg(i){return Array.from(i.entries())}});var md=d(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.AsyncMetricStorage=void 0;var Wg=Pa(),Jg=Ia(),Qg=wa(),Zg=Fr(),Ma=class extends Wg.MetricStorage{constructor(r,o,c,u){super(r),this._attributesProcessor=c,this._deltaMetricStorage=new Jg.DeltaMetricProcessor(o),this._temporalMetricStorage=new Qg.TemporalMetricProcessor(o,u)}record(r,o){let c=new Zg.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)}};gi.AsyncMetricStorage=Ma});var gd=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 eT(i,r){let o="";return i.unit!==r.unit&&(o+=` - Unit '${i.unit}' does not match '${r.unit}'
|
|
7
|
+
var km=Object.create;var au=Object.defineProperty;var qm=Object.getOwnPropertyDescriptor;var jm=Object.getOwnPropertyNames;var Gm=Object.getPrototypeOf,Hm=Object.prototype.hasOwnProperty;var X=(i=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(i,{get:(r,o)=>(typeof require<"u"?require:r)[o]}):i)(function(i){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+i+'" is not supported')});var Hc=(i,r)=>()=>(i&&(r=i(i=0)),r);var d=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports);var an=(i,r,o,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let u of jm(r))!Hm.call(i,u)&&u!==o&&au(i,u,{get:()=>r[u],enumerable:!(c=qm(r,u))||c.enumerable});return i},St=(i,r,o)=>(an(i,r,"default"),o&&an(o,r,"default")),J=(i,r,o)=>(o=i!=null?km(Gm(i)):{},an(r||!i||!i.__esModule?au(o,"default",{value:i,enumerable:!0}):o,i)),E=i=>an(au({},"__esModule",{value:!0}),i);var _={};import*as gb from"@opentelemetry/api";var y=Hc(()=>{St(_,gb)});var Sr=d(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.isTracingSuppressed=Ue.unsuppressTracing=Ue.suppressTracing=void 0;var Fm=(y(),E(_)),cu=(0,Fm.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Km(i){return i.setValue(cu,!0)}Ue.suppressTracing=Km;function Xm(i){return i.deleteValue(cu)}Ue.unsuppressTracing=Xm;function zm(i){return i.getValue(cu)===!0}Ue.isTracingSuppressed=zm});var lu=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 pu=d(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.parseKeyPairsIntoRecord=Oe.parsePairKeyValue=Oe.getKeyPairs=Oe.serializeKeyPairs=void 0;var $m=(y(),E(_)),Je=lu();function Ym(i){return i.reduce((r,o)=>{let c=`${r}${r!==""?Je.BAGGAGE_ITEMS_SEPARATOR:""}${o}`;return c.length>Je.BAGGAGE_MAX_TOTAL_LENGTH?r:c},"")}Oe.serializeKeyPairs=Ym;function Wm(i){return i.getAllEntries().map(([r,o])=>{let c=`${encodeURIComponent(r)}=${encodeURIComponent(o.value)}`;return o.metadata!==void 0&&(c+=Je.BAGGAGE_PROPERTIES_SEPARATOR+o.metadata.toString()),c})}Oe.getKeyPairs=Wm;function Fc(i){let r=i.split(Je.BAGGAGE_PROPERTIES_SEPARATOR);if(r.length<=0)return;let o=r.shift();if(!o)return;let c=o.indexOf(Je.BAGGAGE_KEY_PAIR_SEPARATOR);if(c<=0)return;let u=decodeURIComponent(o.substring(0,c).trim()),a=decodeURIComponent(o.substring(c+1).trim()),t;return r.length>0&&(t=(0,$m.baggageEntryMetadataFromString)(r.join(Je.BAGGAGE_PROPERTIES_SEPARATOR))),{key:u,value:a,metadata:t}}Oe.parsePairKeyValue=Fc;function Jm(i){return typeof i!="string"||i.length===0?{}:i.split(Je.BAGGAGE_ITEMS_SEPARATOR).map(r=>Fc(r)).filter(r=>r!==void 0&&r.value.length>0).reduce((r,o)=>(r[o.key]=o.value,r),{})}Oe.parseKeyPairsIntoRecord=Jm});var Kc=d(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.W3CBaggagePropagator=void 0;var fu=(y(),E(_)),Qm=Sr(),Qe=lu(),du=pu(),hu=class{inject(r,o,c){let u=fu.propagation.getBaggage(r);if(!u||(0,Qm.isTracingSuppressed)(r))return;let a=(0,du.getKeyPairs)(u).filter(e=>e.length<=Qe.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,Qe.BAGGAGE_MAX_NAME_VALUE_PAIRS),t=(0,du.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,du.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:fu.propagation.setBaggage(r,fu.propagation.createBaggage(t))}fields(){return[Qe.BAGGAGE_HEADER]}};cn.W3CBaggagePropagator=hu});var Xc=d(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.AnchoredClock=void 0;var mu=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}};ln.AnchoredClock=mu});var Jc=d(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.isAttributeValue=De.isAttributeKey=De.sanitizeAttributes=void 0;var zc=(y(),E(_));function Zm(i){let r={};if(typeof i!="object"||i==null)return r;for(let[o,c]of Object.entries(i)){if(!$c(o)){zc.diag.warn(`Invalid attribute key: ${o}`);continue}if(!Yc(c)){zc.diag.warn(`Invalid attribute value set for key: ${o}`);continue}Array.isArray(c)?r[o]=c.slice():r[o]=c}return r}De.sanitizeAttributes=Zm;function $c(i){return typeof i=="string"&&i.length>0}De.isAttributeKey=$c;function Yc(i){return i==null?!0:Array.isArray(i)?e_(i):Wc(i)}De.isAttributeValue=Yc;function e_(i){let r;for(let o of i)if(o!=null){if(!r){if(Wc(o)){r=typeof o;continue}return!1}if(typeof o!==r)return!1}return!0}function Wc(i){switch(typeof i){case"number":case"boolean":case"string":return!0}return!1}});var _u=d(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.loggingErrorHandler=void 0;var t_=(y(),E(_));function r_(){return i=>{t_.diag.error(n_(i))}}pn.loggingErrorHandler=r_;function n_(i){return typeof i=="string"?i:JSON.stringify(o_(i))}function o_(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 yu=d(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.globalErrorHandler=bt.setGlobalErrorHandler=void 0;var i_=_u(),Qc=(0,i_.loggingErrorHandler)();function u_(i){Qc=i}bt.setGlobalErrorHandler=u_;function s_(i){try{Qc(i)}catch{}}bt.globalErrorHandler=s_});var Eu=d(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.TracesSamplerValues=void 0;var a_;(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"})(a_=br.TracesSamplerValues||(br.TracesSamplerValues={}))});var Zc=d(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn._globalThis=void 0;fn._globalThis=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});var dn=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(_)),c_=Eu(),l_=Zc(),p_=",",f_=["OTEL_SDK_DISABLED"];function d_(i){return f_.indexOf(i)>-1}var h_=["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 m_(i){return h_.indexOf(i)>-1}var __=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function y_(i){return __.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:c_.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 E_(i,r,o){if(typeof o[i]>"u")return;let c=String(o[i]);r[i]=c.toLowerCase()==="true"}function v_(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 g_(i,r,o,c=p_){let u=o[i];typeof u=="string"&&(r[i]=u.split(c).map(a=>a.trim()))}var T_={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 S_(i,r,o){let c=o[i];if(typeof c=="string"){let u=T_[c.toUpperCase()];u!=null&&(r[i]=u)}}function vu(i){let r={};for(let o in U.DEFAULT_ENVIRONMENT){let c=o;switch(c){case"OTEL_LOG_LEVEL":S_(c,r,i);break;default:if(d_(c))E_(c,r,i);else if(m_(c))v_(c,r,i);else if(y_(c))g_(c,r,i);else{let u=i[c];typeof u<"u"&&u!==null&&(r[c]=String(u))}}}return r}U.parseEnvironment=vu;function b_(){return typeof process<"u"&&process&&process.env?vu(process.env):vu(l_._globalThis)}U.getEnvWithoutDefaults=b_});var tl=d(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.getEnv=void 0;var O_=X("os"),el=dn();function A_(){let i=(0,el.parseEnvironment)(process.env);return Object.assign({HOSTNAME:O_.hostname()},el.DEFAULT_ENVIRONMENT,i)}hn.getEnv=A_});var rl=d(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn._globalThis=void 0;mn._globalThis=typeof globalThis=="object"?globalThis:global});var ol=d(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.hexToBase64=void 0;function nl(i){return i>=48&&i<=57?i-48:i>=97&&i<=102?i-87:i-55}var P_=Buffer.alloc(8),N_=Buffer.alloc(16);function R_(i){let r;i.length===16?r=P_:i.length===32?r=N_:r=Buffer.alloc(i.length/2);let o=0;for(let c=0;c<i.length;c+=2){let u=nl(i.charCodeAt(c)),a=nl(i.charCodeAt(c+1));r.writeUInt8(u<<4|a,o++)}return r.toString("base64")}_n.hexToBase64=R_});var sl=d(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.RandomIdGenerator=void 0;var x_=8,ul=16,gu=class{constructor(){this.generateTraceId=il(ul),this.generateSpanId=il(x_)}};En.RandomIdGenerator=gu;var yn=Buffer.allocUnsafe(ul);function il(i){return function(){for(let o=0;o<i/4;o++)yn.writeUInt32BE(Math.random()*2**32>>>0,o*4);for(let o=0;o<i&&!(yn[o]>0);o++)o===i-1&&(yn[i-1]=1);return yn.toString("hex",0,i)}}});var al=d(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.otperformance=void 0;var I_=X("perf_hooks");vn.otperformance=I_.performance});var Tu=d(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.VERSION=void 0;gn.VERSION="1.19.0"});var cl=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 ll=d(Ze=>{"use strict";var L_=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]}),w_=Ze&&Ze.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&L_(r,i,o)};Object.defineProperty(Ze,"__esModule",{value:!0});w_(cl(),Ze)});var pl=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 fl=d(et=>{"use strict";var M_=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]}),C_=et&&et.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&M_(r,i,o)};Object.defineProperty(et,"__esModule",{value:!0});C_(pl(),et)});var fe=d(Ve=>{"use strict";var U_=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]}),dl=Ve&&Ve.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&U_(r,i,o)};Object.defineProperty(Ve,"__esModule",{value:!0});dl(ll(),Ve);dl(fl(),Ve)});var hl=d(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.SDK_INFO=void 0;var D_=Tu(),Or=fe();Tn.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]:D_.VERSION}});var ml=d(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.unrefTimer=void 0;function B_(i){i.unref()}Sn.unrefTimer=B_});var _l=d(ae=>{"use strict";var V_=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)&&V_(r,i,o)};Object.defineProperty(ae,"__esModule",{value:!0});tt(tl(),ae);tt(rl(),ae);tt(ol(),ae);tt(sl(),ae);tt(al(),ae);tt(hl(),ae);tt(ml(),ae)});var Su=d(rt=>{"use strict";var k_=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]}),q_=rt&&rt.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&k_(r,i,o)};Object.defineProperty(rt,"__esModule",{value:!0});q_(_l(),rt)});var gl=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 bu=Su(),yl=9,j_=6,G_=Math.pow(10,j_),bn=Math.pow(10,yl);function Ar(i){let r=i/1e3,o=Math.trunc(r),c=Math.round(i%1e3*G_);return[o,c]}C.millisToHrTime=Ar;function Ou(){let i=bu.otperformance.timeOrigin;if(typeof i!="number"){let r=bu.otperformance;i=r.timing&&r.timing.fetchStart}return i}C.getTimeOrigin=Ou;function El(i){let r=Ar(Ou()),o=Ar(typeof i=="number"?i:bu.otperformance.now());return vl(r,o)}C.hrTime=El;function H_(i){if(Au(i))return i;if(typeof i=="number")return i<Ou()?El(i):Ar(i);if(i instanceof Date)return Ar(i.getTime());throw TypeError("Invalid input type")}C.timeInputToHrTime=H_;function F_(i,r){let o=r[0]-i[0],c=r[1]-i[1];return c<0&&(o-=1,c+=bn),[o,c]}C.hrTimeDuration=F_;function K_(i){let r=yl,o=`${"0".repeat(r)}${i[1]}Z`,c=o.substr(o.length-r-1);return new Date(i[0]*1e3).toISOString().replace("000Z",c)}C.hrTimeToTimeStamp=K_;function X_(i){return i[0]*bn+i[1]}C.hrTimeToNanoseconds=X_;function z_(i){return i[0]*1e3+i[1]/1e6}C.hrTimeToMilliseconds=z_;function $_(i){return i[0]*1e6+i[1]/1e3}C.hrTimeToMicroseconds=$_;function Au(i){return Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"}C.isTimeInputHrTime=Au;function Y_(i){return Au(i)||typeof i=="number"||i instanceof Date}C.isTimeInput=Y_;function vl(i,r){let o=[i[0]+r[0],i[1]+r[1]];return o[1]>=bn&&(o[1]-=bn,o[0]+=1),o}C.addHrTimes=vl});var Sl=d(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0})});var bl=d(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.ExportResultCode=void 0;var W_;(function(i){i[i.SUCCESS=0]="SUCCESS",i[i.FAILED=1]="FAILED"})(W_=Pr.ExportResultCode||(Pr.ExportResultCode={}))});var Al=d(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.CompositePropagator=void 0;var Ol=(y(),E(_)),Pu=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){Ol.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){Ol.diag.warn(`Failed to inject with ${a.constructor.name}. Err: ${t.message}`)}return u},r)}fields(){return this._fields.slice()}};On.CompositePropagator=Pu});var Pl=d(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.validateValue=Ot.validateKey=void 0;var Nu="[_0-9a-z-*/]",J_=`[a-z]${Nu}{0,255}`,Q_=`[a-z0-9]${Nu}{0,240}@[a-z]${Nu}{0,13}`,Z_=new RegExp(`^(?:${J_}|${Q_})$`),ey=/^[ -~]{0,255}[!-~]$/,ty=/,|=/;function ry(i){return Z_.test(i)}Ot.validateKey=ry;function ny(i){return ey.test(i)&&!ty.test(i)}Ot.validateValue=ny});var xu=d(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.TraceState=void 0;var Nl=Pl(),Rl=32,oy=512,xl=",",Il="=",Ru=class i{constructor(r){this._internalState=new Map,r&&this._parse(r)}set(r,o){let c=this._clone();return c._internalState.has(r)&&c._internalState.delete(r),c._internalState.set(r,o),c}unset(r){let o=this._clone();return o._internalState.delete(r),o}get(r){return this._internalState.get(r)}serialize(){return this._keys().reduce((r,o)=>(r.push(o+Il+this.get(o)),r),[]).join(xl)}_parse(r){r.length>oy||(this._internalState=r.split(xl).reverse().reduce((o,c)=>{let u=c.trim(),a=u.indexOf(Il);if(a!==-1){let t=u.slice(0,a),e=u.slice(a+1,c.length);(0,Nl.validateKey)(t)&&(0,Nl.validateValue)(e)&&o.set(t,e)}return o},new Map),this._internalState.size>Rl&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Rl))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let r=new i;return r._internalState=new Map(this._internalState),r}};An.TraceState=Ru});var wl=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 Pn=(y(),E(_)),iy=Sr(),uy=xu();ee.TRACE_PARENT_HEADER="traceparent";ee.TRACE_STATE_HEADER="tracestate";var sy="00",ay="(?!ff)[\\da-f]{2}",cy="(?![0]{32})[\\da-f]{32}",ly="(?![0]{16})[\\da-f]{16}",py="[\\da-f]{2}",fy=new RegExp(`^\\s?(${ay})-(${cy})-(${ly})-(${py})(-.*)?\\s?$`);function Ll(i){let r=fy.exec(i);return!r||r[1]==="00"&&r[5]?null:{traceId:r[2],spanId:r[3],traceFlags:parseInt(r[4],16)}}ee.parseTraceParent=Ll;var Iu=class{inject(r,o,c){let u=Pn.trace.getSpanContext(r);if(!u||(0,iy.isTracingSuppressed)(r)||!(0,Pn.isSpanContextValid)(u))return;let a=`${sy}-${u.traceId}-${u.spanId}-0${Number(u.traceFlags||Pn.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=Ll(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 uy.TraceState(typeof n=="string"?n:void 0)}return Pn.trace.setSpanContext(r,t)}fields(){return[ee.TRACE_PARENT_HEADER,ee.TRACE_STATE_HEADER]}};ee.W3CTraceContextPropagator=Iu});var Cl=d(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0})});var Ul=d(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.getRPCMetadata=Ee.deleteRPCMetadata=Ee.setRPCMetadata=Ee.RPCType=void 0;var dy=(y(),E(_)),Lu=(0,dy.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),hy;(function(i){i.HTTP="http"})(hy=Ee.RPCType||(Ee.RPCType={}));function my(i,r){return i.setValue(Lu,r)}Ee.setRPCMetadata=my;function _y(i){return i.deleteValue(Lu)}Ee.deleteRPCMetadata=_y;function yy(i){return i.getValue(Lu)}Ee.getRPCMetadata=yy});var Mu=d(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.AlwaysOffSampler=void 0;var Ey=(y(),E(_)),wu=class{shouldSample(){return{decision:Ey.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Nn.AlwaysOffSampler=wu});var Uu=d(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.AlwaysOnSampler=void 0;var vy=(y(),E(_)),Cu=class{shouldSample(){return{decision:vy.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};Rn.AlwaysOnSampler=Cu});var Bl=d(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.ParentBasedSampler=void 0;var xn=(y(),E(_)),gy=yu(),Dl=Mu(),Du=Uu(),Bu=class{constructor(r){var o,c,u,a;this._root=r.root,this._root||((0,gy.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Du.AlwaysOnSampler),this._remoteParentSampled=(o=r.remoteParentSampled)!==null&&o!==void 0?o:new Du.AlwaysOnSampler,this._remoteParentNotSampled=(c=r.remoteParentNotSampled)!==null&&c!==void 0?c:new Dl.AlwaysOffSampler,this._localParentSampled=(u=r.localParentSampled)!==null&&u!==void 0?u:new Du.AlwaysOnSampler,this._localParentNotSampled=(a=r.localParentNotSampled)!==null&&a!==void 0?a:new Dl.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()}}`}};In.ParentBasedSampler=Bu});var Vl=d(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.TraceIdRatioBasedSampler=void 0;var Vu=(y(),E(_)),ku=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,Vu.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?Vu.SamplingDecision.RECORD_AND_SAMPLED:Vu.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}};Ln.TraceIdRatioBasedSampler=ku});var Hl=d(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.isPlainObject=void 0;var Ty="[object Object]",Sy="[object Null]",by="[object Undefined]",Oy=Function.prototype,kl=Oy.toString,Ay=kl.call(Object),Py=Ny(Object.getPrototypeOf,Object),ql=Object.prototype,jl=ql.hasOwnProperty,nt=Symbol?Symbol.toStringTag:void 0,Gl=ql.toString;function Ny(i,r){return function(o){return i(r(o))}}function Ry(i){if(!xy(i)||Iy(i)!==Ty)return!1;let r=Py(i);if(r===null)return!0;let o=jl.call(r,"constructor")&&r.constructor;return typeof o=="function"&&o instanceof o&&kl.call(o)===Ay}wn.isPlainObject=Ry;function xy(i){return i!=null&&typeof i=="object"}function Iy(i){return i==null?i===void 0?by:Sy:nt&&nt in Object(i)?Ly(i):wy(i)}function Ly(i){let r=jl.call(i,nt),o=i[nt],c=!1;try{i[nt]=void 0,c=!0}catch{}let u=Gl.call(i);return c&&(r?i[nt]=o:delete i[nt]),u}function wy(i){return Gl.call(i)}});var $l=d(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.merge=void 0;var Fl=Hl(),My=20;function Cy(...i){let r=i.shift(),o=new WeakMap;for(;i.length>0;)r=Xl(r,i.shift(),0,o);return r}Un.merge=Cy;function qu(i){return Cn(i)?i.slice():i}function Xl(i,r,o=0,c){let u;if(!(o>My)){if(o++,Mn(i)||Mn(r)||zl(r))u=qu(r);else if(Cn(i)){if(u=i.slice(),Cn(r))for(let a=0,t=r.length;a<t;a++)u.push(qu(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]=qu(r[n])}}}else if(Nr(i))if(Nr(r)){if(!Uy(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(Mn(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)||[],P=c.get(h)||[];T.push({obj:i,key:n}),P.push({obj:r,key:n}),c.set(l,T),c.set(h,P)}u[n]=Xl(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 Cn(i){return Array.isArray(i)}function zl(i){return typeof i=="function"}function Nr(i){return!Mn(i)&&!Cn(i)&&!zl(i)&&typeof i=="object"}function Mn(i){return typeof i=="string"||typeof i=="number"||typeof i=="boolean"||typeof i>"u"||i instanceof Date||i instanceof RegExp||i===null}function Uy(i,r){return!(!(0,Fl.isPlainObject)(i)||!(0,Fl.isPlainObject)(r))}});var Yl=d(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.callWithTimeout=At.TimeoutError=void 0;var Dn=class i extends Error{constructor(r){super(r),Object.setPrototypeOf(this,i.prototype)}};At.TimeoutError=Dn;function Dy(i,r){let o,c=new Promise(function(a,t){o=setTimeout(function(){t(new Dn("Operation timed out."))},r)});return Promise.race([i,c]).then(u=>(clearTimeout(o),u),u=>{throw clearTimeout(o),u})}At.callWithTimeout=Dy});var Jl=d(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.isUrlIgnored=Pt.urlMatches=void 0;function Wl(i,r){return typeof r=="string"?i===r:!!i.match(r)}Pt.urlMatches=Wl;function By(i,r){if(!r)return!1;for(let o of r)if(Wl(i,o))return!0;return!1}Pt.isUrlIgnored=By});var Ql=d(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.isWrapped=void 0;function Vy(i){return typeof i=="function"&&typeof i.__original=="function"&&typeof i.__unwrap=="function"&&i.__wrapped===!0}Bn.isWrapped=Vy});var Zl=d(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.Deferred=void 0;var ju=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)}};Vn.Deferred=ju});var ep=d(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.BindOnceFuture=void 0;var ky=Zl(),Gu=class{constructor(r,o){this._callback=r,this._that=o,this._isCalled=!1,this._deferred=new ky.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}};kn.BindOnceFuture=Gu});var rp=d(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn._export=void 0;var tp=(y(),E(_)),qy=Sr();function jy(i,r){return new Promise(o=>{tp.context.with((0,qy.suppressTracing)(tp.context.active()),()=>{i.export(r,c=>{o(c)})})})}qn._export=jy});var N=d(A=>{"use strict";var Gy=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)&&Gy(r,i,o)};Object.defineProperty(A,"__esModule",{value:!0});A.internal=A.baggageUtils=void 0;M(Kc(),A);M(Xc(),A);M(Jc(),A);M(yu(),A);M(_u(),A);M(gl(),A);M(Sl(),A);M(bl(),A);A.baggageUtils=pu();M(Su(),A);M(Al(),A);M(wl(),A);M(Cl(),A);M(Ul(),A);M(Mu(),A);M(Uu(),A);M(Bl(),A);M(Vl(),A);M(Sr(),A);M(xu(),A);M(dn(),A);M($l(),A);M(Eu(),A);M(Yl(),A);M(Jl(),A);M(Ql(),A);M(ep(),A);M(Tu(),A);var Hy=rp();A.internal={_export:Hy._export}});var np=d(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.ExceptionEventName=void 0;jn.ExceptionEventName="exception"});var Fu=d(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.Span=void 0;var Ae=(y(),E(_)),te=N(),ot=fe(),Fy=np(),Hu=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[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(Fy.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}};Gn.Span=Hu});var xr=d(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.SamplingDecision=void 0;var Ky;(function(i){i[i.NOT_RECORD=0]="NOT_RECORD",i[i.RECORD=1]="RECORD",i[i.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Ky=Rr.SamplingDecision||(Rr.SamplingDecision={}))});var Fn=d(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.AlwaysOffSampler=void 0;var Xy=xr(),Ku=class{shouldSample(){return{decision:Xy.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Hn.AlwaysOffSampler=Ku});var Xn=d(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.AlwaysOnSampler=void 0;var zy=xr(),Xu=class{shouldSample(){return{decision:zy.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};Kn.AlwaysOnSampler=Xu});var Yu=d($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.ParentBasedSampler=void 0;var zn=(y(),E(_)),$y=N(),op=Fn(),zu=Xn(),$u=class{constructor(r){var o,c,u,a;this._root=r.root,this._root||((0,$y.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new zu.AlwaysOnSampler),this._remoteParentSampled=(o=r.remoteParentSampled)!==null&&o!==void 0?o:new zu.AlwaysOnSampler,this._remoteParentNotSampled=(c=r.remoteParentNotSampled)!==null&&c!==void 0?c:new op.AlwaysOffSampler,this._localParentSampled=(u=r.localParentSampled)!==null&&u!==void 0?u:new zu.AlwaysOnSampler,this._localParentNotSampled=(a=r.localParentNotSampled)!==null&&a!==void 0?a:new op.AlwaysOffSampler}shouldSample(r,o,c,u,a,t){let e=zn.trace.getSpanContext(r);return!e||!(0,zn.isSpanContextValid)(e)?this._root.shouldSample(r,o,c,u,a,t):e.isRemote?e.traceFlags&zn.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(r,o,c,u,a,t):this._remoteParentNotSampled.shouldSample(r,o,c,u,a,t):e.traceFlags&zn.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()}}`}};$n.ParentBasedSampler=$u});var Ju=d(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.TraceIdRatioBasedSampler=void 0;var Yy=(y(),E(_)),ip=xr(),Wu=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,Yy.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?ip.SamplingDecision.RECORD_AND_SAMPLED:ip.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(r){return typeof r!="number"||isNaN(r)?0:r>=1?1:r<=0?0:r}_accumulate(r){let o=0;for(let c=0;c<r.length/8;c++){let u=c*8,a=parseInt(r.slice(u,u+8),16);o=(o^a)>>>0}return o}};Yn.TraceIdRatioBasedSampler=Wu});var es=d(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.buildSamplerFromEnv=Rt.loadDefaultConfig=void 0;var Wn=(y(),E(_)),Y=N(),up=Fn(),Qu=Xn(),Zu=Yu(),sp=Ju(),Wy=(0,Y.getEnv)(),Jy=Y.TracesSamplerValues.AlwaysOn,Nt=1;function Qy(){return{sampler:cp(Wy),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}}}Rt.loadDefaultConfig=Qy;function cp(i=(0,Y.getEnv)()){switch(i.OTEL_TRACES_SAMPLER){case Y.TracesSamplerValues.AlwaysOn:return new Qu.AlwaysOnSampler;case Y.TracesSamplerValues.AlwaysOff:return new up.AlwaysOffSampler;case Y.TracesSamplerValues.ParentBasedAlwaysOn:return new Zu.ParentBasedSampler({root:new Qu.AlwaysOnSampler});case Y.TracesSamplerValues.ParentBasedAlwaysOff:return new Zu.ParentBasedSampler({root:new up.AlwaysOffSampler});case Y.TracesSamplerValues.TraceIdRatio:return new sp.TraceIdRatioBasedSampler(ap(i));case Y.TracesSamplerValues.ParentBasedTraceIdRatio:return new Zu.ParentBasedSampler({root:new sp.TraceIdRatioBasedSampler(ap(i))});default:return Wn.diag.error(`OTEL_TRACES_SAMPLER value "${i.OTEL_TRACES_SAMPLER} invalid, defaulting to ${Jy}".`),new Qu.AlwaysOnSampler}}Rt.buildSamplerFromEnv=cp;function ap(i){if(i.OTEL_TRACES_SAMPLER_ARG===void 0||i.OTEL_TRACES_SAMPLER_ARG==="")return Wn.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${Nt}.`),Nt;let r=Number(i.OTEL_TRACES_SAMPLER_ARG);return isNaN(r)?(Wn.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?(Wn.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 rs=d(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.reconfigureLimits=xt.mergeConfig=void 0;var lp=es(),ts=N();function Zy(i){let r={sampler:(0,lp.buildSamplerFromEnv)()},o=(0,lp.loadDefaultConfig)(),c=Object.assign({},o,r,i);return c.generalLimits=Object.assign({},o.generalLimits,i.generalLimits||{}),c.spanLimits=Object.assign({},o.spanLimits,i.spanLimits||{}),c}xt.mergeConfig=Zy;function eE(i){var r,o,c,u,a,t,e,n,s,l,h,T;let P=Object.assign({},i.spanLimits),R=(0,ts.getEnvWithoutDefaults)();return P.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:R.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&a!==void 0?a:R.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&t!==void 0?t:ts.DEFAULT_ATTRIBUTE_COUNT_LIMIT,P.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:R.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&h!==void 0?h:R.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&T!==void 0?T:ts.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},i,{spanLimits:P})}xt.reconfigureLimits=eE});var pp=d(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.BatchSpanProcessorBase=void 0;var It=(y(),E(_)),it=N(),ns=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)}};Jn.BatchSpanProcessorBase=ns});var fp=d(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.BatchSpanProcessor=void 0;var tE=pp(),os=class extends tE.BatchSpanProcessorBase{onShutdown(){}};Qn.BatchSpanProcessor=os});var mp=d(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.RandomIdGenerator=void 0;var rE=8,hp=16,is=class{constructor(){this.generateTraceId=dp(hp),this.generateSpanId=dp(rE)}};eo.RandomIdGenerator=is;var Zn=Buffer.allocUnsafe(hp);function dp(i){return function(){for(let o=0;o<i/4;o++)Zn.writeUInt32BE(Math.random()*2**32>>>0,o*4);for(let o=0;o<i&&!(Zn[o]>0);o++)o===i-1&&(Zn[i-1]=1);return Zn.toString("hex",0,i)}}});var yp=d(ke=>{"use strict";var nE=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]}),_p=ke&&ke.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&nE(r,i,o)};Object.defineProperty(ke,"__esModule",{value:!0});_p(fp(),ke);_p(mp(),ke)});var to=d(ut=>{"use strict";var oE=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]}),iE=ut&&ut.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&oE(r,i,o)};Object.defineProperty(ut,"__esModule",{value:!0});iE(yp(),ut)});var Ep=d(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.Tracer=void 0;var W=(y(),E(_)),ro=N(),uE=Fu(),sE=rs(),aE=to(),us=class{constructor(r,o,c){this._tracerProvider=c;let u=(0,sE.mergeConfig)(o);this._sampler=u.sampler,this._generalLimits=u.generalLimits,this._spanLimits=u.spanLimits,this._idGenerator=o.idGenerator||new aE.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,ro.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 P=(u=o.kind)!==null&&u!==void 0?u:W.SpanKind.INTERNAL,R=((a=o.links)!==null&&a!==void 0?a:[]).map(H=>({context:H.context,attributes:(0,ro.sanitizeAttributes)(H.attributes)})),I=(0,ro.sanitizeAttributes)(o.attributes),b=this._sampler.shouldSample(c,l,r,P,I,R);h=(t=b.traceState)!==null&&t!==void 0?t:h;let L=b.decision===W.SamplingDecision.RECORD_AND_SAMPLED?W.TraceFlags.SAMPLED:W.TraceFlags.NONE,k={traceId:l,spanId:s,traceFlags:L,traceState:h};if(b.decision===W.SamplingDecision.NOT_RECORD)return W.diag.debug("Recording is off, propagating context in a non-recording span"),W.trace.wrapSpanContext(k);let se=(0,ro.sanitizeAttributes)(Object.assign(I,b.attributes));return new uE.Span(this,c,r,k,P,T,R,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??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()}};no.Tracer=us});var vp=d(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.defaultServiceName=void 0;function cE(){return`unknown_service:${process.argv0}`}oo.defaultServiceName=cE});var ss=d(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.normalizeType=Lt.normalizeArch=void 0;var lE=i=>{switch(i){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return i}};Lt.normalizeArch=lE;var pE=i=>{switch(i){case"sunos":return"solaris";case"win32":return"windows";default:return i}};Lt.normalizeType=pE});var uo=d(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.execAsync=void 0;var fE=X("child_process"),dE=X("util");io.execAsync=dE.promisify(fE.exec)});var gp=d(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.getMachineId=void 0;var hE=uo(),mE=(y(),E(_));async function _E(){try{let r=(await(0,hE.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){mE.diag.debug(`error reading machine id: ${i}`)}return""}so.getMachineId=_E});var Tp=d(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.getMachineId=void 0;var yE=X("fs"),EE=(y(),E(_));async function vE(){let i=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let r of i)try{return(await yE.promises.readFile(r,{encoding:"utf8"})).trim()}catch(o){EE.diag.debug(`error reading machine id: ${o}`)}return""}ao.getMachineId=vE});var bp=d(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.getMachineId=void 0;var gE=X("fs"),TE=uo(),Sp=(y(),E(_));async function SE(){try{return(await gE.promises.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(i){Sp.diag.debug(`error reading machine id: ${i}`)}try{return(await(0,TE.execAsync)("kenv -q smbios.system.uuid")).stdout.trim()}catch(i){Sp.diag.debug(`error reading machine id: ${i}`)}return""}co.getMachineId=SE});var Ap=d(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.getMachineId=void 0;var Op=X("process"),bE=uo(),OE=(y(),E(_));async function AE(){let i="QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",r="%windir%\\System32\\REG.exe";Op.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in Op.env&&(r="%windir%\\sysnative\\cmd.exe /c "+r);try{let c=(await(0,bE.execAsync)(`${r} ${i}`)).stdout.split("REG_SZ");if(c.length===2)return c[1].trim()}catch(o){OE.diag.debug(`error reading machine id: ${o}`)}return""}lo.getMachineId=AE});var Pp=d(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.getMachineId=void 0;var PE=(y(),E(_));async function NE(){return PE.diag.debug("could not read machine-id: unsupported platform"),""}po.getMachineId=NE});var Np=d(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.getMachineId=void 0;var RE=X("process"),wt;Ie.getMachineId=wt;switch(RE.platform){case"darwin":Ie.getMachineId=wt=gp().getMachineId;break;case"linux":Ie.getMachineId=wt=Tp().getMachineId;break;case"freebsd":Ie.getMachineId=wt=bp().getMachineId;break;case"win32":Ie.getMachineId=wt=Ap().getMachineId;break;default:Ie.getMachineId=wt=Pp().getMachineId}});var ls=d(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.hostDetectorSync=void 0;var as=fe(),xE=st(),Rp=X("os"),IE=ss(),LE=Np(),cs=class{detect(r){let o={[as.SemanticResourceAttributes.HOST_NAME]:(0,Rp.hostname)(),[as.SemanticResourceAttributes.HOST_ARCH]:(0,IE.normalizeArch)((0,Rp.arch)())};return new xE.Resource(o,this._getAsyncAttributes())}_getAsyncAttributes(){return(0,LE.getMachineId)().then(r=>{let o={};return r&&(o[as.SemanticResourceAttributes.HOST_ID]=r),o})}};fo.hostDetectorSync=new cs});var xp=d(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.hostDetector=void 0;var wE=ls(),ps=class{detect(r){return Promise.resolve(wE.hostDetectorSync.detect(r))}};ho.hostDetector=new ps});var ds=d(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.osDetectorSync=void 0;var Ip=fe(),ME=st(),Lp=X("os"),CE=ss(),fs=class{detect(r){let o={[Ip.SemanticResourceAttributes.OS_TYPE]:(0,CE.normalizeType)((0,Lp.platform)()),[Ip.SemanticResourceAttributes.OS_VERSION]:(0,Lp.release)()};return new ME.Resource(o)}};mo.osDetectorSync=new fs});var wp=d(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.osDetector=void 0;var UE=ds(),hs=class{detect(r){return Promise.resolve(UE.osDetectorSync.detect(r))}};_o.osDetector=new hs});var _s=d(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.processDetectorSync=void 0;var DE=(y(),E(_)),Le=fe(),BE=st(),VE=X("os"),ms=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=VE.userInfo();o[Le.SemanticResourceAttributes.PROCESS_OWNER]=c.username}catch(c){DE.diag.debug(`error obtaining process owner: ${c}`)}return new BE.Resource(o)}};yo.processDetectorSync=new ms});var Mp=d(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});Eo.processDetector=void 0;var kE=_s(),ys=class{detect(r){return Promise.resolve(kE.processDetectorSync.detect(r))}};Eo.processDetector=new ys});var Cp=d(ce=>{"use strict";var qE=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)&&qE(r,i,o)};Object.defineProperty(ce,"__esModule",{value:!0});at(vp(),ce);at(xp(),ce);at(wp(),ce);at(ls(),ce);at(ds(),ce);at(Mp(),ce);at(_s(),ce)});var Es=d(ct=>{"use strict";var jE=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]}),GE=ct&&ct.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&jE(r,i,o)};Object.defineProperty(ct,"__esModule",{value:!0});GE(Cp(),ct)});var st=d(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.Resource=void 0;var Up=(y(),E(_)),lt=fe(),vs=N(),HE=Es(),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=>(Up.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,HE.defaultServiceName)(),[lt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:vs.SDK_INFO[lt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE],[lt.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:vs.SDK_INFO[lt.SemanticResourceAttributes.TELEMETRY_SDK_NAME],[lt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:vs.SDK_INFO[lt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]})}get attributes(){var r;return this.asyncAttributesPending&&Up.diag.error("Accessing resource attributes before async attributes settled"),(r=this._attributes)!==null&&r!==void 0?r:{}}async waitForAsyncAttributes(){this.asyncAttributesPending&&await this._asyncAttributesPromise}merge(r){var o;if(!r)return this;let c=Object.assign(Object.assign({},this._syncAttributes),(o=r._syncAttributes)!==null&&o!==void 0?o:r.attributes);if(!this._asyncAttributesPromise&&!r._asyncAttributesPromise)return new i(c);let 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)}};vo.Resource=Ir;Ir.EMPTY=new Ir({})});var Bp=d(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0})});var kp=d(Vp=>{"use strict";Object.defineProperty(Vp,"__esModule",{value:!0})});var jp=d(qp=>{"use strict";Object.defineProperty(qp,"__esModule",{value:!0})});var Gp=d(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.browserDetector=void 0;var FE=pt(),gs=class{detect(r){return Promise.resolve(FE.browserDetectorSync.detect(r))}};go.browserDetector=new gs});var Ss=d(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.envDetectorSync=void 0;var KE=(y(),E(_)),XE=N(),zE=fe(),$E=st(),Ts=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,XE.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){KE.diag.debug(`EnvDetector failed: ${t.message}`)}return a&&(o[zE.SemanticResourceAttributes.SERVICE_NAME]=a),new $E.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)}};To.envDetectorSync=new Ts});var Hp=d(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.envDetector=void 0;var YE=Ss(),bs=class{detect(r){return Promise.resolve(YE.envDetectorSync.detect(r))}};So.envDetector=new bs});var Fp=d(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.browserDetectorSync=void 0;var bo=fe(),Os=pt(),WE=(y(),E(_)),As=class{detect(r){if(!(typeof navigator<"u"))return Os.Resource.empty();let c={[bo.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"browser",[bo.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]:"Web Browser",[bo.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]:navigator.userAgent};return this._getResourceAttributes(c,r)}_getResourceAttributes(r,o){return r[bo.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]===""?(WE.diag.debug("BrowserDetector failed: Unable to find required browser resources. "),Os.Resource.empty()):new Os.Resource(Object.assign({},r))}};Oo.browserDetectorSync=new As});var Kp=d(Pe=>{"use strict";var JE=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]}),Ao=Pe&&Pe.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&JE(r,i,o)};Object.defineProperty(Pe,"__esModule",{value:!0});Ao(Gp(),Pe);Ao(Hp(),Pe);Ao(Fp(),Pe);Ao(Ss(),Pe)});var Xp=d(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.isPromiseLike=void 0;var QE=i=>i!==null&&typeof i=="object"&&typeof i.then=="function";Po.isPromiseLike=QE});var $p=d(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.detectResourcesSync=Ct.detectResources=void 0;var Lr=st(),Mt=(y(),E(_)),ZE=Xp(),ev=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 zp(r),r.reduce((o,c)=>o.merge(c),Lr.Resource.empty())};Ct.detectResources=ev;var tv=(i={})=>{var r;let o=((r=i.detectors)!==null&&r!==void 0?r:[]).map(u=>{try{let a=u.detect(i),t;if((0,ZE.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(()=>{zp(o)}),c};Ct.detectResourcesSync=tv;var zp=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 rv=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)&&rv(r,i,o)};Object.defineProperty(le,"__esModule",{value:!0});ft(st(),le);ft(Bp(),le);ft(Es(),le);ft(kp(),le);ft(jp(),le);ft(Kp(),le);ft($p(),le)});var Yp=d(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.MultiSpanProcessor=void 0;var nv=N(),Ps=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,nv.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)})}};No.MultiSpanProcessor=Ps});var Rs=d(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.NoopSpanProcessor=void 0;var Ns=class{onStart(r,o){}onEnd(r){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}};Ro.NoopSpanProcessor=Ns});var Jp=d(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.BasicTracerProvider=dt.ForceFlushState=void 0;var Ut=(y(),E(_)),Bt=N(),Wp=pt(),ov=xs(),iv=es(),uv=Yp(),sv=Rs(),av=to(),cv=rs(),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,iv.loadDefaultConfig)(),(0,cv.reconfigureLimits)(r));this.resource=(o=c.resource)!==null&&o!==void 0?o:Wp.Resource.empty(),this.resource=Wp.Resource.default().merge(this.resource),this._config=Object.assign({},c,{resource:this.resource});let u=this._buildExporterFromEnv();if(u!==void 0){let a=new av.BatchSpanProcessor(u);this.activeSpanProcessor=a}else this.activeSpanProcessor=new sv.NoopSpanProcessor}getTracer(r,o,c){let u=`${r}@${o||""}:${c?.schemaUrl||""}`;return this._tracers.has(u)||this._tracers.set(u,new ov.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 uv.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 Qp=d(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.ConsoleSpanExporter=void 0;var Is=N(),Ls=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,Is.hrTimeToMicroseconds)(r.startTime),duration:(0,Is.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:Is.ExportResultCode.SUCCESS})}};xo.ConsoleSpanExporter=Ls});var ef=d(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.InMemorySpanExporter=void 0;var Zp=N(),ws=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}};Io.InMemorySpanExporter=ws});var rf=d(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0})});var nf=d(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.SimpleSpanProcessor=void 0;var lv=(y(),E(_)),Vt=N(),Ms=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&lv.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()}};Lo.SimpleSpanProcessor=Ms});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 lf=d(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0})});var ff=d(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0})});var hf=d(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0})});var xs=d(D=>{"use strict";var pv=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]}),K=D&&D.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&pv(r,i,o)};Object.defineProperty(D,"__esModule",{value:!0});K(Ep(),D);K(Jp(),D);K(to(),D);K(Qp(),D);K(ef(),D);K(rf(),D);K(nf(),D);K(uf(),D);K(Rs(),D);K(Fn(),D);K(Xn(),D);K(Yu(),D);K(Ju(),D);K(xr(),D);K(Fu(),D);K(af(),D);K(lf(),D);K(ff(),D);K(hf(),D)});var ht={};import*as EA from"@opentelemetry/api-logs";var Cs=Hc(()=>{St(ht,EA)});var _f=d(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.disableInstrumentations=qe.enableInstrumentations=qe.parseInstrumentationOptions=void 0;function mf(i=[]){let r=[];for(let o=0,c=i.length;o<c;o++){let u=i[o];if(Array.isArray(u)){let a=mf(u);r=r.concat(a.instrumentations)}else typeof u=="function"?r.push(new u):u.instrumentationName&&r.push(u)}return{instrumentations:r}}qe.parseInstrumentationOptions=mf;function fv(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=fv;function dv(i){i.forEach(r=>r.disable())}qe.disableInstrumentations=dv});var Ef=d(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.registerInstrumentations=void 0;var yf=(y(),E(_)),Us=_f();function hv(i){let{instrumentations:r}=(0,Us.parseInstrumentationOptions)(i.instrumentations),o=i.tracerProvider||yf.trace.getTracerProvider(),c=i.meterProvider||yf.metrics.getMeterProvider();return(0,Us.enableInstrumentations)(r,o,c),()=>{(0,Us.disableInstrumentations)(r)}}wo.registerInstrumentations=hv});var Bs=d(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.LogRecord=void 0;var mv=(y(),E(_)),Mr=(y(),E(_)),Mo=N(),Ds=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,Mo.timeInputToHrTime)(u??h),this.hrTimeObserved=(0,Mo.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,Mo.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,Mo.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&&mv.diag.warn("Can not execute the operation on emitted log record"),this._isReadonly}};Co.LogRecord=Ds});var vf=d(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});Uo.Logger=void 0;var _v=(y(),E(_)),yv=Bs(),Vs=class{constructor(r,o){this.instrumentationScope=r,this._sharedState=o}emit(r){let o=r.context||_v.context.active(),c=new yv.LogRecord(this._sharedState,this.instrumentationScope,Object.assign({context:o},r));this._sharedState.activeProcessor.onEmit(c,o),c._makeReadonly()}};Uo.Logger=Vs});var gf=d(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.reconfigureLimits=kt.loadDefaultConfig=void 0;var Cr=N();function Ev(){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=Ev;function vv(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=vv});var Tf=d(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.MultiLogRecordProcessor=void 0;var gv=N(),ks=class{constructor(r,o){this.processors=r,this.forceFlushTimeoutMillis=o}async forceFlush(){let r=this.forceFlushTimeoutMillis;await Promise.all(this.processors.map(o=>(0,gv.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()))}};Do.MultiLogRecordProcessor=ks});var js=d(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});Bo.NoopLogRecordProcessor=void 0;var qs=class{forceFlush(){return Promise.resolve()}onEmit(r,o){}shutdown(){return Promise.resolve()}};Bo.NoopLogRecordProcessor=qs});var Sf=d(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.LoggerProviderSharedState=void 0;var Tv=js(),Gs=class{constructor(r,o,c){this.resource=r,this.forceFlushTimeoutMillis=o,this.logRecordLimits=c,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new Tv.NoopLogRecordProcessor}};Vo.LoggerProviderSharedState=Gs});var Af=d(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.LoggerProvider=mt.DEFAULT_LOGGER_NAME=void 0;var Ur=(y(),E(_)),Sv=(Cs(),E(ht)),bv=pt(),bf=N(),Ov=vf(),Of=gf(),Av=Tf(),Pv=Sf();mt.DEFAULT_LOGGER_NAME="unknown";var Hs=class{constructor(r={}){let{resource:o=bv.Resource.default(),logRecordLimits:c,forceFlushTimeoutMillis:u}=(0,bf.merge)({},(0,Of.loadDefaultConfig)(),r);this._sharedState=new Pv.LoggerProviderSharedState(o,u,(0,Of.reconfigureLimits)(c)),this._shutdownOnce=new bf.BindOnceFuture(this._shutdown,this)}getLogger(r,o,c){if(this._shutdownOnce.isCalled)return Ur.diag.warn("A shutdown LoggerProvider cannot provide a Logger"),Sv.NOOP_LOGGER;r||Ur.diag.warn("Logger requested without instrumentation scope name.");let u=r||mt.DEFAULT_LOGGER_NAME,a=`${u}@${o||""}:${c?.schemaUrl||""}`;return this._sharedState.loggers.has(a)||this._sharedState.loggers.set(a,new Ov.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 Av.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()}};mt.LoggerProvider=Hs});var Pf=d(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.ConsoleLogRecordExporter=void 0;var Nv=N(),Rv=N(),Fs=class{export(r,o){this._sendLogRecords(r,o)}shutdown(){return Promise.resolve()}_exportInfo(r){var o,c,u;return{timestamp:(0,Nv.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:Rv.ExportResultCode.SUCCESS})}};ko.ConsoleLogRecordExporter=Fs});var Nf=d(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});qo.SimpleLogRecordProcessor=void 0;var Ks=N(),Xs=class{constructor(r){this._exporter=r,this._shutdownOnce=new Ks.BindOnceFuture(this._shutdown,this)}onEmit(r){this._shutdownOnce.isCalled||this._exporter.export([r],o=>{var c;if(o.code!==Ks.ExportResultCode.SUCCESS){(0,Ks.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()}};qo.SimpleLogRecordProcessor=Xs});var xf=d(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});jo.InMemoryLogRecordExporter=void 0;var Rf=N(),zs=class{constructor(){this._finishedLogRecords=[],this._stopped=!1}export(r,o){if(this._stopped)return o({code:Rf.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedLogRecords.push(...r),o({code:Rf.ExportResultCode.SUCCESS})}shutdown(){return this._stopped=!0,this.reset(),Promise.resolve()}getFinishedLogRecords(){return this._finishedLogRecords}reset(){this._finishedLogRecords=[]}};jo.InMemoryLogRecordExporter=zs});var If=d(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.BatchLogRecordProcessorBase=void 0;var xv=(y(),E(_)),qt=N(),$s=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&&(xv.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)})})}};Go.BatchLogRecordProcessorBase=$s});var Lf=d(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.BatchLogRecordProcessor=void 0;var Iv=If(),Ys=class extends Iv.BatchLogRecordProcessorBase{onShutdown(){}};Ho.BatchLogRecordProcessor=Ys});var wf=d(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.BatchLogRecordProcessor=void 0;var Lv=Lf();Object.defineProperty(Fo,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return Lv.BatchLogRecordProcessor}})});var Mf=d(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});Ko.BatchLogRecordProcessor=void 0;var wv=wf();Object.defineProperty(Ko,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return wv.BatchLogRecordProcessor}})});var Cf=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 Mv=Af();Object.defineProperty(re,"LoggerProvider",{enumerable:!0,get:function(){return Mv.LoggerProvider}});var Cv=Bs();Object.defineProperty(re,"LogRecord",{enumerable:!0,get:function(){return Cv.LogRecord}});var Uv=js();Object.defineProperty(re,"NoopLogRecordProcessor",{enumerable:!0,get:function(){return Uv.NoopLogRecordProcessor}});var Dv=Pf();Object.defineProperty(re,"ConsoleLogRecordExporter",{enumerable:!0,get:function(){return Dv.ConsoleLogRecordExporter}});var Bv=Nf();Object.defineProperty(re,"SimpleLogRecordProcessor",{enumerable:!0,get:function(){return Bv.SimpleLogRecordProcessor}});var Vv=xf();Object.defineProperty(re,"InMemoryLogRecordExporter",{enumerable:!0,get:function(){return Vv.InMemoryLogRecordExporter}});var kv=Mf();Object.defineProperty(re,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return kv.BatchLogRecordProcessor}})});var Xo=d(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.AggregationTemporality=void 0;var qv;(function(i){i[i.DELTA=0]="DELTA",i[i.CUMULATIVE=1]="CUMULATIVE"})(qv=Dr.AggregationTemporality||(Dr.AggregationTemporality={}))});var jt=d(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.DataPointType=void 0;var jv;(function(i){i[i.HISTOGRAM=0]="HISTOGRAM",i[i.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",i[i.GAUGE=2]="GAUGE",i[i.SUM=3]="SUM"})(jv=Br.DataPointType||(Br.DataPointType={}))});var Ne=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 Gv(i){return i!=null}B.isNotNullish=Gv;function Hv(i){let r=Object.keys(i);return r.length===0?"":(r=r.sort(),JSON.stringify(r.map(o=>[o,i[o]])))}B.hashAttributes=Hv;function Fv(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=Fv;var zo=class i extends Error{constructor(r){super(r),Object.setPrototypeOf(this,i.prototype)}};B.TimeoutError=zo;function Kv(i,r){let o,c=new Promise(function(a,t){o=setTimeout(function(){t(new zo("Operation timed out."))},r)});return Promise.race([i,c]).then(u=>(clearTimeout(o),u),u=>{throw clearTimeout(o),u})}B.callWithTimeout=Kv;async function Xv(i){return Promise.all(i.map(async r=>{try{return{status:"fulfilled",value:await r}}catch(o){return{status:"rejected",reason:o}}}))}B.PromiseAllSettled=Xv;function zv(i){return i.status==="rejected"}B.isPromiseAllSettledRejectionResult=zv;function $v(i,r){let o=[];return i.forEach(c=>{o.push(...r(c))}),o}B.FlatMap=$v;function Yv(i,r){if(i.size!==r.size)return!1;for(let o of i)if(!r.has(o))return!1;return!0}B.setEquals=Yv;function Wv(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=Wv;function Jv(i,r){return i.toLowerCase()===r.toLowerCase()}B.equalsCaseInsensitive=Jv});var Gt=d(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.AggregatorKind=void 0;var Qv;(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"})(Qv=Vr.AggregatorKind||(Vr.AggregatorKind={}))});var Uf=d($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});$o.DropAggregator=void 0;var Zv=Gt(),Ws=class{constructor(){this.kind=Zv.AggregatorKind.DROP}createAccumulation(){}merge(r,o){}diff(r,o){}toMetricData(r,o,c,u){}};$o.DropAggregator=Ws});var we=d(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.isValidName=pe.isDescriptorCompatibleWith=pe.createInstrumentDescriptorWithView=pe.createInstrumentDescriptor=pe.InstrumentType=void 0;var Df=(y(),E(_)),eg=Ne(),tg;(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"})(tg=pe.InstrumentType||(pe.InstrumentType={}));function rg(i,r,o){var c,u,a,t;return Bf(i)||Df.diag.warn(`Invalid metric name: "${i}". The metric name should be a ASCII string with a length no greater than 255 characters.`),{name:i,type:r,description:(c=o?.description)!==null&&c!==void 0?c:"",unit:(u=o?.unit)!==null&&u!==void 0?u:"",valueType:(a=o?.valueType)!==null&&a!==void 0?a:Df.ValueType.DOUBLE,advice:(t=o?.advice)!==null&&t!==void 0?t:{}}}pe.createInstrumentDescriptor=rg;function ng(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=ng;function og(i,r){return(0,eg.equalsCaseInsensitive)(i.name,r.name)&&i.unit===r.unit&&i.type===r.type&&i.valueType===r.valueType}pe.isDescriptorCompatibleWith=og;var ig=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Bf(i){return i.match(ig)!=null}pe.isValidName=Bf});var Vf=d(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.HistogramAggregator=Ft.HistogramAccumulation=void 0;var ug=Gt(),sg=jt(),Js=we(),ag=Ne();function cg(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=cg(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,ag.binarySearchLB)(this._boundaries,r);this._current.buckets.counts[o+1]+=1}setStartTime(r){this.startTime=r}toPointValue(){return this._current}};Ft.HistogramAccumulation=Ht;var Qs=class{constructor(r,o){this._boundaries=r,this._recordMinMax=o,this.kind=ug.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:sg.DataPointType.HISTOGRAM,dataPoints:c.map(([a,t])=>{let e=t.toPointValue(),n=r.type===Js.InstrumentType.UP_DOWN_COUNTER||r.type===Js.InstrumentType.OBSERVABLE_GAUGE||r.type===Js.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=Qs});var kf=d(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.Buckets=void 0;var Zs=class i{constructor(r=new ea,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))}};Yo.Buckets=Zs;var ea=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 ra=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 lg=2146435072,pg=1048575,ta=1023;oe.MIN_NORMAL_EXPONENT=-ta+1;oe.MAX_NORMAL_EXPONENT=ta;oe.MIN_VALUE=Math.pow(2,-1022);function fg(i){let r=new DataView(new ArrayBuffer(8));return r.setFloat64(0,i),((r.getUint32(0)&lg)>>20)-ta}oe.getNormalBase2=fg;function dg(i){let r=new DataView(new ArrayBuffer(8));r.setFloat64(0,i);let o=r.getUint32(0),c=r.getUint32(4);return(o&pg)*Math.pow(2,32)+c}oe.getSignificand=dg});var Wo=d(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.nextGreaterSquare=Kt.ldexp=void 0;function hg(i,r){return i===0||i===Number.POSITIVE_INFINITY||i===Number.NEGATIVE_INFINITY||Number.isNaN(i)?i:i*Math.pow(2,r)}Kt.ldexp=hg;function mg(i){return i--,i|=i>>1,i|=i>>2,i|=i>>4,i|=i>>8,i|=i>>16,i++,i}Kt.nextGreaterSquare=mg});var Qo=d(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});Jo.MappingError=void 0;var na=class extends Error{};Jo.MappingError=na});var jf=d(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.ExponentMapping=void 0;var Xt=ra(),_g=Wo(),qf=Qo(),oa=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 qf.MappingError(`underflow: ${r} is < minimum lower boundary: ${o}`);let c=this._maxNormalLowerBoundaryIndex();if(r>c)throw new qf.MappingError(`overflow: ${r} is > maximum lower boundary: ${c}`);return _g.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))}};Zo.ExponentMapping=oa});var Ff=d(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.LogarithmMapping=void 0;var zt=ra(),Gf=Wo(),Hf=Qo(),ia=class{constructor(r){this._scale=r,this._scaleFactor=Gf.ldexp(Math.LOG2E,r),this._inverseFactor=Gf.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 Hf.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 Hf.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}};ei.LogarithmMapping=ia});var zf=d(ti=>{"use strict";Object.defineProperty(ti,"__esModule",{value:!0});ti.getMapping=void 0;var yg=jf(),Eg=Ff(),vg=Qo(),Kf=-10,Xf=20,gg=Array.from({length:31},(i,r)=>r>10?new Eg.LogarithmMapping(r-10):new yg.ExponentMapping(r-10));function Tg(i){if(i>Xf||i<Kf)throw new vg.MappingError(`expected scale >= ${Kf} && <= ${Xf}, got: ${i}`);return gg[i+10]}ti.getMapping=Tg});var Wf=d(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.ExponentialHistogramAggregator=Yt.ExponentialHistogramAccumulation=void 0;var Sg=Gt(),bg=jt(),Og=(y(),E(_)),ua=we(),$f=kf(),Yf=zf(),Ag=Wo(),$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))}},Pg=20,Ng=160,sa=2,ri=class i{constructor(r=r,o=Ng,c=!0,u=0,a=0,t=0,e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,s=new $f.Buckets,l=new $f.Buckets,h=(0,Yf.getMapping)(Pg)){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<sa&&(Og.diag.warn(`Exponential Histogram Max Size set to ${this._maxSize}, changing to the minimum size of: ${sa}`),this._maxSize=sa)}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,Ag.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,Yf.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=ri;var aa=class{constructor(r,o){this._maxSize=r,this._recordMinMax=o,this.kind=Sg.AggregatorKind.EXPONENTIAL_HISTOGRAM}createAccumulation(r){return new ri(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:bg.DataPointType.EXPONENTIAL_HISTOGRAM,dataPoints:c.map(([a,t])=>{let e=t.toPointValue(),n=r.type===ua.InstrumentType.UP_DOWN_COUNTER||r.type===ua.InstrumentType.OBSERVABLE_GAUGE||r.type===ua.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=aa});var Jf=d(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.LastValueAggregator=Jt.LastValueAccumulation=void 0;var Rg=Gt(),kr=N(),xg=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 ca=class{constructor(){this.kind=Rg.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:xg.DataPointType.GAUGE,dataPoints:c.map(([a,t])=>({attributes:a,startTime:t.startTime,endTime:u,value:t.toPointValue()}))}}};Jt.LastValueAggregator=ca});var Qf=d(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.SumAggregator=Qt.SumAccumulation=void 0;var Ig=Gt(),Lg=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 la=class{constructor(r){this.monotonic=r,this.kind=Ig.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:Lg.DataPointType.SUM,dataPoints:c.map(([a,t])=>({attributes:a,startTime:t.startTime,endTime:u,value:t.toPointValue()})),isMonotonic:this.monotonic}}};Qt.SumAggregator=la});var Zf=d(ve=>{"use strict";var wg=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)&&wg(r,i,o)};Object.defineProperty(ve,"__esModule",{value:!0});qr(Uf(),ve);qr(Vf(),ve);qr(Wf(),ve);qr(Jf(),ve);qr(Qf(),ve)});var ui=d(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.DefaultAggregation=z.ExponentialHistogramAggregation=z.ExplicitBucketHistogramAggregation=z.HistogramAggregation=z.LastValueAggregation=z.SumAggregation=z.DropAggregation=z.Aggregation=void 0;var Mg=(y(),E(_)),_t=Zf(),Me=we(),Re=class{static Drop(){return ed}static Sum(){return td}static LastValue(){return rd}static Histogram(){return nd}static ExponentialHistogram(){return Cg}static Default(){return Ug}};z.Aggregation=Re;var jr=class i extends Re{createAggregator(r){return i.DEFAULT_INSTANCE}};z.DropAggregation=jr;jr.DEFAULT_INSTANCE=new _t.DropAggregator;var Zt=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=Zt;Zt.MONOTONIC_INSTANCE=new _t.SumAggregator(!0);Zt.NON_MONOTONIC_INSTANCE=new _t.SumAggregator(!1);var Gr=class i extends Re{createAggregator(r){return i.DEFAULT_INSTANCE}};z.LastValueAggregation=Gr;Gr.DEFAULT_INSTANCE=new _t.LastValueAggregator;var Hr=class i extends Re{createAggregator(r){return i.DEFAULT_INSTANCE}};z.HistogramAggregation=Hr;Hr.DEFAULT_INSTANCE=new _t.HistogramAggregator([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0);var ni=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=ni;var oi=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=oi;var ii=class extends Re{_resolve(r){switch(r.type){case Me.InstrumentType.COUNTER:case Me.InstrumentType.UP_DOWN_COUNTER:case Me.InstrumentType.OBSERVABLE_COUNTER:case Me.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:return td;case Me.InstrumentType.OBSERVABLE_GAUGE:return rd;case Me.InstrumentType.HISTOGRAM:return r.advice.explicitBucketBoundaries?new ni(r.advice.explicitBucketBoundaries):nd}return Mg.diag.warn(`Unable to recognize instrument type: ${r.type}`),ed}createAggregator(r){return this._resolve(r).createAggregator(r)}};z.DefaultAggregation=ii;var ed=new jr,td=new Zt,rd=new Gr,nd=new Hr,Cg=new oi,Ug=new ii});var pa=d(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=er.DEFAULT_AGGREGATION_SELECTOR=void 0;var Dg=ui(),Bg=Xo(),Vg=i=>Dg.Aggregation.Default();er.DEFAULT_AGGREGATION_SELECTOR=Vg;var kg=i=>Bg.AggregationTemporality.CUMULATIVE;er.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=kg});var da=d(ai=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0});ai.MetricReader=void 0;var od=(y(),E(_)),si=Ne(),id=pa(),fa=class{constructor(r){var o,c,u;this._shutdown=!1,this._aggregationSelector=(o=r?.aggregationSelector)!==null&&o!==void 0?o:id.DEFAULT_AGGREGATION_SELECTOR,this._aggregationTemporalitySelector=(c=r?.aggregationTemporalitySelector)!==null&&c!==void 0?c:id.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR,this._metricProducers=(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,si.FlatMap)(c,e=>e.errors)),a=o.resourceMetrics.resource,t=o.resourceMetrics.scopeMetrics.concat((0,si.FlatMap)(c,e=>e.resourceMetrics.scopeMetrics));return{resourceMetrics:{resource:a,scopeMetrics:t},errors:u}}async shutdown(r){if(this._shutdown){od.diag.error("Cannot call shutdown twice.");return}r?.timeoutMillis==null?await this.onShutdown():await(0,si.callWithTimeout)(this.onShutdown(),r.timeoutMillis),this._shutdown=!0}async forceFlush(r){if(this._shutdown){od.diag.warn("Cannot forceFlush on already shutdown MetricReader.");return}if(r?.timeoutMillis==null){await this.onForceFlush();return}await(0,si.callWithTimeout)(this.onForceFlush(),r.timeoutMillis)}};ai.MetricReader=fa});var ad=d(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.PeriodicExportingMetricReader=void 0;var ud=(y(),E(_)),ci=N(),qg=da(),sd=Ne(),jg=(y(),E(_)),ha=class extends qg.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,sd.callWithTimeout)(this._doRun(),this._exportTimeout)}catch(r){if(r instanceof sd.TimeoutError){ud.diag.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout);return}(0,ci.globalErrorHandler)(r)}}async _doRun(){var r,o;let{resourceMetrics:c,errors:u}=await this.collect({timeoutMillis:this._exportTimeout});u.length>0&&ud.diag.error("PeriodicExportingMetricReader: metrics collection errors",...u);let a=async()=>{let t=await ci.internal._export(this._exporter,c);if(t.code!==ci.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=>jg.diag.debug("Error while resolving async portion of resource: ",t)):await a()}onInitialized(){this._interval=setInterval(()=>{this._runOnce()},this._exportInterval),(0,ci.unrefTimer)(this._interval)}async onForceFlush(){await this._runOnce(),await this._exporter.forceFlush()}async onShutdown(){this._interval&&clearInterval(this._interval),await this._exporter.shutdown()}};li.PeriodicExportingMetricReader=ha});var ld=d(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.InMemoryMetricExporter=void 0;var cd=N(),ma=class{constructor(r){this._shutdown=!1,this._metrics=[],this._aggregationTemporality=r}export(r,o){if(this._shutdown){setTimeout(()=>o({code:cd.ExportResultCode.FAILED}),0);return}this._metrics.push(r),setTimeout(()=>o({code:cd.ExportResultCode.SUCCESS}),0)}getMetrics(){return this._metrics}forceFlush(){return Promise.resolve()}reset(){this._metrics=[]}selectAggregationTemporality(r){return this._aggregationTemporality}shutdown(){return this._shutdown=!0,Promise.resolve()}};pi.InMemoryMetricExporter=ma});var fd=d(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.ConsoleMetricExporter=void 0;var pd=N(),Gg=pa(),_a=class i{constructor(r){var o;this._shutdown=!1,this._temporalitySelector=(o=r?.temporalitySelector)!==null&&o!==void 0?o:Gg.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR}export(r,o){if(this._shutdown){setImmediate(o,{code:pd.ExportResultCode.FAILED});return}return i._sendMetrics(r,o)}forceFlush(){return Promise.resolve()}selectAggregationTemporality(r){return this._temporalitySelector(r)}shutdown(){return this._shutdown=!0,Promise.resolve()}static _sendMetrics(r,o){for(let c of r.scopeMetrics)for(let u of c.metrics)console.dir({descriptor:u.descriptor,dataPointType:u.dataPointType,dataPoints:u.dataPoints});o({code:pd.ExportResultCode.SUCCESS})}};fi.ConsoleMetricExporter=_a});var dd=d(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.ViewRegistry=void 0;var ya=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))}};di.ViewRegistry=ya});var hi=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 tr=(y(),E(_)),Hg=N(),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,Hg.millisToHrTime)(Date.now()))}};F.SyncInstrument=rr;var Ea=class extends rr{add(r,o,c){this._record(r,o,c)}};F.UpDownCounterInstrument=Ea;var va=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)}};F.CounterInstrument=va;var ga=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)}};F.HistogramInstrument=ga;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)}};F.ObservableInstrument=yt;var Ta=class extends yt{};F.ObservableCounterInstrument=Ta;var Sa=class extends yt{};F.ObservableGaugeInstrument=Sa;var ba=class extends yt{};F.ObservableUpDownCounterInstrument=ba;function Fg(i){return i instanceof yt}F.isObservableInstrument=Fg});var hd=d(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.Meter=void 0;var de=we(),nr=hi(),Oa=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)}};mi.Meter=Oa});var Pa=d(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.MetricStorage=void 0;var Kg=we(),Aa=class{constructor(r){this._instrumentDescriptor=r}getInstrumentDescriptor(){return this._instrumentDescriptor}updateDescription(r){this._instrumentDescriptor=(0,Kg.createInstrumentDescriptor)(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:r,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})}};_i.MetricStorage=Aa});var Fr=d(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.AttributeHashMap=or.HashMap=void 0;var Xg=Ne(),yi=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=yi;var Na=class extends yi{constructor(){super(Xg.hashAttributes)}};or.AttributeHashMap=Na});var Ia=d(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.DeltaMetricProcessor=void 0;var Ra=Fr(),xa=class{constructor(r){this._aggregator=r,this._activeCollectionStorage=new Ra.AttributeHashMap,this._cumulativeMemoStorage=new Ra.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 Ra.AttributeHashMap,r}};Ei.DeltaMetricProcessor=xa});var wa=d(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.TemporalMetricProcessor=void 0;var zg=Xo(),$g=Fr(),La=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===zg.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=Yg(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 $g.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}};vi.TemporalMetricProcessor=La;function Yg(i){return Array.from(i.entries())}});var md=d(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.AsyncMetricStorage=void 0;var Wg=Pa(),Jg=Ia(),Qg=wa(),Zg=Fr(),Ma=class extends Wg.MetricStorage{constructor(r,o,c,u){super(r),this._attributesProcessor=c,this._deltaMetricStorage=new Jg.DeltaMetricProcessor(o),this._temporalMetricStorage=new Qg.TemporalMetricProcessor(o,u)}record(r,o){let c=new Zg.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)}};gi.AsyncMetricStorage=Ma});var gd=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 eT(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}'
|
|
@@ -17,4 +17,4 @@ var km=Object.create;var au=Object.defineProperty;var qm=Object.getOwnPropertyDe
|
|
|
17
17
|
To resolve the conflict:`,(0,Ti.getConflictResolutionRecipe)(a,r))),c=u):Td.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,Ti.getIncompatibilityDetails)(a,r),`To resolve the conflict:
|
|
20
|
-
`,(0,Ti.getConflictResolutionRecipe)(a,r))}return c}};Si.MetricStorageRegistry=Ca});var bd=d(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.MultiMetricStorage=void 0;var Ua=class{constructor(r){this._backingStorages=r}record(r,o,c,u){this._backingStorages.forEach(a=>{a.record(r,o,c,u)})}};bi.MultiMetricStorage=Ua});var Ad=d(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.BatchObservableResultImpl=ur.ObservableResultImpl=void 0;var ir=(y(),E(_)),Od=Fr(),nT=hi(),Da=class{constructor(r,o){this._instrumentName=r,this._valueType=o,this._buffer=new Od.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=Da;var Ba=class{constructor(){this._buffer=new Map}observe(r,o,c={}){if(!(0,nT.isObservableInstrument)(r))return;let u=this._buffer.get(r);if(u==null&&(u=new Od.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=Ba});var Rd=d(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.ObservableRegistry=void 0;var oT=(y(),E(_)),Pd=hi(),Nd=Ad(),Kr=Ne(),Va=class{constructor(){this._callbacks=[],this._batchCallbacks=[]}addCallback(r,o){this._findCallback(r,o)>=0||this._callbacks.push({callback:r,instrument:o})}removeCallback(r,o){let c=this._findCallback(r,o);c<0||this._callbacks.splice(c,1)}addBatchCallback(r,o){let c=new Set(o.filter(Pd.isObservableInstrument));if(c.size===0){oT.diag.error("BatchObservableCallback is not associated with valid instruments",o);return}this._findBatchCallback(r,c)>=0||this._batchCallbacks.push({callback:r,instruments:c})}removeBatchCallback(r,o){let c=new Set(o.filter(Pd.isObservableInstrument)),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 Nd.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 Nd.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))}};Oi.ObservableRegistry=Va});var xd=d(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.SyncMetricStorage=void 0;var iT=Pa(),uT=Ia(),sT=wa(),ka=class extends iT.MetricStorage{constructor(r,o,c,u){super(r),this._attributesProcessor=c,this._deltaMetricStorage=new uT.DeltaMetricProcessor(o),this._temporalMetricStorage=new sT.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)}};Ai.SyncMetricStorage=ka});var ja=d(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.FilteringAttributesProcessor=Ge.NoopAttributesProcessor=Ge.AttributesProcessor=void 0;var Xr=class{static Noop(){return aT}};Ge.AttributesProcessor=Xr;var Pi=class extends Xr{process(r,o){return r}};Ge.NoopAttributesProcessor=Pi;var qa=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=qa;var aT=new Pi});var Id=d(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.MeterSharedState=void 0;var cT=we(),lT=hd(),pT=Ne(),fT=md(),dT=Sd(),hT=bd(),mT=Rd(),_T=xd(),yT=ja(),Ga=class{constructor(r,o){this._meterProviderSharedState=r,this._instrumentationScope=o,this.metricStorageRegistry=new dT.MetricStorageRegistry,this.observableRegistry=new mT.ObservableRegistry,this.meter=new lT.Meter(this)}registerMetricStorage(r){let o=this._registerMetricStorage(r,_T.SyncMetricStorage);return o.length===1?o[0]:new hT.MultiMetricStorage(o)}registerAsyncMetricStorage(r){return this._registerMetricStorage(r,fT.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(pT.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,cT.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,yT.AttributesProcessor.Noop(),[e]);return this.metricStorageRegistry.registerForCollector(e,h),h});u=u.concat(t)}return u}};Ni.MeterSharedState=Ga});var Ld=d(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.MeterProviderSharedState=void 0;var ET=Ne(),vT=dd(),gT=Id(),Ha=class{constructor(r){this.resource=r,this.viewRegistry=new vT.ViewRegistry,this.metricCollectors=[],this.meterSharedStates=new Map}getMeterSharedState(r){let o=(0,ET.instrumentationScopeId)(r),c=this.meterSharedStates.get(o);return c==null&&(c=new gT.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}};Ri.MeterProviderSharedState=Ha});var wd=d(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});xi.MetricCollector=void 0;var TT=P(),Fa=class{constructor(r,o){this._sharedState=r,this._metricReader=o}async collect(r){let o=(0,TT.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)}};xi.MetricCollector=Fa});var Cd=d(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.MeterProvider=void 0;var Ii=(y(),E(_)),Md=pt(),ST=Ld(),bT=wd(),Ka=class{constructor(r){var o;this._shutdown=!1;let c=Md.Resource.default().merge((o=r?.resource)!==null&&o!==void 0?o:Md.Resource.empty());if(this._sharedState=new ST.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?(Ii.diag.warn("A shutdown MeterProvider cannot provide a Meter"),(0,Ii.createNoopMeter)()):this._sharedState.getMeterSharedState({name:r,version:o,schemaUrl:c.schemaUrl}).meter}addMetricReader(r){let o=new bT.MetricCollector(this._sharedState,r);r.setMetricProducer(o),this._sharedState.metricCollectors.push(o)}async shutdown(r){if(this._shutdown){Ii.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){Ii.diag.warn("invalid attempt to force flush after MeterProvider shutdown");return}await Promise.all(this._sharedState.metricCollectors.map(o=>o.forceFlush(r)))}};Li.MeterProvider=Ka});var wi=d(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.ExactPredicate=sr.PatternPredicate=void 0;var OT=/[\^$\\.+?()[\]{}|]/g,Xa=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(OT,"\\$&").replace("*",".*")}$`}static hasWildcard(r){return r.includes("*")}};sr.PatternPredicate=Xa;var za=class{constructor(r){this._matchAll=r===void 0,this._pattern=r}match(r){return!!(this._matchAll||r===this._pattern)}};sr.ExactPredicate=za});var Dd=d(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});Mi.InstrumentSelector=void 0;var Ud=wi(),$a=class{constructor(r){var o;this._nameFilter=new Ud.PatternPredicate((o=r?.name)!==null&&o!==void 0?o:"*"),this._type=r?.type,this._unitFilter=new Ud.ExactPredicate(r?.unit)}getType(){return this._type}getNameFilter(){return this._nameFilter}getUnitFilter(){return this._unitFilter}};Mi.InstrumentSelector=$a});var Bd=d(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.MeterSelector=void 0;var Ya=wi(),Wa=class{constructor(r){this._nameFilter=new Ya.ExactPredicate(r?.name),this._versionFilter=new Ya.ExactPredicate(r?.version),this._schemaUrlFilter=new Ya.ExactPredicate(r?.schemaUrl)}getNameFilter(){return this._nameFilter}getVersionFilter(){return this._versionFilter}getSchemaUrlFilter(){return this._schemaUrlFilter}};Ci.MeterSelector=Wa});var kd=d(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.View=void 0;var AT=wi(),Vd=ja(),PT=Dd(),NT=Bd(),RT=ui();function xT(i){return i.instrumentName==null&&i.instrumentType==null&&i.instrumentUnit==null&&i.meterName==null&&i.meterVersion==null&&i.meterSchemaUrl==null}var Ja=class{constructor(r){var o;if(xT(r))throw new Error("Cannot create view with no selector arguments supplied");if(r.name!=null&&(r?.instrumentName==null||AT.PatternPredicate.hasWildcard(r.instrumentName)))throw new Error("Views with a specified name must be declared with an instrument selector that selects at most one instrument per meter.");r.attributeKeys!=null?this.attributesProcessor=new Vd.FilteringAttributesProcessor(r.attributeKeys):this.attributesProcessor=Vd.AttributesProcessor.Noop(),this.name=r.name,this.description=r.description,this.aggregation=(o=r.aggregation)!==null&&o!==void 0?o:RT.Aggregation.Default(),this.instrumentSelector=new PT.InstrumentSelector({name:r.instrumentName,type:r.instrumentType,unit:r.instrumentUnit}),this.meterSelector=new NT.MeterSelector({name:r.meterName,version:r.meterVersion,schemaUrl:r.meterSchemaUrl})}};Ui.View=Ja});var qd=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 IT=Xo();Object.defineProperty(O,"AggregationTemporality",{enumerable:!0,get:function(){return IT.AggregationTemporality}});var LT=jt();Object.defineProperty(O,"DataPointType",{enumerable:!0,get:function(){return LT.DataPointType}});var wT=da();Object.defineProperty(O,"MetricReader",{enumerable:!0,get:function(){return wT.MetricReader}});var MT=ad();Object.defineProperty(O,"PeriodicExportingMetricReader",{enumerable:!0,get:function(){return MT.PeriodicExportingMetricReader}});var CT=ld();Object.defineProperty(O,"InMemoryMetricExporter",{enumerable:!0,get:function(){return CT.InMemoryMetricExporter}});var UT=fd();Object.defineProperty(O,"ConsoleMetricExporter",{enumerable:!0,get:function(){return UT.ConsoleMetricExporter}});var DT=we();Object.defineProperty(O,"InstrumentType",{enumerable:!0,get:function(){return DT.InstrumentType}});var BT=Cd();Object.defineProperty(O,"MeterProvider",{enumerable:!0,get:function(){return BT.MeterProvider}});var He=ui();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 VT=kd();Object.defineProperty(O,"View",{enumerable:!0,get:function(){return VT.View}});var kT=Ne();Object.defineProperty(O,"TimeoutError",{enumerable:!0,get:function(){return kT.TimeoutError}})});var jd=d(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.AbstractAsyncHooksContextManager=void 0;var qT=X("events"),jT=["addListener","on","once","prependListener","prependOnceListener"],Qa=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(r,o){return o instanceof qT.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),jT.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]}};Di.AbstractAsyncHooksContextManager=Qa});var Gd=d(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.AsyncLocalStorageContextManager=void 0;var GT=(y(),E(_)),HT=X("async_hooks"),FT=jd(),Za=class extends FT.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new HT.AsyncLocalStorage}active(){var r;return(r=this._asyncLocalStorage.getStore())!==null&&r!==void 0?r:GT.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}};Bi.AsyncLocalStorageContextManager=Za});var oc=d(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.toAnyValue=Fe.toKeyValue=Fe.toAttributes=void 0;function zT(i){return Object.keys(i).map(r=>rc(r,i[r]))}Fe.toAttributes=zT;function rc(i,r){return{key:i,value:nc(r)}}Fe.toKeyValue=rc;function nc(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(nc)}}:r==="object"&&i!=null?{kvlistValue:{values:Object.entries(i).map(([o,c])=>rc(o,c))}}:{}}Fe.toAnyValue=nc});var $d=d(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.toOtlpSpanEvent=Ke.toOtlpLink=Ke.sdkSpanToOtlpSpan=void 0;var ic=oc();function $T(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,ic.toAttributes)(i.attributes),droppedAttributesCount:i.droppedAttributesCount,events:i.events.map(a=>zd(a,r)),droppedEventsCount:i.droppedEventsCount,status:{code:u.code,message:u.message},links:i.links.map(a=>Xd(a,r)),droppedLinksCount:i.droppedLinksCount}}Ke.sdkSpanToOtlpSpan=$T;function Xd(i,r){var o;return{attributes:i.attributes?(0,ic.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=Xd;function zd(i,r){return{attributes:i.attributes?(0,ic.toAttributes)(i.attributes):[],name:i.name,timeUnixNano:r.encodeHrTime(i.time),droppedAttributesCount:i.droppedAttributesCount||0}}Ke.toOtlpSpanEvent=zd});var Zd=d(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.getOtlpEncoder=he.encodeAsString=he.encodeAsLongBits=he.toLongBits=he.hrTimeToNanos=void 0;var qi=P(),YT=BigInt(1e9);function uc(i){return BigInt(i[0])*YT+BigInt(i[1])}he.hrTimeToNanos=uc;function Wd(i){let r=Number(BigInt.asUintN(32,i)),o=Number(BigInt.asUintN(32,i>>BigInt(32)));return{low:r,high:o}}he.toLongBits=Wd;function sc(i){let r=uc(i);return Wd(r)}he.encodeAsLongBits=sc;function Jd(i){return uc(i).toString()}he.encodeAsString=Jd;var WT=typeof BigInt<"u"?Jd:qi.hrTimeToNanoseconds;function Yd(i){return i}function Qd(i){if(i!==void 0)return(0,qi.hexToBase64)(i)}var JT={encodeHrTime:sc,encodeSpanContext:qi.hexToBase64,encodeOptionalSpanContext:Qd};function QT(i){var r,o;if(i===void 0)return JT;let c=(r=i.useLongBits)!==null&&r!==void 0?r:!0,u=(o=i.useHex)!==null&&o!==void 0?o:!1;return{encodeHrTime:c?sc:WT,encodeSpanContext:u?Yd:qi.hexToBase64,encodeOptionalSpanContext:u?Yd:Qd}}he.getOtlpEncoder=QT});var ac=d(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.createExportTraceServiceRequest=void 0;var ZT=oc(),eS=$d(),tS=Zd();function rS(i,r){let o=(0,tS.getOtlpEncoder)(r);return{resourceSpans:oS(i,o)}}ji.createExportTraceServiceRequest=rS;function nS(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 oS(i,r){let o=nS(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,eS.sdkSpanToOtlpSpan)(L,r));n.push({scope:{name:R,version:N},spans:b,schemaUrl:I})}l=s.next()}let h={resource:{attributes:(0,ZT.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 cc=(y(),E(_)),eh=P(),th=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 iS(i={}){let r={};return Object.entries(i).forEach(([o,c])=>{typeof c<"u"?r[o]=String(c):cc.diag.warn(`Header "${o}" has wrong value and will be ignored`)}),r}V.parseHeaders=iS;function uS(i,r){return i.endsWith("/")||(i=i+"/"),i+r}V.appendResourcePathToUrl=uS;function sS(i){try{let r=new URL(i);return r.pathname===""&&(r.pathname=r.pathname+"/"),r.toString()}catch{return cc.diag.warn(`Could not parse export URL: '${i}'`),i}}V.appendRootPathToUrlIfNeeded=sS;function aS(i){return typeof i=="number"?i<=0?lc(i,th):i:cS()}V.configureExporterTimeout=aS;function cS(){var i;let r=Number((i=(0,eh.getEnv)().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)!==null&&i!==void 0?i:(0,eh.getEnv)().OTEL_EXPORTER_OTLP_TIMEOUT);return r<=0?lc(r,th):r}function lc(i,r){return cc.diag.warn("Timeout must be greater than 0",i),r}V.invalidTimeout=lc;function lS(i){return[429,502,503,504].includes(i)}V.isExportRetryable=lS;function pS(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=pS});var Yr=d(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.OTLPExporterBase=void 0;var rh=(y(),E(_)),$r=P(),fS=Et(),pc=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,fS.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{rh.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 rh.diag.debug("shutdown started"),this.onShutdown(),this.forceFlush()}};Gi.OTLPExporterBase=pc});var dc=d(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.CompressionAlgorithm=void 0;var mS;(function(i){i.NONE="none",i.GZIP="gzip"})(mS=Wr.CompressionAlgorithm||(Wr.CompressionAlgorithm={}))});var Ki=d(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.OTLPExporterError=void 0;var hc=class extends Error{constructor(r,o,c){super(r),this.name="OTLPExporterError",this.data=c,this.code=o}};Fi.OTLPExporterError=hc});var _c=d(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.configureCompression=Xe.createHttpAgent=Xe.sendWithHttp=void 0;var uh=X("url"),sh=X("http"),ah=X("https"),_S=X("zlib"),yS=X("stream"),mc=(y(),E(_)),Xi=dc(),ih=P(),Jr=Ki(),pr=Et();function ES(i,r,o,c,u){let a=i.timeoutMillis,t=new uh.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:"?sh.request:ah.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)mc.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 Xi.CompressionAlgorithm.GZIP:{s.setHeader("Content-Encoding","gzip"),vS(r).on("error",u).pipe(_S.createGzip()).on("error",u).pipe(s);break}default:s.end(r);break}};N()}Xe.sendWithHttp=ES;function vS(i){let r=new yS.Readable;return r.push(i),r.push(null),r}function gS(i){if(i.httpAgentOptions&&i.keepAlive===!1){mc.diag.warn("httpAgentOptions is used only when keepAlive is true");return}if(!(i.keepAlive===!1||!i.url))try{let o=new uh.URL(i.url).protocol==="http:"?sh.Agent:ah.Agent;return new o(Object.assign({keepAlive:!0},i.httpAgentOptions))}catch(r){mc.diag.error(`collector exporter failed to create http agent. err: ${r.message}`);return}}Xe.createHttpAgent=gS;function TS(i){return i||(((0,ih.getEnv)().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION||(0,ih.getEnv)().OTEL_EXPORTER_OTLP_COMPRESSION)===Xi.CompressionAlgorithm.GZIP?Xi.CompressionAlgorithm.GZIP:Xi.CompressionAlgorithm.NONE)}Xe.configureCompression=TS});var ph=d(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.OTLPExporterNodeBase=void 0;var SS=Yr(),bS=Et(),yc=_c(),ch=(y(),E(_)),lh=P(),Ec=class extends SS.OTLPExporterBase{constructor(r={}){super(r),this.DEFAULT_HEADERS={},r.metadata&&ch.diag.warn("Metadata cannot be set when using http"),this.headers=Object.assign(this.DEFAULT_HEADERS,(0,bS.parseHeaders)(r.headers),lh.baggageUtils.parseKeyPairsIntoRecord((0,lh.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)),this.agent=(0,yc.createHttpAgent)(r),this.compression=(0,yc.configureCompression)(r.compression)}onInit(r){}send(r,o,c){if(this._shutdownOnce.isCalled){ch.diag.debug("Shutdown already started. Cannot send objects");return}let u=this.convert(r),a=new Promise((e,n)=>{(0,yc.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(){}};zi.OTLPExporterNodeBase=Ec});var fh=d(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.CompressionAlgorithm=me.configureCompression=me.createHttpAgent=me.sendWithHttp=me.OTLPExporterNodeBase=void 0;var OS=ph();Object.defineProperty(me,"OTLPExporterNodeBase",{enumerable:!0,get:function(){return OS.OTLPExporterNodeBase}});var vc=_c();Object.defineProperty(me,"sendWithHttp",{enumerable:!0,get:function(){return vc.sendWithHttp}});Object.defineProperty(me,"createHttpAgent",{enumerable:!0,get:function(){return vc.createHttpAgent}});Object.defineProperty(me,"configureCompression",{enumerable:!0,get:function(){return vc.configureCompression}});var AS=dc();Object.defineProperty(me,"CompressionAlgorithm",{enumerable:!0,get:function(){return AS.CompressionAlgorithm}})});var gc=d(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.sendWithXhr=dr.sendWithBeacon=void 0;var dh=(y(),E(_)),Qr=Ki(),fr=Et();function PS(i,r,o,c,u){if(navigator.sendBeacon(r,new Blob([i],o)))dh.diag.debug("sendBeacon - can send",i),c();else{let a=new Qr.OTLPExporterError(`sendBeacon - cannot send ${i}`);u(a)}}dr.sendWithBeacon=PS;function NS(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)dh.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=NS});var mh=d(Yi=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.OTLPExporterBrowserBase=void 0;var RS=Yr(),xS=Et(),hh=gc(),IS=(y(),E(_)),$i=P(),Tc=class extends RS.OTLPExporterBase{constructor(r={}){super(r),this._useXHR=!1,this._useXHR=!!r.headers||typeof navigator.sendBeacon!="function",this._useXHR?this._headers=Object.assign({},(0,xS.parseHeaders)(r.headers),$i.baggageUtils.parseKeyPairsIntoRecord((0,$i.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)):this._headers={}}onInit(){$i._globalThis.addEventListener("unload",this.shutdown)}onShutdown(){$i._globalThis.removeEventListener("unload",this.shutdown)}send(r,o,c){if(this._shutdownOnce.isCalled){IS.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,hh.sendWithXhr)(a,this.url,this._headers,this.timeoutMillis,n,s):(0,hh.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)}};Yi.OTLPExporterBrowserBase=Tc});var _h=d(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.sendWithXhr=hr.OTLPExporterBrowserBase=void 0;var LS=mh();Object.defineProperty(hr,"OTLPExporterBrowserBase",{enumerable:!0,get:function(){return LS.OTLPExporterBrowserBase}});var wS=gc();Object.defineProperty(hr,"sendWithXhr",{enumerable:!0,get:function(){return wS.sendWithXhr}})});var Eh=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=fh();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 yh=_h();Object.defineProperty(ne,"OTLPExporterBrowserBase",{enumerable:!0,get:function(){return yh.OTLPExporterBrowserBase}});Object.defineProperty(ne,"sendWithXhr",{enumerable:!0,get:function(){return yh.sendWithXhr}})});var Wi=d(q=>{"use strict";var MS=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]}),CS=q&&q.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&MS(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;CS(Eh(),q);var US=Yr();Object.defineProperty(q,"OTLPExporterBase",{enumerable:!0,get:function(){return US.OTLPExporterBase}});var DS=Ki();Object.defineProperty(q,"OTLPExporterError",{enumerable:!0,get:function(){return DS.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 gh=d((hN,vh)=>{"use strict";vh.exports=BS;function BS(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 Oh=d(bh=>{"use strict";var Ji=bh;Ji.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 mr=new Array(64),Sh=new Array(123);for(ge=0;ge<64;)Sh[mr[ge]=ge<26?ge+65:ge<52?ge+71:ge<62?ge-4:ge-59|43]=ge++;var ge;Ji.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++]=mr[s>>2],n=(s&3)<<4,e=1;break;case 1:a[t++]=mr[n|s>>4],n=(s&15)<<2,e=2;break;case 2:a[t++]=mr[n|s>>6],a[t++]=mr[s&63],e=0;break}t>8191&&((u||(u=[])).push(String.fromCharCode.apply(String,a)),t=0)}return e&&(a[t++]=mr[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 Th="invalid encoding";Ji.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=Sh[n])===void 0)throw Error(Th);switch(a){case 0:t=n,a=1;break;case 1:o[c++]=t<<2|(n&48)>>4,t=n,a=2;break;case 2:o[c++]=(t&15)<<4|(n&60)>>2,t=n,a=3;break;case 3:o[c++]=(t&3)<<6|n,a=0;break}}if(a===1)throw Error(Th);return c-u};Ji.test=function(r){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r)}});var Ph=d((_N,Ah)=>{"use strict";Ah.exports=Qi;function Qi(){this._listeners={}}Qi.prototype.on=function(r,o,c){return(this._listeners[r]||(this._listeners[r]=[])).push({fn:o,ctx:c||this}),this};Qi.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};Qi.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 Mh=d((yN,wh)=>{"use strict";wh.exports=Nh(Nh);function Nh(i){return typeof Float32Array<"u"?function(){var r=new Float32Array([-0]),o=new Uint8Array(r.buffer),c=o[3]===128;function 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,Rh),i.writeFloatBE=r.bind(null,xh);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,Ih),i.readFloatBE=o.bind(null,Lh)}(),typeof Float64Array<"u"?function(){var r=new Float64Array([-0]),o=new Uint8Array(r.buffer),c=o[7]===128;function 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,Rh,0,4),i.writeDoubleBE=r.bind(null,xh,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,Ih,0,4),i.readDoubleBE=o.bind(null,Lh,4,0)}(),i}function Rh(i,r,o){r[o]=i&255,r[o+1]=i>>>8&255,r[o+2]=i>>>16&255,r[o+3]=i>>>24}function xh(i,r,o){r[o]=i>>>24,r[o+1]=i>>>16&255,r[o+2]=i>>>8&255,r[o+3]=i&255}function Ih(i,r){return(i[r]|i[r+1]<<8|i[r+2]<<16|i[r+3]<<24)>>>0}function Lh(i,r){return(i[r]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3])>>>0}});var Ch=d((exports,module)=>{"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(i){}return null}});var Dh=d(Uh=>{"use strict";var Sc=Uh;Sc.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};Sc.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))};Sc.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 Vh=d((vN,Bh)=>{"use strict";Bh.exports=VS;function VS(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 qh=d((gN,kh)=>{"use strict";kh.exports=$;var tn=$e();function $(i,r){this.lo=i>>>0,this.hi=r>>>0}var vt=$.zero=new $(0,0);vt.toNumber=function(){return 0};vt.zzEncode=vt.zzDecode=function(){return this};vt.length=function(){return 1};var kS=$.zeroHash="\0\0\0\0\0\0\0\0";$.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 $(c,u)};$.from=function(r){if(typeof r=="number")return $.fromNumber(r);if(tn.isString(r))if(tn.Long)r=tn.Long.fromString(r);else return $.fromNumber(parseInt(r,10));return r.low||r.high?new $(r.low>>>0,r.high>>>0):vt};$.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 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;$.fromHash=function(r){return r===kS?vt:new $((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)};$.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 $e=d(bc=>{"use strict";var v=bc;v.asPromise=gh();v.base64=Oh();v.EventEmitter=Ph();v.float=Mh();v.inquire=Ch();v.utf8=Dh();v.pool=Vh();v.LongBits=qh();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||bc;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 jh(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=jh;v.lcFirst=function(r){return r.charAt(0).toLowerCase()+r.substring(1)};function Gh(i){function r(o,c){if(!(this instanceof r))return new r(o,c);Object.defineProperty(this,"message",{get:function(){return o}}),Error.captureStackTrace?Error.captureStackTrace(this,r):Object.defineProperty(this,"stack",{value:new Error().stack||""}),c&&jh(this,c)}return r.prototype=Object.create(Error.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return i},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),r}v.newError=Gh;v.ProtocolError=Gh("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 Ic=d((SN,Xh)=>{"use strict";Xh.exports=x;var _e=$e(),Oc,Zi=_e.LongBits,Hh=_e.base64,Fh=_e.utf8;function rn(i,r,o){this.fn=i,this.len=r,this.next=void 0,this.val=o}function Pc(){}function qS(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(Pc,0,0),this.tail=this.head,this.states=null}var Kh=function(){return _e.Buffer?function(){return(x.create=function(){return new Oc})()}:function(){return new x}};x.create=Kh();x.alloc=function(r){return new _e.Array(r)};_e.Array!==Array&&(x.alloc=_e.pool(x.alloc,_e.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 Nc(i,r,o){r[o]=i&255}function jS(i,r,o){for(;i>127;)r[o++]=i&127|128,i>>>=7;r[o]=i}function Rc(i,r){this.len=i,this.next=void 0,this.val=r}Rc.prototype=Object.create(rn.prototype);Rc.prototype.fn=jS;x.prototype.uint32=function(r){return this.len+=(this.tail=this.tail.next=new Rc((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(xc,10,Zi.fromNumber(r)):this.uint32(r)};x.prototype.sint32=function(r){return this.uint32((r<<1^r>>31)>>>0)};function xc(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=Zi.from(r);return this._push(xc,o.length(),o)};x.prototype.int64=x.prototype.uint64;x.prototype.sint64=function(r){var o=Zi.from(r).zzEncode();return this._push(xc,o.length(),o)};x.prototype.bool=function(r){return this._push(Nc,1,r?1:0)};function Ac(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(Ac,4,r>>>0)};x.prototype.sfixed32=x.prototype.fixed32;x.prototype.fixed64=function(r){var o=Zi.from(r);return this._push(Ac,4,o.lo)._push(Ac,4,o.hi)};x.prototype.sfixed64=x.prototype.fixed64;x.prototype.float=function(r){return this._push(_e.float.writeFloatLE,4,r)};x.prototype.double=function(r){return this._push(_e.float.writeDoubleLE,8,r)};var GS=_e.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(Nc,1,0);if(_e.isString(r)){var c=x.alloc(o=Hh.length(r));Hh.decode(r,c,0),r=c}return this.uint32(o)._push(GS,o,r)};x.prototype.string=function(r){var o=Fh.length(r);return o?this.uint32(o)._push(Fh.write,o,r):this._push(Nc,1,0)};x.prototype.fork=function(){return this.states=new qS(this),this.head=this.tail=new rn(Pc,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(Pc,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){Oc=i,x.create=Kh(),Oc._configure()}});var Yh=d((bN,$h)=>{"use strict";$h.exports=xe;var zh=Ic();(xe.prototype=Object.create(zh.prototype)).constructor=xe;var Ye=$e();function xe(){zh.call(this)}xe._configure=function(){xe.alloc=Ye._Buffer_allocUnsafe,xe.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++]}};xe.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(xe.writeBytesBuffer,o,r),this};function HS(i,r,o){i.length<40?Ye.utf8.write(i,r,o):r.utf8Write?r.utf8Write(i,o):r.write(i,o)}xe.prototype.string=function(r){var o=Ye.Buffer.byteLength(r);return this.uint32(o),o&&this._push(HS,o,r),this};xe._configure()});var Mc=d((ON,em)=>{"use strict";em.exports=j;var Te=$e(),wc,Qh=Te.LongBits,FS=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 Wh=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 wc(u):Wh(u)})(o)}:Wh};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 Lc(){var i=new Qh(0,0),r=0;if(this.len-this.pos>4){for(;r<4;++r)if(i.lo=(i.lo|(this.buf[this.pos]&127)<<r*7)>>>0,this.buf[this.pos++]<128)return i;if(i.lo=(i.lo|(this.buf[this.pos]&127)<<28)>>>0,i.hi=(i.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return i;r=0}else{for(;r<3;++r){if(this.pos>=this.len)throw Se(this);if(i.lo=(i.lo|(this.buf[this.pos]&127)<<r*7)>>>0,this.buf[this.pos++]<128)return i}return i.lo=(i.lo|(this.buf[this.pos++]&127)<<r*7)>>>0,i}if(this.len-this.pos>4){for(;r<5;++r)if(i.hi=(i.hi|(this.buf[this.pos]&127)<<r*7+3)>>>0,this.buf[this.pos++]<128)return i}else for(;r<5;++r){if(this.pos>=this.len)throw Se(this);if(i.hi=(i.hi|(this.buf[this.pos]&127)<<r*7+3)>>>0,this.buf[this.pos++]<128)return i}throw Error("invalid varint encoding")}j.prototype.bool=function(){return this.uint32()!==0};function eu(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 eu(this.buf,this.pos+=4)};j.prototype.sfixed32=function(){if(this.pos+4>this.len)throw Se(this,4);return eu(this.buf,this.pos+=4)|0};function Jh(){if(this.pos+8>this.len)throw Se(this,8);return new Qh(eu(this.buf,this.pos+=4),eu(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 FS.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){wc=i,j.create=Zh(),wc._configure();var r=Te.Long?"toLong":"toNumber";Te.merge(j.prototype,{int64:function(){return Lc.call(this)[r](!1)},uint64:function(){return Lc.call(this)[r](!0)},sint64:function(){return Lc.call(this).zzDecode()[r](!1)},fixed64:function(){return Jh.call(this)[r](!0)},sfixed64:function(){return Jh.call(this)[r](!1)}})}});var om=d((AN,nm)=>{"use strict";nm.exports=gt;var rm=Mc();(gt.prototype=Object.create(rm.prototype)).constructor=gt;var tm=$e();function gt(i){rm.call(this,i)}gt._configure=function(){tm.Buffer&&(gt.prototype._slice=tm.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 um=d((PN,im)=>{"use strict";im.exports=nn;var Cc=$e();(nn.prototype=Object.create(Cc.EventEmitter.prototype)).constructor=nn;function nn(i,r,o){if(typeof i!="function")throw TypeError("rpcImpl must be a function");Cc.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 Cc.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 am=d(sm=>{"use strict";var KS=sm;KS.Service=um()});var lm=d((RN,cm)=>{"use strict";cm.exports={}});var dm=d(fm=>{"use strict";var ue=fm;ue.build="minimal";ue.Writer=Ic();ue.BufferWriter=Yh();ue.Reader=Mc();ue.BufferReader=om();ue.util=$e();ue.rpc=am();ue.roots=lm();ue.configure=pm;function pm(){ue.util._configure(),ue.Writer._configure(ue.BufferWriter),ue.Reader._configure(ue.BufferReader)}pm()});var mm=d((IN,hm)=>{"use strict";hm.exports=dm()});var ym=d((LN,_m)=>{"use strict";var g=mm(),m=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 m||(e=m.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 m||(e=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!f.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&f.isInteger(e.timeUnixNano.low)&&f.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.name!=null&&e.hasOwnProperty("name")&&!f.isString(e.name))return"name: string expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var n=0;n<e.attributes.length;++n){var 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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.traceId!=null&&e.hasOwnProperty("traceId")&&!(e.traceId&&typeof e.traceId.length=="number"||f.isString(e.traceId)))return"traceId: buffer expected";if(e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||f.isString(e.spanId)))return"spanId: buffer expected";if(e.traceState!=null&&e.hasOwnProperty("traceState")&&!f.isString(e.traceState))return"traceState: string expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var n=0;n<e.attributes.length;++n){var 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 m||(t=m.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 m||(t=new m(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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceSpans!=null&&e.hasOwnProperty("resourceSpans")){if(!Array.isArray(e.resourceSpans))return"resourceSpans: array expected";for(var n=0;n<e.resourceSpans.length;++n){var 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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(e.partialSuccess)}return n},a.toObject=function(e,n){n||(n={});var 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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedSpans!=null&&e.hasOwnProperty("rejectedSpans")&&!f.isInteger(e.rejectedSpans)&&!(e.rejectedSpans&&f.isInteger(e.rejectedSpans.low)&&f.isInteger(e.rejectedSpans.high))?"rejectedSpans: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!f.isString(e.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;return e.rejectedSpans!=null&&(f.Long?(n.rejectedSpans=f.Long.fromValue(e.rejectedSpans)).unsigned=!1:typeof e.rejectedSpans=="string"?n.rejectedSpans=parseInt(e.rejectedSpans,10):typeof e.rejectedSpans=="number"?n.rejectedSpans=e.rejectedSpans:typeof e.rejectedSpans=="object"&&(n.rejectedSpans=new f.LongBits(e.rejectedSpans.low>>>0,e.rejectedSpans.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},a.toObject=function(e,n){n||(n={});var 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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceMetrics!=null&&e.hasOwnProperty("resourceMetrics")){if(!Array.isArray(e.resourceMetrics))return"resourceMetrics: array expected";for(var n=0;n<e.resourceMetrics.length;++n){var 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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(e.partialSuccess)}return n},a.toObject=function(e,n){n||(n={});var 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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedDataPoints!=null&&e.hasOwnProperty("rejectedDataPoints")&&!f.isInteger(e.rejectedDataPoints)&&!(e.rejectedDataPoints&&f.isInteger(e.rejectedDataPoints.low)&&f.isInteger(e.rejectedDataPoints.high))?"rejectedDataPoints: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!f.isString(e.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;return e.rejectedDataPoints!=null&&(f.Long?(n.rejectedDataPoints=f.Long.fromValue(e.rejectedDataPoints)).unsigned=!1:typeof e.rejectedDataPoints=="string"?n.rejectedDataPoints=parseInt(e.rejectedDataPoints,10):typeof e.rejectedDataPoints=="number"?n.rejectedDataPoints=e.rejectedDataPoints:typeof e.rejectedDataPoints=="object"&&(n.rejectedDataPoints=new f.LongBits(e.rejectedDataPoints.low>>>0,e.rejectedDataPoints.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},a.toObject=function(e,n){n||(n={});var 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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceLogs!=null&&e.hasOwnProperty("resourceLogs")){if(!Array.isArray(e.resourceLogs))return"resourceLogs: array expected";for(var n=0;n<e.resourceLogs.length;++n){var 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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(e.partialSuccess)}return n},a.toObject=function(e,n){n||(n={});var 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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedLogRecords!=null&&e.hasOwnProperty("rejectedLogRecords")&&!f.isInteger(e.rejectedLogRecords)&&!(e.rejectedLogRecords&&f.isInteger(e.rejectedLogRecords.low)&&f.isInteger(e.rejectedLogRecords.high))?"rejectedLogRecords: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!f.isString(e.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;return e.rejectedLogRecords!=null&&(f.Long?(n.rejectedLogRecords=f.Long.fromValue(e.rejectedLogRecords)).unsigned=!1:typeof e.rejectedLogRecords=="string"?n.rejectedLogRecords=parseInt(e.rejectedLogRecords,10):typeof e.rejectedLogRecords=="number"?n.rejectedLogRecords=e.rejectedLogRecords:typeof e.rejectedLogRecords=="object"&&(n.rejectedLogRecords=new f.LongBits(e.rejectedLogRecords.low>>>0,e.rejectedLogRecords.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},a.toObject=function(e,n){n||(n={});var 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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(e=m.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 m||(e=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(e=m.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 m||(e=new m(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 m||(e=m.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 m||(e=new m(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 m||(e=m.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 m||(e=new m(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 m||(n=m.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 m||(n=new m(n)),this.decode(n,n.uint32())},t.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.offset!=null&&n.hasOwnProperty("offset")&&!f.isInteger(n.offset))return"offset: integer expected";if(n.bucketCounts!=null&&n.hasOwnProperty("bucketCounts")){if(!Array.isArray(n.bucketCounts))return"bucketCounts: array expected";for(var 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 m||(t=m.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 m||(t=new m(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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.quantile!=null&&e.hasOwnProperty("quantile")&&typeof e.quantile!="number"?"quantile: number expected":e.value!=null&&e.hasOwnProperty("value")&&typeof e.value!="number"?"value: number expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return e;var n=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;return e.quantile!=null&&(n.quantile=Number(e.quantile)),e.value!=null&&(n.value=Number(e.value)),n},a.toObject=function(e,n){n||(n={});var 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 m||(e=m.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 m||(e=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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}();_m.exports=p});var tu=d(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.ServiceClientType=void 0;var XS;(function(i){i[i.SPANS=0]="SPANS",i[i.METRICS=1]="METRICS",i[i.LOGS=2]="LOGS"})(XS=on.ServiceClientType||(on.ServiceClientType={}))});var un=d(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.getExportRequestProto=void 0;var Uc=ym(),Em=tu();function zS(i){return i===Em.ServiceClientType.SPANS?Uc.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest:i===Em.ServiceClientType.LOGS?Uc.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest:Uc.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest}ru.getExportRequestProto=zS});var Dc=d(nu=>{"use strict";Object.defineProperty(nu,"__esModule",{value:!0});nu.send=void 0;var vm=Wi(),$S=un();function YS(i,r,o,c,u){let a=i.convert(r),t=(0,$S.getExportRequestProto)(i.getServiceClientType()),e=t.create(a);if(e){let n=t.encode(e).finish();n&&(0,vm.sendWithHttp)(i,Buffer.from(n),"application/x-protobuf",c,u)}else u(new vm.OTLPExporterError("No proto"))}nu.send=YS});var gm=d(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.OTLPProtoExporterNodeBase=void 0;var WS=(y(),E(_)),JS=Wi(),Bc=class extends JS.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){WS.diag.debug("Shutdown already started. Cannot send objects");return}this._send?this._sendPromise(r,o,c):setImmediate(()=>{let{send:u}=Dc();this._send=u,this._sendPromise(r,o,c)})}};ou.OTLPProtoExporterNodeBase=Bc});var Tm=d(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.send=_r.OTLPProtoExporterNodeBase=void 0;var QS=gm();Object.defineProperty(_r,"OTLPProtoExporterNodeBase",{enumerable:!0,get:function(){return QS.OTLPProtoExporterNodeBase}});var ZS=Dc();Object.defineProperty(_r,"send",{enumerable:!0,get:function(){return ZS.send}})});var Sm=d(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});iu.OTLPProtoExporterBrowserBase=void 0;var eb=(y(),E(_)),Vc=Wi(),tb=un(),kc=class extends Vc.OTLPExporterBrowserBase{constructor(r={}){super(r)}send(r,o,c){if(this._shutdownOnce.isCalled){eb.diag.debug("Shutdown already started. Cannot send objects");return}let u=this.convert(r),a=(0,tb.getExportRequestProto)(this.getServiceClientType()),t=a.create(u);if(t){let e=a.encode(t).finish();e&&(0,Vc.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 Vc.OTLPExporterError("No proto"))}};iu.OTLPProtoExporterBrowserBase=kc});var bm=d(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.ServiceClientType=yr.OTLPProtoExporterBrowserBase=void 0;var rb=Sm();Object.defineProperty(yr,"OTLPProtoExporterBrowserBase",{enumerable:!0,get:function(){return rb.OTLPProtoExporterBrowserBase}});var nb=tu();Object.defineProperty(yr,"ServiceClientType",{enumerable:!0,get:function(){return nb.ServiceClientType}})});var Am=d(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.getExportRequestProto=ye.ServiceClientType=ye.OTLPProtoExporterBrowserBase=ye.send=ye.OTLPProtoExporterNodeBase=void 0;var Om=Tm();Object.defineProperty(ye,"OTLPProtoExporterNodeBase",{enumerable:!0,get:function(){return Om.OTLPProtoExporterNodeBase}});Object.defineProperty(ye,"send",{enumerable:!0,get:function(){return Om.send}});var ob=bm();Object.defineProperty(ye,"OTLPProtoExporterBrowserBase",{enumerable:!0,get:function(){return ob.OTLPProtoExporterBrowserBase}});var ib=tu();Object.defineProperty(ye,"ServiceClientType",{enumerable:!0,get:function(){return ib.ServiceClientType}});var ub=un();Object.defineProperty(ye,"getExportRequestProto",{enumerable:!0,get:function(){return ub.getExportRequestProto}})});var G=J(xs(),1);y();Cs();var wm=J(Ef(),1),gr=J(pt(),1),Mm=J(Cf(),1),Cm=J(qd(),1),Um=J(fe(),1),Tr=J(dn(),1),Dm=J(Gd(),1),be=J(P(),1);y();var KT=Symbol.for("@vercel/request-context");function ar(){return globalThis[KT]?.get()}var ec=J(fe(),1);function Vi(i){return Object.fromEntries(Object.entries(i).filter(([r,o])=>o!==void 0))}function Hd(i){return i?i.split("::").at(-1):void 0}function Fd(i=ar()){if(i)return Vi({[ec.SemanticAttributes.HTTP_HOST]:i.headers.host,[ec.SemanticAttributes.HTTP_USER_AGENT]:i.headers["user-agent"],"http.referer":i.headers.referer,"vercel.request_id":Hd(i.headers["x-vercel-id"]),"vercel.matched_path":i.headers["x-matched-path"],"vercel.edge_region":i.headers["x-vercel-edge-region"]})}y();function zr(i){return(i&_.TraceFlags.SAMPLED)!==0}var ki=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=>{_.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,{rootSpanId:u,open:[]}):this.rootSpanIds.get(c)?.open.push(r),t&&zr(a)){let e=Fd();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),e=t?.rootSpanId===c;if(a){let n=XT(r);n&&Object.assign(r.attributes,n)}if(e){if(this.rootSpanIds.delete(o),t.open.length>0){for(let n of t.open)if(!n.ended&&n.spanContext().spanId!==c)try{n.end()}catch(s){_.diag.error("@vercel/otel: onEnd failed:",s)}}}else if(t)for(let n=0;n<t.open.length;n++)t.open[n]?.spanContext().spanId===c&&t.open.splice(n,1);for(let n of this.processors)n.onEnd(r);if(e){let n=this.waitSpanEnd.get(o);n&&(this.waitSpanEnd.delete(o),n())}}},Kd={[_.SpanKind.INTERNAL]:"internal",[_.SpanKind.SERVER]:"server",[_.SpanKind.CLIENT]:"client",[_.SpanKind.PRODUCER]:"producer",[_.SpanKind.CONSUMER]:"consumer"};function XT(i){let{kind:r,attributes:o}=i,{"operation.name":c,"resouce.name":u,"span.type":a,"next.span_type":t,"http.method":e,"http.route":n}=o;if(c)return;let s=i.instrumentationLibrary.name,l=t??a;if(l&&typeof l=="string"){let h=tc(s,l);return n?{"operation.name":h,"resource.name":u??n}:{"operation.name":h}}return e&&n&&typeof e=="string"&&typeof n=="string"?{"operation.name":tc(s,`http.${Kd[r]||"internal"}.${e}`),"resource.name":u??n}:{"operation.name":tc(s,r===_.SpanKind.INTERNAL?"":Kd[r])}}function tc(i,r){if(!i)return r;let o=i.replace(/[ @./]/g,"_");return o.startsWith("_")&&(o=o.slice(1)),r?`${o}.${r}`:o}var oh=J(ac(),1);var nh=J(Yr(),1);y();var cr=class extends nh.OTLPExporterBase{constructor(r={}){super(r),r.headers&&(this._headers=r.headers)}onShutdown(){_.diag.debug("@vercel/otel/otlp: onShutdown")}onInit(){_.diag.debug("@vercel/otel/otlp: onInit")}send(r,o,c){if(this._shutdownOnce.isCalled){_.diag.debug("@vercel/otel/otlp: Shutdown already started. Cannot send objects");return}let u=this.convert(r),a,t,e;try{({body:a,contentType:t,headers:e}=this.toMessage(u))}catch(s){_.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=>{_.diag.debug("@vercel/otel/otlp: onSuccess",s.status,s.statusText),o(),s.arrayBuffer().catch(()=>{})}).catch(s=>{_.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 dS="v1/traces",hS=`http://localhost:4318/${dS}`;function Hi(i){return typeof i.url=="string"?i.url:hS}var lr=class{constructor(r={}){this.impl=new fc(r)}export(r,o){this.impl.export(r,o)}shutdown(){return this.impl.shutdown()}forceFlush(){return this.impl.forceFlush()}},fc=class extends cr{convert(r){return(0,oh.createExportTraceServiceRequest)(r,{useHex:!0,useLongBits:!1})}toMessage(r){return{body:JSON.stringify(r),contentType:"application/json"}}getDefaultUrl(r){return Hi(r)}};var Pm=J(ac(),1),Nm=J(Am(),1),Rm=J(un(),1);var Tt=class{constructor(r={}){this.impl=new qc(r)}export(r,o){this.impl.export(r,o)}shutdown(){return this.impl.shutdown()}forceFlush(){return this.impl.forceFlush()}},qc=class extends cr{convert(r){return(0,Pm.createExportTraceServiceRequest)(r,void 0)}toMessage(r){let o=Nm.ServiceClientType.SPANS,c=(0,Rm.getExportRequestProto)(o),u=c.create(r);return{body:c.encode(u).finish(),contentType:"application/x-protobuf",headers:{accept:"application/x-protobuf"}}}getDefaultUrl(r){return Hi(r)}};y();var Ce=J(fe(),1);function xm(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=async(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={[Ce.SemanticAttributes.HTTP_METHOD]:b.method,[Ce.SemanticAttributes.HTTP_URL]:b.url,[Ce.SemanticAttributes.HTTP_HOST]:L.host,[Ce.SemanticAttributes.HTTP_SCHEME]:L.protocol.replace(":",""),[Ce.SemanticAttributes.NET_PEER_NAME]:L.hostname,[Ce.SemanticAttributes.NET_PEER_PORT]:L.port},se=s?xm(s,k):ab(b.url),Gc=I?.opentelemetry?.spanName??`fetch ${b.method} ${b.url}`,H=o.startSpan(Gc,{kind:_.SpanKind.CLIENT,attributes:{...k,"operation.name":`fetch.${b.method}`,"resource.name":se,...I?.opentelemetry?.attributes}},_.context.active());if(!H.isRecording()||!zr(H.spanContext().traceFlags))return H.end(),h(R,I);l(L,I)&&_.propagation.inject(_.context.active(),b.headers,sb);try{let sn=Date.now(),We=await h(R,{...I,headers:b.headers}),Vm=Date.now()-sn;return H.setAttribute(Ce.SemanticAttributes.HTTP_STATUS_CODE,We.status),H.setAttribute("http.response_time",Vm),We.status>=500&&jc(H,`Status: ${We.status} (${We.statusText})`),We.body?cb(We).then(su=>{H.isRecording()&&(H.setAttribute(Ce.SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED,su),H.end())},su=>{H.isRecording()&&(jc(H,su),H.end())}):H.end(),We}catch(sn){throw jc(H,sn),H.end(),sn}};globalThis.fetch=T}disable(){this.originalFetch&&(globalThis.fetch=this.originalFetch)}},sb={set(i,r,o){i.set(r,o)}};function ab(i){let r=i.indexOf("?");return r===-1?i:i.substring(0,r)}function cb(i){let r=0,c=i.clone().body?.getReader();if(!c)return Promise.resolve(0);let u=()=>c.read().then(({done:a,value:t})=>{if(!a)return r+=t.byteLength,u()});return u().then(()=>r)}function jc(i,r){if(r instanceof Error)i.recordException(r),i.setStatus({code:_.SpanStatusCode.ERROR,message:r.message});else{let o=String(r);i.setStatus({code:_.SpanStatusCode.ERROR,message:o})}}var uu=class{constructor(r={}){this.configuration=r}start(){let r=lb(),o=(0,Tr.getEnvWithoutDefaults)(),c=this.configuration,u=process.env.NEXT_RUNTIME||"nodejs",a=!!r.OTEL_SDK_DISABLED;if(o.OTEL_LOG_LEVEL&&_.diag.setLogger(new _.DiagConsoleLogger,{logLevel:o.OTEL_LOG_LEVEL}),a)return;let t=c.idGenerator??new G.RandomIdGenerator,e=c.contextManager??new Dm.AsyncLocalStorageContextManager;e.enable(),this.contextManager=e;let n=r.OTEL_SERVICE_NAME||c.serviceName||"app",s=new gr.Resource(Vi({[Um.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=fb(c.propagators,r),R=db(c.traceSampler,r),N=hb(c.spanProcessors,c,r);N.length===0&&_.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 ki(N)),b.register({contextManager:e,propagator:new be.CompositePropagator({propagators:T})}),this.tracerProvider=b,c.logRecordProcessor){let k=new Mm.LoggerProvider({resource:s});this.loggerProvider=k,k.addLogRecordProcessor(c.logRecordProcessor),ht.logs.setGlobalLoggerProvider(k)}if(c.metricReader||c.views){let k=new Cm.MeterProvider({resource:s,views:c.views??[]});c.metricReader&&k.addMetricReader(c.metricReader),_.metrics.setGlobalMeterProvider(k),this.meterProvider=k}let L=pb(c.instrumentations,c.instrumentationConfig);this.disableInstumentations=(0,wm.registerInstrumentations)({instrumentations:L}),_.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()),_.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 lb(){let i=(0,Tr.parseEnvironment)(process.env);return{...Tr.DEFAULT_ENVIRONMENT,...i}}function pb(i,r){return(i??["auto"]).map(o=>o==="auto"?(_.diag.debug("@vercel/otel: Configure instrumentations: fetch",r?.fetch),[new Er(r?.fetch)]):o==="fetch"?(_.diag.debug("@vercel/otel: Configure instrumentations: fetch",r?.fetch),new Er(r?.fetch)):o).flat()}function fb(i,r){let o=r.OTEL_PROPAGATORS&&r.OTEL_PROPAGATORS.length>0?r.OTEL_PROPAGATORS:void 0;return(i??o??["auto"]).map(c=>{if(c==="none")return[];if(c==="auto")return _.diag.debug("@vercel/otel: Configure propagators: tracecontext, baggage"),[new be.W3CTraceContextPropagator,new be.W3CBaggagePropagator];if(c==="tracecontext")return _.diag.debug("@vercel/otel: Configure propagator: tracecontext"),new be.W3CTraceContextPropagator;if(c==="baggage")return _.diag.debug("@vercel/otel: Configure propagator: baggage"),new be.W3CBaggagePropagator;if(typeof c=="string")throw new Error(`Unknown propagator: "${c}"`);return c}).flat()}var Im="always_on",vr=1;function db(i,r){if(i&&typeof i!="string")return i;let o=i&&i!=="auto"?i:r.OTEL_TRACES_SAMPLER||Im;switch(_.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(Lm(r));case"parentbased_traceidratio":return new G.ParentBasedSampler({root:new G.TraceIdRatioBasedSampler(Lm(r))});default:return _.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER value "${String(r.OTEL_TRACES_SAMPLER)} invalid, defaulting to ${Im}".`),new G.AlwaysOnSampler}}function Lm(i){if(i.OTEL_TRACES_SAMPLER_ARG===void 0||i.OTEL_TRACES_SAMPLER_ARG==="")return _.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${vr}.`),vr;_.diag.debug("@vercel/otel: Configure sampler probability: ",i.OTEL_TRACES_SAMPLER_ARG);let r=Number(i.OTEL_TRACES_SAMPLER_ARG);return isNaN(r)?(_.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${i.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${vr}.`),vr):r<0||r>1?(_.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${i.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${vr}.`),vr):r}function hb(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";_.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(mb(r.traceExporter,o)):void 0}return c}).filter(Eb)}function mb(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=yb(r),u={...be.baggageUtils.parseKeyPairsIntoRecord(r.OTEL_EXPORTER_OTLP_HEADERS),...be.baggageUtils.parseKeyPairsIntoRecord(r.OTEL_EXPORTER_OTLP_TRACES_HEADERS)};switch(_.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 _.diag.warn(`@vercel/otel: Unsupported OTLP traces protocol: ${o}. Using http/protobuf.`),new Tt}}var Bm="v1/traces",_b=`http://localhost:4318/${Bm}`;function yb(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}/${Bm}`:_b}function Eb(i){return i!=null}function oR(i){let r;i?typeof i=="string"?r={serviceName:i}:r=i:r={},new uu(r).start()}export{Er as FetchInstrumentation,lr as OTLPHttpJsonTraceExporter,Tt as OTLPHttpProtoTraceExporter,oR as registerOTel};
|
|
20
|
+
`,(0,Ti.getConflictResolutionRecipe)(a,r))}return c}};Si.MetricStorageRegistry=Ca});var bd=d(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.MultiMetricStorage=void 0;var Ua=class{constructor(r){this._backingStorages=r}record(r,o,c,u){this._backingStorages.forEach(a=>{a.record(r,o,c,u)})}};bi.MultiMetricStorage=Ua});var Ad=d(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.BatchObservableResultImpl=ur.ObservableResultImpl=void 0;var ir=(y(),E(_)),Od=Fr(),nT=hi(),Da=class{constructor(r,o){this._instrumentName=r,this._valueType=o,this._buffer=new Od.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=Da;var Ba=class{constructor(){this._buffer=new Map}observe(r,o,c={}){if(!(0,nT.isObservableInstrument)(r))return;let u=this._buffer.get(r);if(u==null&&(u=new Od.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=Ba});var Rd=d(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.ObservableRegistry=void 0;var oT=(y(),E(_)),Pd=hi(),Nd=Ad(),Kr=Ne(),Va=class{constructor(){this._callbacks=[],this._batchCallbacks=[]}addCallback(r,o){this._findCallback(r,o)>=0||this._callbacks.push({callback:r,instrument:o})}removeCallback(r,o){let c=this._findCallback(r,o);c<0||this._callbacks.splice(c,1)}addBatchCallback(r,o){let c=new Set(o.filter(Pd.isObservableInstrument));if(c.size===0){oT.diag.error("BatchObservableCallback is not associated with valid instruments",o);return}this._findBatchCallback(r,c)>=0||this._batchCallbacks.push({callback:r,instruments:c})}removeBatchCallback(r,o){let c=new Set(o.filter(Pd.isObservableInstrument)),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 Nd.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 Nd.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))}};Oi.ObservableRegistry=Va});var xd=d(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.SyncMetricStorage=void 0;var iT=Pa(),uT=Ia(),sT=wa(),ka=class extends iT.MetricStorage{constructor(r,o,c,u){super(r),this._attributesProcessor=c,this._deltaMetricStorage=new uT.DeltaMetricProcessor(o),this._temporalMetricStorage=new sT.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)}};Ai.SyncMetricStorage=ka});var ja=d(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.FilteringAttributesProcessor=Ge.NoopAttributesProcessor=Ge.AttributesProcessor=void 0;var Xr=class{static Noop(){return aT}};Ge.AttributesProcessor=Xr;var Pi=class extends Xr{process(r,o){return r}};Ge.NoopAttributesProcessor=Pi;var qa=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=qa;var aT=new Pi});var Id=d(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.MeterSharedState=void 0;var cT=we(),lT=hd(),pT=Ne(),fT=md(),dT=Sd(),hT=bd(),mT=Rd(),_T=xd(),yT=ja(),Ga=class{constructor(r,o){this._meterProviderSharedState=r,this._instrumentationScope=o,this.metricStorageRegistry=new dT.MetricStorageRegistry,this.observableRegistry=new mT.ObservableRegistry,this.meter=new lT.Meter(this)}registerMetricStorage(r){let o=this._registerMetricStorage(r,_T.SyncMetricStorage);return o.length===1?o[0]:new hT.MultiMetricStorage(o)}registerAsyncMetricStorage(r){return this._registerMetricStorage(r,fT.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(pT.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,cT.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,yT.AttributesProcessor.Noop(),[e]);return this.metricStorageRegistry.registerForCollector(e,h),h});u=u.concat(t)}return u}};Ni.MeterSharedState=Ga});var Ld=d(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.MeterProviderSharedState=void 0;var ET=Ne(),vT=dd(),gT=Id(),Ha=class{constructor(r){this.resource=r,this.viewRegistry=new vT.ViewRegistry,this.metricCollectors=[],this.meterSharedStates=new Map}getMeterSharedState(r){let o=(0,ET.instrumentationScopeId)(r),c=this.meterSharedStates.get(o);return c==null&&(c=new gT.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}};Ri.MeterProviderSharedState=Ha});var wd=d(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});xi.MetricCollector=void 0;var TT=N(),Fa=class{constructor(r,o){this._sharedState=r,this._metricReader=o}async collect(r){let o=(0,TT.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)}};xi.MetricCollector=Fa});var Cd=d(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.MeterProvider=void 0;var Ii=(y(),E(_)),Md=pt(),ST=Ld(),bT=wd(),Ka=class{constructor(r){var o;this._shutdown=!1;let c=Md.Resource.default().merge((o=r?.resource)!==null&&o!==void 0?o:Md.Resource.empty());if(this._sharedState=new ST.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?(Ii.diag.warn("A shutdown MeterProvider cannot provide a Meter"),(0,Ii.createNoopMeter)()):this._sharedState.getMeterSharedState({name:r,version:o,schemaUrl:c.schemaUrl}).meter}addMetricReader(r){let o=new bT.MetricCollector(this._sharedState,r);r.setMetricProducer(o),this._sharedState.metricCollectors.push(o)}async shutdown(r){if(this._shutdown){Ii.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){Ii.diag.warn("invalid attempt to force flush after MeterProvider shutdown");return}await Promise.all(this._sharedState.metricCollectors.map(o=>o.forceFlush(r)))}};Li.MeterProvider=Ka});var wi=d(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.ExactPredicate=sr.PatternPredicate=void 0;var OT=/[\^$\\.+?()[\]{}|]/g,Xa=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(OT,"\\$&").replace("*",".*")}$`}static hasWildcard(r){return r.includes("*")}};sr.PatternPredicate=Xa;var za=class{constructor(r){this._matchAll=r===void 0,this._pattern=r}match(r){return!!(this._matchAll||r===this._pattern)}};sr.ExactPredicate=za});var Dd=d(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});Mi.InstrumentSelector=void 0;var Ud=wi(),$a=class{constructor(r){var o;this._nameFilter=new Ud.PatternPredicate((o=r?.name)!==null&&o!==void 0?o:"*"),this._type=r?.type,this._unitFilter=new Ud.ExactPredicate(r?.unit)}getType(){return this._type}getNameFilter(){return this._nameFilter}getUnitFilter(){return this._unitFilter}};Mi.InstrumentSelector=$a});var Bd=d(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.MeterSelector=void 0;var Ya=wi(),Wa=class{constructor(r){this._nameFilter=new Ya.ExactPredicate(r?.name),this._versionFilter=new Ya.ExactPredicate(r?.version),this._schemaUrlFilter=new Ya.ExactPredicate(r?.schemaUrl)}getNameFilter(){return this._nameFilter}getVersionFilter(){return this._versionFilter}getSchemaUrlFilter(){return this._schemaUrlFilter}};Ci.MeterSelector=Wa});var kd=d(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.View=void 0;var AT=wi(),Vd=ja(),PT=Dd(),NT=Bd(),RT=ui();function xT(i){return i.instrumentName==null&&i.instrumentType==null&&i.instrumentUnit==null&&i.meterName==null&&i.meterVersion==null&&i.meterSchemaUrl==null}var Ja=class{constructor(r){var o;if(xT(r))throw new Error("Cannot create view with no selector arguments supplied");if(r.name!=null&&(r?.instrumentName==null||AT.PatternPredicate.hasWildcard(r.instrumentName)))throw new Error("Views with a specified name must be declared with an instrument selector that selects at most one instrument per meter.");r.attributeKeys!=null?this.attributesProcessor=new Vd.FilteringAttributesProcessor(r.attributeKeys):this.attributesProcessor=Vd.AttributesProcessor.Noop(),this.name=r.name,this.description=r.description,this.aggregation=(o=r.aggregation)!==null&&o!==void 0?o:RT.Aggregation.Default(),this.instrumentSelector=new PT.InstrumentSelector({name:r.instrumentName,type:r.instrumentType,unit:r.instrumentUnit}),this.meterSelector=new NT.MeterSelector({name:r.meterName,version:r.meterVersion,schemaUrl:r.meterSchemaUrl})}};Ui.View=Ja});var qd=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 IT=Xo();Object.defineProperty(O,"AggregationTemporality",{enumerable:!0,get:function(){return IT.AggregationTemporality}});var LT=jt();Object.defineProperty(O,"DataPointType",{enumerable:!0,get:function(){return LT.DataPointType}});var wT=da();Object.defineProperty(O,"MetricReader",{enumerable:!0,get:function(){return wT.MetricReader}});var MT=ad();Object.defineProperty(O,"PeriodicExportingMetricReader",{enumerable:!0,get:function(){return MT.PeriodicExportingMetricReader}});var CT=ld();Object.defineProperty(O,"InMemoryMetricExporter",{enumerable:!0,get:function(){return CT.InMemoryMetricExporter}});var UT=fd();Object.defineProperty(O,"ConsoleMetricExporter",{enumerable:!0,get:function(){return UT.ConsoleMetricExporter}});var DT=we();Object.defineProperty(O,"InstrumentType",{enumerable:!0,get:function(){return DT.InstrumentType}});var BT=Cd();Object.defineProperty(O,"MeterProvider",{enumerable:!0,get:function(){return BT.MeterProvider}});var He=ui();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 VT=kd();Object.defineProperty(O,"View",{enumerable:!0,get:function(){return VT.View}});var kT=Ne();Object.defineProperty(O,"TimeoutError",{enumerable:!0,get:function(){return kT.TimeoutError}})});var jd=d(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.AbstractAsyncHooksContextManager=void 0;var qT=X("events"),jT=["addListener","on","once","prependListener","prependOnceListener"],Qa=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(r,o){return o instanceof qT.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),jT.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]}};Di.AbstractAsyncHooksContextManager=Qa});var Gd=d(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.AsyncLocalStorageContextManager=void 0;var GT=(y(),E(_)),HT=X("async_hooks"),FT=jd(),Za=class extends FT.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new HT.AsyncLocalStorage}active(){var r;return(r=this._asyncLocalStorage.getStore())!==null&&r!==void 0?r:GT.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}};Bi.AsyncLocalStorageContextManager=Za});var oc=d(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.toAnyValue=Fe.toKeyValue=Fe.toAttributes=void 0;function zT(i){return Object.keys(i).map(r=>rc(r,i[r]))}Fe.toAttributes=zT;function rc(i,r){return{key:i,value:nc(r)}}Fe.toKeyValue=rc;function nc(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(nc)}}:r==="object"&&i!=null?{kvlistValue:{values:Object.entries(i).map(([o,c])=>rc(o,c))}}:{}}Fe.toAnyValue=nc});var $d=d(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.toOtlpSpanEvent=Ke.toOtlpLink=Ke.sdkSpanToOtlpSpan=void 0;var ic=oc();function $T(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,ic.toAttributes)(i.attributes),droppedAttributesCount:i.droppedAttributesCount,events:i.events.map(a=>zd(a,r)),droppedEventsCount:i.droppedEventsCount,status:{code:u.code,message:u.message},links:i.links.map(a=>Xd(a,r)),droppedLinksCount:i.droppedLinksCount}}Ke.sdkSpanToOtlpSpan=$T;function Xd(i,r){var o;return{attributes:i.attributes?(0,ic.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=Xd;function zd(i,r){return{attributes:i.attributes?(0,ic.toAttributes)(i.attributes):[],name:i.name,timeUnixNano:r.encodeHrTime(i.time),droppedAttributesCount:i.droppedAttributesCount||0}}Ke.toOtlpSpanEvent=zd});var Zd=d(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.getOtlpEncoder=he.encodeAsString=he.encodeAsLongBits=he.toLongBits=he.hrTimeToNanos=void 0;var qi=N(),YT=BigInt(1e9);function uc(i){return BigInt(i[0])*YT+BigInt(i[1])}he.hrTimeToNanos=uc;function Wd(i){let r=Number(BigInt.asUintN(32,i)),o=Number(BigInt.asUintN(32,i>>BigInt(32)));return{low:r,high:o}}he.toLongBits=Wd;function sc(i){let r=uc(i);return Wd(r)}he.encodeAsLongBits=sc;function Jd(i){return uc(i).toString()}he.encodeAsString=Jd;var WT=typeof BigInt<"u"?Jd:qi.hrTimeToNanoseconds;function Yd(i){return i}function Qd(i){if(i!==void 0)return(0,qi.hexToBase64)(i)}var JT={encodeHrTime:sc,encodeSpanContext:qi.hexToBase64,encodeOptionalSpanContext:Qd};function QT(i){var r,o;if(i===void 0)return JT;let c=(r=i.useLongBits)!==null&&r!==void 0?r:!0,u=(o=i.useHex)!==null&&o!==void 0?o:!1;return{encodeHrTime:c?sc:WT,encodeSpanContext:u?Yd:qi.hexToBase64,encodeOptionalSpanContext:u?Yd:Qd}}he.getOtlpEncoder=QT});var ac=d(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.createExportTraceServiceRequest=void 0;var ZT=oc(),eS=$d(),tS=Zd();function rS(i,r){let o=(0,tS.getOtlpEncoder)(r);return{resourceSpans:oS(i,o)}}ji.createExportTraceServiceRequest=rS;function nS(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 oS(i,r){let o=nS(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:P,version:R,schemaUrl:I}=T[0].instrumentationLibrary,b=T.map(L=>(0,eS.sdkSpanToOtlpSpan)(L,r));n.push({scope:{name:P,version:R},spans:b,schemaUrl:I})}l=s.next()}let h={resource:{attributes:(0,ZT.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 cc=(y(),E(_)),eh=N(),th=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 iS(i={}){let r={};return Object.entries(i).forEach(([o,c])=>{typeof c<"u"?r[o]=String(c):cc.diag.warn(`Header "${o}" has wrong value and will be ignored`)}),r}V.parseHeaders=iS;function uS(i,r){return i.endsWith("/")||(i=i+"/"),i+r}V.appendResourcePathToUrl=uS;function sS(i){try{let r=new URL(i);return r.pathname===""&&(r.pathname=r.pathname+"/"),r.toString()}catch{return cc.diag.warn(`Could not parse export URL: '${i}'`),i}}V.appendRootPathToUrlIfNeeded=sS;function aS(i){return typeof i=="number"?i<=0?lc(i,th):i:cS()}V.configureExporterTimeout=aS;function cS(){var i;let r=Number((i=(0,eh.getEnv)().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)!==null&&i!==void 0?i:(0,eh.getEnv)().OTEL_EXPORTER_OTLP_TIMEOUT);return r<=0?lc(r,th):r}function lc(i,r){return cc.diag.warn("Timeout must be greater than 0",i),r}V.invalidTimeout=lc;function lS(i){return[429,502,503,504].includes(i)}V.isExportRetryable=lS;function pS(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=pS});var Yr=d(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.OTLPExporterBase=void 0;var rh=(y(),E(_)),$r=N(),fS=Et(),pc=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,fS.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{rh.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 rh.diag.debug("shutdown started"),this.onShutdown(),this.forceFlush()}};Gi.OTLPExporterBase=pc});var dc=d(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.CompressionAlgorithm=void 0;var mS;(function(i){i.NONE="none",i.GZIP="gzip"})(mS=Wr.CompressionAlgorithm||(Wr.CompressionAlgorithm={}))});var Ki=d(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.OTLPExporterError=void 0;var hc=class extends Error{constructor(r,o,c){super(r),this.name="OTLPExporterError",this.data=c,this.code=o}};Fi.OTLPExporterError=hc});var _c=d(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.configureCompression=Xe.createHttpAgent=Xe.sendWithHttp=void 0;var uh=X("url"),sh=X("http"),ah=X("https"),_S=X("zlib"),yS=X("stream"),mc=(y(),E(_)),Xi=dc(),ih=N(),Jr=Ki(),pr=Et();function ES(i,r,o,c,u){let a=i.timeoutMillis,t=new uh.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},P=t.protocol==="http:"?sh.request:ah.request,R=(I=pr.DEFAULT_EXPORT_MAX_ATTEMPTS,b=pr.DEFAULT_EXPORT_INITIAL_BACKOFF)=>{switch(s=P(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)mc.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(()=>{R(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 Xi.CompressionAlgorithm.GZIP:{s.setHeader("Content-Encoding","gzip"),vS(r).on("error",u).pipe(_S.createGzip()).on("error",u).pipe(s);break}default:s.end(r);break}};R()}Xe.sendWithHttp=ES;function vS(i){let r=new yS.Readable;return r.push(i),r.push(null),r}function gS(i){if(i.httpAgentOptions&&i.keepAlive===!1){mc.diag.warn("httpAgentOptions is used only when keepAlive is true");return}if(!(i.keepAlive===!1||!i.url))try{let o=new uh.URL(i.url).protocol==="http:"?sh.Agent:ah.Agent;return new o(Object.assign({keepAlive:!0},i.httpAgentOptions))}catch(r){mc.diag.error(`collector exporter failed to create http agent. err: ${r.message}`);return}}Xe.createHttpAgent=gS;function TS(i){return i||(((0,ih.getEnv)().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION||(0,ih.getEnv)().OTEL_EXPORTER_OTLP_COMPRESSION)===Xi.CompressionAlgorithm.GZIP?Xi.CompressionAlgorithm.GZIP:Xi.CompressionAlgorithm.NONE)}Xe.configureCompression=TS});var ph=d(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.OTLPExporterNodeBase=void 0;var SS=Yr(),bS=Et(),yc=_c(),ch=(y(),E(_)),lh=N(),Ec=class extends SS.OTLPExporterBase{constructor(r={}){super(r),this.DEFAULT_HEADERS={},r.metadata&&ch.diag.warn("Metadata cannot be set when using http"),this.headers=Object.assign(this.DEFAULT_HEADERS,(0,bS.parseHeaders)(r.headers),lh.baggageUtils.parseKeyPairsIntoRecord((0,lh.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)),this.agent=(0,yc.createHttpAgent)(r),this.compression=(0,yc.configureCompression)(r.compression)}onInit(r){}send(r,o,c){if(this._shutdownOnce.isCalled){ch.diag.debug("Shutdown already started. Cannot send objects");return}let u=this.convert(r),a=new Promise((e,n)=>{(0,yc.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(){}};zi.OTLPExporterNodeBase=Ec});var fh=d(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.CompressionAlgorithm=me.configureCompression=me.createHttpAgent=me.sendWithHttp=me.OTLPExporterNodeBase=void 0;var OS=ph();Object.defineProperty(me,"OTLPExporterNodeBase",{enumerable:!0,get:function(){return OS.OTLPExporterNodeBase}});var vc=_c();Object.defineProperty(me,"sendWithHttp",{enumerable:!0,get:function(){return vc.sendWithHttp}});Object.defineProperty(me,"createHttpAgent",{enumerable:!0,get:function(){return vc.createHttpAgent}});Object.defineProperty(me,"configureCompression",{enumerable:!0,get:function(){return vc.configureCompression}});var AS=dc();Object.defineProperty(me,"CompressionAlgorithm",{enumerable:!0,get:function(){return AS.CompressionAlgorithm}})});var gc=d(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.sendWithXhr=dr.sendWithBeacon=void 0;var dh=(y(),E(_)),Qr=Ki(),fr=Et();function PS(i,r,o,c,u){if(navigator.sendBeacon(r,new Blob([i],o)))dh.diag.debug("sendBeacon - can send",i),c();else{let a=new Qr.OTLPExporterError(`sendBeacon - cannot send ${i}`);u(a)}}dr.sendWithBeacon=PS;function NS(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(([R,I])=>{e.setRequestHeader(R,I)}),e.send(i),e.onreadystatechange=()=>{if(e.readyState===XMLHttpRequest.DONE&&n===!1)if(e.status>=200&&e.status<=299)dh.diag.debug("xhr success",i),u(),clearTimeout(s),clearTimeout(t);else if(e.status&&(0,fr.isExportRetryable)(e.status)&&h>0){let R;T=fr.DEFAULT_EXPORT_BACKOFF_MULTIPLIER*T,e.getResponseHeader("Retry-After")?R=(0,fr.parseRetryAfterToMills)(e.getResponseHeader("Retry-After")):R=Math.round(Math.random()*(fr.DEFAULT_EXPORT_MAX_BACKOFF-T)+T),t=setTimeout(()=>{l(h-1,T)},R)}else{let R=new Qr.OTLPExporterError(`Failed to export with XHR (status: ${e.status})`,e.status);a(R),clearTimeout(s),clearTimeout(t)}},e.onabort=()=>{if(n){let R=new Qr.OTLPExporterError("Request Timeout");a(R)}clearTimeout(s),clearTimeout(t)},e.onerror=()=>{if(n){let R=new Qr.OTLPExporterError("Request Timeout");a(R)}clearTimeout(s),clearTimeout(t)}};l()}dr.sendWithXhr=NS});var mh=d(Yi=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.OTLPExporterBrowserBase=void 0;var RS=Yr(),xS=Et(),hh=gc(),IS=(y(),E(_)),$i=N(),Tc=class extends RS.OTLPExporterBase{constructor(r={}){super(r),this._useXHR=!1,this._useXHR=!!r.headers||typeof navigator.sendBeacon!="function",this._useXHR?this._headers=Object.assign({},(0,xS.parseHeaders)(r.headers),$i.baggageUtils.parseKeyPairsIntoRecord((0,$i.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)):this._headers={}}onInit(){$i._globalThis.addEventListener("unload",this.shutdown)}onShutdown(){$i._globalThis.removeEventListener("unload",this.shutdown)}send(r,o,c){if(this._shutdownOnce.isCalled){IS.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,hh.sendWithXhr)(a,this.url,this._headers,this.timeoutMillis,n,s):(0,hh.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)}};Yi.OTLPExporterBrowserBase=Tc});var _h=d(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.sendWithXhr=hr.OTLPExporterBrowserBase=void 0;var LS=mh();Object.defineProperty(hr,"OTLPExporterBrowserBase",{enumerable:!0,get:function(){return LS.OTLPExporterBrowserBase}});var wS=gc();Object.defineProperty(hr,"sendWithXhr",{enumerable:!0,get:function(){return wS.sendWithXhr}})});var Eh=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=fh();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 yh=_h();Object.defineProperty(ne,"OTLPExporterBrowserBase",{enumerable:!0,get:function(){return yh.OTLPExporterBrowserBase}});Object.defineProperty(ne,"sendWithXhr",{enumerable:!0,get:function(){return yh.sendWithXhr}})});var Wi=d(q=>{"use strict";var MS=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]}),CS=q&&q.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&MS(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;CS(Eh(),q);var US=Yr();Object.defineProperty(q,"OTLPExporterBase",{enumerable:!0,get:function(){return US.OTLPExporterBase}});var DS=Ki();Object.defineProperty(q,"OTLPExporterError",{enumerable:!0,get:function(){return DS.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 gh=d((hN,vh)=>{"use strict";vh.exports=BS;function BS(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 Oh=d(bh=>{"use strict";var Ji=bh;Ji.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 mr=new Array(64),Sh=new Array(123);for(ge=0;ge<64;)Sh[mr[ge]=ge<26?ge+65:ge<52?ge+71:ge<62?ge-4:ge-59|43]=ge++;var ge;Ji.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++]=mr[s>>2],n=(s&3)<<4,e=1;break;case 1:a[t++]=mr[n|s>>4],n=(s&15)<<2,e=2;break;case 2:a[t++]=mr[n|s>>6],a[t++]=mr[s&63],e=0;break}t>8191&&((u||(u=[])).push(String.fromCharCode.apply(String,a)),t=0)}return e&&(a[t++]=mr[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 Th="invalid encoding";Ji.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=Sh[n])===void 0)throw Error(Th);switch(a){case 0:t=n,a=1;break;case 1:o[c++]=t<<2|(n&48)>>4,t=n,a=2;break;case 2:o[c++]=(t&15)<<4|(n&60)>>2,t=n,a=3;break;case 3:o[c++]=(t&3)<<6|n,a=0;break}}if(a===1)throw Error(Th);return c-u};Ji.test=function(r){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r)}});var Ph=d((_N,Ah)=>{"use strict";Ah.exports=Qi;function Qi(){this._listeners={}}Qi.prototype.on=function(r,o,c){return(this._listeners[r]||(this._listeners[r]=[])).push({fn:o,ctx:c||this}),this};Qi.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};Qi.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 Mh=d((yN,wh)=>{"use strict";wh.exports=Nh(Nh);function Nh(i){return typeof Float32Array<"u"?function(){var r=new Float32Array([-0]),o=new Uint8Array(r.buffer),c=o[3]===128;function 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,Rh),i.writeFloatBE=r.bind(null,xh);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,Ih),i.readFloatBE=o.bind(null,Lh)}(),typeof Float64Array<"u"?function(){var r=new Float64Array([-0]),o=new Uint8Array(r.buffer),c=o[7]===128;function 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,Rh,0,4),i.writeDoubleBE=r.bind(null,xh,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,Ih,0,4),i.readDoubleBE=o.bind(null,Lh,4,0)}(),i}function Rh(i,r,o){r[o]=i&255,r[o+1]=i>>>8&255,r[o+2]=i>>>16&255,r[o+3]=i>>>24}function xh(i,r,o){r[o]=i>>>24,r[o+1]=i>>>16&255,r[o+2]=i>>>8&255,r[o+3]=i&255}function Ih(i,r){return(i[r]|i[r+1]<<8|i[r+2]<<16|i[r+3]<<24)>>>0}function Lh(i,r){return(i[r]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3])>>>0}});var Ch=d((exports,module)=>{"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(i){}return null}});var Dh=d(Uh=>{"use strict";var Sc=Uh;Sc.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};Sc.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))};Sc.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 Vh=d((vN,Bh)=>{"use strict";Bh.exports=VS;function VS(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 qh=d((gN,kh)=>{"use strict";kh.exports=$;var tn=$e();function $(i,r){this.lo=i>>>0,this.hi=r>>>0}var vt=$.zero=new $(0,0);vt.toNumber=function(){return 0};vt.zzEncode=vt.zzDecode=function(){return this};vt.length=function(){return 1};var kS=$.zeroHash="\0\0\0\0\0\0\0\0";$.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 $(c,u)};$.from=function(r){if(typeof r=="number")return $.fromNumber(r);if(tn.isString(r))if(tn.Long)r=tn.Long.fromString(r);else return $.fromNumber(parseInt(r,10));return r.low||r.high?new $(r.low>>>0,r.high>>>0):vt};$.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 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;$.fromHash=function(r){return r===kS?vt:new $((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)};$.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 $e=d(bc=>{"use strict";var v=bc;v.asPromise=gh();v.base64=Oh();v.EventEmitter=Ph();v.float=Mh();v.inquire=Ch();v.utf8=Dh();v.pool=Vh();v.LongBits=qh();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||bc;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 jh(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=jh;v.lcFirst=function(r){return r.charAt(0).toLowerCase()+r.substring(1)};function Gh(i){function r(o,c){if(!(this instanceof r))return new r(o,c);Object.defineProperty(this,"message",{get:function(){return o}}),Error.captureStackTrace?Error.captureStackTrace(this,r):Object.defineProperty(this,"stack",{value:new Error().stack||""}),c&&jh(this,c)}return r.prototype=Object.create(Error.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return i},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),r}v.newError=Gh;v.ProtocolError=Gh("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 Ic=d((SN,Xh)=>{"use strict";Xh.exports=x;var _e=$e(),Oc,Zi=_e.LongBits,Hh=_e.base64,Fh=_e.utf8;function rn(i,r,o){this.fn=i,this.len=r,this.next=void 0,this.val=o}function Pc(){}function qS(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(Pc,0,0),this.tail=this.head,this.states=null}var Kh=function(){return _e.Buffer?function(){return(x.create=function(){return new Oc})()}:function(){return new x}};x.create=Kh();x.alloc=function(r){return new _e.Array(r)};_e.Array!==Array&&(x.alloc=_e.pool(x.alloc,_e.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 Nc(i,r,o){r[o]=i&255}function jS(i,r,o){for(;i>127;)r[o++]=i&127|128,i>>>=7;r[o]=i}function Rc(i,r){this.len=i,this.next=void 0,this.val=r}Rc.prototype=Object.create(rn.prototype);Rc.prototype.fn=jS;x.prototype.uint32=function(r){return this.len+=(this.tail=this.tail.next=new Rc((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(xc,10,Zi.fromNumber(r)):this.uint32(r)};x.prototype.sint32=function(r){return this.uint32((r<<1^r>>31)>>>0)};function xc(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=Zi.from(r);return this._push(xc,o.length(),o)};x.prototype.int64=x.prototype.uint64;x.prototype.sint64=function(r){var o=Zi.from(r).zzEncode();return this._push(xc,o.length(),o)};x.prototype.bool=function(r){return this._push(Nc,1,r?1:0)};function Ac(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(Ac,4,r>>>0)};x.prototype.sfixed32=x.prototype.fixed32;x.prototype.fixed64=function(r){var o=Zi.from(r);return this._push(Ac,4,o.lo)._push(Ac,4,o.hi)};x.prototype.sfixed64=x.prototype.fixed64;x.prototype.float=function(r){return this._push(_e.float.writeFloatLE,4,r)};x.prototype.double=function(r){return this._push(_e.float.writeDoubleLE,8,r)};var GS=_e.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(Nc,1,0);if(_e.isString(r)){var c=x.alloc(o=Hh.length(r));Hh.decode(r,c,0),r=c}return this.uint32(o)._push(GS,o,r)};x.prototype.string=function(r){var o=Fh.length(r);return o?this.uint32(o)._push(Fh.write,o,r):this._push(Nc,1,0)};x.prototype.fork=function(){return this.states=new qS(this),this.head=this.tail=new rn(Pc,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(Pc,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){Oc=i,x.create=Kh(),Oc._configure()}});var Yh=d((bN,$h)=>{"use strict";$h.exports=xe;var zh=Ic();(xe.prototype=Object.create(zh.prototype)).constructor=xe;var Ye=$e();function xe(){zh.call(this)}xe._configure=function(){xe.alloc=Ye._Buffer_allocUnsafe,xe.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++]}};xe.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(xe.writeBytesBuffer,o,r),this};function HS(i,r,o){i.length<40?Ye.utf8.write(i,r,o):r.utf8Write?r.utf8Write(i,o):r.write(i,o)}xe.prototype.string=function(r){var o=Ye.Buffer.byteLength(r);return this.uint32(o),o&&this._push(HS,o,r),this};xe._configure()});var Mc=d((ON,em)=>{"use strict";em.exports=j;var Te=$e(),wc,Qh=Te.LongBits,FS=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 Wh=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 wc(u):Wh(u)})(o)}:Wh};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 Lc(){var i=new Qh(0,0),r=0;if(this.len-this.pos>4){for(;r<4;++r)if(i.lo=(i.lo|(this.buf[this.pos]&127)<<r*7)>>>0,this.buf[this.pos++]<128)return i;if(i.lo=(i.lo|(this.buf[this.pos]&127)<<28)>>>0,i.hi=(i.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return i;r=0}else{for(;r<3;++r){if(this.pos>=this.len)throw Se(this);if(i.lo=(i.lo|(this.buf[this.pos]&127)<<r*7)>>>0,this.buf[this.pos++]<128)return i}return i.lo=(i.lo|(this.buf[this.pos++]&127)<<r*7)>>>0,i}if(this.len-this.pos>4){for(;r<5;++r)if(i.hi=(i.hi|(this.buf[this.pos]&127)<<r*7+3)>>>0,this.buf[this.pos++]<128)return i}else for(;r<5;++r){if(this.pos>=this.len)throw Se(this);if(i.hi=(i.hi|(this.buf[this.pos]&127)<<r*7+3)>>>0,this.buf[this.pos++]<128)return i}throw Error("invalid varint encoding")}j.prototype.bool=function(){return this.uint32()!==0};function eu(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 eu(this.buf,this.pos+=4)};j.prototype.sfixed32=function(){if(this.pos+4>this.len)throw Se(this,4);return eu(this.buf,this.pos+=4)|0};function Jh(){if(this.pos+8>this.len)throw Se(this,8);return new Qh(eu(this.buf,this.pos+=4),eu(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 FS.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){wc=i,j.create=Zh(),wc._configure();var r=Te.Long?"toLong":"toNumber";Te.merge(j.prototype,{int64:function(){return Lc.call(this)[r](!1)},uint64:function(){return Lc.call(this)[r](!0)},sint64:function(){return Lc.call(this).zzDecode()[r](!1)},fixed64:function(){return Jh.call(this)[r](!0)},sfixed64:function(){return Jh.call(this)[r](!1)}})}});var om=d((AN,nm)=>{"use strict";nm.exports=gt;var rm=Mc();(gt.prototype=Object.create(rm.prototype)).constructor=gt;var tm=$e();function gt(i){rm.call(this,i)}gt._configure=function(){tm.Buffer&&(gt.prototype._slice=tm.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 um=d((PN,im)=>{"use strict";im.exports=nn;var Cc=$e();(nn.prototype=Object.create(Cc.EventEmitter.prototype)).constructor=nn;function nn(i,r,o){if(typeof i!="function")throw TypeError("rpcImpl must be a function");Cc.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 Cc.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 am=d(sm=>{"use strict";var KS=sm;KS.Service=um()});var lm=d((RN,cm)=>{"use strict";cm.exports={}});var dm=d(fm=>{"use strict";var ue=fm;ue.build="minimal";ue.Writer=Ic();ue.BufferWriter=Yh();ue.Reader=Mc();ue.BufferReader=om();ue.util=$e();ue.rpc=am();ue.roots=lm();ue.configure=pm;function pm(){ue.util._configure(),ue.Writer._configure(ue.BufferWriter),ue.Reader._configure(ue.BufferReader)}pm()});var mm=d((IN,hm)=>{"use strict";hm.exports=dm()});var ym=d((LN,_m)=>{"use strict";var g=mm(),m=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 m||(e=m.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 m||(e=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!f.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&f.isInteger(e.timeUnixNano.low)&&f.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.name!=null&&e.hasOwnProperty("name")&&!f.isString(e.name))return"name: string expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var n=0;n<e.attributes.length;++n){var 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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.traceId!=null&&e.hasOwnProperty("traceId")&&!(e.traceId&&typeof e.traceId.length=="number"||f.isString(e.traceId)))return"traceId: buffer expected";if(e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||f.isString(e.spanId)))return"spanId: buffer expected";if(e.traceState!=null&&e.hasOwnProperty("traceState")&&!f.isString(e.traceState))return"traceState: string expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var n=0;n<e.attributes.length;++n){var 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 m||(t=m.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 m||(t=new m(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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceSpans!=null&&e.hasOwnProperty("resourceSpans")){if(!Array.isArray(e.resourceSpans))return"resourceSpans: array expected";for(var n=0;n<e.resourceSpans.length;++n){var 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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(e.partialSuccess)}return n},a.toObject=function(e,n){n||(n={});var 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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedSpans!=null&&e.hasOwnProperty("rejectedSpans")&&!f.isInteger(e.rejectedSpans)&&!(e.rejectedSpans&&f.isInteger(e.rejectedSpans.low)&&f.isInteger(e.rejectedSpans.high))?"rejectedSpans: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!f.isString(e.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;return e.rejectedSpans!=null&&(f.Long?(n.rejectedSpans=f.Long.fromValue(e.rejectedSpans)).unsigned=!1:typeof e.rejectedSpans=="string"?n.rejectedSpans=parseInt(e.rejectedSpans,10):typeof e.rejectedSpans=="number"?n.rejectedSpans=e.rejectedSpans:typeof e.rejectedSpans=="object"&&(n.rejectedSpans=new f.LongBits(e.rejectedSpans.low>>>0,e.rejectedSpans.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},a.toObject=function(e,n){n||(n={});var 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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceMetrics!=null&&e.hasOwnProperty("resourceMetrics")){if(!Array.isArray(e.resourceMetrics))return"resourceMetrics: array expected";for(var n=0;n<e.resourceMetrics.length;++n){var 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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(e.partialSuccess)}return n},a.toObject=function(e,n){n||(n={});var 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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedDataPoints!=null&&e.hasOwnProperty("rejectedDataPoints")&&!f.isInteger(e.rejectedDataPoints)&&!(e.rejectedDataPoints&&f.isInteger(e.rejectedDataPoints.low)&&f.isInteger(e.rejectedDataPoints.high))?"rejectedDataPoints: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!f.isString(e.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;return e.rejectedDataPoints!=null&&(f.Long?(n.rejectedDataPoints=f.Long.fromValue(e.rejectedDataPoints)).unsigned=!1:typeof e.rejectedDataPoints=="string"?n.rejectedDataPoints=parseInt(e.rejectedDataPoints,10):typeof e.rejectedDataPoints=="number"?n.rejectedDataPoints=e.rejectedDataPoints:typeof e.rejectedDataPoints=="object"&&(n.rejectedDataPoints=new f.LongBits(e.rejectedDataPoints.low>>>0,e.rejectedDataPoints.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},a.toObject=function(e,n){n||(n={});var 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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceLogs!=null&&e.hasOwnProperty("resourceLogs")){if(!Array.isArray(e.resourceLogs))return"resourceLogs: array expected";for(var n=0;n<e.resourceLogs.length;++n){var 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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(e.partialSuccess)}return n},a.toObject=function(e,n){n||(n={});var 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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedLogRecords!=null&&e.hasOwnProperty("rejectedLogRecords")&&!f.isInteger(e.rejectedLogRecords)&&!(e.rejectedLogRecords&&f.isInteger(e.rejectedLogRecords.low)&&f.isInteger(e.rejectedLogRecords.high))?"rejectedLogRecords: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!f.isString(e.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;return e.rejectedLogRecords!=null&&(f.Long?(n.rejectedLogRecords=f.Long.fromValue(e.rejectedLogRecords)).unsigned=!1:typeof e.rejectedLogRecords=="string"?n.rejectedLogRecords=parseInt(e.rejectedLogRecords,10):typeof e.rejectedLogRecords=="number"?n.rejectedLogRecords=e.rejectedLogRecords:typeof e.rejectedLogRecords=="object"&&(n.rejectedLogRecords=new f.LongBits(e.rejectedLogRecords.low>>>0,e.rejectedLogRecords.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},a.toObject=function(e,n){n||(n={});var 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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(e=m.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 m||(e=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(e=m.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 m||(e=new m(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 m||(e=m.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 m||(e=new m(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 m||(e=m.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 m||(e=new m(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 m||(n=m.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 P=n.uint32()+n.pos;n.pos<P;)h.bucketCounts.push(n.uint64());else h.bucketCounts.push(n.uint64());break}default:n.skipType(T&7);break}}return h},t.decodeDelimited=function(n){return n instanceof m||(n=new m(n)),this.decode(n,n.uint32())},t.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.offset!=null&&n.hasOwnProperty("offset")&&!f.isInteger(n.offset))return"offset: integer expected";if(n.bucketCounts!=null&&n.hasOwnProperty("bucketCounts")){if(!Array.isArray(n.bucketCounts))return"bucketCounts: array expected";for(var 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 m||(t=m.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 m||(t=new m(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 m||(e=m.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 m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.quantile!=null&&e.hasOwnProperty("quantile")&&typeof e.quantile!="number"?"quantile: number expected":e.value!=null&&e.hasOwnProperty("value")&&typeof e.value!="number"?"value: number expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return e;var n=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;return e.quantile!=null&&(n.quantile=Number(e.quantile)),e.value!=null&&(n.value=Number(e.value)),n},a.toObject=function(e,n){n||(n={});var 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 m||(e=m.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 m||(e=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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 m||(t=m.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 m||(t=new m(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}();_m.exports=p});var tu=d(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.ServiceClientType=void 0;var XS;(function(i){i[i.SPANS=0]="SPANS",i[i.METRICS=1]="METRICS",i[i.LOGS=2]="LOGS"})(XS=on.ServiceClientType||(on.ServiceClientType={}))});var un=d(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.getExportRequestProto=void 0;var Uc=ym(),Em=tu();function zS(i){return i===Em.ServiceClientType.SPANS?Uc.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest:i===Em.ServiceClientType.LOGS?Uc.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest:Uc.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest}ru.getExportRequestProto=zS});var Dc=d(nu=>{"use strict";Object.defineProperty(nu,"__esModule",{value:!0});nu.send=void 0;var vm=Wi(),$S=un();function YS(i,r,o,c,u){let a=i.convert(r),t=(0,$S.getExportRequestProto)(i.getServiceClientType()),e=t.create(a);if(e){let n=t.encode(e).finish();n&&(0,vm.sendWithHttp)(i,Buffer.from(n),"application/x-protobuf",c,u)}else u(new vm.OTLPExporterError("No proto"))}nu.send=YS});var gm=d(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.OTLPProtoExporterNodeBase=void 0;var WS=(y(),E(_)),JS=Wi(),Bc=class extends JS.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){WS.diag.debug("Shutdown already started. Cannot send objects");return}this._send?this._sendPromise(r,o,c):setImmediate(()=>{let{send:u}=Dc();this._send=u,this._sendPromise(r,o,c)})}};ou.OTLPProtoExporterNodeBase=Bc});var Tm=d(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.send=_r.OTLPProtoExporterNodeBase=void 0;var QS=gm();Object.defineProperty(_r,"OTLPProtoExporterNodeBase",{enumerable:!0,get:function(){return QS.OTLPProtoExporterNodeBase}});var ZS=Dc();Object.defineProperty(_r,"send",{enumerable:!0,get:function(){return ZS.send}})});var Sm=d(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});iu.OTLPProtoExporterBrowserBase=void 0;var eb=(y(),E(_)),Vc=Wi(),tb=un(),kc=class extends Vc.OTLPExporterBrowserBase{constructor(r={}){super(r)}send(r,o,c){if(this._shutdownOnce.isCalled){eb.diag.debug("Shutdown already started. Cannot send objects");return}let u=this.convert(r),a=(0,tb.getExportRequestProto)(this.getServiceClientType()),t=a.create(u);if(t){let e=a.encode(t).finish();e&&(0,Vc.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 Vc.OTLPExporterError("No proto"))}};iu.OTLPProtoExporterBrowserBase=kc});var bm=d(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.ServiceClientType=yr.OTLPProtoExporterBrowserBase=void 0;var rb=Sm();Object.defineProperty(yr,"OTLPProtoExporterBrowserBase",{enumerable:!0,get:function(){return rb.OTLPProtoExporterBrowserBase}});var nb=tu();Object.defineProperty(yr,"ServiceClientType",{enumerable:!0,get:function(){return nb.ServiceClientType}})});var Am=d(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.getExportRequestProto=ye.ServiceClientType=ye.OTLPProtoExporterBrowserBase=ye.send=ye.OTLPProtoExporterNodeBase=void 0;var Om=Tm();Object.defineProperty(ye,"OTLPProtoExporterNodeBase",{enumerable:!0,get:function(){return Om.OTLPProtoExporterNodeBase}});Object.defineProperty(ye,"send",{enumerable:!0,get:function(){return Om.send}});var ob=bm();Object.defineProperty(ye,"OTLPProtoExporterBrowserBase",{enumerable:!0,get:function(){return ob.OTLPProtoExporterBrowserBase}});var ib=tu();Object.defineProperty(ye,"ServiceClientType",{enumerable:!0,get:function(){return ib.ServiceClientType}});var ub=un();Object.defineProperty(ye,"getExportRequestProto",{enumerable:!0,get:function(){return ub.getExportRequestProto}})});var G=J(xs(),1);y();Cs();var wm=J(Ef(),1),gr=J(pt(),1),Mm=J(Cf(),1),Cm=J(qd(),1),Um=J(fe(),1),Tr=J(dn(),1),Dm=J(Gd(),1),be=J(N(),1);y();var KT=Symbol.for("@vercel/request-context");function ar(){return globalThis[KT]?.get()}var ec=J(fe(),1);function Vi(i){return Object.fromEntries(Object.entries(i).filter(([r,o])=>o!==void 0))}function Hd(i){return i?i.split("::").at(-1):void 0}function Fd(i=ar()){if(i)return Vi({[ec.SemanticAttributes.HTTP_HOST]:i.headers.host,[ec.SemanticAttributes.HTTP_USER_AGENT]:i.headers["user-agent"],"http.referer":i.headers.referer,"vercel.request_id":Hd(i.headers["x-vercel-id"]),"vercel.matched_path":i.headers["x-matched-path"],"vercel.edge_region":i.headers["x-vercel-edge-region"]})}y();function zr(i){return(i&_.TraceFlags.SAMPLED)!==0}var ki=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=>{_.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,{rootSpanId:u,open:[]}):this.rootSpanIds.get(c)?.open.push(r),t&&zr(a)){let e=Fd();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),e=t?.rootSpanId===c;if(a){let n=XT(r);n&&Object.assign(r.attributes,n)}if(e){if(this.rootSpanIds.delete(o),t.open.length>0){for(let n of t.open)if(!n.ended&&n.spanContext().spanId!==c)try{n.end()}catch(s){_.diag.error("@vercel/otel: onEnd failed:",s)}}}else if(t)for(let n=0;n<t.open.length;n++)t.open[n]?.spanContext().spanId===c&&t.open.splice(n,1);for(let n of this.processors)n.onEnd(r);if(e){let n=this.waitSpanEnd.get(o);n&&(this.waitSpanEnd.delete(o),n())}}},Kd={[_.SpanKind.INTERNAL]:"internal",[_.SpanKind.SERVER]:"server",[_.SpanKind.CLIENT]:"client",[_.SpanKind.PRODUCER]:"producer",[_.SpanKind.CONSUMER]:"consumer"};function XT(i){let{kind:r,attributes:o}=i,{"operation.name":c,"resouce.name":u,"span.type":a,"next.span_type":t,"http.method":e,"http.route":n}=o;if(c)return;let s=i.instrumentationLibrary.name,l=t??a;if(l&&typeof l=="string"){let h=tc(s,l);return n?{"operation.name":h,"resource.name":u??n}:{"operation.name":h}}return e&&n&&typeof e=="string"&&typeof n=="string"?{"operation.name":tc(s,`http.${Kd[r]||"internal"}.${e}`),"resource.name":u??n}:{"operation.name":tc(s,r===_.SpanKind.INTERNAL?"":Kd[r])}}function tc(i,r){if(!i)return r;let o=i.replace(/[ @./]/g,"_");return o.startsWith("_")&&(o=o.slice(1)),r?`${o}.${r}`:o}var oh=J(ac(),1);var nh=J(Yr(),1);y();var cr=class extends nh.OTLPExporterBase{constructor(r={}){super(r),r.headers&&(this._headers=r.headers)}onShutdown(){_.diag.debug("@vercel/otel/otlp: onShutdown")}onInit(){_.diag.debug("@vercel/otel/otlp: onInit")}send(r,o,c){if(this._shutdownOnce.isCalled){_.diag.debug("@vercel/otel/otlp: Shutdown already started. Cannot send objects");return}let u=this.convert(r),a,t,e;try{({body:a,contentType:t,headers:e}=this.toMessage(u))}catch(s){_.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=>{_.diag.debug("@vercel/otel/otlp: onSuccess",s.status,s.statusText),o(),s.arrayBuffer().catch(()=>{})}).catch(s=>{_.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 dS="v1/traces",hS=`http://localhost:4318/${dS}`;function Hi(i){return typeof i.url=="string"?i.url:hS}var lr=class{constructor(r={}){this.impl=new fc(r)}export(r,o){this.impl.export(r,o)}shutdown(){return this.impl.shutdown()}forceFlush(){return this.impl.forceFlush()}},fc=class extends cr{convert(r){return(0,oh.createExportTraceServiceRequest)(r,{useHex:!0,useLongBits:!1})}toMessage(r){return{body:JSON.stringify(r),contentType:"application/json"}}getDefaultUrl(r){return Hi(r)}};var Pm=J(ac(),1),Nm=J(Am(),1),Rm=J(un(),1);var Tt=class{constructor(r={}){this.impl=new qc(r)}export(r,o){this.impl.export(r,o)}shutdown(){return this.impl.shutdown()}forceFlush(){return this.impl.forceFlush()}},qc=class extends cr{convert(r){return(0,Pm.createExportTraceServiceRequest)(r,void 0)}toMessage(r){let o=Nm.ServiceClientType.SPANS,c=(0,Rm.getExportRequestProto)(o),u=c.create(r);return{body:c.encode(u).finish(),contentType:"application/x-protobuf",headers:{accept:"application/x-protobuf"}}}getDefaultUrl(r){return Hi(r)}};y();var Ce=J(fe(),1);function xm(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=(P,R)=>{if(R?.opentelemetry?.ignore!==void 0)return R.opentelemetry.ignore;if(c.length===0)return!1;let I=P.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=(P,R)=>{if(R?.opentelemetry?.propagateContext)return R.opentelemetry.propagateContext;let I=P.toString();return n.length>0&&n.some(b=>typeof b=="string"?b==="*"?!0:I.startsWith(b):b.test(I))?!1:a&&P.protocol==="https:"&&(P.host===a||P.host===t||P.host===ar()?.headers.host)||!a&&P.protocol==="http:"&&P.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=async(P,R)=>{let I=R;if(I?.next?.internal)return h(P,I);let b=new Request(P instanceof Request?P.clone():P,I),L=new URL(b.url);if(u(L,I))return h(P,I);let k={[Ce.SemanticAttributes.HTTP_METHOD]:b.method,[Ce.SemanticAttributes.HTTP_URL]:b.url,[Ce.SemanticAttributes.HTTP_HOST]:L.host,[Ce.SemanticAttributes.HTTP_SCHEME]:L.protocol.replace(":",""),[Ce.SemanticAttributes.NET_PEER_NAME]:L.hostname,[Ce.SemanticAttributes.NET_PEER_PORT]:L.port},se=s?xm(s,k):ab(b.url),Gc=I?.opentelemetry?.spanName??`fetch ${b.method} ${b.url}`,H=o.startSpan(Gc,{kind:_.SpanKind.CLIENT,attributes:{...k,"operation.name":`fetch.${b.method}`,"resource.name":se,...I?.opentelemetry?.attributes}},_.context.active());if(!H.isRecording()||!zr(H.spanContext().traceFlags))return H.end(),h(P,I);l(L,I)&&_.propagation.inject(_.context.active(),b.headers,sb);try{let sn=Date.now(),We=await h(P,{...I,headers:b.headers}),Vm=Date.now()-sn;return H.setAttribute(Ce.SemanticAttributes.HTTP_STATUS_CODE,We.status),H.setAttribute("http.response_time",Vm),We.status>=500&&jc(H,`Status: ${We.status} (${We.statusText})`),We.body?cb(We).then(su=>{H.isRecording()&&(H.setAttribute(Ce.SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED,su),H.end())},su=>{H.isRecording()&&(jc(H,su),H.end())}):H.end(),We}catch(sn){throw jc(H,sn),H.end(),sn}};globalThis.fetch=T}disable(){this.originalFetch&&(globalThis.fetch=this.originalFetch)}},sb={set(i,r,o){i.set(r,o)}};function ab(i){let r=i.indexOf("?");return r===-1?i:i.substring(0,r)}function cb(i){let r=0,c=i.clone().body?.getReader();if(!c)return Promise.resolve(0);let u=()=>c.read().then(({done:a,value:t})=>{if(!a)return r+=t.byteLength,u()});return u().then(()=>r)}function jc(i,r){if(r instanceof Error)i.recordException(r),i.setStatus({code:_.SpanStatusCode.ERROR,message:r.message});else{let o=String(r);i.setStatus({code:_.SpanStatusCode.ERROR,message:o})}}var uu=class{constructor(r={}){this.configuration=r}start(){let r=lb(),o=(0,Tr.getEnvWithoutDefaults)(),c=this.configuration,u=process.env.NEXT_RUNTIME||"nodejs",a=!!r.OTEL_SDK_DISABLED;if(o.OTEL_LOG_LEVEL&&_.diag.setLogger(new _.DiagConsoleLogger,{logLevel:o.OTEL_LOG_LEVEL}),a)return;let t=c.idGenerator??new G.RandomIdGenerator,e=c.contextManager??new Dm.AsyncLocalStorageContextManager;e.enable(),this.contextManager=e;let n=r.OTEL_SERVICE_NAME||c.serviceName||"app",s=new gr.Resource(Vi({[Um.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=fb(c.propagators,r),P=db(c.traceSampler,r),R=hb(c.spanProcessors,c,r);R.length===0&&_.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:P,spanLimits:I});if(b.addSpanProcessor(new ki(R)),b.register({contextManager:e,propagator:new be.CompositePropagator({propagators:T})}),this.tracerProvider=b,c.logRecordProcessor){let k=new Mm.LoggerProvider({resource:s});this.loggerProvider=k,k.addLogRecordProcessor(c.logRecordProcessor),ht.logs.setGlobalLoggerProvider(k)}if(c.metricReader||c.views){let k=new Cm.MeterProvider({resource:s,views:c.views??[]});c.metricReader&&k.addMetricReader(c.metricReader),_.metrics.setGlobalMeterProvider(k),this.meterProvider=k}let L=pb(c.instrumentations,c.instrumentationConfig);this.disableInstumentations=(0,wm.registerInstrumentations)({instrumentations:L}),_.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()),_.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 lb(){let i=(0,Tr.parseEnvironment)(process.env);return{...Tr.DEFAULT_ENVIRONMENT,...i}}function pb(i,r){return(i??["auto"]).map(o=>o==="auto"?(_.diag.debug("@vercel/otel: Configure instrumentations: fetch",r?.fetch),[new Er(r?.fetch)]):o==="fetch"?(_.diag.debug("@vercel/otel: Configure instrumentations: fetch",r?.fetch),new Er(r?.fetch)):o).flat()}function fb(i,r){let o=r.OTEL_PROPAGATORS&&r.OTEL_PROPAGATORS.length>0?r.OTEL_PROPAGATORS:void 0;return(i??o??["auto"]).map(c=>{if(c==="none")return[];if(c==="auto")return _.diag.debug("@vercel/otel: Configure propagators: tracecontext, baggage"),[new be.W3CTraceContextPropagator,new be.W3CBaggagePropagator];if(c==="tracecontext")return _.diag.debug("@vercel/otel: Configure propagator: tracecontext"),new be.W3CTraceContextPropagator;if(c==="baggage")return _.diag.debug("@vercel/otel: Configure propagator: baggage"),new be.W3CBaggagePropagator;if(typeof c=="string")throw new Error(`Unknown propagator: "${c}"`);return c}).flat()}var Im="always_on",vr=1;function db(i,r){if(i&&typeof i!="string")return i;let o=i&&i!=="auto"?i:r.OTEL_TRACES_SAMPLER||Im;switch(_.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(Lm(r));case"parentbased_traceidratio":return new G.ParentBasedSampler({root:new G.TraceIdRatioBasedSampler(Lm(r))});default:return _.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER value "${String(r.OTEL_TRACES_SAMPLER)} invalid, defaulting to ${Im}".`),new G.AlwaysOnSampler}}function Lm(i){if(i.OTEL_TRACES_SAMPLER_ARG===void 0||i.OTEL_TRACES_SAMPLER_ARG==="")return _.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${vr}.`),vr;_.diag.debug("@vercel/otel: Configure sampler probability: ",i.OTEL_TRACES_SAMPLER_ARG);let r=Number(i.OTEL_TRACES_SAMPLER_ARG);return isNaN(r)?(_.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${i.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${vr}.`),vr):r<0||r>1?(_.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${i.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${vr}.`),vr):r}function hb(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";_.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(mb(r.traceExporter,o)):void 0}return c}).filter(Eb)}function mb(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=yb(r),u={...be.baggageUtils.parseKeyPairsIntoRecord(r.OTEL_EXPORTER_OTLP_HEADERS),...be.baggageUtils.parseKeyPairsIntoRecord(r.OTEL_EXPORTER_OTLP_TRACES_HEADERS)};switch(_.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 _.diag.warn(`@vercel/otel: Unsupported OTLP traces protocol: ${o}. Using http/protobuf.`),new Tt}}var Bm="v1/traces",_b=`http://localhost:4318/${Bm}`;function yb(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}/${Bm}`:_b}function Eb(i){return i!=null}function oR(i){let r;i?typeof i=="string"?r={serviceName:i}:r=i:r={},new uu(r).start()}export{Er as FetchInstrumentation,lr as OTLPHttpJsonTraceExporter,Tt as OTLPHttpProtoTraceExporter,oR as registerOTel};
|