@vercel/otel 1.2.0 → 1.2.1-c67c01a2-20240201214812
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/edge/index.js.map +3 -3
- package/dist/node/index.js +5 -5
- package/dist/node/index.js.map +3 -3
- package/package.json +1 -1
package/dist/node/index.js
CHANGED
|
@@ -4,18 +4,18 @@ 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 N_=Object.create;var ou=Object.defineProperty;var R_=Object.getOwnPropertyDescriptor;var x_=Object.getOwnPropertyNames;var I_=Object.getPrototypeOf,L_=Object.prototype.hasOwnProperty;var K=(u=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(u,{get:(r,o)=>(typeof require<"u"?require:r)[o]}):u)(function(u){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+u+'" is not supported')});var Cc=(u,r)=>()=>(u&&(r=u(u=0)),r);var d=(u,r)=>()=>(r||u((r={exports:{}}).exports,r),r.exports);var nn=(u,r,o,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of x_(r))!L_.call(u,i)&&i!==o&&ou(u,i,{get:()=>r[i],enumerable:!(c=R_(r,i))||c.enumerable});return u},Tt=(u,r,o)=>(nn(u,r,"default"),o&&nn(o,r,"default")),W=(u,r,o)=>(o=u!=null?N_(I_(u)):{},nn(r||!u||!u.__esModule?ou(o,"default",{value:u,enumerable:!0}):o,u)),E=u=>nn(ou({},"__esModule",{value:!0}),u);var m={};import*as sb from"@opentelemetry/api";var y=Cc(()=>{Tt(m,sb)});var vr=d(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.isTracingSuppressed=Me.unsuppressTracing=Me.suppressTracing=void 0;var w_=(y(),E(m)),iu=(0,w_.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function M_(u){return u.setValue(iu,!0)}Me.suppressTracing=M_;function C_(u){return u.deleteValue(iu)}Me.unsuppressTracing=C_;function U_(u){return u.getValue(iu)===!0}Me.isTracingSuppressed=U_});var uu=d(J=>{"use strict";Object.defineProperty(J,"__esModule",{value:!0});J.BAGGAGE_MAX_TOTAL_LENGTH=J.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=J.BAGGAGE_MAX_NAME_VALUE_PAIRS=J.BAGGAGE_HEADER=J.BAGGAGE_ITEMS_SEPARATOR=J.BAGGAGE_PROPERTIES_SEPARATOR=J.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;J.BAGGAGE_KEY_PAIR_SEPARATOR="=";J.BAGGAGE_PROPERTIES_SEPARATOR=";";J.BAGGAGE_ITEMS_SEPARATOR=",";J.BAGGAGE_HEADER="baggage";J.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;J.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;J.BAGGAGE_MAX_TOTAL_LENGTH=8192});var su=d(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.parseKeyPairsIntoRecord=be.parsePairKeyValue=be.getKeyPairs=be.serializeKeyPairs=void 0;var D_=(y(),E(m)),Ye=uu();function B_(u){return u.reduce((r,o)=>{let c=`${r}${r!==""?Ye.BAGGAGE_ITEMS_SEPARATOR:""}${o}`;return c.length>Ye.BAGGAGE_MAX_TOTAL_LENGTH?r:c},"")}be.serializeKeyPairs=B_;function V_(u){return u.getAllEntries().map(([r,o])=>{let c=`${encodeURIComponent(r)}=${encodeURIComponent(o.value)}`;return o.metadata!==void 0&&(c+=Ye.BAGGAGE_PROPERTIES_SEPARATOR+o.metadata.toString()),c})}be.getKeyPairs=V_;function Uc(u){let r=u.split(Ye.BAGGAGE_PROPERTIES_SEPARATOR);if(r.length<=0)return;let o=r.shift();if(!o)return;let c=o.indexOf(Ye.BAGGAGE_KEY_PAIR_SEPARATOR);if(c<=0)return;let i=decodeURIComponent(o.substring(0,c).trim()),a=decodeURIComponent(o.substring(c+1).trim()),t;return r.length>0&&(t=(0,D_.baggageEntryMetadataFromString)(r.join(Ye.BAGGAGE_PROPERTIES_SEPARATOR))),{key:i,value:a,metadata:t}}be.parsePairKeyValue=Uc;function k_(u){return typeof u!="string"||u.length===0?{}:u.split(Ye.BAGGAGE_ITEMS_SEPARATOR).map(r=>Uc(r)).filter(r=>r!==void 0&&r.value.length>0).reduce((r,o)=>(r[o.key]=o.value,r),{})}be.parseKeyPairsIntoRecord=k_});var Dc=d(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.W3CBaggagePropagator=void 0;var au=(y(),E(m)),q_=vr(),We=uu(),cu=su(),lu=class{inject(r,o,c){let i=au.propagation.getBaggage(r);if(!i||(0,q_.isTracingSuppressed)(r))return;let a=(0,cu.getKeyPairs)(i).filter(e=>e.length<=We.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,We.BAGGAGE_MAX_NAME_VALUE_PAIRS),t=(0,cu.serializeKeyPairs)(a);t.length>0&&c.set(o,We.BAGGAGE_HEADER,t)}extract(r,o,c){let i=c.get(o,We.BAGGAGE_HEADER),a=Array.isArray(i)?i.join(We.BAGGAGE_ITEMS_SEPARATOR):i;if(!a)return r;let t={};return a.length===0||(a.split(We.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let s=(0,cu.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:au.propagation.setBaggage(r,au.propagation.createBaggage(t))}fields(){return[We.BAGGAGE_HEADER]}};on.W3CBaggagePropagator=lu});var Bc=d(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.AnchoredClock=void 0;var pu=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}};un.AnchoredClock=pu});var Gc=d(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.isAttributeValue=Ce.isAttributeKey=Ce.sanitizeAttributes=void 0;var Vc=(y(),E(m));function j_(u){let r={};if(typeof u!="object"||u==null)return r;for(let[o,c]of Object.entries(u)){if(!kc(o)){Vc.diag.warn(`Invalid attribute key: ${o}`);continue}if(!qc(c)){Vc.diag.warn(`Invalid attribute value set for key: ${o}`);continue}Array.isArray(c)?r[o]=c.slice():r[o]=c}return r}Ce.sanitizeAttributes=j_;function kc(u){return typeof u=="string"&&u.length>0}Ce.isAttributeKey=kc;function qc(u){return u==null?!0:Array.isArray(u)?G_(u):jc(u)}Ce.isAttributeValue=qc;function G_(u){let r;for(let o of u)if(o!=null){if(!r){if(jc(o)){r=typeof o;continue}return!1}if(typeof o!==r)return!1}return!0}function jc(u){switch(typeof u){case"number":case"boolean":case"string":return!0}return!1}});var fu=d(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.loggingErrorHandler=void 0;var H_=(y(),E(m));function F_(){return u=>{H_.diag.error(K_(u))}}sn.loggingErrorHandler=F_;function K_(u){return typeof u=="string"?u:JSON.stringify(X_(u))}function X_(u){let r={},o=u;for(;o!==null;)Object.getOwnPropertyNames(o).forEach(c=>{if(r[c])return;let i=o[c];i&&(r[c]=String(i))}),o=Object.getPrototypeOf(o);return r}});var du=d(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.globalErrorHandler=gt.setGlobalErrorHandler=void 0;var z_=fu(),Hc=(0,z_.loggingErrorHandler)();function $_(u){Hc=u}gt.setGlobalErrorHandler=$_;function Y_(u){try{Hc(u)}catch{}}gt.globalErrorHandler=Y_});var hu=d(Tr=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:!0});Tr.TracesSamplerValues=void 0;var W_;(function(u){u.AlwaysOff="always_off",u.AlwaysOn="always_on",u.ParentBasedAlwaysOff="parentbased_always_off",u.ParentBasedAlwaysOn="parentbased_always_on",u.ParentBasedTraceIdRatio="parentbased_traceidratio",u.TraceIdRatio="traceidratio"})(W_=Tr.TracesSamplerValues||(Tr.TracesSamplerValues={}))});var Fc=d(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an._globalThis=void 0;an._globalThis=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});var cn=d(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.getEnvWithoutDefaults=M.parseEnvironment=M.DEFAULT_ENVIRONMENT=M.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=M.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=M.DEFAULT_ATTRIBUTE_COUNT_LIMIT=M.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=void 0;var Ue=(y(),E(m)),J_=hu(),Q_=Fc(),Z_=",",em=["OTEL_SDK_DISABLED"];function tm(u){return em.indexOf(u)>-1}var rm=["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 nm(u){return rm.indexOf(u)>-1}var om=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function im(u){return om.indexOf(u)>-1}M.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=1/0;M.DEFAULT_ATTRIBUTE_COUNT_LIMIT=128;M.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=128;M.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=128;M.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:Ue.DiagLogLevel.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:M.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_ATTRIBUTE_COUNT_LIMIT:M.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:M.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:M.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:M.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:M.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:M.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:M.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:J_.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 um(u,r,o){if(typeof o[u]>"u")return;let c=String(o[u]);r[u]=c.toLowerCase()==="true"}function sm(u,r,o,c=-1/0,i=1/0){if(typeof o[u]<"u"){let a=Number(o[u]);isNaN(a)||(a<c?r[u]=c:a>i?r[u]=i:r[u]=a)}}function am(u,r,o,c=Z_){let i=o[u];typeof i=="string"&&(r[u]=i.split(c).map(a=>a.trim()))}var cm={ALL:Ue.DiagLogLevel.ALL,VERBOSE:Ue.DiagLogLevel.VERBOSE,DEBUG:Ue.DiagLogLevel.DEBUG,INFO:Ue.DiagLogLevel.INFO,WARN:Ue.DiagLogLevel.WARN,ERROR:Ue.DiagLogLevel.ERROR,NONE:Ue.DiagLogLevel.NONE};function lm(u,r,o){let c=o[u];if(typeof c=="string"){let i=cm[c.toUpperCase()];i!=null&&(r[u]=i)}}function _u(u){let r={};for(let o in M.DEFAULT_ENVIRONMENT){let c=o;switch(c){case"OTEL_LOG_LEVEL":lm(c,r,u);break;default:if(tm(c))um(c,r,u);else if(nm(c))sm(c,r,u);else if(im(c))am(c,r,u);else{let i=u[c];typeof i<"u"&&i!==null&&(r[c]=String(i))}}}return r}M.parseEnvironment=_u;function pm(){return typeof process<"u"&&process&&process.env?_u(process.env):_u(Q_._globalThis)}M.getEnvWithoutDefaults=pm});var Xc=d(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.getEnv=void 0;var fm=K("os"),Kc=cn();function dm(){let u=(0,Kc.parseEnvironment)(process.env);return Object.assign({HOSTNAME:fm.hostname()},Kc.DEFAULT_ENVIRONMENT,u)}ln.getEnv=dm});var zc=d(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn._globalThis=void 0;pn._globalThis=typeof globalThis=="object"?globalThis:global});var Yc=d(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.hexToBase64=void 0;function $c(u){return u>=48&&u<=57?u-48:u>=97&&u<=102?u-87:u-55}var hm=Buffer.alloc(8),_m=Buffer.alloc(16);function mm(u){let r;u.length===16?r=hm:u.length===32?r=_m:r=Buffer.alloc(u.length/2);let o=0;for(let c=0;c<u.length;c+=2){let i=$c(u.charCodeAt(c)),a=$c(u.charCodeAt(c+1));r.writeUInt8(i<<4|a,o++)}return r.toString("base64")}fn.hexToBase64=mm});var Qc=d(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.RandomIdGenerator=void 0;var ym=8,Jc=16,mu=class{constructor(){this.generateTraceId=Wc(Jc),this.generateSpanId=Wc(ym)}};hn.RandomIdGenerator=mu;var dn=Buffer.allocUnsafe(Jc);function Wc(u){return function(){for(let o=0;o<u/4;o++)dn.writeUInt32BE(Math.random()*2**32>>>0,o*4);for(let o=0;o<u&&!(dn[o]>0);o++)o===u-1&&(dn[u-1]=1);return dn.toString("hex",0,u)}}});var Zc=d(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.otperformance=void 0;var Em=K("perf_hooks");_n.otperformance=Em.performance});var yu=d(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.VERSION=void 0;mn.VERSION="1.19.0"});var el=d(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.MessageTypeValues=x.RpcGrpcStatusCodeValues=x.MessagingOperationValues=x.MessagingDestinationKindValues=x.HttpFlavorValues=x.NetHostConnectionSubtypeValues=x.NetHostConnectionTypeValues=x.NetTransportValues=x.FaasInvokedProviderValues=x.FaasDocumentOperationValues=x.FaasTriggerValues=x.DbCassandraConsistencyLevelValues=x.DbSystemValues=x.SemanticAttributes=void 0;x.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"};x.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"};x.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"};x.FaasTriggerValues={DATASOURCE:"datasource",HTTP:"http",PUBSUB:"pubsub",TIMER:"timer",OTHER:"other"};x.FaasDocumentOperationValues={INSERT:"insert",EDIT:"edit",DELETE:"delete"};x.FaasInvokedProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};x.NetTransportValues={IP_TCP:"ip_tcp",IP_UDP:"ip_udp",IP:"ip",UNIX:"unix",PIPE:"pipe",INPROC:"inproc",OTHER:"other"};x.NetHostConnectionTypeValues={WIFI:"wifi",WIRED:"wired",CELL:"cell",UNAVAILABLE:"unavailable",UNKNOWN:"unknown"};x.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"};x.HttpFlavorValues={HTTP_1_0:"1.0",HTTP_1_1:"1.1",HTTP_2_0:"2.0",SPDY:"SPDY",QUIC:"QUIC"};x.MessagingDestinationKindValues={QUEUE:"queue",TOPIC:"topic"};x.MessagingOperationValues={RECEIVE:"receive",PROCESS:"process"};x.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};x.MessageTypeValues={SENT:"SENT",RECEIVED:"RECEIVED"}});var tl=d(Je=>{"use strict";var vm=Je&&Je.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),Tm=Je&&Je.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&vm(r,u,o)};Object.defineProperty(Je,"__esModule",{value:!0});Tm(el(),Je)});var rl=d(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.TelemetrySdkLanguageValues=Q.OsTypeValues=Q.HostArchValues=Q.AwsEcsLaunchtypeValues=Q.CloudPlatformValues=Q.CloudProviderValues=Q.SemanticResourceAttributes=void 0;Q.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"};Q.CloudProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};Q.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"};Q.AwsEcsLaunchtypeValues={EC2:"ec2",FARGATE:"fargate"};Q.HostArchValues={AMD64:"amd64",ARM32:"arm32",ARM64:"arm64",IA64:"ia64",PPC32:"ppc32",PPC64:"ppc64",X86:"x86"};Q.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"};Q.TelemetrySdkLanguageValues={CPP:"cpp",DOTNET:"dotnet",ERLANG:"erlang",GO:"go",JAVA:"java",NODEJS:"nodejs",PHP:"php",PYTHON:"python",RUBY:"ruby",WEBJS:"webjs"}});var nl=d(Qe=>{"use strict";var gm=Qe&&Qe.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),Sm=Qe&&Qe.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&gm(r,u,o)};Object.defineProperty(Qe,"__esModule",{value:!0});Sm(rl(),Qe)});var le=d(De=>{"use strict";var bm=De&&De.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),ol=De&&De.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&bm(r,u,o)};Object.defineProperty(De,"__esModule",{value:!0});ol(tl(),De);ol(nl(),De)});var il=d(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.SDK_INFO=void 0;var Om=yu(),gr=le();yn.SDK_INFO={[gr.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:"opentelemetry",[gr.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"node",[gr.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:gr.TelemetrySdkLanguageValues.NODEJS,[gr.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:Om.VERSION}});var ul=d(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.unrefTimer=void 0;function Am(u){u.unref()}En.unrefTimer=Am});var sl=d(ue=>{"use strict";var Pm=ue&&ue.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),Ze=ue&&ue.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Pm(r,u,o)};Object.defineProperty(ue,"__esModule",{value:!0});Ze(Xc(),ue);Ze(zc(),ue);Ze(Yc(),ue);Ze(Qc(),ue);Ze(Zc(),ue);Ze(il(),ue);Ze(ul(),ue)});var Eu=d(et=>{"use strict";var Nm=et&&et.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),Rm=et&&et.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Nm(r,u,o)};Object.defineProperty(et,"__esModule",{value:!0});Rm(sl(),et)});var pl=d(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.addHrTimes=w.isTimeInput=w.isTimeInputHrTime=w.hrTimeToMicroseconds=w.hrTimeToMilliseconds=w.hrTimeToNanoseconds=w.hrTimeToTimeStamp=w.hrTimeDuration=w.timeInputToHrTime=w.hrTime=w.getTimeOrigin=w.millisToHrTime=void 0;var vu=Eu(),al=9,xm=6,Im=Math.pow(10,xm),vn=Math.pow(10,al);function Sr(u){let r=u/1e3,o=Math.trunc(r),c=Math.round(u%1e3*Im);return[o,c]}w.millisToHrTime=Sr;function Tu(){let u=vu.otperformance.timeOrigin;if(typeof u!="number"){let r=vu.otperformance;u=r.timing&&r.timing.fetchStart}return u}w.getTimeOrigin=Tu;function cl(u){let r=Sr(Tu()),o=Sr(typeof u=="number"?u:vu.otperformance.now());return ll(r,o)}w.hrTime=cl;function Lm(u){if(gu(u))return u;if(typeof u=="number")return u<Tu()?cl(u):Sr(u);if(u instanceof Date)return Sr(u.getTime());throw TypeError("Invalid input type")}w.timeInputToHrTime=Lm;function wm(u,r){let o=r[0]-u[0],c=r[1]-u[1];return c<0&&(o-=1,c+=vn),[o,c]}w.hrTimeDuration=wm;function Mm(u){let r=al,o=`${"0".repeat(r)}${u[1]}Z`,c=o.substr(o.length-r-1);return new Date(u[0]*1e3).toISOString().replace("000Z",c)}w.hrTimeToTimeStamp=Mm;function Cm(u){return u[0]*vn+u[1]}w.hrTimeToNanoseconds=Cm;function Um(u){return u[0]*1e3+u[1]/1e6}w.hrTimeToMilliseconds=Um;function Dm(u){return u[0]*1e6+u[1]/1e3}w.hrTimeToMicroseconds=Dm;function gu(u){return Array.isArray(u)&&u.length===2&&typeof u[0]=="number"&&typeof u[1]=="number"}w.isTimeInputHrTime=gu;function Bm(u){return gu(u)||typeof u=="number"||u instanceof Date}w.isTimeInput=Bm;function ll(u,r){let o=[u[0]+r[0],u[1]+r[1]];return o[1]>=vn&&(o[1]-=vn,o[0]+=1),o}w.addHrTimes=ll});var dl=d(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0})});var hl=d(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.ExportResultCode=void 0;var Vm;(function(u){u[u.SUCCESS=0]="SUCCESS",u[u.FAILED=1]="FAILED"})(Vm=br.ExportResultCode||(br.ExportResultCode={}))});var ml=d(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.CompositePropagator=void 0;var _l=(y(),E(m)),Su=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,i)=>c.concat(i),[])))}inject(r,o,c){for(let i of this._propagators)try{i.inject(r,o,c)}catch(a){_l.diag.warn(`Failed to inject with ${i.constructor.name}. Err: ${a.message}`)}}extract(r,o,c){return this._propagators.reduce((i,a)=>{try{return a.extract(i,o,c)}catch(t){_l.diag.warn(`Failed to inject with ${a.constructor.name}. Err: ${t.message}`)}return i},r)}fields(){return this._fields.slice()}};Tn.CompositePropagator=Su});var yl=d(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.validateValue=St.validateKey=void 0;var bu="[_0-9a-z-*/]",km=`[a-z]${bu}{0,255}`,qm=`[a-z0-9]${bu}{0,240}@[a-z]${bu}{0,13}`,jm=new RegExp(`^(?:${km}|${qm})$`),Gm=/^[ -~]{0,255}[!-~]$/,Hm=/,|=/;function Fm(u){return jm.test(u)}St.validateKey=Fm;function Km(u){return Gm.test(u)&&!Hm.test(u)}St.validateValue=Km});var Au=d(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.TraceState=void 0;var El=yl(),vl=32,Xm=512,Tl=",",gl="=",Ou=class u{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+gl+this.get(o)),r),[]).join(Tl)}_parse(r){r.length>Xm||(this._internalState=r.split(Tl).reverse().reduce((o,c)=>{let i=c.trim(),a=i.indexOf(gl);if(a!==-1){let t=i.slice(0,a),e=i.slice(a+1,c.length);(0,El.validateKey)(t)&&(0,El.validateValue)(e)&&o.set(t,e)}return o},new Map),this._internalState.size>vl&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,vl))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let r=new u;return r._internalState=new Map(this._internalState),r}};gn.TraceState=Ou});var bl=d(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.W3CTraceContextPropagator=Z.parseTraceParent=Z.TRACE_STATE_HEADER=Z.TRACE_PARENT_HEADER=void 0;var Sn=(y(),E(m)),zm=vr(),$m=Au();Z.TRACE_PARENT_HEADER="traceparent";Z.TRACE_STATE_HEADER="tracestate";var Ym="00",Wm="(?!ff)[\\da-f]{2}",Jm="(?![0]{32})[\\da-f]{32}",Qm="(?![0]{16})[\\da-f]{16}",Zm="[\\da-f]{2}",ey=new RegExp(`^\\s?(${Wm})-(${Jm})-(${Qm})-(${Zm})(-.*)?\\s?$`);function Sl(u){let r=ey.exec(u);return!r||r[1]==="00"&&r[5]?null:{traceId:r[2],spanId:r[3],traceFlags:parseInt(r[4],16)}}Z.parseTraceParent=Sl;var Pu=class{inject(r,o,c){let i=Sn.trace.getSpanContext(r);if(!i||(0,zm.isTracingSuppressed)(r)||!(0,Sn.isSpanContextValid)(i))return;let a=`${Ym}-${i.traceId}-${i.spanId}-0${Number(i.traceFlags||Sn.TraceFlags.NONE).toString(16)}`;c.set(o,Z.TRACE_PARENT_HEADER,a),i.traceState&&c.set(o,Z.TRACE_STATE_HEADER,i.traceState.serialize())}extract(r,o,c){let i=c.get(o,Z.TRACE_PARENT_HEADER);if(!i)return r;let a=Array.isArray(i)?i[0]:i;if(typeof a!="string")return r;let t=Sl(a);if(!t)return r;t.isRemote=!0;let e=c.get(o,Z.TRACE_STATE_HEADER);if(e){let n=Array.isArray(e)?e.join(","):e;t.traceState=new $m.TraceState(typeof n=="string"?n:void 0)}return Sn.trace.setSpanContext(r,t)}fields(){return[Z.TRACE_PARENT_HEADER,Z.TRACE_STATE_HEADER]}};Z.W3CTraceContextPropagator=Pu});var Al=d(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0})});var Pl=d(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.getRPCMetadata=ye.deleteRPCMetadata=ye.setRPCMetadata=ye.RPCType=void 0;var ty=(y(),E(m)),Nu=(0,ty.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),ry;(function(u){u.HTTP="http"})(ry=ye.RPCType||(ye.RPCType={}));function ny(u,r){return u.setValue(Nu,r)}ye.setRPCMetadata=ny;function oy(u){return u.deleteValue(Nu)}ye.deleteRPCMetadata=oy;function iy(u){return u.getValue(Nu)}ye.getRPCMetadata=iy});var xu=d(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.AlwaysOffSampler=void 0;var uy=(y(),E(m)),Ru=class{shouldSample(){return{decision:uy.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};bn.AlwaysOffSampler=Ru});var Lu=d(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.AlwaysOnSampler=void 0;var sy=(y(),E(m)),Iu=class{shouldSample(){return{decision:sy.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};On.AlwaysOnSampler=Iu});var Rl=d(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.ParentBasedSampler=void 0;var An=(y(),E(m)),ay=du(),Nl=xu(),wu=Lu(),Mu=class{constructor(r){var o,c,i,a;this._root=r.root,this._root||((0,ay.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new wu.AlwaysOnSampler),this._remoteParentSampled=(o=r.remoteParentSampled)!==null&&o!==void 0?o:new wu.AlwaysOnSampler,this._remoteParentNotSampled=(c=r.remoteParentNotSampled)!==null&&c!==void 0?c:new Nl.AlwaysOffSampler,this._localParentSampled=(i=r.localParentSampled)!==null&&i!==void 0?i:new wu.AlwaysOnSampler,this._localParentNotSampled=(a=r.localParentNotSampled)!==null&&a!==void 0?a:new Nl.AlwaysOffSampler}shouldSample(r,o,c,i,a,t){let e=An.trace.getSpanContext(r);return!e||!(0,An.isSpanContextValid)(e)?this._root.shouldSample(r,o,c,i,a,t):e.isRemote?e.traceFlags&An.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(r,o,c,i,a,t):this._remoteParentNotSampled.shouldSample(r,o,c,i,a,t):e.traceFlags&An.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(r,o,c,i,a,t):this._localParentNotSampled.shouldSample(r,o,c,i,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()}}`}};Pn.ParentBasedSampler=Mu});var xl=d(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.TraceIdRatioBasedSampler=void 0;var Cu=(y(),E(m)),Uu=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,Cu.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?Cu.SamplingDecision.RECORD_AND_SAMPLED:Cu.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 i=c*8,a=parseInt(r.slice(i,i+8),16);o=(o^a)>>>0}return o}};Nn.TraceIdRatioBasedSampler=Uu});var Cl=d(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.isPlainObject=void 0;var cy="[object Object]",ly="[object Null]",py="[object Undefined]",fy=Function.prototype,Il=fy.toString,dy=Il.call(Object),hy=_y(Object.getPrototypeOf,Object),Ll=Object.prototype,wl=Ll.hasOwnProperty,tt=Symbol?Symbol.toStringTag:void 0,Ml=Ll.toString;function _y(u,r){return function(o){return u(r(o))}}function my(u){if(!yy(u)||Ey(u)!==cy)return!1;let r=hy(u);if(r===null)return!0;let o=wl.call(r,"constructor")&&r.constructor;return typeof o=="function"&&o instanceof o&&Il.call(o)===dy}Rn.isPlainObject=my;function yy(u){return u!=null&&typeof u=="object"}function Ey(u){return u==null?u===void 0?py:ly:tt&&tt in Object(u)?vy(u):Ty(u)}function vy(u){let r=wl.call(u,tt),o=u[tt],c=!1;try{u[tt]=void 0,c=!0}catch{}let i=Ml.call(u);return c&&(r?u[tt]=o:delete u[tt]),i}function Ty(u){return Ml.call(u)}});var kl=d(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.merge=void 0;var Ul=Cl(),gy=20;function Sy(...u){let r=u.shift(),o=new WeakMap;for(;u.length>0;)r=Bl(r,u.shift(),0,o);return r}Ln.merge=Sy;function Du(u){return In(u)?u.slice():u}function Bl(u,r,o=0,c){let i;if(!(o>gy)){if(o++,xn(u)||xn(r)||Vl(r))i=Du(r);else if(In(u)){if(i=u.slice(),In(r))for(let a=0,t=r.length;a<t;a++)i.push(Du(r[a]));else if(Or(r)){let a=Object.keys(r);for(let t=0,e=a.length;t<e;t++){let n=a[t];i[n]=Du(r[n])}}}else if(Or(u))if(Or(r)){if(!by(u,r))return r;i=Object.assign({},u);let a=Object.keys(r);for(let t=0,e=a.length;t<e;t++){let n=a[t],s=r[n];if(xn(s))typeof s>"u"?delete i[n]:i[n]=s;else{let l=i[n],h=s;if(Dl(u,n,c)||Dl(r,n,c))delete i[n];else{if(Or(l)&&Or(h)){let v=c.get(l)||[],b=c.get(h)||[];v.push({obj:u,key:n}),b.push({obj:r,key:n}),c.set(l,v),c.set(h,b)}i[n]=Bl(i[n],s,o,c)}}}}else i=r;return i}}function Dl(u,r,o){let c=o.get(u[r])||[];for(let i=0,a=c.length;i<a;i++){let t=c[i];if(t.key===r&&t.obj===u)return!0}return!1}function In(u){return Array.isArray(u)}function Vl(u){return typeof u=="function"}function Or(u){return!xn(u)&&!In(u)&&!Vl(u)&&typeof u=="object"}function xn(u){return typeof u=="string"||typeof u=="number"||typeof u=="boolean"||typeof u>"u"||u instanceof Date||u instanceof RegExp||u===null}function by(u,r){return!(!(0,Ul.isPlainObject)(u)||!(0,Ul.isPlainObject)(r))}});var ql=d(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.callWithTimeout=bt.TimeoutError=void 0;var wn=class u extends Error{constructor(r){super(r),Object.setPrototypeOf(this,u.prototype)}};bt.TimeoutError=wn;function Oy(u,r){let o,c=new Promise(function(a,t){o=setTimeout(function(){t(new wn("Operation timed out."))},r)});return Promise.race([u,c]).then(i=>(clearTimeout(o),i),i=>{throw clearTimeout(o),i})}bt.callWithTimeout=Oy});var Gl=d(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.isUrlIgnored=Ot.urlMatches=void 0;function jl(u,r){return typeof r=="string"?u===r:!!u.match(r)}Ot.urlMatches=jl;function Ay(u,r){if(!r)return!1;for(let o of r)if(jl(u,o))return!0;return!1}Ot.isUrlIgnored=Ay});var Hl=d(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.isWrapped=void 0;function Py(u){return typeof u=="function"&&typeof u.__original=="function"&&typeof u.__unwrap=="function"&&u.__wrapped===!0}Mn.isWrapped=Py});var Fl=d(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.Deferred=void 0;var Bu=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)}};Cn.Deferred=Bu});var Kl=d(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.BindOnceFuture=void 0;var Ny=Fl(),Vu=class{constructor(r,o){this._callback=r,this._that=o,this._isCalled=!1,this._deferred=new Ny.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}};Un.BindOnceFuture=Vu});var zl=d(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn._export=void 0;var Xl=(y(),E(m)),Ry=vr();function xy(u,r){return new Promise(o=>{Xl.context.with((0,Ry.suppressTracing)(Xl.context.active()),()=>{u.export(r,c=>{o(c)})})})}Dn._export=xy});var P=d(A=>{"use strict";var Iy=A&&A.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),L=A&&A.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Iy(r,u,o)};Object.defineProperty(A,"__esModule",{value:!0});A.internal=A.baggageUtils=void 0;L(Dc(),A);L(Bc(),A);L(Gc(),A);L(du(),A);L(fu(),A);L(pl(),A);L(dl(),A);L(hl(),A);A.baggageUtils=su();L(Eu(),A);L(ml(),A);L(bl(),A);L(Al(),A);L(Pl(),A);L(xu(),A);L(Lu(),A);L(Rl(),A);L(xl(),A);L(vr(),A);L(Au(),A);L(cn(),A);L(kl(),A);L(hu(),A);L(ql(),A);L(Gl(),A);L(Hl(),A);L(Kl(),A);L(yu(),A);var Ly=zl();A.internal={_export:Ly._export}});var $l=d(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.ExceptionEventName=void 0;Bn.ExceptionEventName="exception"});var qu=d(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.Span=void 0;var Oe=(y(),E(m)),ee=P(),rt=le(),wy=$l(),ku=class{constructor(r,o,c,i,a,t,e=[],n,s,l){this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:Oe.SpanStatusCode.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=c,this._spanContext=i,this.parentSpanId=t,this.kind=a,this.links=e;let h=Date.now();this._performanceStartTime=ee.otperformance.now(),this._performanceOffset=h-(this._performanceStartTime+(0,ee.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?(Oe.diag.warn(`Invalid attribute key: ${r}`),this):(0,ee.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):(Oe.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 Oe.diag.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(Oe.diag.warn("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),(0,ee.isTimeInput)(o)&&((0,ee.isTimeInput)(c)||(c=o),o=void 0);let i=(0,ee.sanitizeAttributes)(o);return this.events.push({name:r,attributes:i,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()){Oe.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,ee.hrTimeDuration)(this.startTime,this.endTime),this._duration[0]<0&&(Oe.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<ee.otperformance.now())return(0,ee.hrTime)(r+this._performanceOffset);if(typeof r=="number")return(0,ee.millisToHrTime)(r);if(r instanceof Date)return(0,ee.millisToHrTime)(r.getTime());if((0,ee.isTimeInputHrTime)(r))return r;if(this._startTimeProvided)return(0,ee.millisToHrTime)(Date.now());let o=ee.otperformance.now()-this._performanceStartTime;return(0,ee.addHrTimes)(this.startTime,(0,ee.millisToHrTime)(o))}isRecording(){return this._ended===!1}recordException(r,o){let c={};typeof r=="string"?c[rt.SemanticAttributes.EXCEPTION_MESSAGE]=r:r&&(r.code?c[rt.SemanticAttributes.EXCEPTION_TYPE]=r.code.toString():r.name&&(c[rt.SemanticAttributes.EXCEPTION_TYPE]=r.name),r.message&&(c[rt.SemanticAttributes.EXCEPTION_MESSAGE]=r.message),r.stack&&(c[rt.SemanticAttributes.EXCEPTION_STACKTRACE]=r.stack)),c[rt.SemanticAttributes.EXCEPTION_TYPE]||c[rt.SemanticAttributes.EXCEPTION_MESSAGE]?this.addEvent(wy.ExceptionEventName,c,o):Oe.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&&Oe.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?(Oe.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}};Vn.Span=ku});var Pr=d(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.SamplingDecision=void 0;var My;(function(u){u[u.NOT_RECORD=0]="NOT_RECORD",u[u.RECORD=1]="RECORD",u[u.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(My=Ar.SamplingDecision||(Ar.SamplingDecision={}))});var qn=d(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.AlwaysOffSampler=void 0;var Cy=Pr(),ju=class{shouldSample(){return{decision:Cy.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};kn.AlwaysOffSampler=ju});var Gn=d(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.AlwaysOnSampler=void 0;var Uy=Pr(),Gu=class{shouldSample(){return{decision:Uy.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};jn.AlwaysOnSampler=Gu});var Ku=d(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.ParentBasedSampler=void 0;var Hn=(y(),E(m)),Dy=P(),Yl=qn(),Hu=Gn(),Fu=class{constructor(r){var o,c,i,a;this._root=r.root,this._root||((0,Dy.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Hu.AlwaysOnSampler),this._remoteParentSampled=(o=r.remoteParentSampled)!==null&&o!==void 0?o:new Hu.AlwaysOnSampler,this._remoteParentNotSampled=(c=r.remoteParentNotSampled)!==null&&c!==void 0?c:new Yl.AlwaysOffSampler,this._localParentSampled=(i=r.localParentSampled)!==null&&i!==void 0?i:new Hu.AlwaysOnSampler,this._localParentNotSampled=(a=r.localParentNotSampled)!==null&&a!==void 0?a:new Yl.AlwaysOffSampler}shouldSample(r,o,c,i,a,t){let e=Hn.trace.getSpanContext(r);return!e||!(0,Hn.isSpanContextValid)(e)?this._root.shouldSample(r,o,c,i,a,t):e.isRemote?e.traceFlags&Hn.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(r,o,c,i,a,t):this._remoteParentNotSampled.shouldSample(r,o,c,i,a,t):e.traceFlags&Hn.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(r,o,c,i,a,t):this._localParentNotSampled.shouldSample(r,o,c,i,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()}}`}};Fn.ParentBasedSampler=Fu});var zu=d(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.TraceIdRatioBasedSampler=void 0;var By=(y(),E(m)),Wl=Pr(),Xu=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,By.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?Wl.SamplingDecision.RECORD_AND_SAMPLED:Wl.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 i=c*8,a=parseInt(r.slice(i,i+8),16);o=(o^a)>>>0}return o}};Kn.TraceIdRatioBasedSampler=Xu});var Wu=d(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.buildSamplerFromEnv=Pt.loadDefaultConfig=void 0;var Xn=(y(),E(m)),$=P(),Jl=qn(),$u=Gn(),Yu=Ku(),Ql=zu(),Vy=(0,$.getEnv)(),ky=$.TracesSamplerValues.AlwaysOn,At=1;function qy(){return{sampler:ep(Vy),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,$.getEnv)().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,$.getEnv)().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:(0,$.getEnv)().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,$.getEnv)().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:(0,$.getEnv)().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:(0,$.getEnv)().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:(0,$.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:(0,$.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}Pt.loadDefaultConfig=qy;function ep(u=(0,$.getEnv)()){switch(u.OTEL_TRACES_SAMPLER){case $.TracesSamplerValues.AlwaysOn:return new $u.AlwaysOnSampler;case $.TracesSamplerValues.AlwaysOff:return new Jl.AlwaysOffSampler;case $.TracesSamplerValues.ParentBasedAlwaysOn:return new Yu.ParentBasedSampler({root:new $u.AlwaysOnSampler});case $.TracesSamplerValues.ParentBasedAlwaysOff:return new Yu.ParentBasedSampler({root:new Jl.AlwaysOffSampler});case $.TracesSamplerValues.TraceIdRatio:return new Ql.TraceIdRatioBasedSampler(Zl(u));case $.TracesSamplerValues.ParentBasedTraceIdRatio:return new Yu.ParentBasedSampler({root:new Ql.TraceIdRatioBasedSampler(Zl(u))});default:return Xn.diag.error(`OTEL_TRACES_SAMPLER value "${u.OTEL_TRACES_SAMPLER} invalid, defaulting to ${ky}".`),new $u.AlwaysOnSampler}}Pt.buildSamplerFromEnv=ep;function Zl(u){if(u.OTEL_TRACES_SAMPLER_ARG===void 0||u.OTEL_TRACES_SAMPLER_ARG==="")return Xn.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${At}.`),At;let r=Number(u.OTEL_TRACES_SAMPLER_ARG);return isNaN(r)?(Xn.diag.error(`OTEL_TRACES_SAMPLER_ARG=${u.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${At}.`),At):r<0||r>1?(Xn.diag.error(`OTEL_TRACES_SAMPLER_ARG=${u.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${At}.`),At):r}});var Qu=d(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.reconfigureLimits=Nt.mergeConfig=void 0;var tp=Wu(),Ju=P();function jy(u){let r={sampler:(0,tp.buildSamplerFromEnv)()},o=(0,tp.loadDefaultConfig)(),c=Object.assign({},o,r,u);return c.generalLimits=Object.assign({},o.generalLimits,u.generalLimits||{}),c.spanLimits=Object.assign({},o.spanLimits,u.spanLimits||{}),c}Nt.mergeConfig=jy;function Gy(u){var r,o,c,i,a,t,e,n,s,l,h,v;let b=Object.assign({},u.spanLimits),N=(0,Ju.getEnvWithoutDefaults)();return b.attributeCountLimit=(t=(a=(i=(o=(r=u.spanLimits)===null||r===void 0?void 0:r.attributeCountLimit)!==null&&o!==void 0?o:(c=u.generalLimits)===null||c===void 0?void 0:c.attributeCountLimit)!==null&&i!==void 0?i:N.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&a!==void 0?a:N.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&t!==void 0?t:Ju.DEFAULT_ATTRIBUTE_COUNT_LIMIT,b.attributeValueLengthLimit=(v=(h=(l=(n=(e=u.spanLimits)===null||e===void 0?void 0:e.attributeValueLengthLimit)!==null&&n!==void 0?n:(s=u.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&&v!==void 0?v:Ju.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},u,{spanLimits:b})}Nt.reconfigureLimits=Gy});var rp=d(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.BatchSpanProcessorBase=void 0;var Rt=(y(),E(m)),nt=P(),Zu=class{constructor(r,o){this._exporter=r,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;let c=(0,nt.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 nt.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(Rt.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&Rt.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&&Rt.diag.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(Rt.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=[],i=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let a=0,t=i;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);Rt.context.with((0,nt.suppressTracing)(Rt.context.active()),()=>{let i=this._finishedSpans.splice(0,this._maxExportBatchSize),a=()=>this._exporter.export(i,e=>{var n;clearTimeout(c),e.code===nt.ExportResultCode.SUCCESS?r():o((n=e.error)!==null&&n!==void 0?n:new Error("BatchSpanProcessor: span export failed"))}),t=i.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,nt.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,nt.globalErrorHandler)(o)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return r();this._timer===void 0&&(this._timer=setTimeout(()=>r(),this._scheduledDelayMillis),(0,nt.unrefTimer)(this._timer))}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}};zn.BatchSpanProcessorBase=Zu});var np=d($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.BatchSpanProcessor=void 0;var Hy=rp(),es=class extends Hy.BatchSpanProcessorBase{onShutdown(){}};$n.BatchSpanProcessor=es});var up=d(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.RandomIdGenerator=void 0;var Fy=8,ip=16,ts=class{constructor(){this.generateTraceId=op(ip),this.generateSpanId=op(Fy)}};Wn.RandomIdGenerator=ts;var Yn=Buffer.allocUnsafe(ip);function op(u){return function(){for(let o=0;o<u/4;o++)Yn.writeUInt32BE(Math.random()*2**32>>>0,o*4);for(let o=0;o<u&&!(Yn[o]>0);o++)o===u-1&&(Yn[u-1]=1);return Yn.toString("hex",0,u)}}});var ap=d(Be=>{"use strict";var Ky=Be&&Be.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),sp=Be&&Be.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Ky(r,u,o)};Object.defineProperty(Be,"__esModule",{value:!0});sp(np(),Be);sp(up(),Be)});var Jn=d(ot=>{"use strict";var Xy=ot&&ot.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),zy=ot&&ot.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Xy(r,u,o)};Object.defineProperty(ot,"__esModule",{value:!0});zy(ap(),ot)});var cp=d(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.Tracer=void 0;var Y=(y(),E(m)),Qn=P(),$y=qu(),Yy=Qu(),Wy=Jn(),rs=class{constructor(r,o,c){this._tracerProvider=c;let i=(0,Yy.mergeConfig)(o);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=o.idGenerator||new Wy.RandomIdGenerator,this.resource=c.resource,this.instrumentationLibrary=r}startSpan(r,o={},c=Y.context.active()){var i,a,t;o.root&&(c=Y.trace.deleteSpan(c));let e=Y.trace.getSpan(c);if((0,Qn.isTracingSuppressed)(c))return Y.diag.debug("Instrumentation suppressed, returning Noop Span"),Y.trace.wrapSpanContext(Y.INVALID_SPAN_CONTEXT);let n=e?.spanContext(),s=this._idGenerator.generateSpanId(),l,h,v;!n||!Y.trace.isSpanContextValid(n)?l=this._idGenerator.generateTraceId():(l=n.traceId,h=n.traceState,v=n.spanId);let b=(i=o.kind)!==null&&i!==void 0?i:Y.SpanKind.INTERNAL,N=((a=o.links)!==null&&a!==void 0?a:[]).map(rn=>({context:rn.context,attributes:(0,Qn.sanitizeAttributes)(rn.attributes)})),V=(0,Qn.sanitizeAttributes)(o.attributes),I=this._sampler.shouldSample(c,l,r,b,V,N);h=(t=I.traceState)!==null&&t!==void 0?t:h;let U=I.decision===Y.SamplingDecision.RECORD_AND_SAMPLED?Y.TraceFlags.SAMPLED:Y.TraceFlags.NONE,F={traceId:l,spanId:s,traceFlags:U,traceState:h};if(I.decision===Y.SamplingDecision.NOT_RECORD)return Y.diag.debug("Recording is off, propagating context in a non-recording span"),Y.trace.wrapSpanContext(F);let me=(0,Qn.sanitizeAttributes)(Object.assign(V,I.attributes));return new $y.Span(this,c,r,F,b,v,N,o.startTime,void 0,me)}startActiveSpan(r,o,c,i){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=i);let n=t??Y.context.active(),s=this.startSpan(r,a,n),l=Y.trace.setSpan(n,s);return Y.context.with(l,e,void 0,s)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}getActiveSpanProcessor(){return this._tracerProvider.getActiveSpanProcessor()}};Zn.Tracer=rs});var lp=d(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.defaultServiceName=void 0;function Jy(){return`unknown_service:${process.argv0}`}eo.defaultServiceName=Jy});var ns=d(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.normalizeType=xt.normalizeArch=void 0;var Qy=u=>{switch(u){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return u}};xt.normalizeArch=Qy;var Zy=u=>{switch(u){case"sunos":return"solaris";case"win32":return"windows";default:return u}};xt.normalizeType=Zy});var ro=d(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.execAsync=void 0;var eE=K("child_process"),tE=K("util");to.execAsync=tE.promisify(eE.exec)});var pp=d(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.getMachineId=void 0;var rE=ro(),nE=(y(),E(m));async function oE(){try{let r=(await(0,rE.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(u){nE.diag.debug(`error reading machine id: ${u}`)}return""}no.getMachineId=oE});var fp=d(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.getMachineId=void 0;var iE=K("fs"),uE=(y(),E(m));async function sE(){let u=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let r of u)try{return(await iE.promises.readFile(r,{encoding:"utf8"})).trim()}catch(o){uE.diag.debug(`error reading machine id: ${o}`)}return""}oo.getMachineId=sE});var hp=d(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.getMachineId=void 0;var aE=K("fs"),cE=ro(),dp=(y(),E(m));async function lE(){try{return(await aE.promises.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(u){dp.diag.debug(`error reading machine id: ${u}`)}try{return(await(0,cE.execAsync)("kenv -q smbios.system.uuid")).stdout.trim()}catch(u){dp.diag.debug(`error reading machine id: ${u}`)}return""}io.getMachineId=lE});var mp=d(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo.getMachineId=void 0;var _p=K("process"),pE=ro(),fE=(y(),E(m));async function dE(){let u="QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",r="%windir%\\System32\\REG.exe";_p.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in _p.env&&(r="%windir%\\sysnative\\cmd.exe /c "+r);try{let c=(await(0,pE.execAsync)(`${r} ${u}`)).stdout.split("REG_SZ");if(c.length===2)return c[1].trim()}catch(o){fE.diag.debug(`error reading machine id: ${o}`)}return""}uo.getMachineId=dE});var yp=d(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.getMachineId=void 0;var hE=(y(),E(m));async function _E(){return hE.diag.debug("could not read machine-id: unsupported platform"),""}so.getMachineId=_E});var Ep=d(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.getMachineId=void 0;var mE=K("process"),It;xe.getMachineId=It;switch(mE.platform){case"darwin":xe.getMachineId=It=pp().getMachineId;break;case"linux":xe.getMachineId=It=fp().getMachineId;break;case"freebsd":xe.getMachineId=It=hp().getMachineId;break;case"win32":xe.getMachineId=It=mp().getMachineId;break;default:xe.getMachineId=It=yp().getMachineId}});var us=d(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.hostDetectorSync=void 0;var os=le(),yE=it(),vp=K("os"),EE=ns(),vE=Ep(),is=class{detect(r){let o={[os.SemanticResourceAttributes.HOST_NAME]:(0,vp.hostname)(),[os.SemanticResourceAttributes.HOST_ARCH]:(0,EE.normalizeArch)((0,vp.arch)())};return new yE.Resource(o,this._getAsyncAttributes())}_getAsyncAttributes(){return(0,vE.getMachineId)().then(r=>{let o={};return r&&(o[os.SemanticResourceAttributes.HOST_ID]=r),o})}};ao.hostDetectorSync=new is});var Tp=d(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.hostDetector=void 0;var TE=us(),ss=class{detect(r){return Promise.resolve(TE.hostDetectorSync.detect(r))}};co.hostDetector=new ss});var cs=d(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.osDetectorSync=void 0;var gp=le(),gE=it(),Sp=K("os"),SE=ns(),as=class{detect(r){let o={[gp.SemanticResourceAttributes.OS_TYPE]:(0,SE.normalizeType)((0,Sp.platform)()),[gp.SemanticResourceAttributes.OS_VERSION]:(0,Sp.release)()};return new gE.Resource(o)}};lo.osDetectorSync=new as});var bp=d(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.osDetector=void 0;var bE=cs(),ls=class{detect(r){return Promise.resolve(bE.osDetectorSync.detect(r))}};po.osDetector=new ls});var fs=d(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.processDetectorSync=void 0;var OE=(y(),E(m)),Ie=le(),AE=it(),PE=K("os"),ps=class{detect(r){let o={[Ie.SemanticResourceAttributes.PROCESS_PID]:process.pid,[Ie.SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME]:process.title,[Ie.SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH]:process.execPath,[Ie.SemanticResourceAttributes.PROCESS_COMMAND_ARGS]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[Ie.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]:process.versions.node,[Ie.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"nodejs",[Ie.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]:"Node.js"};process.argv.length>1&&(o[Ie.SemanticResourceAttributes.PROCESS_COMMAND]=process.argv[1]);try{let c=PE.userInfo();o[Ie.SemanticResourceAttributes.PROCESS_OWNER]=c.username}catch(c){OE.diag.debug(`error obtaining process owner: ${c}`)}return new AE.Resource(o)}};fo.processDetectorSync=new ps});var Op=d(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.processDetector=void 0;var NE=fs(),ds=class{detect(r){return Promise.resolve(NE.processDetectorSync.detect(r))}};ho.processDetector=new ds});var Ap=d(se=>{"use strict";var RE=se&&se.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),ut=se&&se.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&RE(r,u,o)};Object.defineProperty(se,"__esModule",{value:!0});ut(lp(),se);ut(Tp(),se);ut(bp(),se);ut(us(),se);ut(cs(),se);ut(Op(),se);ut(fs(),se)});var hs=d(st=>{"use strict";var xE=st&&st.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),IE=st&&st.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&xE(r,u,o)};Object.defineProperty(st,"__esModule",{value:!0});IE(Ap(),st)});var it=d(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.Resource=void 0;var Pp=(y(),E(m)),at=le(),_s=P(),LE=hs(),Nr=class u{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(i=>(this._attributes=Object.assign({},this._attributes,i),this.asyncAttributesPending=!1,i),i=>(Pp.diag.debug("a resource's async attributes promise rejected: %s",i),this.asyncAttributesPending=!1,{}))}static empty(){return u.EMPTY}static default(){return new u({[at.SemanticResourceAttributes.SERVICE_NAME]:(0,LE.defaultServiceName)(),[at.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:_s.SDK_INFO[at.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE],[at.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:_s.SDK_INFO[at.SemanticResourceAttributes.TELEMETRY_SDK_NAME],[at.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:_s.SDK_INFO[at.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]})}get attributes(){var r;return this.asyncAttributesPending&&Pp.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 u(c);let i=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 u(c,i)}};_o.Resource=Nr;Nr.EMPTY=new Nr({})});var Rp=d(Np=>{"use strict";Object.defineProperty(Np,"__esModule",{value:!0})});var Ip=d(xp=>{"use strict";Object.defineProperty(xp,"__esModule",{value:!0})});var wp=d(Lp=>{"use strict";Object.defineProperty(Lp,"__esModule",{value:!0})});var Mp=d(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.browserDetector=void 0;var wE=ct(),ms=class{detect(r){return Promise.resolve(wE.browserDetectorSync.detect(r))}};mo.browserDetector=new ms});var Es=d(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.envDetectorSync=void 0;var ME=(y(),E(m)),CE=P(),UE=le(),DE=it(),ys=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,CE.getEnv)(),i=c.OTEL_RESOURCE_ATTRIBUTES,a=c.OTEL_SERVICE_NAME;if(i)try{let t=this._parseResourceAttributes(i);Object.assign(o,t)}catch(t){ME.diag.debug(`EnvDetector failed: ${t.message}`)}return a&&(o[UE.SemanticResourceAttributes.SERVICE_NAME]=a),new DE.Resource(o)}_parseResourceAttributes(r){if(!r)return{};let o={},c=r.split(this._COMMA_SEPARATOR,-1);for(let i of c){let a=i.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)}};yo.envDetectorSync=new ys});var Cp=d(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});Eo.envDetector=void 0;var BE=Es(),vs=class{detect(r){return Promise.resolve(BE.envDetectorSync.detect(r))}};Eo.envDetector=new vs});var Up=d(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.browserDetectorSync=void 0;var vo=le(),Ts=ct(),VE=(y(),E(m)),gs=class{detect(r){if(!(typeof navigator<"u"))return Ts.Resource.empty();let c={[vo.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"browser",[vo.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]:"Web Browser",[vo.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]:navigator.userAgent};return this._getResourceAttributes(c,r)}_getResourceAttributes(r,o){return r[vo.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]===""?(VE.diag.debug("BrowserDetector failed: Unable to find required browser resources. "),Ts.Resource.empty()):new Ts.Resource(Object.assign({},r))}};To.browserDetectorSync=new gs});var Dp=d(Ae=>{"use strict";var kE=Ae&&Ae.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),go=Ae&&Ae.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&kE(r,u,o)};Object.defineProperty(Ae,"__esModule",{value:!0});go(Mp(),Ae);go(Cp(),Ae);go(Up(),Ae);go(Es(),Ae)});var Bp=d(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.isPromiseLike=void 0;var qE=u=>u!==null&&typeof u=="object"&&typeof u.then=="function";So.isPromiseLike=qE});var kp=d(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.detectResourcesSync=wt.detectResources=void 0;var Rr=it(),Lt=(y(),E(m)),jE=Bp(),GE=async(u={})=>{let r=await Promise.all((u.detectors||[]).map(async o=>{try{let c=await o.detect(u);return Lt.diag.debug(`${o.constructor.name} found resource.`,c),c}catch(c){return Lt.diag.debug(`${o.constructor.name} failed: ${c.message}`),Rr.Resource.empty()}}));return Vp(r),r.reduce((o,c)=>o.merge(c),Rr.Resource.empty())};wt.detectResources=GE;var HE=(u={})=>{var r;let o=((r=u.detectors)!==null&&r!==void 0?r:[]).map(i=>{try{let a=i.detect(u),t;if((0,jE.isPromiseLike)(a)){let e=async()=>(await a).attributes;t=new Rr.Resource({},e())}else t=a;return t.waitForAsyncAttributes?t.waitForAsyncAttributes().then(()=>Lt.diag.debug(`${i.constructor.name} found resource.`,t)):Lt.diag.debug(`${i.constructor.name} found resource.`,t),t}catch(a){return Lt.diag.error(`${i.constructor.name} failed: ${a.message}`),Rr.Resource.empty()}}),c=o.reduce((i,a)=>i.merge(a),Rr.Resource.empty());return c.waitForAsyncAttributes&&c.waitForAsyncAttributes().then(()=>{Vp(o)}),c};wt.detectResourcesSync=HE;var Vp=u=>{u.forEach(r=>{if(Object.keys(r.attributes).length>0){let o=JSON.stringify(r.attributes,null,4);Lt.diag.verbose(o)}})}});var ct=d(ae=>{"use strict";var FE=ae&&ae.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),lt=ae&&ae.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&FE(r,u,o)};Object.defineProperty(ae,"__esModule",{value:!0});lt(it(),ae);lt(Rp(),ae);lt(hs(),ae);lt(Ip(),ae);lt(wp(),ae);lt(Dp(),ae);lt(kp(),ae)});var qp=d(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.MultiSpanProcessor=void 0;var KE=P(),Ss=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,KE.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)})}};bo.MultiSpanProcessor=Ss});var Os=d(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.NoopSpanProcessor=void 0;var bs=class{onStart(r,o){}onEnd(r){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}};Oo.NoopSpanProcessor=bs});var Gp=d(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.BasicTracerProvider=pt.ForceFlushState=void 0;var Mt=(y(),E(m)),Ut=P(),jp=ct(),XE=As(),zE=Wu(),$E=qp(),YE=Os(),WE=Jn(),JE=Qu(),Ct;(function(u){u[u.resolved=0]="resolved",u[u.timeout=1]="timeout",u[u.error=2]="error",u[u.unresolved=3]="unresolved"})(Ct=pt.ForceFlushState||(pt.ForceFlushState={}));var xr=class{constructor(r={}){var o;this._registeredSpanProcessors=[],this._tracers=new Map;let c=(0,Ut.merge)({},(0,zE.loadDefaultConfig)(),(0,JE.reconfigureLimits)(r));this.resource=(o=c.resource)!==null&&o!==void 0?o:jp.Resource.empty(),this.resource=jp.Resource.default().merge(this.resource),this._config=Object.assign({},c,{resource:this.resource});let i=this._buildExporterFromEnv();if(i!==void 0){let a=new WE.BatchSpanProcessor(i);this.activeSpanProcessor=a}else this.activeSpanProcessor=new YE.NoopSpanProcessor}getTracer(r,o,c){let i=`${r}@${o||""}:${c?.schemaUrl||""}`;return this._tracers.has(i)||this._tracers.set(i,new XE.Tracer({name:r,version:o,schemaUrl:c?.schemaUrl},this._config,this)),this._tracers.get(i)}addSpanProcessor(r){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(o=>Mt.diag.error("Error while trying to shutdown current span processor",o)),this._registeredSpanProcessors.push(r),this.activeSpanProcessor=new $E.MultiSpanProcessor(this._registeredSpanProcessors)}getActiveSpanProcessor(){return this.activeSpanProcessor}register(r={}){Mt.trace.setGlobalTracerProvider(this),r.propagator===void 0&&(r.propagator=this._buildPropagatorFromEnv()),r.contextManager&&Mt.context.setGlobalContextManager(r.contextManager),r.propagator&&Mt.propagation.setGlobalPropagator(r.propagator)}forceFlush(){let r=this._config.forceFlushTimeoutMillis,o=this._registeredSpanProcessors.map(c=>new Promise(i=>{let a,t=setTimeout(()=>{i(new Error(`Span processor did not completed within timeout period of ${r} ms`)),a=Ct.timeout},r);c.forceFlush().then(()=>{clearTimeout(t),a!==Ct.timeout&&(a=Ct.resolved,i(a))}).catch(e=>{clearTimeout(t),a=Ct.error,i(e)})}));return new Promise((c,i)=>{Promise.all(o).then(a=>{let t=a.filter(e=>e!==Ct.resolved);t.length>0?i(t):c()}).catch(a=>i([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,Ut.getEnv)().OTEL_PROPAGATORS)),c=r.map(i=>{let a=this._getPropagator(i);return a||Mt.diag.warn(`Propagator "${i}" requested through environment variable is unavailable.`),a}).reduce((i,a)=>(a&&i.push(a),i),[]);if(c.length!==0)return r.length===1?c[0]:new Ut.CompositePropagator({propagators:c})}_buildExporterFromEnv(){let r=(0,Ut.getEnv)().OTEL_TRACES_EXPORTER;if(r==="none"||r==="")return;let o=this._getSpanExporter(r);return o||Mt.diag.error(`Exporter "${r}" requested through environment variable is unavailable.`),o}};pt.BasicTracerProvider=xr;xr._registeredPropagators=new Map([["tracecontext",()=>new Ut.W3CTraceContextPropagator],["baggage",()=>new Ut.W3CBaggagePropagator]]);xr._registeredExporters=new Map});var Hp=d(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.ConsoleSpanExporter=void 0;var Ps=P(),Ns=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,Ps.hrTimeToMicroseconds)(r.startTime),duration:(0,Ps.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:Ps.ExportResultCode.SUCCESS})}};Ao.ConsoleSpanExporter=Ns});var Kp=d(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.InMemorySpanExporter=void 0;var Fp=P(),Rs=class{constructor(){this._finishedSpans=[],this._stopped=!1}export(r,o){if(this._stopped)return o({code:Fp.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedSpans.push(...r),setTimeout(()=>o({code:Fp.ExportResultCode.SUCCESS}),0)}shutdown(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()}forceFlush(){return Promise.resolve()}reset(){this._finishedSpans=[]}getFinishedSpans(){return this._finishedSpans}};Po.InMemorySpanExporter=Rs});var zp=d(Xp=>{"use strict";Object.defineProperty(Xp,"__esModule",{value:!0})});var $p=d(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.SimpleSpanProcessor=void 0;var QE=(y(),E(m)),Dt=P(),xs=class{constructor(r){this._exporter=r,this._shutdownOnce=new Dt.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&QE.TraceFlags.SAMPLED))return;let i=()=>Dt.internal._export(this._exporter,[r]).then(a=>{var t;a.code!==Dt.ExportResultCode.SUCCESS&&(0,Dt.globalErrorHandler)((t=a.error)!==null&&t!==void 0?t:new Error(`SimpleSpanProcessor: span export failed (status ${a})`))}).catch(a=>{(0,Dt.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),i()),t=>(0,Dt.globalErrorHandler)(t));a!=null&&this._unresolvedExports.add(a)}else i()}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}};No.SimpleSpanProcessor=xs});var Wp=d(Yp=>{"use strict";Object.defineProperty(Yp,"__esModule",{value:!0})});var Qp=d(Jp=>{"use strict";Object.defineProperty(Jp,"__esModule",{value:!0})});var ef=d(Zp=>{"use strict";Object.defineProperty(Zp,"__esModule",{value:!0})});var rf=d(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0})});var of=d(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0})});var As=d(C=>{"use strict";var ZE=C&&C.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),H=C&&C.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&ZE(r,u,o)};Object.defineProperty(C,"__esModule",{value:!0});H(cp(),C);H(Gp(),C);H(Jn(),C);H(Hp(),C);H(Kp(),C);H(zp(),C);H($p(),C);H(Wp(),C);H(Os(),C);H(qn(),C);H(Gn(),C);H(Ku(),C);H(zu(),C);H(Pr(),C);H(qu(),C);H(Qp(),C);H(ef(),C);H(rf(),C);H(of(),C)});var ft={};import*as iA from"@opentelemetry/api-logs";var Is=Cc(()=>{Tt(ft,iA)});var sf=d(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.disableInstrumentations=Ve.enableInstrumentations=Ve.parseInstrumentationOptions=void 0;function uf(u=[]){let r=[];for(let o=0,c=u.length;o<c;o++){let i=u[o];if(Array.isArray(i)){let a=uf(i);r=r.concat(a.instrumentations)}else typeof i=="function"?r.push(new i):i.instrumentationName&&r.push(i)}return{instrumentations:r}}Ve.parseInstrumentationOptions=uf;function ev(u,r,o){for(let c=0,i=u.length;c<i;c++){let a=u[c];r&&a.setTracerProvider(r),o&&a.setMeterProvider(o),a.getConfig().enabled||a.enable()}}Ve.enableInstrumentations=ev;function tv(u){u.forEach(r=>r.disable())}Ve.disableInstrumentations=tv});var cf=d(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.registerInstrumentations=void 0;var af=(y(),E(m)),Ls=sf();function rv(u){let{instrumentations:r}=(0,Ls.parseInstrumentationOptions)(u.instrumentations),o=u.tracerProvider||af.trace.getTracerProvider(),c=u.meterProvider||af.metrics.getMeterProvider();return(0,Ls.enableInstrumentations)(r,o,c),()=>{(0,Ls.disableInstrumentations)(r)}}Ro.registerInstrumentations=rv});var Ms=d(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.LogRecord=void 0;var nv=(y(),E(m)),Ir=(y(),E(m)),xo=P(),ws=class{constructor(r,o,c){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;let{timestamp:i,observedTimestamp:a,severityNumber:t,severityText:e,body:n,attributes:s={},context:l}=c,h=Date.now();if(this.hrTime=(0,xo.timeInputToHrTime)(i??h),this.hrTimeObserved=(0,xo.timeInputToHrTime)(a??h),l){let v=Ir.trace.getSpanContext(l);v&&Ir.isSpanContextValid(v)&&(this.spanContext=v)}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?(Ir.diag.warn(`Invalid attribute key: ${r}`),this):!(0,xo.isAttributeValue)(o)&&!(typeof o=="object"&&!Array.isArray(o)&&Object.keys(o).length>0)?(Ir.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,xo.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?(Ir.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&&nv.diag.warn("Can not execute the operation on emitted log record"),this._isReadonly}};Io.LogRecord=ws});var lf=d(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.Logger=void 0;var ov=(y(),E(m)),iv=Ms(),Cs=class{constructor(r,o){this.instrumentationScope=r,this._sharedState=o}emit(r){let o=r.context||ov.context.active(),c=new iv.LogRecord(this._sharedState,this.instrumentationScope,Object.assign({context:o},r));this._sharedState.activeProcessor.onEmit(c,o),c._makeReadonly()}};Lo.Logger=Cs});var pf=d(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.reconfigureLimits=Bt.loadDefaultConfig=void 0;var Lr=P();function uv(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:(0,Lr.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,Lr.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT},includeTraceContext:!0}}Bt.loadDefaultConfig=uv;function sv(u){var r,o,c,i,a,t;let e=(0,Lr.getEnvWithoutDefaults)();return{attributeCountLimit:(c=(o=(r=u.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:Lr.DEFAULT_ATTRIBUTE_COUNT_LIMIT,attributeValueLengthLimit:(t=(a=(i=u.attributeValueLengthLimit)!==null&&i!==void 0?i:e.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&a!==void 0?a:e.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&t!==void 0?t:Lr.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT}}Bt.reconfigureLimits=sv});var ff=d(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.MultiLogRecordProcessor=void 0;var av=P(),Us=class{constructor(r,o){this.processors=r,this.forceFlushTimeoutMillis=o}async forceFlush(){let r=this.forceFlushTimeoutMillis;await Promise.all(this.processors.map(o=>(0,av.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()))}};wo.MultiLogRecordProcessor=Us});var Bs=d(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.NoopLogRecordProcessor=void 0;var Ds=class{forceFlush(){return Promise.resolve()}onEmit(r,o){}shutdown(){return Promise.resolve()}};Mo.NoopLogRecordProcessor=Ds});var df=d(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.LoggerProviderSharedState=void 0;var cv=Bs(),Vs=class{constructor(r,o,c){this.resource=r,this.forceFlushTimeoutMillis=o,this.logRecordLimits=c,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new cv.NoopLogRecordProcessor}};Co.LoggerProviderSharedState=Vs});var mf=d(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.LoggerProvider=dt.DEFAULT_LOGGER_NAME=void 0;var wr=(y(),E(m)),lv=(Is(),E(ft)),pv=ct(),hf=P(),fv=lf(),_f=pf(),dv=ff(),hv=df();dt.DEFAULT_LOGGER_NAME="unknown";var ks=class{constructor(r={}){let{resource:o=pv.Resource.default(),logRecordLimits:c,forceFlushTimeoutMillis:i}=(0,hf.merge)({},(0,_f.loadDefaultConfig)(),r);this._sharedState=new hv.LoggerProviderSharedState(o,i,(0,_f.reconfigureLimits)(c)),this._shutdownOnce=new hf.BindOnceFuture(this._shutdown,this)}getLogger(r,o,c){if(this._shutdownOnce.isCalled)return wr.diag.warn("A shutdown LoggerProvider cannot provide a Logger"),lv.NOOP_LOGGER;r||wr.diag.warn("Logger requested without instrumentation scope name.");let i=r||dt.DEFAULT_LOGGER_NAME,a=`${i}@${o||""}:${c?.schemaUrl||""}`;return this._sharedState.loggers.has(a)||this._sharedState.loggers.set(a,new fv.Logger({name:i,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=>wr.diag.error("Error while trying to shutdown current log record processor",o)),this._sharedState.registeredLogRecordProcessors.push(r),this._sharedState.activeProcessor=new dv.MultiLogRecordProcessor(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)}forceFlush(){return this._shutdownOnce.isCalled?(wr.diag.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()}shutdown(){return this._shutdownOnce.isCalled?(wr.diag.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()}_shutdown(){return this._sharedState.activeProcessor.shutdown()}};dt.LoggerProvider=ks});var yf=d(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});Uo.ConsoleLogRecordExporter=void 0;var _v=P(),mv=P(),qs=class{export(r,o){this._sendLogRecords(r,o)}shutdown(){return Promise.resolve()}_exportInfo(r){var o,c,i;return{timestamp:(0,_v.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:(i=r.spanContext)===null||i===void 0?void 0:i.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:mv.ExportResultCode.SUCCESS})}};Uo.ConsoleLogRecordExporter=qs});var Ef=d(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.SimpleLogRecordProcessor=void 0;var js=P(),Gs=class{constructor(r){this._exporter=r,this._shutdownOnce=new js.BindOnceFuture(this._shutdown,this)}onEmit(r){this._shutdownOnce.isCalled||this._exporter.export([r],o=>{var c;if(o.code!==js.ExportResultCode.SUCCESS){(0,js.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()}};Do.SimpleLogRecordProcessor=Gs});var Tf=d(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});Bo.InMemoryLogRecordExporter=void 0;var vf=P(),Hs=class{constructor(){this._finishedLogRecords=[],this._stopped=!1}export(r,o){if(this._stopped)return o({code:vf.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedLogRecords.push(...r),o({code:vf.ExportResultCode.SUCCESS})}shutdown(){return this._stopped=!0,this.reset(),Promise.resolve()}getFinishedLogRecords(){return this._finishedLogRecords}reset(){this._finishedLogRecords=[]}};Bo.InMemoryLogRecordExporter=Hs});var gf=d(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.BatchLogRecordProcessorBase=void 0;var yv=(y(),E(m)),Vt=P(),Fs=class{constructor(r,o){var c,i,a,t;this._exporter=r,this._finishedLogRecords=[];let e=(0,Vt.getEnv)();this._maxExportBatchSize=(c=o?.maxExportBatchSize)!==null&&c!==void 0?c:e.OTEL_BLRP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=(i=o?.maxQueueSize)!==null&&i!==void 0?i: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 Vt.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(yv.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=[],i=Math.ceil(this._finishedLogRecords.length/this._maxExportBatchSize);for(let a=0;a<i;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,Vt.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,Vt.globalErrorHandler)(r)})},this._scheduledDelayMillis),(0,Vt.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,i=>{var a;if(i.code!==Vt.ExportResultCode.SUCCESS){c((a=i.error)!==null&&a!==void 0?a:new Error(`BatchLogRecordProcessorBase: log record export failed (status ${i})`));return}o(i)})})}};Vo.BatchLogRecordProcessorBase=Fs});var Sf=d(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.BatchLogRecordProcessor=void 0;var Ev=gf(),Ks=class extends Ev.BatchLogRecordProcessorBase{onShutdown(){}};ko.BatchLogRecordProcessor=Ks});var bf=d(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});qo.BatchLogRecordProcessor=void 0;var vv=Sf();Object.defineProperty(qo,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return vv.BatchLogRecordProcessor}})});var Of=d(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});jo.BatchLogRecordProcessor=void 0;var Tv=bf();Object.defineProperty(jo,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return Tv.BatchLogRecordProcessor}})});var Af=d(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.BatchLogRecordProcessor=te.InMemoryLogRecordExporter=te.SimpleLogRecordProcessor=te.ConsoleLogRecordExporter=te.NoopLogRecordProcessor=te.LogRecord=te.LoggerProvider=void 0;var gv=mf();Object.defineProperty(te,"LoggerProvider",{enumerable:!0,get:function(){return gv.LoggerProvider}});var Sv=Ms();Object.defineProperty(te,"LogRecord",{enumerable:!0,get:function(){return Sv.LogRecord}});var bv=Bs();Object.defineProperty(te,"NoopLogRecordProcessor",{enumerable:!0,get:function(){return bv.NoopLogRecordProcessor}});var Ov=yf();Object.defineProperty(te,"ConsoleLogRecordExporter",{enumerable:!0,get:function(){return Ov.ConsoleLogRecordExporter}});var Av=Ef();Object.defineProperty(te,"SimpleLogRecordProcessor",{enumerable:!0,get:function(){return Av.SimpleLogRecordProcessor}});var Pv=Tf();Object.defineProperty(te,"InMemoryLogRecordExporter",{enumerable:!0,get:function(){return Pv.InMemoryLogRecordExporter}});var Nv=Of();Object.defineProperty(te,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return Nv.BatchLogRecordProcessor}})});var Go=d(Mr=>{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.AggregationTemporality=void 0;var Rv;(function(u){u[u.DELTA=0]="DELTA",u[u.CUMULATIVE=1]="CUMULATIVE"})(Rv=Mr.AggregationTemporality||(Mr.AggregationTemporality={}))});var kt=d(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.DataPointType=void 0;var xv;(function(u){u[u.HISTOGRAM=0]="HISTOGRAM",u[u.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",u[u.GAUGE=2]="GAUGE",u[u.SUM=3]="SUM"})(xv=Cr.DataPointType||(Cr.DataPointType={}))});var Pe=d(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});D.equalsCaseInsensitive=D.binarySearchLB=D.setEquals=D.FlatMap=D.isPromiseAllSettledRejectionResult=D.PromiseAllSettled=D.callWithTimeout=D.TimeoutError=D.instrumentationScopeId=D.hashAttributes=D.isNotNullish=void 0;function Iv(u){return u!=null}D.isNotNullish=Iv;function Lv(u){let r=Object.keys(u);return r.length===0?"":(r=r.sort(),JSON.stringify(r.map(o=>[o,u[o]])))}D.hashAttributes=Lv;function wv(u){var r,o;return`${u.name}:${(r=u.version)!==null&&r!==void 0?r:""}:${(o=u.schemaUrl)!==null&&o!==void 0?o:""}`}D.instrumentationScopeId=wv;var Ho=class u extends Error{constructor(r){super(r),Object.setPrototypeOf(this,u.prototype)}};D.TimeoutError=Ho;function Mv(u,r){let o,c=new Promise(function(a,t){o=setTimeout(function(){t(new Ho("Operation timed out."))},r)});return Promise.race([u,c]).then(i=>(clearTimeout(o),i),i=>{throw clearTimeout(o),i})}D.callWithTimeout=Mv;async function Cv(u){return Promise.all(u.map(async r=>{try{return{status:"fulfilled",value:await r}}catch(o){return{status:"rejected",reason:o}}}))}D.PromiseAllSettled=Cv;function Uv(u){return u.status==="rejected"}D.isPromiseAllSettledRejectionResult=Uv;function Dv(u,r){let o=[];return u.forEach(c=>{o.push(...r(c))}),o}D.FlatMap=Dv;function Bv(u,r){if(u.size!==r.size)return!1;for(let o of u)if(!r.has(o))return!1;return!0}D.setEquals=Bv;function Vv(u,r){let o=0,c=u.length-1;for(;c-o>1;){let i=Math.trunc((c+o)/2);u[i]<=r?o=i:c=i-1}return u[c]<=r?c:u[o]<=r?o:-1}D.binarySearchLB=Vv;function kv(u,r){return u.toLowerCase()===r.toLowerCase()}D.equalsCaseInsensitive=kv});var qt=d(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.AggregatorKind=void 0;var qv;(function(u){u[u.DROP=0]="DROP",u[u.SUM=1]="SUM",u[u.LAST_VALUE=2]="LAST_VALUE",u[u.HISTOGRAM=3]="HISTOGRAM",u[u.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(qv=Ur.AggregatorKind||(Ur.AggregatorKind={}))});var Pf=d(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.DropAggregator=void 0;var jv=qt(),Xs=class{constructor(){this.kind=jv.AggregatorKind.DROP}createAccumulation(){}merge(r,o){}diff(r,o){}toMetricData(r,o,c,i){}};Fo.DropAggregator=Xs});var Le=d(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.isValidName=ce.isDescriptorCompatibleWith=ce.createInstrumentDescriptorWithView=ce.createInstrumentDescriptor=ce.InstrumentType=void 0;var Nf=(y(),E(m)),Gv=Pe(),Hv;(function(u){u.COUNTER="COUNTER",u.HISTOGRAM="HISTOGRAM",u.UP_DOWN_COUNTER="UP_DOWN_COUNTER",u.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",u.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",u.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(Hv=ce.InstrumentType||(ce.InstrumentType={}));function Fv(u,r,o){var c,i,a,t;return Rf(u)||Nf.diag.warn(`Invalid metric name: "${u}". The metric name should be a ASCII string with a length no greater than 255 characters.`),{name:u,type:r,description:(c=o?.description)!==null&&c!==void 0?c:"",unit:(i=o?.unit)!==null&&i!==void 0?i:"",valueType:(a=o?.valueType)!==null&&a!==void 0?a:Nf.ValueType.DOUBLE,advice:(t=o?.advice)!==null&&t!==void 0?t:{}}}ce.createInstrumentDescriptor=Fv;function Kv(u,r){var o,c;return{name:(o=u.name)!==null&&o!==void 0?o:r.name,description:(c=u.description)!==null&&c!==void 0?c:r.description,type:r.type,unit:r.unit,valueType:r.valueType,advice:r.advice}}ce.createInstrumentDescriptorWithView=Kv;function Xv(u,r){return(0,Gv.equalsCaseInsensitive)(u.name,r.name)&&u.unit===r.unit&&u.type===r.type&&u.valueType===r.valueType}ce.isDescriptorCompatibleWith=Xv;var zv=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Rf(u){return u.match(zv)!=null}ce.isValidName=Rf});var xf=d(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});Gt.HistogramAggregator=Gt.HistogramAccumulation=void 0;var $v=qt(),Yv=kt(),zs=Le(),Wv=Pe();function Jv(u){let r=u.map(()=>0);return r.push(0),{buckets:{boundaries:u,counts:r},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var jt=class{constructor(r,o,c=!0,i=Jv(o)){this.startTime=r,this._boundaries=o,this._recordMinMax=c,this._current=i}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,Wv.binarySearchLB)(this._boundaries,r);this._current.buckets.counts[o+1]+=1}setStartTime(r){this.startTime=r}toPointValue(){return this._current}};Gt.HistogramAccumulation=jt;var $s=class{constructor(r,o){this._boundaries=r,this._recordMinMax=o,this.kind=$v.AggregatorKind.HISTOGRAM}createAccumulation(r){return new jt(r,this._boundaries,this._recordMinMax)}merge(r,o){let c=r.toPointValue(),i=o.toPointValue(),a=c.buckets.counts,t=i.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&&i.hasMinMax?(n=Math.min(c.min,i.min),s=Math.max(c.max,i.max)):c.hasMinMax?(n=c.min,s=c.max):i.hasMinMax&&(n=i.min,s=i.max)),new jt(r.startTime,c.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:c.buckets.boundaries,counts:e},count:c.count+i.count,sum:c.sum+i.sum,hasMinMax:this._recordMinMax&&(c.hasMinMax||i.hasMinMax),min:n,max:s})}diff(r,o){let c=r.toPointValue(),i=o.toPointValue(),a=c.buckets.counts,t=i.buckets.counts,e=new Array(a.length);for(let n=0;n<a.length;n++)e[n]=t[n]-a[n];return new jt(o.startTime,c.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:c.buckets.boundaries,counts:e},count:i.count-c.count,sum:i.sum-c.sum,hasMinMax:!1,min:1/0,max:-1/0})}toMetricData(r,o,c,i){return{descriptor:r,aggregationTemporality:o,dataPointType:Yv.DataPointType.HISTOGRAM,dataPoints:c.map(([a,t])=>{let e=t.toPointValue(),n=r.type===zs.InstrumentType.UP_DOWN_COUNTER||r.type===zs.InstrumentType.OBSERVABLE_GAUGE||r.type===zs.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:t.startTime,endTime:i,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}}})}}};Gt.HistogramAggregator=$s});var If=d(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});Ko.Buckets=void 0;var Ys=class u{constructor(r=new Ws,o=0,c=0,i=0){this.backing=r,this.indexBase=o,this.indexStart=c,this.indexEnd=i}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,i=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&&i<o;n++)this._relocateBucket(a,i),i++,t++;a++}this.indexStart>>=r,this.indexEnd>>=r,this.indexBase=this.indexStart}clone(){return new u(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))}};Ko.Buckets=Ys;var Ws=class u{constructor(r=[0]){this._counts=r}get length(){return this._counts.length}countAt(r){return this._counts[r]}growTo(r,o,c){let i=new Array(r).fill(0);i.splice(c,this._counts.length-o,...this._counts.slice(o)),i.splice(0,o,...this._counts.slice(0,o)),this._counts=i}reverse(r,o){let c=Math.floor((r+o)/2)-r;for(let i=0;i<c;i++){let a=this._counts[r+i];this._counts[r+i]=this._counts[o-i-1],this._counts[o-i-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 u([...this._counts])}}});var Qs=d(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.getSignificand=ne.getNormalBase2=ne.MIN_VALUE=ne.MAX_NORMAL_EXPONENT=ne.MIN_NORMAL_EXPONENT=ne.SIGNIFICAND_WIDTH=void 0;ne.SIGNIFICAND_WIDTH=52;var Qv=2146435072,Zv=1048575,Js=1023;ne.MIN_NORMAL_EXPONENT=-Js+1;ne.MAX_NORMAL_EXPONENT=Js;ne.MIN_VALUE=Math.pow(2,-1022);function eT(u){let r=new DataView(new ArrayBuffer(8));return r.setFloat64(0,u),((r.getUint32(0)&Qv)>>20)-Js}ne.getNormalBase2=eT;function tT(u){let r=new DataView(new ArrayBuffer(8));r.setFloat64(0,u);let o=r.getUint32(0),c=r.getUint32(4);return(o&Zv)*Math.pow(2,32)+c}ne.getSignificand=tT});var Xo=d(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.nextGreaterSquare=Ht.ldexp=void 0;function rT(u,r){return u===0||u===Number.POSITIVE_INFINITY||u===Number.NEGATIVE_INFINITY||Number.isNaN(u)?u:u*Math.pow(2,r)}Ht.ldexp=rT;function nT(u){return u--,u|=u>>1,u|=u>>2,u|=u>>4,u|=u>>8,u|=u>>16,u++,u}Ht.nextGreaterSquare=nT});var $o=d(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.MappingError=void 0;var Zs=class extends Error{};zo.MappingError=Zs});var wf=d(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.ExponentMapping=void 0;var Ft=Qs(),oT=Xo(),Lf=$o(),ea=class{constructor(r){this._shift=-r}mapToIndex(r){if(r<Ft.MIN_VALUE)return this._minNormalLowerBoundaryIndex();let o=Ft.getNormalBase2(r),c=this._rightShift(Ft.getSignificand(r)-1,Ft.SIGNIFICAND_WIDTH);return o+c>>this._shift}lowerBoundary(r){let o=this._minNormalLowerBoundaryIndex();if(r<o)throw new Lf.MappingError(`underflow: ${r} is < minimum lower boundary: ${o}`);let c=this._maxNormalLowerBoundaryIndex();if(r>c)throw new Lf.MappingError(`overflow: ${r} is > maximum lower boundary: ${c}`);return oT.ldexp(1,r<<this._shift)}get scale(){return this._shift===0?0:-this._shift}_minNormalLowerBoundaryIndex(){let r=Ft.MIN_NORMAL_EXPONENT>>this._shift;return this._shift<2&&r--,r}_maxNormalLowerBoundaryIndex(){return Ft.MAX_NORMAL_EXPONENT>>this._shift}_rightShift(r,o){return Math.floor(r*Math.pow(2,-o))}};Yo.ExponentMapping=ea});var Uf=d(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.LogarithmMapping=void 0;var Kt=Qs(),Mf=Xo(),Cf=$o(),ta=class{constructor(r){this._scale=r,this._scaleFactor=Mf.ldexp(Math.LOG2E,r),this._inverseFactor=Mf.ldexp(Math.LN2,-r)}mapToIndex(r){if(r<=Kt.MIN_VALUE)return this._minNormalLowerBoundaryIndex()-1;if(Kt.getSignificand(r)===0)return(Kt.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 Cf.MappingError(`overflow: ${r} is > maximum lower boundary: ${o}`)}let c=this._minNormalLowerBoundaryIndex();if(r<=c){if(r===c)return Kt.MIN_VALUE;if(r===c-1)return Math.exp((r+(1<<this._scale))/this._scaleFactor)/2;throw new Cf.MappingError(`overflow: ${r} is < minimum lower boundary: ${c}`)}return Math.exp(r*this._inverseFactor)}get scale(){return this._scale}_minNormalLowerBoundaryIndex(){return Kt.MIN_NORMAL_EXPONENT<<this._scale}_maxNormalLowerBoundaryIndex(){return(Kt.MAX_NORMAL_EXPONENT+1<<this._scale)-1}};Wo.LogarithmMapping=ta});var Vf=d(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});Jo.getMapping=void 0;var iT=wf(),uT=Uf(),sT=$o(),Df=-10,Bf=20,aT=Array.from({length:31},(u,r)=>r>10?new uT.LogarithmMapping(r-10):new iT.ExponentMapping(r-10));function cT(u){if(u>Bf||u<Df)throw new sT.MappingError(`expected scale >= ${Df} && <= ${Bf}, got: ${u}`);return aT[u+10]}Jo.getMapping=cT});var jf=d(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.ExponentialHistogramAggregator=zt.ExponentialHistogramAccumulation=void 0;var lT=qt(),pT=kt(),fT=(y(),E(m)),ra=Le(),kf=If(),qf=Vf(),dT=Xo(),Xt=class u{constructor(r,o){this.low=r,this.high=o}static combine(r,o){return new u(Math.min(r.low,o.low),Math.max(r.high,o.high))}},hT=20,_T=160,na=2,Qo=class u{constructor(r=r,o=_T,c=!0,i=0,a=0,t=0,e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,s=new kf.Buckets,l=new kf.Buckets,h=(0,qf.getMapping)(hT)){this.startTime=r,this._maxSize=o,this._recordMinMax=c,this._sum=i,this._count=a,this._zeroCount=t,this._min=e,this._max=n,this._positive=s,this._negative=l,this._mapping=h,this._maxSize<na&&(fT.diag.warn(`Exponential Histogram Max Size set to ${this._maxSize}, changing to the minimum size of: ${na}`),this._maxSize=na)}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 u(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 i=this._mapping.mapToIndex(o),a=!1,t=0,e=0;if(r.length===0?(r.indexStart=i,r.indexEnd=r.indexStart,r.indexBase=r.indexStart):i<r.indexStart&&r.indexEnd-i>=this._maxSize?(a=!0,e=i,t=r.indexEnd):i>r.indexEnd&&i-r.indexStart>=this._maxSize&&(a=!0,e=r.indexStart,t=i),a){let n=this._changeScale(t,e);this._downscale(n),i=this._mapping.mapToIndex(o)}this._incrementIndexBy(r,i,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 i=o-r.indexBase;i<0&&(i+=r.backing.length),r.incrementBucket(i,c)}_grow(r,o){let c=r.backing.length,i=r.indexBase-r.indexStart,a=c-i,t=(0,dT.nextGreaterSquare)(o);t>this._maxSize&&(t=this._maxSize);let e=t-i;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,qf.getMapping)(o)}_minScale(r){let o=Math.min(this.scale,r.scale),c=Xt.combine(this._highLowAtScale(this.positive,this.scale,o),this._highLowAtScale(r.positive,r.scale,o)),i=Xt.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(i.high,i.low))}_highLowAtScale(r,o,c){if(r.length===0)return new Xt(0,-1);let i=o-c;return new Xt(r.indexStart>>i,r.indexEnd>>i)}_mergeBuckets(r,o,c,i){let a=c.offset,t=o.scale-i;for(let e=0;e<c.length;e++)this._incrementIndexBy(r,a+e>>t,c.at(e))}_diffBuckets(r,o,c,i){let a=c.offset,t=o.scale-i;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()}};zt.ExponentialHistogramAccumulation=Qo;var oa=class{constructor(r,o){this._maxSize=r,this._recordMinMax=o,this.kind=lT.AggregatorKind.EXPONENTIAL_HISTOGRAM}createAccumulation(r){return new Qo(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,i){return{descriptor:r,aggregationTemporality:o,dataPointType:pT.DataPointType.EXPONENTIAL_HISTOGRAM,dataPoints:c.map(([a,t])=>{let e=t.toPointValue(),n=r.type===ra.InstrumentType.UP_DOWN_COUNTER||r.type===ra.InstrumentType.OBSERVABLE_GAUGE||r.type===ra.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:t.startTime,endTime:i,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}}})}}};zt.ExponentialHistogramAggregator=oa});var Gf=d(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.LastValueAggregator=Yt.LastValueAccumulation=void 0;var mT=qt(),Dr=P(),yT=kt(),$t=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,Dr.millisToHrTime)(Date.now())}setStartTime(r){this.startTime=r}toPointValue(){return this._current}};Yt.LastValueAccumulation=$t;var ia=class{constructor(){this.kind=mT.AggregatorKind.LAST_VALUE}createAccumulation(r){return new $t(r)}merge(r,o){let c=(0,Dr.hrTimeToMicroseconds)(o.sampleTime)>=(0,Dr.hrTimeToMicroseconds)(r.sampleTime)?o:r;return new $t(r.startTime,c.toPointValue(),c.sampleTime)}diff(r,o){let c=(0,Dr.hrTimeToMicroseconds)(o.sampleTime)>=(0,Dr.hrTimeToMicroseconds)(r.sampleTime)?o:r;return new $t(o.startTime,c.toPointValue(),c.sampleTime)}toMetricData(r,o,c,i){return{descriptor:r,aggregationTemporality:o,dataPointType:yT.DataPointType.GAUGE,dataPoints:c.map(([a,t])=>({attributes:a,startTime:t.startTime,endTime:i,value:t.toPointValue()}))}}};Yt.LastValueAggregator=ia});var Hf=d(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.SumAggregator=Wt.SumAccumulation=void 0;var ET=qt(),vT=kt(),ke=class{constructor(r,o,c=0,i=!1){this.startTime=r,this.monotonic=o,this._current=c,this.reset=i}record(r){this.monotonic&&r<0||(this._current+=r)}setStartTime(r){this.startTime=r}toPointValue(){return this._current}};Wt.SumAccumulation=ke;var ua=class{constructor(r){this.monotonic=r,this.kind=ET.AggregatorKind.SUM}createAccumulation(r){return new ke(r,this.monotonic)}merge(r,o){let c=r.toPointValue(),i=o.toPointValue();return o.reset?new ke(o.startTime,this.monotonic,i,o.reset):new ke(r.startTime,this.monotonic,c+i)}diff(r,o){let c=r.toPointValue(),i=o.toPointValue();return this.monotonic&&c>i?new ke(o.startTime,this.monotonic,i,!0):new ke(o.startTime,this.monotonic,i-c)}toMetricData(r,o,c,i){return{descriptor:r,aggregationTemporality:o,dataPointType:vT.DataPointType.SUM,dataPoints:c.map(([a,t])=>({attributes:a,startTime:t.startTime,endTime:i,value:t.toPointValue()})),isMonotonic:this.monotonic}}};Wt.SumAggregator=ua});var Ff=d(Ee=>{"use strict";var TT=Ee&&Ee.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),Br=Ee&&Ee.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&TT(r,u,o)};Object.defineProperty(Ee,"__esModule",{value:!0});Br(Pf(),Ee);Br(xf(),Ee);Br(jf(),Ee);Br(Gf(),Ee);Br(Hf(),Ee)});var ri=d(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.DefaultAggregation=X.ExponentialHistogramAggregation=X.ExplicitBucketHistogramAggregation=X.HistogramAggregation=X.LastValueAggregation=X.SumAggregation=X.DropAggregation=X.Aggregation=void 0;var gT=(y(),E(m)),ht=Ff(),we=Le(),Ne=class{static Drop(){return Kf}static Sum(){return Xf}static LastValue(){return zf}static Histogram(){return $f}static ExponentialHistogram(){return ST}static Default(){return bT}};X.Aggregation=Ne;var Vr=class u extends Ne{createAggregator(r){return u.DEFAULT_INSTANCE}};X.DropAggregation=Vr;Vr.DEFAULT_INSTANCE=new ht.DropAggregator;var Jt=class u extends Ne{createAggregator(r){switch(r.type){case we.InstrumentType.COUNTER:case we.InstrumentType.OBSERVABLE_COUNTER:case we.InstrumentType.HISTOGRAM:return u.MONOTONIC_INSTANCE;default:return u.NON_MONOTONIC_INSTANCE}}};X.SumAggregation=Jt;Jt.MONOTONIC_INSTANCE=new ht.SumAggregator(!0);Jt.NON_MONOTONIC_INSTANCE=new ht.SumAggregator(!1);var kr=class u extends Ne{createAggregator(r){return u.DEFAULT_INSTANCE}};X.LastValueAggregation=kr;kr.DEFAULT_INSTANCE=new ht.LastValueAggregator;var qr=class u extends Ne{createAggregator(r){return u.DEFAULT_INSTANCE}};X.HistogramAggregation=qr;qr.DEFAULT_INSTANCE=new ht.HistogramAggregator([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0);var Zo=class extends Ne{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),i=r.indexOf(1/0);i===-1&&(i=void 0),this._boundaries=r.slice(c+1,i)}createAggregator(r){return new ht.HistogramAggregator(this._boundaries,this._recordMinMax)}};X.ExplicitBucketHistogramAggregation=Zo;var ei=class extends Ne{constructor(r=160,o=!0){super(),this._maxSize=r,this._recordMinMax=o}createAggregator(r){return new ht.ExponentialHistogramAggregator(this._maxSize,this._recordMinMax)}};X.ExponentialHistogramAggregation=ei;var ti=class extends Ne{_resolve(r){switch(r.type){case we.InstrumentType.COUNTER:case we.InstrumentType.UP_DOWN_COUNTER:case we.InstrumentType.OBSERVABLE_COUNTER:case we.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:return Xf;case we.InstrumentType.OBSERVABLE_GAUGE:return zf;case we.InstrumentType.HISTOGRAM:return r.advice.explicitBucketBoundaries?new Zo(r.advice.explicitBucketBoundaries):$f}return gT.diag.warn(`Unable to recognize instrument type: ${r.type}`),Kf}createAggregator(r){return this._resolve(r).createAggregator(r)}};X.DefaultAggregation=ti;var Kf=new Vr,Xf=new Jt,zf=new kr,$f=new qr,ST=new ei,bT=new ti});var sa=d(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=Qt.DEFAULT_AGGREGATION_SELECTOR=void 0;var OT=ri(),AT=Go(),PT=u=>OT.Aggregation.Default();Qt.DEFAULT_AGGREGATION_SELECTOR=PT;var NT=u=>AT.AggregationTemporality.CUMULATIVE;Qt.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=NT});var ca=d(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.MetricReader=void 0;var Yf=(y(),E(m)),ni=Pe(),Wf=sa(),aa=class{constructor(r){var o,c,i;this._shutdown=!1,this._aggregationSelector=(o=r?.aggregationSelector)!==null&&o!==void 0?o:Wf.DEFAULT_AGGREGATION_SELECTOR,this._aggregationTemporalitySelector=(c=r?.aggregationTemporalitySelector)!==null&&c!==void 0?c:Wf.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR,this._metricProducers=(i=r?.metricProducers)!==null&&i!==void 0?i:[]}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}))]),i=o.errors.concat((0,ni.FlatMap)(c,e=>e.errors)),a=o.resourceMetrics.resource,t=o.resourceMetrics.scopeMetrics.concat((0,ni.FlatMap)(c,e=>e.resourceMetrics.scopeMetrics));return{resourceMetrics:{resource:a,scopeMetrics:t},errors:i}}async shutdown(r){if(this._shutdown){Yf.diag.error("Cannot call shutdown twice.");return}r?.timeoutMillis==null?await this.onShutdown():await(0,ni.callWithTimeout)(this.onShutdown(),r.timeoutMillis),this._shutdown=!0}async forceFlush(r){if(this._shutdown){Yf.diag.warn("Cannot forceFlush on already shutdown MetricReader.");return}if(r?.timeoutMillis==null){await this.onForceFlush();return}await(0,ni.callWithTimeout)(this.onForceFlush(),r.timeoutMillis)}};oi.MetricReader=aa});var Zf=d(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.PeriodicExportingMetricReader=void 0;var Jf=(y(),E(m)),ii=P(),RT=ca(),Qf=Pe(),xT=(y(),E(m)),la=class extends RT.MetricReader{constructor(r){var o,c,i,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=(i=r.exportIntervalMillis)!==null&&i!==void 0?i:6e4,this._exportTimeout=(a=r.exportTimeoutMillis)!==null&&a!==void 0?a:3e4,this._exporter=r.exporter}async _runOnce(){try{await(0,Qf.callWithTimeout)(this._doRun(),this._exportTimeout)}catch(r){if(r instanceof Qf.TimeoutError){Jf.diag.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout);return}(0,ii.globalErrorHandler)(r)}}async _doRun(){var r,o;let{resourceMetrics:c,errors:i}=await this.collect({timeoutMillis:this._exportTimeout});i.length>0&&Jf.diag.error("PeriodicExportingMetricReader: metrics collection errors",...i);let a=async()=>{let t=await ii.internal._export(this._exporter,c);if(t.code!==ii.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=>xT.diag.debug("Error while resolving async portion of resource: ",t)):await a()}onInitialized(){this._interval=setInterval(()=>{this._runOnce()},this._exportInterval),(0,ii.unrefTimer)(this._interval)}async onForceFlush(){await this._runOnce(),await this._exporter.forceFlush()}async onShutdown(){this._interval&&clearInterval(this._interval),await this._exporter.shutdown()}};ui.PeriodicExportingMetricReader=la});var td=d(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.InMemoryMetricExporter=void 0;var ed=P(),pa=class{constructor(r){this._shutdown=!1,this._metrics=[],this._aggregationTemporality=r}export(r,o){if(this._shutdown){setTimeout(()=>o({code:ed.ExportResultCode.FAILED}),0);return}this._metrics.push(r),setTimeout(()=>o({code:ed.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()}};si.InMemoryMetricExporter=pa});var nd=d(ai=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0});ai.ConsoleMetricExporter=void 0;var rd=P(),IT=sa(),fa=class u{constructor(r){var o;this._shutdown=!1,this._temporalitySelector=(o=r?.temporalitySelector)!==null&&o!==void 0?o:IT.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR}export(r,o){if(this._shutdown){setImmediate(o,{code:rd.ExportResultCode.FAILED});return}return u._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 i of c.metrics)console.dir({descriptor:i.descriptor,dataPointType:i.dataPointType,dataPoints:i.dataPoints});o({code:rd.ExportResultCode.SUCCESS})}};ai.ConsoleMetricExporter=fa});var od=d(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.ViewRegistry=void 0;var da=class{constructor(){this._registeredViews=[]}addView(r){this._registeredViews.push(r)}findViews(r,o){return this._registeredViews.filter(i=>this._matchInstrument(i.instrumentSelector,r)&&this._matchMeter(i.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))}};ci.ViewRegistry=da});var li=d(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.isObservableInstrument=G.ObservableUpDownCounterInstrument=G.ObservableGaugeInstrument=G.ObservableCounterInstrument=G.ObservableInstrument=G.HistogramInstrument=G.CounterInstrument=G.UpDownCounterInstrument=G.SyncInstrument=void 0;var Zt=(y(),E(m)),LT=P(),er=class{constructor(r,o){this._writableMetricStorage=r,this._descriptor=o}_record(r,o={},c=Zt.context.active()){if(typeof r!="number"){Zt.diag.warn(`non-number value provided to metric ${this._descriptor.name}: ${r}`);return}this._descriptor.valueType===Zt.ValueType.INT&&!Number.isInteger(r)&&(Zt.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,LT.millisToHrTime)(Date.now()))}};G.SyncInstrument=er;var ha=class extends er{add(r,o,c){this._record(r,o,c)}};G.UpDownCounterInstrument=ha;var _a=class extends er{add(r,o,c){if(r<0){Zt.diag.warn(`negative value provided to counter ${this._descriptor.name}: ${r}`);return}this._record(r,o,c)}};G.CounterInstrument=_a;var ma=class extends er{record(r,o,c){if(r<0){Zt.diag.warn(`negative value provided to histogram ${this._descriptor.name}: ${r}`);return}this._record(r,o,c)}};G.HistogramInstrument=ma;var _t=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)}};G.ObservableInstrument=_t;var ya=class extends _t{};G.ObservableCounterInstrument=ya;var Ea=class extends _t{};G.ObservableGaugeInstrument=Ea;var va=class extends _t{};G.ObservableUpDownCounterInstrument=va;function wT(u){return u instanceof _t}G.isObservableInstrument=wT});var id=d(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.Meter=void 0;var pe=Le(),tr=li(),Ta=class{constructor(r){this._meterSharedState=r}createHistogram(r,o){let c=(0,pe.createInstrumentDescriptor)(r,pe.InstrumentType.HISTOGRAM,o),i=this._meterSharedState.registerMetricStorage(c);return new tr.HistogramInstrument(i,c)}createCounter(r,o){let c=(0,pe.createInstrumentDescriptor)(r,pe.InstrumentType.COUNTER,o),i=this._meterSharedState.registerMetricStorage(c);return new tr.CounterInstrument(i,c)}createUpDownCounter(r,o){let c=(0,pe.createInstrumentDescriptor)(r,pe.InstrumentType.UP_DOWN_COUNTER,o),i=this._meterSharedState.registerMetricStorage(c);return new tr.UpDownCounterInstrument(i,c)}createObservableGauge(r,o){let c=(0,pe.createInstrumentDescriptor)(r,pe.InstrumentType.OBSERVABLE_GAUGE,o),i=this._meterSharedState.registerAsyncMetricStorage(c);return new tr.ObservableGaugeInstrument(c,i,this._meterSharedState.observableRegistry)}createObservableCounter(r,o){let c=(0,pe.createInstrumentDescriptor)(r,pe.InstrumentType.OBSERVABLE_COUNTER,o),i=this._meterSharedState.registerAsyncMetricStorage(c);return new tr.ObservableCounterInstrument(c,i,this._meterSharedState.observableRegistry)}createObservableUpDownCounter(r,o){let c=(0,pe.createInstrumentDescriptor)(r,pe.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER,o),i=this._meterSharedState.registerAsyncMetricStorage(c);return new tr.ObservableUpDownCounterInstrument(c,i,this._meterSharedState.observableRegistry)}addBatchObservableCallback(r,o){this._meterSharedState.observableRegistry.addBatchCallback(r,o)}removeBatchObservableCallback(r,o){this._meterSharedState.observableRegistry.removeBatchCallback(r,o)}};pi.Meter=Ta});var Sa=d(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.MetricStorage=void 0;var MT=Le(),ga=class{constructor(r){this._instrumentDescriptor=r}getInstrumentDescriptor(){return this._instrumentDescriptor}updateDescription(r){this._instrumentDescriptor=(0,MT.createInstrumentDescriptor)(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:r,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})}};fi.MetricStorage=ga});var jr=d(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.AttributeHashMap=rr.HashMap=void 0;var CT=Pe(),di=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 i=o();return this._keyMap.has(c)||this._keyMap.set(c,r),this._valueMap.set(c,i),i}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}};rr.HashMap=di;var ba=class extends di{constructor(){super(CT.hashAttributes)}};rr.AttributeHashMap=ba});var Pa=d(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.DeltaMetricProcessor=void 0;var Oa=jr(),Aa=class{constructor(r){this._aggregator=r,this._activeCollectionStorage=new Oa.AttributeHashMap,this._cumulativeMemoStorage=new Oa.AttributeHashMap}record(r,o,c,i){let a=this._activeCollectionStorage.getOrDefault(o,()=>this._aggregator.createAccumulation(i));a?.record(r)}batchCumulate(r,o){Array.from(r.entries()).forEach(([c,i,a])=>{let t=this._aggregator.createAccumulation(o);t?.record(i);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 Oa.AttributeHashMap,r}};hi.DeltaMetricProcessor=Aa});var Ra=d(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.TemporalMetricProcessor=void 0;var UT=Go(),DT=jr(),Na=class u{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,i){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===UT.AggregationTemporality.CUMULATIVE?t=u.merge(s.accumulations,a,this._aggregator):t=u.calibrateStartTime(s.accumulations,a,l)}else e=r.selectAggregationTemporality(o.type);this._reportHistory.set(r,{accumulations:t,collectionTime:i,aggregationTemporality:e});let n=BT(t);if(n.length!==0)return this._aggregator.toMetricData(o,e,n,i)}_stashAccumulations(r){let o=this._unreportedAccumulations.keys();for(let c of o){let i=this._unreportedAccumulations.get(c);i===void 0&&(i=[],this._unreportedAccumulations.set(c,i)),i.push(r)}}_getMergedUnreportedAccumulations(r){let o=new DT.AttributeHashMap,c=this._unreportedAccumulations.get(r);if(this._unreportedAccumulations.set(r,[]),c===void 0)return o;for(let i of c)o=u.merge(o,i,this._aggregator);return o}static merge(r,o,c){let i=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);i.set(e,h,s)}else i.set(e,n,s);t=a.next()}return i}static calibrateStartTime(r,o,c){for(let[i,a]of r.keys()){let t=o.get(i,a);t?.setStartTime(c)}return o}};_i.TemporalMetricProcessor=Na;function BT(u){return Array.from(u.entries())}});var ud=d(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.AsyncMetricStorage=void 0;var VT=Sa(),kT=Pa(),qT=Ra(),jT=jr(),xa=class extends VT.MetricStorage{constructor(r,o,c,i){super(r),this._attributesProcessor=c,this._deltaMetricStorage=new kT.DeltaMetricProcessor(o),this._temporalMetricStorage=new qT.TemporalMetricProcessor(o,i)}record(r,o){let c=new jT.AttributeHashMap;Array.from(r.entries()).forEach(([i,a])=>{c.set(this._attributesProcessor.process(i),a)}),this._deltaMetricStorage.batchCumulate(c,o)}collect(r,o){let c=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,c,o)}};mi.AsyncMetricStorage=xa});var pd=d(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.getConflictResolutionRecipe=oe.getDescriptionResolutionRecipe=oe.getTypeConflictResolutionRecipe=oe.getUnitConflictResolutionRecipe=oe.getValueTypeConflictResolutionRecipe=oe.getIncompatibilityDetails=void 0;function GT(u,r){let o="";return u.unit!==r.unit&&(o+=` - Unit '${u.unit}' does not match '${r.unit}'
|
|
7
|
+
var N_=Object.create;var ou=Object.defineProperty;var R_=Object.getOwnPropertyDescriptor;var x_=Object.getOwnPropertyNames;var I_=Object.getPrototypeOf,L_=Object.prototype.hasOwnProperty;var K=(u=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(u,{get:(r,o)=>(typeof require<"u"?require:r)[o]}):u)(function(u){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+u+'" is not supported')});var Cc=(u,r)=>()=>(u&&(r=u(u=0)),r);var d=(u,r)=>()=>(r||u((r={exports:{}}).exports,r),r.exports);var nn=(u,r,o,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of x_(r))!L_.call(u,i)&&i!==o&&ou(u,i,{get:()=>r[i],enumerable:!(c=R_(r,i))||c.enumerable});return u},gt=(u,r,o)=>(nn(u,r,"default"),o&&nn(o,r,"default")),W=(u,r,o)=>(o=u!=null?N_(I_(u)):{},nn(r||!u||!u.__esModule?ou(o,"default",{value:u,enumerable:!0}):o,u)),E=u=>nn(ou({},"__esModule",{value:!0}),u);var m={};import*as sb from"@opentelemetry/api";var y=Cc(()=>{gt(m,sb)});var vr=d(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.isTracingSuppressed=Me.unsuppressTracing=Me.suppressTracing=void 0;var w_=(y(),E(m)),iu=(0,w_.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function M_(u){return u.setValue(iu,!0)}Me.suppressTracing=M_;function C_(u){return u.deleteValue(iu)}Me.unsuppressTracing=C_;function U_(u){return u.getValue(iu)===!0}Me.isTracingSuppressed=U_});var uu=d(J=>{"use strict";Object.defineProperty(J,"__esModule",{value:!0});J.BAGGAGE_MAX_TOTAL_LENGTH=J.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=J.BAGGAGE_MAX_NAME_VALUE_PAIRS=J.BAGGAGE_HEADER=J.BAGGAGE_ITEMS_SEPARATOR=J.BAGGAGE_PROPERTIES_SEPARATOR=J.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;J.BAGGAGE_KEY_PAIR_SEPARATOR="=";J.BAGGAGE_PROPERTIES_SEPARATOR=";";J.BAGGAGE_ITEMS_SEPARATOR=",";J.BAGGAGE_HEADER="baggage";J.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;J.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;J.BAGGAGE_MAX_TOTAL_LENGTH=8192});var su=d(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.parseKeyPairsIntoRecord=be.parsePairKeyValue=be.getKeyPairs=be.serializeKeyPairs=void 0;var D_=(y(),E(m)),Ye=uu();function B_(u){return u.reduce((r,o)=>{let c=`${r}${r!==""?Ye.BAGGAGE_ITEMS_SEPARATOR:""}${o}`;return c.length>Ye.BAGGAGE_MAX_TOTAL_LENGTH?r:c},"")}be.serializeKeyPairs=B_;function V_(u){return u.getAllEntries().map(([r,o])=>{let c=`${encodeURIComponent(r)}=${encodeURIComponent(o.value)}`;return o.metadata!==void 0&&(c+=Ye.BAGGAGE_PROPERTIES_SEPARATOR+o.metadata.toString()),c})}be.getKeyPairs=V_;function Uc(u){let r=u.split(Ye.BAGGAGE_PROPERTIES_SEPARATOR);if(r.length<=0)return;let o=r.shift();if(!o)return;let c=o.indexOf(Ye.BAGGAGE_KEY_PAIR_SEPARATOR);if(c<=0)return;let i=decodeURIComponent(o.substring(0,c).trim()),a=decodeURIComponent(o.substring(c+1).trim()),t;return r.length>0&&(t=(0,D_.baggageEntryMetadataFromString)(r.join(Ye.BAGGAGE_PROPERTIES_SEPARATOR))),{key:i,value:a,metadata:t}}be.parsePairKeyValue=Uc;function k_(u){return typeof u!="string"||u.length===0?{}:u.split(Ye.BAGGAGE_ITEMS_SEPARATOR).map(r=>Uc(r)).filter(r=>r!==void 0&&r.value.length>0).reduce((r,o)=>(r[o.key]=o.value,r),{})}be.parseKeyPairsIntoRecord=k_});var Dc=d(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.W3CBaggagePropagator=void 0;var au=(y(),E(m)),q_=vr(),We=uu(),cu=su(),lu=class{inject(r,o,c){let i=au.propagation.getBaggage(r);if(!i||(0,q_.isTracingSuppressed)(r))return;let a=(0,cu.getKeyPairs)(i).filter(e=>e.length<=We.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,We.BAGGAGE_MAX_NAME_VALUE_PAIRS),t=(0,cu.serializeKeyPairs)(a);t.length>0&&c.set(o,We.BAGGAGE_HEADER,t)}extract(r,o,c){let i=c.get(o,We.BAGGAGE_HEADER),a=Array.isArray(i)?i.join(We.BAGGAGE_ITEMS_SEPARATOR):i;if(!a)return r;let t={};return a.length===0||(a.split(We.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let s=(0,cu.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:au.propagation.setBaggage(r,au.propagation.createBaggage(t))}fields(){return[We.BAGGAGE_HEADER]}};on.W3CBaggagePropagator=lu});var Bc=d(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.AnchoredClock=void 0;var pu=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}};un.AnchoredClock=pu});var Gc=d(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.isAttributeValue=Ce.isAttributeKey=Ce.sanitizeAttributes=void 0;var Vc=(y(),E(m));function j_(u){let r={};if(typeof u!="object"||u==null)return r;for(let[o,c]of Object.entries(u)){if(!kc(o)){Vc.diag.warn(`Invalid attribute key: ${o}`);continue}if(!qc(c)){Vc.diag.warn(`Invalid attribute value set for key: ${o}`);continue}Array.isArray(c)?r[o]=c.slice():r[o]=c}return r}Ce.sanitizeAttributes=j_;function kc(u){return typeof u=="string"&&u.length>0}Ce.isAttributeKey=kc;function qc(u){return u==null?!0:Array.isArray(u)?G_(u):jc(u)}Ce.isAttributeValue=qc;function G_(u){let r;for(let o of u)if(o!=null){if(!r){if(jc(o)){r=typeof o;continue}return!1}if(typeof o!==r)return!1}return!0}function jc(u){switch(typeof u){case"number":case"boolean":case"string":return!0}return!1}});var fu=d(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.loggingErrorHandler=void 0;var H_=(y(),E(m));function F_(){return u=>{H_.diag.error(K_(u))}}sn.loggingErrorHandler=F_;function K_(u){return typeof u=="string"?u:JSON.stringify(X_(u))}function X_(u){let r={},o=u;for(;o!==null;)Object.getOwnPropertyNames(o).forEach(c=>{if(r[c])return;let i=o[c];i&&(r[c]=String(i))}),o=Object.getPrototypeOf(o);return r}});var du=d(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.globalErrorHandler=Tt.setGlobalErrorHandler=void 0;var z_=fu(),Hc=(0,z_.loggingErrorHandler)();function $_(u){Hc=u}Tt.setGlobalErrorHandler=$_;function Y_(u){try{Hc(u)}catch{}}Tt.globalErrorHandler=Y_});var hu=d(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.TracesSamplerValues=void 0;var W_;(function(u){u.AlwaysOff="always_off",u.AlwaysOn="always_on",u.ParentBasedAlwaysOff="parentbased_always_off",u.ParentBasedAlwaysOn="parentbased_always_on",u.ParentBasedTraceIdRatio="parentbased_traceidratio",u.TraceIdRatio="traceidratio"})(W_=gr.TracesSamplerValues||(gr.TracesSamplerValues={}))});var Fc=d(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an._globalThis=void 0;an._globalThis=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});var cn=d(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.getEnvWithoutDefaults=M.parseEnvironment=M.DEFAULT_ENVIRONMENT=M.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=M.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=M.DEFAULT_ATTRIBUTE_COUNT_LIMIT=M.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=void 0;var Ue=(y(),E(m)),J_=hu(),Q_=Fc(),Z_=",",em=["OTEL_SDK_DISABLED"];function tm(u){return em.indexOf(u)>-1}var rm=["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 nm(u){return rm.indexOf(u)>-1}var om=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function im(u){return om.indexOf(u)>-1}M.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=1/0;M.DEFAULT_ATTRIBUTE_COUNT_LIMIT=128;M.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=128;M.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=128;M.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:Ue.DiagLogLevel.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:M.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_ATTRIBUTE_COUNT_LIMIT:M.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:M.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:M.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:M.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:M.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:M.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:M.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:J_.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 um(u,r,o){if(typeof o[u]>"u")return;let c=String(o[u]);r[u]=c.toLowerCase()==="true"}function sm(u,r,o,c=-1/0,i=1/0){if(typeof o[u]<"u"){let a=Number(o[u]);isNaN(a)||(a<c?r[u]=c:a>i?r[u]=i:r[u]=a)}}function am(u,r,o,c=Z_){let i=o[u];typeof i=="string"&&(r[u]=i.split(c).map(a=>a.trim()))}var cm={ALL:Ue.DiagLogLevel.ALL,VERBOSE:Ue.DiagLogLevel.VERBOSE,DEBUG:Ue.DiagLogLevel.DEBUG,INFO:Ue.DiagLogLevel.INFO,WARN:Ue.DiagLogLevel.WARN,ERROR:Ue.DiagLogLevel.ERROR,NONE:Ue.DiagLogLevel.NONE};function lm(u,r,o){let c=o[u];if(typeof c=="string"){let i=cm[c.toUpperCase()];i!=null&&(r[u]=i)}}function _u(u){let r={};for(let o in M.DEFAULT_ENVIRONMENT){let c=o;switch(c){case"OTEL_LOG_LEVEL":lm(c,r,u);break;default:if(tm(c))um(c,r,u);else if(nm(c))sm(c,r,u);else if(im(c))am(c,r,u);else{let i=u[c];typeof i<"u"&&i!==null&&(r[c]=String(i))}}}return r}M.parseEnvironment=_u;function pm(){return typeof process<"u"&&process&&process.env?_u(process.env):_u(Q_._globalThis)}M.getEnvWithoutDefaults=pm});var Xc=d(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.getEnv=void 0;var fm=K("os"),Kc=cn();function dm(){let u=(0,Kc.parseEnvironment)(process.env);return Object.assign({HOSTNAME:fm.hostname()},Kc.DEFAULT_ENVIRONMENT,u)}ln.getEnv=dm});var zc=d(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn._globalThis=void 0;pn._globalThis=typeof globalThis=="object"?globalThis:global});var Yc=d(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.hexToBase64=void 0;function $c(u){return u>=48&&u<=57?u-48:u>=97&&u<=102?u-87:u-55}var hm=Buffer.alloc(8),_m=Buffer.alloc(16);function mm(u){let r;u.length===16?r=hm:u.length===32?r=_m:r=Buffer.alloc(u.length/2);let o=0;for(let c=0;c<u.length;c+=2){let i=$c(u.charCodeAt(c)),a=$c(u.charCodeAt(c+1));r.writeUInt8(i<<4|a,o++)}return r.toString("base64")}fn.hexToBase64=mm});var Qc=d(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.RandomIdGenerator=void 0;var ym=8,Jc=16,mu=class{constructor(){this.generateTraceId=Wc(Jc),this.generateSpanId=Wc(ym)}};hn.RandomIdGenerator=mu;var dn=Buffer.allocUnsafe(Jc);function Wc(u){return function(){for(let o=0;o<u/4;o++)dn.writeUInt32BE(Math.random()*2**32>>>0,o*4);for(let o=0;o<u&&!(dn[o]>0);o++)o===u-1&&(dn[u-1]=1);return dn.toString("hex",0,u)}}});var Zc=d(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.otperformance=void 0;var Em=K("perf_hooks");_n.otperformance=Em.performance});var yu=d(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.VERSION=void 0;mn.VERSION="1.19.0"});var el=d(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.MessageTypeValues=x.RpcGrpcStatusCodeValues=x.MessagingOperationValues=x.MessagingDestinationKindValues=x.HttpFlavorValues=x.NetHostConnectionSubtypeValues=x.NetHostConnectionTypeValues=x.NetTransportValues=x.FaasInvokedProviderValues=x.FaasDocumentOperationValues=x.FaasTriggerValues=x.DbCassandraConsistencyLevelValues=x.DbSystemValues=x.SemanticAttributes=void 0;x.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"};x.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"};x.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"};x.FaasTriggerValues={DATASOURCE:"datasource",HTTP:"http",PUBSUB:"pubsub",TIMER:"timer",OTHER:"other"};x.FaasDocumentOperationValues={INSERT:"insert",EDIT:"edit",DELETE:"delete"};x.FaasInvokedProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};x.NetTransportValues={IP_TCP:"ip_tcp",IP_UDP:"ip_udp",IP:"ip",UNIX:"unix",PIPE:"pipe",INPROC:"inproc",OTHER:"other"};x.NetHostConnectionTypeValues={WIFI:"wifi",WIRED:"wired",CELL:"cell",UNAVAILABLE:"unavailable",UNKNOWN:"unknown"};x.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"};x.HttpFlavorValues={HTTP_1_0:"1.0",HTTP_1_1:"1.1",HTTP_2_0:"2.0",SPDY:"SPDY",QUIC:"QUIC"};x.MessagingDestinationKindValues={QUEUE:"queue",TOPIC:"topic"};x.MessagingOperationValues={RECEIVE:"receive",PROCESS:"process"};x.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};x.MessageTypeValues={SENT:"SENT",RECEIVED:"RECEIVED"}});var tl=d(Je=>{"use strict";var vm=Je&&Je.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),gm=Je&&Je.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&vm(r,u,o)};Object.defineProperty(Je,"__esModule",{value:!0});gm(el(),Je)});var rl=d(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.TelemetrySdkLanguageValues=Q.OsTypeValues=Q.HostArchValues=Q.AwsEcsLaunchtypeValues=Q.CloudPlatformValues=Q.CloudProviderValues=Q.SemanticResourceAttributes=void 0;Q.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"};Q.CloudProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};Q.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"};Q.AwsEcsLaunchtypeValues={EC2:"ec2",FARGATE:"fargate"};Q.HostArchValues={AMD64:"amd64",ARM32:"arm32",ARM64:"arm64",IA64:"ia64",PPC32:"ppc32",PPC64:"ppc64",X86:"x86"};Q.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"};Q.TelemetrySdkLanguageValues={CPP:"cpp",DOTNET:"dotnet",ERLANG:"erlang",GO:"go",JAVA:"java",NODEJS:"nodejs",PHP:"php",PYTHON:"python",RUBY:"ruby",WEBJS:"webjs"}});var nl=d(Qe=>{"use strict";var Tm=Qe&&Qe.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),Sm=Qe&&Qe.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Tm(r,u,o)};Object.defineProperty(Qe,"__esModule",{value:!0});Sm(rl(),Qe)});var le=d(De=>{"use strict";var bm=De&&De.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),ol=De&&De.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&bm(r,u,o)};Object.defineProperty(De,"__esModule",{value:!0});ol(tl(),De);ol(nl(),De)});var il=d(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.SDK_INFO=void 0;var Om=yu(),Tr=le();yn.SDK_INFO={[Tr.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:"opentelemetry",[Tr.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"node",[Tr.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:Tr.TelemetrySdkLanguageValues.NODEJS,[Tr.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:Om.VERSION}});var ul=d(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.unrefTimer=void 0;function Am(u){u.unref()}En.unrefTimer=Am});var sl=d(ue=>{"use strict";var Pm=ue&&ue.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),Ze=ue&&ue.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Pm(r,u,o)};Object.defineProperty(ue,"__esModule",{value:!0});Ze(Xc(),ue);Ze(zc(),ue);Ze(Yc(),ue);Ze(Qc(),ue);Ze(Zc(),ue);Ze(il(),ue);Ze(ul(),ue)});var Eu=d(et=>{"use strict";var Nm=et&&et.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),Rm=et&&et.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Nm(r,u,o)};Object.defineProperty(et,"__esModule",{value:!0});Rm(sl(),et)});var pl=d(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.addHrTimes=w.isTimeInput=w.isTimeInputHrTime=w.hrTimeToMicroseconds=w.hrTimeToMilliseconds=w.hrTimeToNanoseconds=w.hrTimeToTimeStamp=w.hrTimeDuration=w.timeInputToHrTime=w.hrTime=w.getTimeOrigin=w.millisToHrTime=void 0;var vu=Eu(),al=9,xm=6,Im=Math.pow(10,xm),vn=Math.pow(10,al);function Sr(u){let r=u/1e3,o=Math.trunc(r),c=Math.round(u%1e3*Im);return[o,c]}w.millisToHrTime=Sr;function gu(){let u=vu.otperformance.timeOrigin;if(typeof u!="number"){let r=vu.otperformance;u=r.timing&&r.timing.fetchStart}return u}w.getTimeOrigin=gu;function cl(u){let r=Sr(gu()),o=Sr(typeof u=="number"?u:vu.otperformance.now());return ll(r,o)}w.hrTime=cl;function Lm(u){if(Tu(u))return u;if(typeof u=="number")return u<gu()?cl(u):Sr(u);if(u instanceof Date)return Sr(u.getTime());throw TypeError("Invalid input type")}w.timeInputToHrTime=Lm;function wm(u,r){let o=r[0]-u[0],c=r[1]-u[1];return c<0&&(o-=1,c+=vn),[o,c]}w.hrTimeDuration=wm;function Mm(u){let r=al,o=`${"0".repeat(r)}${u[1]}Z`,c=o.substr(o.length-r-1);return new Date(u[0]*1e3).toISOString().replace("000Z",c)}w.hrTimeToTimeStamp=Mm;function Cm(u){return u[0]*vn+u[1]}w.hrTimeToNanoseconds=Cm;function Um(u){return u[0]*1e3+u[1]/1e6}w.hrTimeToMilliseconds=Um;function Dm(u){return u[0]*1e6+u[1]/1e3}w.hrTimeToMicroseconds=Dm;function Tu(u){return Array.isArray(u)&&u.length===2&&typeof u[0]=="number"&&typeof u[1]=="number"}w.isTimeInputHrTime=Tu;function Bm(u){return Tu(u)||typeof u=="number"||u instanceof Date}w.isTimeInput=Bm;function ll(u,r){let o=[u[0]+r[0],u[1]+r[1]];return o[1]>=vn&&(o[1]-=vn,o[0]+=1),o}w.addHrTimes=ll});var dl=d(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0})});var hl=d(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.ExportResultCode=void 0;var Vm;(function(u){u[u.SUCCESS=0]="SUCCESS",u[u.FAILED=1]="FAILED"})(Vm=br.ExportResultCode||(br.ExportResultCode={}))});var ml=d(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.CompositePropagator=void 0;var _l=(y(),E(m)),Su=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,i)=>c.concat(i),[])))}inject(r,o,c){for(let i of this._propagators)try{i.inject(r,o,c)}catch(a){_l.diag.warn(`Failed to inject with ${i.constructor.name}. Err: ${a.message}`)}}extract(r,o,c){return this._propagators.reduce((i,a)=>{try{return a.extract(i,o,c)}catch(t){_l.diag.warn(`Failed to inject with ${a.constructor.name}. Err: ${t.message}`)}return i},r)}fields(){return this._fields.slice()}};gn.CompositePropagator=Su});var yl=d(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.validateValue=St.validateKey=void 0;var bu="[_0-9a-z-*/]",km=`[a-z]${bu}{0,255}`,qm=`[a-z0-9]${bu}{0,240}@[a-z]${bu}{0,13}`,jm=new RegExp(`^(?:${km}|${qm})$`),Gm=/^[ -~]{0,255}[!-~]$/,Hm=/,|=/;function Fm(u){return jm.test(u)}St.validateKey=Fm;function Km(u){return Gm.test(u)&&!Hm.test(u)}St.validateValue=Km});var Au=d(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.TraceState=void 0;var El=yl(),vl=32,Xm=512,gl=",",Tl="=",Ou=class u{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+Tl+this.get(o)),r),[]).join(gl)}_parse(r){r.length>Xm||(this._internalState=r.split(gl).reverse().reduce((o,c)=>{let i=c.trim(),a=i.indexOf(Tl);if(a!==-1){let t=i.slice(0,a),e=i.slice(a+1,c.length);(0,El.validateKey)(t)&&(0,El.validateValue)(e)&&o.set(t,e)}return o},new Map),this._internalState.size>vl&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,vl))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let r=new u;return r._internalState=new Map(this._internalState),r}};Tn.TraceState=Ou});var bl=d(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.W3CTraceContextPropagator=Z.parseTraceParent=Z.TRACE_STATE_HEADER=Z.TRACE_PARENT_HEADER=void 0;var Sn=(y(),E(m)),zm=vr(),$m=Au();Z.TRACE_PARENT_HEADER="traceparent";Z.TRACE_STATE_HEADER="tracestate";var Ym="00",Wm="(?!ff)[\\da-f]{2}",Jm="(?![0]{32})[\\da-f]{32}",Qm="(?![0]{16})[\\da-f]{16}",Zm="[\\da-f]{2}",ey=new RegExp(`^\\s?(${Wm})-(${Jm})-(${Qm})-(${Zm})(-.*)?\\s?$`);function Sl(u){let r=ey.exec(u);return!r||r[1]==="00"&&r[5]?null:{traceId:r[2],spanId:r[3],traceFlags:parseInt(r[4],16)}}Z.parseTraceParent=Sl;var Pu=class{inject(r,o,c){let i=Sn.trace.getSpanContext(r);if(!i||(0,zm.isTracingSuppressed)(r)||!(0,Sn.isSpanContextValid)(i))return;let a=`${Ym}-${i.traceId}-${i.spanId}-0${Number(i.traceFlags||Sn.TraceFlags.NONE).toString(16)}`;c.set(o,Z.TRACE_PARENT_HEADER,a),i.traceState&&c.set(o,Z.TRACE_STATE_HEADER,i.traceState.serialize())}extract(r,o,c){let i=c.get(o,Z.TRACE_PARENT_HEADER);if(!i)return r;let a=Array.isArray(i)?i[0]:i;if(typeof a!="string")return r;let t=Sl(a);if(!t)return r;t.isRemote=!0;let e=c.get(o,Z.TRACE_STATE_HEADER);if(e){let n=Array.isArray(e)?e.join(","):e;t.traceState=new $m.TraceState(typeof n=="string"?n:void 0)}return Sn.trace.setSpanContext(r,t)}fields(){return[Z.TRACE_PARENT_HEADER,Z.TRACE_STATE_HEADER]}};Z.W3CTraceContextPropagator=Pu});var Al=d(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0})});var Pl=d(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.getRPCMetadata=ye.deleteRPCMetadata=ye.setRPCMetadata=ye.RPCType=void 0;var ty=(y(),E(m)),Nu=(0,ty.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),ry;(function(u){u.HTTP="http"})(ry=ye.RPCType||(ye.RPCType={}));function ny(u,r){return u.setValue(Nu,r)}ye.setRPCMetadata=ny;function oy(u){return u.deleteValue(Nu)}ye.deleteRPCMetadata=oy;function iy(u){return u.getValue(Nu)}ye.getRPCMetadata=iy});var xu=d(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.AlwaysOffSampler=void 0;var uy=(y(),E(m)),Ru=class{shouldSample(){return{decision:uy.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};bn.AlwaysOffSampler=Ru});var Lu=d(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.AlwaysOnSampler=void 0;var sy=(y(),E(m)),Iu=class{shouldSample(){return{decision:sy.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};On.AlwaysOnSampler=Iu});var Rl=d(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.ParentBasedSampler=void 0;var An=(y(),E(m)),ay=du(),Nl=xu(),wu=Lu(),Mu=class{constructor(r){var o,c,i,a;this._root=r.root,this._root||((0,ay.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new wu.AlwaysOnSampler),this._remoteParentSampled=(o=r.remoteParentSampled)!==null&&o!==void 0?o:new wu.AlwaysOnSampler,this._remoteParentNotSampled=(c=r.remoteParentNotSampled)!==null&&c!==void 0?c:new Nl.AlwaysOffSampler,this._localParentSampled=(i=r.localParentSampled)!==null&&i!==void 0?i:new wu.AlwaysOnSampler,this._localParentNotSampled=(a=r.localParentNotSampled)!==null&&a!==void 0?a:new Nl.AlwaysOffSampler}shouldSample(r,o,c,i,a,t){let e=An.trace.getSpanContext(r);return!e||!(0,An.isSpanContextValid)(e)?this._root.shouldSample(r,o,c,i,a,t):e.isRemote?e.traceFlags&An.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(r,o,c,i,a,t):this._remoteParentNotSampled.shouldSample(r,o,c,i,a,t):e.traceFlags&An.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(r,o,c,i,a,t):this._localParentNotSampled.shouldSample(r,o,c,i,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()}}`}};Pn.ParentBasedSampler=Mu});var xl=d(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.TraceIdRatioBasedSampler=void 0;var Cu=(y(),E(m)),Uu=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,Cu.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?Cu.SamplingDecision.RECORD_AND_SAMPLED:Cu.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 i=c*8,a=parseInt(r.slice(i,i+8),16);o=(o^a)>>>0}return o}};Nn.TraceIdRatioBasedSampler=Uu});var Cl=d(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.isPlainObject=void 0;var cy="[object Object]",ly="[object Null]",py="[object Undefined]",fy=Function.prototype,Il=fy.toString,dy=Il.call(Object),hy=_y(Object.getPrototypeOf,Object),Ll=Object.prototype,wl=Ll.hasOwnProperty,tt=Symbol?Symbol.toStringTag:void 0,Ml=Ll.toString;function _y(u,r){return function(o){return u(r(o))}}function my(u){if(!yy(u)||Ey(u)!==cy)return!1;let r=hy(u);if(r===null)return!0;let o=wl.call(r,"constructor")&&r.constructor;return typeof o=="function"&&o instanceof o&&Il.call(o)===dy}Rn.isPlainObject=my;function yy(u){return u!=null&&typeof u=="object"}function Ey(u){return u==null?u===void 0?py:ly:tt&&tt in Object(u)?vy(u):gy(u)}function vy(u){let r=wl.call(u,tt),o=u[tt],c=!1;try{u[tt]=void 0,c=!0}catch{}let i=Ml.call(u);return c&&(r?u[tt]=o:delete u[tt]),i}function gy(u){return Ml.call(u)}});var kl=d(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.merge=void 0;var Ul=Cl(),Ty=20;function Sy(...u){let r=u.shift(),o=new WeakMap;for(;u.length>0;)r=Bl(r,u.shift(),0,o);return r}Ln.merge=Sy;function Du(u){return In(u)?u.slice():u}function Bl(u,r,o=0,c){let i;if(!(o>Ty)){if(o++,xn(u)||xn(r)||Vl(r))i=Du(r);else if(In(u)){if(i=u.slice(),In(r))for(let a=0,t=r.length;a<t;a++)i.push(Du(r[a]));else if(Or(r)){let a=Object.keys(r);for(let t=0,e=a.length;t<e;t++){let n=a[t];i[n]=Du(r[n])}}}else if(Or(u))if(Or(r)){if(!by(u,r))return r;i=Object.assign({},u);let a=Object.keys(r);for(let t=0,e=a.length;t<e;t++){let n=a[t],s=r[n];if(xn(s))typeof s>"u"?delete i[n]:i[n]=s;else{let l=i[n],h=s;if(Dl(u,n,c)||Dl(r,n,c))delete i[n];else{if(Or(l)&&Or(h)){let v=c.get(l)||[],b=c.get(h)||[];v.push({obj:u,key:n}),b.push({obj:r,key:n}),c.set(l,v),c.set(h,b)}i[n]=Bl(i[n],s,o,c)}}}}else i=r;return i}}function Dl(u,r,o){let c=o.get(u[r])||[];for(let i=0,a=c.length;i<a;i++){let t=c[i];if(t.key===r&&t.obj===u)return!0}return!1}function In(u){return Array.isArray(u)}function Vl(u){return typeof u=="function"}function Or(u){return!xn(u)&&!In(u)&&!Vl(u)&&typeof u=="object"}function xn(u){return typeof u=="string"||typeof u=="number"||typeof u=="boolean"||typeof u>"u"||u instanceof Date||u instanceof RegExp||u===null}function by(u,r){return!(!(0,Ul.isPlainObject)(u)||!(0,Ul.isPlainObject)(r))}});var ql=d(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.callWithTimeout=bt.TimeoutError=void 0;var wn=class u extends Error{constructor(r){super(r),Object.setPrototypeOf(this,u.prototype)}};bt.TimeoutError=wn;function Oy(u,r){let o,c=new Promise(function(a,t){o=setTimeout(function(){t(new wn("Operation timed out."))},r)});return Promise.race([u,c]).then(i=>(clearTimeout(o),i),i=>{throw clearTimeout(o),i})}bt.callWithTimeout=Oy});var Gl=d(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.isUrlIgnored=Ot.urlMatches=void 0;function jl(u,r){return typeof r=="string"?u===r:!!u.match(r)}Ot.urlMatches=jl;function Ay(u,r){if(!r)return!1;for(let o of r)if(jl(u,o))return!0;return!1}Ot.isUrlIgnored=Ay});var Hl=d(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.isWrapped=void 0;function Py(u){return typeof u=="function"&&typeof u.__original=="function"&&typeof u.__unwrap=="function"&&u.__wrapped===!0}Mn.isWrapped=Py});var Fl=d(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.Deferred=void 0;var Bu=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)}};Cn.Deferred=Bu});var Kl=d(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.BindOnceFuture=void 0;var Ny=Fl(),Vu=class{constructor(r,o){this._callback=r,this._that=o,this._isCalled=!1,this._deferred=new Ny.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}};Un.BindOnceFuture=Vu});var zl=d(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn._export=void 0;var Xl=(y(),E(m)),Ry=vr();function xy(u,r){return new Promise(o=>{Xl.context.with((0,Ry.suppressTracing)(Xl.context.active()),()=>{u.export(r,c=>{o(c)})})})}Dn._export=xy});var P=d(A=>{"use strict";var Iy=A&&A.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),L=A&&A.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Iy(r,u,o)};Object.defineProperty(A,"__esModule",{value:!0});A.internal=A.baggageUtils=void 0;L(Dc(),A);L(Bc(),A);L(Gc(),A);L(du(),A);L(fu(),A);L(pl(),A);L(dl(),A);L(hl(),A);A.baggageUtils=su();L(Eu(),A);L(ml(),A);L(bl(),A);L(Al(),A);L(Pl(),A);L(xu(),A);L(Lu(),A);L(Rl(),A);L(xl(),A);L(vr(),A);L(Au(),A);L(cn(),A);L(kl(),A);L(hu(),A);L(ql(),A);L(Gl(),A);L(Hl(),A);L(Kl(),A);L(yu(),A);var Ly=zl();A.internal={_export:Ly._export}});var $l=d(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.ExceptionEventName=void 0;Bn.ExceptionEventName="exception"});var qu=d(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.Span=void 0;var Oe=(y(),E(m)),ee=P(),rt=le(),wy=$l(),ku=class{constructor(r,o,c,i,a,t,e=[],n,s,l){this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:Oe.SpanStatusCode.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=c,this._spanContext=i,this.parentSpanId=t,this.kind=a,this.links=e;let h=Date.now();this._performanceStartTime=ee.otperformance.now(),this._performanceOffset=h-(this._performanceStartTime+(0,ee.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?(Oe.diag.warn(`Invalid attribute key: ${r}`),this):(0,ee.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):(Oe.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 Oe.diag.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(Oe.diag.warn("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),(0,ee.isTimeInput)(o)&&((0,ee.isTimeInput)(c)||(c=o),o=void 0);let i=(0,ee.sanitizeAttributes)(o);return this.events.push({name:r,attributes:i,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()){Oe.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,ee.hrTimeDuration)(this.startTime,this.endTime),this._duration[0]<0&&(Oe.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<ee.otperformance.now())return(0,ee.hrTime)(r+this._performanceOffset);if(typeof r=="number")return(0,ee.millisToHrTime)(r);if(r instanceof Date)return(0,ee.millisToHrTime)(r.getTime());if((0,ee.isTimeInputHrTime)(r))return r;if(this._startTimeProvided)return(0,ee.millisToHrTime)(Date.now());let o=ee.otperformance.now()-this._performanceStartTime;return(0,ee.addHrTimes)(this.startTime,(0,ee.millisToHrTime)(o))}isRecording(){return this._ended===!1}recordException(r,o){let c={};typeof r=="string"?c[rt.SemanticAttributes.EXCEPTION_MESSAGE]=r:r&&(r.code?c[rt.SemanticAttributes.EXCEPTION_TYPE]=r.code.toString():r.name&&(c[rt.SemanticAttributes.EXCEPTION_TYPE]=r.name),r.message&&(c[rt.SemanticAttributes.EXCEPTION_MESSAGE]=r.message),r.stack&&(c[rt.SemanticAttributes.EXCEPTION_STACKTRACE]=r.stack)),c[rt.SemanticAttributes.EXCEPTION_TYPE]||c[rt.SemanticAttributes.EXCEPTION_MESSAGE]?this.addEvent(wy.ExceptionEventName,c,o):Oe.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&&Oe.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?(Oe.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}};Vn.Span=ku});var Pr=d(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.SamplingDecision=void 0;var My;(function(u){u[u.NOT_RECORD=0]="NOT_RECORD",u[u.RECORD=1]="RECORD",u[u.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(My=Ar.SamplingDecision||(Ar.SamplingDecision={}))});var qn=d(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.AlwaysOffSampler=void 0;var Cy=Pr(),ju=class{shouldSample(){return{decision:Cy.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};kn.AlwaysOffSampler=ju});var Gn=d(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.AlwaysOnSampler=void 0;var Uy=Pr(),Gu=class{shouldSample(){return{decision:Uy.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};jn.AlwaysOnSampler=Gu});var Ku=d(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.ParentBasedSampler=void 0;var Hn=(y(),E(m)),Dy=P(),Yl=qn(),Hu=Gn(),Fu=class{constructor(r){var o,c,i,a;this._root=r.root,this._root||((0,Dy.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Hu.AlwaysOnSampler),this._remoteParentSampled=(o=r.remoteParentSampled)!==null&&o!==void 0?o:new Hu.AlwaysOnSampler,this._remoteParentNotSampled=(c=r.remoteParentNotSampled)!==null&&c!==void 0?c:new Yl.AlwaysOffSampler,this._localParentSampled=(i=r.localParentSampled)!==null&&i!==void 0?i:new Hu.AlwaysOnSampler,this._localParentNotSampled=(a=r.localParentNotSampled)!==null&&a!==void 0?a:new Yl.AlwaysOffSampler}shouldSample(r,o,c,i,a,t){let e=Hn.trace.getSpanContext(r);return!e||!(0,Hn.isSpanContextValid)(e)?this._root.shouldSample(r,o,c,i,a,t):e.isRemote?e.traceFlags&Hn.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(r,o,c,i,a,t):this._remoteParentNotSampled.shouldSample(r,o,c,i,a,t):e.traceFlags&Hn.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(r,o,c,i,a,t):this._localParentNotSampled.shouldSample(r,o,c,i,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()}}`}};Fn.ParentBasedSampler=Fu});var zu=d(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.TraceIdRatioBasedSampler=void 0;var By=(y(),E(m)),Wl=Pr(),Xu=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,By.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?Wl.SamplingDecision.RECORD_AND_SAMPLED:Wl.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 i=c*8,a=parseInt(r.slice(i,i+8),16);o=(o^a)>>>0}return o}};Kn.TraceIdRatioBasedSampler=Xu});var Wu=d(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.buildSamplerFromEnv=Pt.loadDefaultConfig=void 0;var Xn=(y(),E(m)),$=P(),Jl=qn(),$u=Gn(),Yu=Ku(),Ql=zu(),Vy=(0,$.getEnv)(),ky=$.TracesSamplerValues.AlwaysOn,At=1;function qy(){return{sampler:ep(Vy),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,$.getEnv)().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,$.getEnv)().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:(0,$.getEnv)().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,$.getEnv)().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:(0,$.getEnv)().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:(0,$.getEnv)().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:(0,$.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:(0,$.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}Pt.loadDefaultConfig=qy;function ep(u=(0,$.getEnv)()){switch(u.OTEL_TRACES_SAMPLER){case $.TracesSamplerValues.AlwaysOn:return new $u.AlwaysOnSampler;case $.TracesSamplerValues.AlwaysOff:return new Jl.AlwaysOffSampler;case $.TracesSamplerValues.ParentBasedAlwaysOn:return new Yu.ParentBasedSampler({root:new $u.AlwaysOnSampler});case $.TracesSamplerValues.ParentBasedAlwaysOff:return new Yu.ParentBasedSampler({root:new Jl.AlwaysOffSampler});case $.TracesSamplerValues.TraceIdRatio:return new Ql.TraceIdRatioBasedSampler(Zl(u));case $.TracesSamplerValues.ParentBasedTraceIdRatio:return new Yu.ParentBasedSampler({root:new Ql.TraceIdRatioBasedSampler(Zl(u))});default:return Xn.diag.error(`OTEL_TRACES_SAMPLER value "${u.OTEL_TRACES_SAMPLER} invalid, defaulting to ${ky}".`),new $u.AlwaysOnSampler}}Pt.buildSamplerFromEnv=ep;function Zl(u){if(u.OTEL_TRACES_SAMPLER_ARG===void 0||u.OTEL_TRACES_SAMPLER_ARG==="")return Xn.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${At}.`),At;let r=Number(u.OTEL_TRACES_SAMPLER_ARG);return isNaN(r)?(Xn.diag.error(`OTEL_TRACES_SAMPLER_ARG=${u.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${At}.`),At):r<0||r>1?(Xn.diag.error(`OTEL_TRACES_SAMPLER_ARG=${u.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${At}.`),At):r}});var Qu=d(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.reconfigureLimits=Nt.mergeConfig=void 0;var tp=Wu(),Ju=P();function jy(u){let r={sampler:(0,tp.buildSamplerFromEnv)()},o=(0,tp.loadDefaultConfig)(),c=Object.assign({},o,r,u);return c.generalLimits=Object.assign({},o.generalLimits,u.generalLimits||{}),c.spanLimits=Object.assign({},o.spanLimits,u.spanLimits||{}),c}Nt.mergeConfig=jy;function Gy(u){var r,o,c,i,a,t,e,n,s,l,h,v;let b=Object.assign({},u.spanLimits),N=(0,Ju.getEnvWithoutDefaults)();return b.attributeCountLimit=(t=(a=(i=(o=(r=u.spanLimits)===null||r===void 0?void 0:r.attributeCountLimit)!==null&&o!==void 0?o:(c=u.generalLimits)===null||c===void 0?void 0:c.attributeCountLimit)!==null&&i!==void 0?i:N.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&a!==void 0?a:N.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&t!==void 0?t:Ju.DEFAULT_ATTRIBUTE_COUNT_LIMIT,b.attributeValueLengthLimit=(v=(h=(l=(n=(e=u.spanLimits)===null||e===void 0?void 0:e.attributeValueLengthLimit)!==null&&n!==void 0?n:(s=u.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&&v!==void 0?v:Ju.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},u,{spanLimits:b})}Nt.reconfigureLimits=Gy});var rp=d(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.BatchSpanProcessorBase=void 0;var Rt=(y(),E(m)),nt=P(),Zu=class{constructor(r,o){this._exporter=r,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;let c=(0,nt.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 nt.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(Rt.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&Rt.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&&Rt.diag.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(Rt.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=[],i=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let a=0,t=i;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);Rt.context.with((0,nt.suppressTracing)(Rt.context.active()),()=>{let i=this._finishedSpans.splice(0,this._maxExportBatchSize),a=()=>this._exporter.export(i,e=>{var n;clearTimeout(c),e.code===nt.ExportResultCode.SUCCESS?r():o((n=e.error)!==null&&n!==void 0?n:new Error("BatchSpanProcessor: span export failed"))}),t=i.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,nt.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,nt.globalErrorHandler)(o)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return r();this._timer===void 0&&(this._timer=setTimeout(()=>r(),this._scheduledDelayMillis),(0,nt.unrefTimer)(this._timer))}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}};zn.BatchSpanProcessorBase=Zu});var np=d($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.BatchSpanProcessor=void 0;var Hy=rp(),es=class extends Hy.BatchSpanProcessorBase{onShutdown(){}};$n.BatchSpanProcessor=es});var up=d(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.RandomIdGenerator=void 0;var Fy=8,ip=16,ts=class{constructor(){this.generateTraceId=op(ip),this.generateSpanId=op(Fy)}};Wn.RandomIdGenerator=ts;var Yn=Buffer.allocUnsafe(ip);function op(u){return function(){for(let o=0;o<u/4;o++)Yn.writeUInt32BE(Math.random()*2**32>>>0,o*4);for(let o=0;o<u&&!(Yn[o]>0);o++)o===u-1&&(Yn[u-1]=1);return Yn.toString("hex",0,u)}}});var ap=d(Be=>{"use strict";var Ky=Be&&Be.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),sp=Be&&Be.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Ky(r,u,o)};Object.defineProperty(Be,"__esModule",{value:!0});sp(np(),Be);sp(up(),Be)});var Jn=d(ot=>{"use strict";var Xy=ot&&ot.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),zy=ot&&ot.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Xy(r,u,o)};Object.defineProperty(ot,"__esModule",{value:!0});zy(ap(),ot)});var cp=d(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.Tracer=void 0;var Y=(y(),E(m)),Qn=P(),$y=qu(),Yy=Qu(),Wy=Jn(),rs=class{constructor(r,o,c){this._tracerProvider=c;let i=(0,Yy.mergeConfig)(o);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=o.idGenerator||new Wy.RandomIdGenerator,this.resource=c.resource,this.instrumentationLibrary=r}startSpan(r,o={},c=Y.context.active()){var i,a,t;o.root&&(c=Y.trace.deleteSpan(c));let e=Y.trace.getSpan(c);if((0,Qn.isTracingSuppressed)(c))return Y.diag.debug("Instrumentation suppressed, returning Noop Span"),Y.trace.wrapSpanContext(Y.INVALID_SPAN_CONTEXT);let n=e?.spanContext(),s=this._idGenerator.generateSpanId(),l,h,v;!n||!Y.trace.isSpanContextValid(n)?l=this._idGenerator.generateTraceId():(l=n.traceId,h=n.traceState,v=n.spanId);let b=(i=o.kind)!==null&&i!==void 0?i:Y.SpanKind.INTERNAL,N=((a=o.links)!==null&&a!==void 0?a:[]).map(rn=>({context:rn.context,attributes:(0,Qn.sanitizeAttributes)(rn.attributes)})),V=(0,Qn.sanitizeAttributes)(o.attributes),I=this._sampler.shouldSample(c,l,r,b,V,N);h=(t=I.traceState)!==null&&t!==void 0?t:h;let U=I.decision===Y.SamplingDecision.RECORD_AND_SAMPLED?Y.TraceFlags.SAMPLED:Y.TraceFlags.NONE,F={traceId:l,spanId:s,traceFlags:U,traceState:h};if(I.decision===Y.SamplingDecision.NOT_RECORD)return Y.diag.debug("Recording is off, propagating context in a non-recording span"),Y.trace.wrapSpanContext(F);let me=(0,Qn.sanitizeAttributes)(Object.assign(V,I.attributes));return new $y.Span(this,c,r,F,b,v,N,o.startTime,void 0,me)}startActiveSpan(r,o,c,i){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=i);let n=t??Y.context.active(),s=this.startSpan(r,a,n),l=Y.trace.setSpan(n,s);return Y.context.with(l,e,void 0,s)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}getActiveSpanProcessor(){return this._tracerProvider.getActiveSpanProcessor()}};Zn.Tracer=rs});var lp=d(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.defaultServiceName=void 0;function Jy(){return`unknown_service:${process.argv0}`}eo.defaultServiceName=Jy});var ns=d(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.normalizeType=xt.normalizeArch=void 0;var Qy=u=>{switch(u){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return u}};xt.normalizeArch=Qy;var Zy=u=>{switch(u){case"sunos":return"solaris";case"win32":return"windows";default:return u}};xt.normalizeType=Zy});var ro=d(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.execAsync=void 0;var eE=K("child_process"),tE=K("util");to.execAsync=tE.promisify(eE.exec)});var pp=d(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.getMachineId=void 0;var rE=ro(),nE=(y(),E(m));async function oE(){try{let r=(await(0,rE.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(u){nE.diag.debug(`error reading machine id: ${u}`)}return""}no.getMachineId=oE});var fp=d(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.getMachineId=void 0;var iE=K("fs"),uE=(y(),E(m));async function sE(){let u=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let r of u)try{return(await iE.promises.readFile(r,{encoding:"utf8"})).trim()}catch(o){uE.diag.debug(`error reading machine id: ${o}`)}return""}oo.getMachineId=sE});var hp=d(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.getMachineId=void 0;var aE=K("fs"),cE=ro(),dp=(y(),E(m));async function lE(){try{return(await aE.promises.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(u){dp.diag.debug(`error reading machine id: ${u}`)}try{return(await(0,cE.execAsync)("kenv -q smbios.system.uuid")).stdout.trim()}catch(u){dp.diag.debug(`error reading machine id: ${u}`)}return""}io.getMachineId=lE});var mp=d(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo.getMachineId=void 0;var _p=K("process"),pE=ro(),fE=(y(),E(m));async function dE(){let u="QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",r="%windir%\\System32\\REG.exe";_p.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in _p.env&&(r="%windir%\\sysnative\\cmd.exe /c "+r);try{let c=(await(0,pE.execAsync)(`${r} ${u}`)).stdout.split("REG_SZ");if(c.length===2)return c[1].trim()}catch(o){fE.diag.debug(`error reading machine id: ${o}`)}return""}uo.getMachineId=dE});var yp=d(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.getMachineId=void 0;var hE=(y(),E(m));async function _E(){return hE.diag.debug("could not read machine-id: unsupported platform"),""}so.getMachineId=_E});var Ep=d(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.getMachineId=void 0;var mE=K("process"),It;xe.getMachineId=It;switch(mE.platform){case"darwin":xe.getMachineId=It=pp().getMachineId;break;case"linux":xe.getMachineId=It=fp().getMachineId;break;case"freebsd":xe.getMachineId=It=hp().getMachineId;break;case"win32":xe.getMachineId=It=mp().getMachineId;break;default:xe.getMachineId=It=yp().getMachineId}});var us=d(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.hostDetectorSync=void 0;var os=le(),yE=it(),vp=K("os"),EE=ns(),vE=Ep(),is=class{detect(r){let o={[os.SemanticResourceAttributes.HOST_NAME]:(0,vp.hostname)(),[os.SemanticResourceAttributes.HOST_ARCH]:(0,EE.normalizeArch)((0,vp.arch)())};return new yE.Resource(o,this._getAsyncAttributes())}_getAsyncAttributes(){return(0,vE.getMachineId)().then(r=>{let o={};return r&&(o[os.SemanticResourceAttributes.HOST_ID]=r),o})}};ao.hostDetectorSync=new is});var gp=d(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.hostDetector=void 0;var gE=us(),ss=class{detect(r){return Promise.resolve(gE.hostDetectorSync.detect(r))}};co.hostDetector=new ss});var cs=d(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.osDetectorSync=void 0;var Tp=le(),TE=it(),Sp=K("os"),SE=ns(),as=class{detect(r){let o={[Tp.SemanticResourceAttributes.OS_TYPE]:(0,SE.normalizeType)((0,Sp.platform)()),[Tp.SemanticResourceAttributes.OS_VERSION]:(0,Sp.release)()};return new TE.Resource(o)}};lo.osDetectorSync=new as});var bp=d(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.osDetector=void 0;var bE=cs(),ls=class{detect(r){return Promise.resolve(bE.osDetectorSync.detect(r))}};po.osDetector=new ls});var fs=d(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.processDetectorSync=void 0;var OE=(y(),E(m)),Ie=le(),AE=it(),PE=K("os"),ps=class{detect(r){let o={[Ie.SemanticResourceAttributes.PROCESS_PID]:process.pid,[Ie.SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME]:process.title,[Ie.SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH]:process.execPath,[Ie.SemanticResourceAttributes.PROCESS_COMMAND_ARGS]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[Ie.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]:process.versions.node,[Ie.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"nodejs",[Ie.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]:"Node.js"};process.argv.length>1&&(o[Ie.SemanticResourceAttributes.PROCESS_COMMAND]=process.argv[1]);try{let c=PE.userInfo();o[Ie.SemanticResourceAttributes.PROCESS_OWNER]=c.username}catch(c){OE.diag.debug(`error obtaining process owner: ${c}`)}return new AE.Resource(o)}};fo.processDetectorSync=new ps});var Op=d(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.processDetector=void 0;var NE=fs(),ds=class{detect(r){return Promise.resolve(NE.processDetectorSync.detect(r))}};ho.processDetector=new ds});var Ap=d(se=>{"use strict";var RE=se&&se.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),ut=se&&se.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&RE(r,u,o)};Object.defineProperty(se,"__esModule",{value:!0});ut(lp(),se);ut(gp(),se);ut(bp(),se);ut(us(),se);ut(cs(),se);ut(Op(),se);ut(fs(),se)});var hs=d(st=>{"use strict";var xE=st&&st.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),IE=st&&st.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&xE(r,u,o)};Object.defineProperty(st,"__esModule",{value:!0});IE(Ap(),st)});var it=d(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.Resource=void 0;var Pp=(y(),E(m)),at=le(),_s=P(),LE=hs(),Nr=class u{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(i=>(this._attributes=Object.assign({},this._attributes,i),this.asyncAttributesPending=!1,i),i=>(Pp.diag.debug("a resource's async attributes promise rejected: %s",i),this.asyncAttributesPending=!1,{}))}static empty(){return u.EMPTY}static default(){return new u({[at.SemanticResourceAttributes.SERVICE_NAME]:(0,LE.defaultServiceName)(),[at.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:_s.SDK_INFO[at.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE],[at.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:_s.SDK_INFO[at.SemanticResourceAttributes.TELEMETRY_SDK_NAME],[at.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:_s.SDK_INFO[at.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]})}get attributes(){var r;return this.asyncAttributesPending&&Pp.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 u(c);let i=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 u(c,i)}};_o.Resource=Nr;Nr.EMPTY=new Nr({})});var Rp=d(Np=>{"use strict";Object.defineProperty(Np,"__esModule",{value:!0})});var Ip=d(xp=>{"use strict";Object.defineProperty(xp,"__esModule",{value:!0})});var wp=d(Lp=>{"use strict";Object.defineProperty(Lp,"__esModule",{value:!0})});var Mp=d(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.browserDetector=void 0;var wE=ct(),ms=class{detect(r){return Promise.resolve(wE.browserDetectorSync.detect(r))}};mo.browserDetector=new ms});var Es=d(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.envDetectorSync=void 0;var ME=(y(),E(m)),CE=P(),UE=le(),DE=it(),ys=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,CE.getEnv)(),i=c.OTEL_RESOURCE_ATTRIBUTES,a=c.OTEL_SERVICE_NAME;if(i)try{let t=this._parseResourceAttributes(i);Object.assign(o,t)}catch(t){ME.diag.debug(`EnvDetector failed: ${t.message}`)}return a&&(o[UE.SemanticResourceAttributes.SERVICE_NAME]=a),new DE.Resource(o)}_parseResourceAttributes(r){if(!r)return{};let o={},c=r.split(this._COMMA_SEPARATOR,-1);for(let i of c){let a=i.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)}};yo.envDetectorSync=new ys});var Cp=d(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});Eo.envDetector=void 0;var BE=Es(),vs=class{detect(r){return Promise.resolve(BE.envDetectorSync.detect(r))}};Eo.envDetector=new vs});var Up=d(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.browserDetectorSync=void 0;var vo=le(),gs=ct(),VE=(y(),E(m)),Ts=class{detect(r){if(!(typeof navigator<"u"))return gs.Resource.empty();let c={[vo.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"browser",[vo.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]:"Web Browser",[vo.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]:navigator.userAgent};return this._getResourceAttributes(c,r)}_getResourceAttributes(r,o){return r[vo.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]===""?(VE.diag.debug("BrowserDetector failed: Unable to find required browser resources. "),gs.Resource.empty()):new gs.Resource(Object.assign({},r))}};go.browserDetectorSync=new Ts});var Dp=d(Ae=>{"use strict";var kE=Ae&&Ae.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),To=Ae&&Ae.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&kE(r,u,o)};Object.defineProperty(Ae,"__esModule",{value:!0});To(Mp(),Ae);To(Cp(),Ae);To(Up(),Ae);To(Es(),Ae)});var Bp=d(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.isPromiseLike=void 0;var qE=u=>u!==null&&typeof u=="object"&&typeof u.then=="function";So.isPromiseLike=qE});var kp=d(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.detectResourcesSync=wt.detectResources=void 0;var Rr=it(),Lt=(y(),E(m)),jE=Bp(),GE=async(u={})=>{let r=await Promise.all((u.detectors||[]).map(async o=>{try{let c=await o.detect(u);return Lt.diag.debug(`${o.constructor.name} found resource.`,c),c}catch(c){return Lt.diag.debug(`${o.constructor.name} failed: ${c.message}`),Rr.Resource.empty()}}));return Vp(r),r.reduce((o,c)=>o.merge(c),Rr.Resource.empty())};wt.detectResources=GE;var HE=(u={})=>{var r;let o=((r=u.detectors)!==null&&r!==void 0?r:[]).map(i=>{try{let a=i.detect(u),t;if((0,jE.isPromiseLike)(a)){let e=async()=>(await a).attributes;t=new Rr.Resource({},e())}else t=a;return t.waitForAsyncAttributes?t.waitForAsyncAttributes().then(()=>Lt.diag.debug(`${i.constructor.name} found resource.`,t)):Lt.diag.debug(`${i.constructor.name} found resource.`,t),t}catch(a){return Lt.diag.error(`${i.constructor.name} failed: ${a.message}`),Rr.Resource.empty()}}),c=o.reduce((i,a)=>i.merge(a),Rr.Resource.empty());return c.waitForAsyncAttributes&&c.waitForAsyncAttributes().then(()=>{Vp(o)}),c};wt.detectResourcesSync=HE;var Vp=u=>{u.forEach(r=>{if(Object.keys(r.attributes).length>0){let o=JSON.stringify(r.attributes,null,4);Lt.diag.verbose(o)}})}});var ct=d(ae=>{"use strict";var FE=ae&&ae.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),lt=ae&&ae.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&FE(r,u,o)};Object.defineProperty(ae,"__esModule",{value:!0});lt(it(),ae);lt(Rp(),ae);lt(hs(),ae);lt(Ip(),ae);lt(wp(),ae);lt(Dp(),ae);lt(kp(),ae)});var qp=d(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.MultiSpanProcessor=void 0;var KE=P(),Ss=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,KE.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)})}};bo.MultiSpanProcessor=Ss});var Os=d(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.NoopSpanProcessor=void 0;var bs=class{onStart(r,o){}onEnd(r){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}};Oo.NoopSpanProcessor=bs});var Gp=d(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.BasicTracerProvider=pt.ForceFlushState=void 0;var Mt=(y(),E(m)),Ut=P(),jp=ct(),XE=As(),zE=Wu(),$E=qp(),YE=Os(),WE=Jn(),JE=Qu(),Ct;(function(u){u[u.resolved=0]="resolved",u[u.timeout=1]="timeout",u[u.error=2]="error",u[u.unresolved=3]="unresolved"})(Ct=pt.ForceFlushState||(pt.ForceFlushState={}));var xr=class{constructor(r={}){var o;this._registeredSpanProcessors=[],this._tracers=new Map;let c=(0,Ut.merge)({},(0,zE.loadDefaultConfig)(),(0,JE.reconfigureLimits)(r));this.resource=(o=c.resource)!==null&&o!==void 0?o:jp.Resource.empty(),this.resource=jp.Resource.default().merge(this.resource),this._config=Object.assign({},c,{resource:this.resource});let i=this._buildExporterFromEnv();if(i!==void 0){let a=new WE.BatchSpanProcessor(i);this.activeSpanProcessor=a}else this.activeSpanProcessor=new YE.NoopSpanProcessor}getTracer(r,o,c){let i=`${r}@${o||""}:${c?.schemaUrl||""}`;return this._tracers.has(i)||this._tracers.set(i,new XE.Tracer({name:r,version:o,schemaUrl:c?.schemaUrl},this._config,this)),this._tracers.get(i)}addSpanProcessor(r){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(o=>Mt.diag.error("Error while trying to shutdown current span processor",o)),this._registeredSpanProcessors.push(r),this.activeSpanProcessor=new $E.MultiSpanProcessor(this._registeredSpanProcessors)}getActiveSpanProcessor(){return this.activeSpanProcessor}register(r={}){Mt.trace.setGlobalTracerProvider(this),r.propagator===void 0&&(r.propagator=this._buildPropagatorFromEnv()),r.contextManager&&Mt.context.setGlobalContextManager(r.contextManager),r.propagator&&Mt.propagation.setGlobalPropagator(r.propagator)}forceFlush(){let r=this._config.forceFlushTimeoutMillis,o=this._registeredSpanProcessors.map(c=>new Promise(i=>{let a,t=setTimeout(()=>{i(new Error(`Span processor did not completed within timeout period of ${r} ms`)),a=Ct.timeout},r);c.forceFlush().then(()=>{clearTimeout(t),a!==Ct.timeout&&(a=Ct.resolved,i(a))}).catch(e=>{clearTimeout(t),a=Ct.error,i(e)})}));return new Promise((c,i)=>{Promise.all(o).then(a=>{let t=a.filter(e=>e!==Ct.resolved);t.length>0?i(t):c()}).catch(a=>i([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,Ut.getEnv)().OTEL_PROPAGATORS)),c=r.map(i=>{let a=this._getPropagator(i);return a||Mt.diag.warn(`Propagator "${i}" requested through environment variable is unavailable.`),a}).reduce((i,a)=>(a&&i.push(a),i),[]);if(c.length!==0)return r.length===1?c[0]:new Ut.CompositePropagator({propagators:c})}_buildExporterFromEnv(){let r=(0,Ut.getEnv)().OTEL_TRACES_EXPORTER;if(r==="none"||r==="")return;let o=this._getSpanExporter(r);return o||Mt.diag.error(`Exporter "${r}" requested through environment variable is unavailable.`),o}};pt.BasicTracerProvider=xr;xr._registeredPropagators=new Map([["tracecontext",()=>new Ut.W3CTraceContextPropagator],["baggage",()=>new Ut.W3CBaggagePropagator]]);xr._registeredExporters=new Map});var Hp=d(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.ConsoleSpanExporter=void 0;var Ps=P(),Ns=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,Ps.hrTimeToMicroseconds)(r.startTime),duration:(0,Ps.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:Ps.ExportResultCode.SUCCESS})}};Ao.ConsoleSpanExporter=Ns});var Kp=d(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.InMemorySpanExporter=void 0;var Fp=P(),Rs=class{constructor(){this._finishedSpans=[],this._stopped=!1}export(r,o){if(this._stopped)return o({code:Fp.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedSpans.push(...r),setTimeout(()=>o({code:Fp.ExportResultCode.SUCCESS}),0)}shutdown(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()}forceFlush(){return Promise.resolve()}reset(){this._finishedSpans=[]}getFinishedSpans(){return this._finishedSpans}};Po.InMemorySpanExporter=Rs});var zp=d(Xp=>{"use strict";Object.defineProperty(Xp,"__esModule",{value:!0})});var $p=d(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.SimpleSpanProcessor=void 0;var QE=(y(),E(m)),Dt=P(),xs=class{constructor(r){this._exporter=r,this._shutdownOnce=new Dt.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&QE.TraceFlags.SAMPLED))return;let i=()=>Dt.internal._export(this._exporter,[r]).then(a=>{var t;a.code!==Dt.ExportResultCode.SUCCESS&&(0,Dt.globalErrorHandler)((t=a.error)!==null&&t!==void 0?t:new Error(`SimpleSpanProcessor: span export failed (status ${a})`))}).catch(a=>{(0,Dt.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),i()),t=>(0,Dt.globalErrorHandler)(t));a!=null&&this._unresolvedExports.add(a)}else i()}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}};No.SimpleSpanProcessor=xs});var Wp=d(Yp=>{"use strict";Object.defineProperty(Yp,"__esModule",{value:!0})});var Qp=d(Jp=>{"use strict";Object.defineProperty(Jp,"__esModule",{value:!0})});var ef=d(Zp=>{"use strict";Object.defineProperty(Zp,"__esModule",{value:!0})});var rf=d(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0})});var of=d(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0})});var As=d(C=>{"use strict";var ZE=C&&C.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),H=C&&C.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&ZE(r,u,o)};Object.defineProperty(C,"__esModule",{value:!0});H(cp(),C);H(Gp(),C);H(Jn(),C);H(Hp(),C);H(Kp(),C);H(zp(),C);H($p(),C);H(Wp(),C);H(Os(),C);H(qn(),C);H(Gn(),C);H(Ku(),C);H(zu(),C);H(Pr(),C);H(qu(),C);H(Qp(),C);H(ef(),C);H(rf(),C);H(of(),C)});var ft={};import*as iA from"@opentelemetry/api-logs";var Is=Cc(()=>{gt(ft,iA)});var sf=d(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.disableInstrumentations=Ve.enableInstrumentations=Ve.parseInstrumentationOptions=void 0;function uf(u=[]){let r=[];for(let o=0,c=u.length;o<c;o++){let i=u[o];if(Array.isArray(i)){let a=uf(i);r=r.concat(a.instrumentations)}else typeof i=="function"?r.push(new i):i.instrumentationName&&r.push(i)}return{instrumentations:r}}Ve.parseInstrumentationOptions=uf;function ev(u,r,o){for(let c=0,i=u.length;c<i;c++){let a=u[c];r&&a.setTracerProvider(r),o&&a.setMeterProvider(o),a.getConfig().enabled||a.enable()}}Ve.enableInstrumentations=ev;function tv(u){u.forEach(r=>r.disable())}Ve.disableInstrumentations=tv});var cf=d(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.registerInstrumentations=void 0;var af=(y(),E(m)),Ls=sf();function rv(u){let{instrumentations:r}=(0,Ls.parseInstrumentationOptions)(u.instrumentations),o=u.tracerProvider||af.trace.getTracerProvider(),c=u.meterProvider||af.metrics.getMeterProvider();return(0,Ls.enableInstrumentations)(r,o,c),()=>{(0,Ls.disableInstrumentations)(r)}}Ro.registerInstrumentations=rv});var Ms=d(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.LogRecord=void 0;var nv=(y(),E(m)),Ir=(y(),E(m)),xo=P(),ws=class{constructor(r,o,c){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;let{timestamp:i,observedTimestamp:a,severityNumber:t,severityText:e,body:n,attributes:s={},context:l}=c,h=Date.now();if(this.hrTime=(0,xo.timeInputToHrTime)(i??h),this.hrTimeObserved=(0,xo.timeInputToHrTime)(a??h),l){let v=Ir.trace.getSpanContext(l);v&&Ir.isSpanContextValid(v)&&(this.spanContext=v)}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?(Ir.diag.warn(`Invalid attribute key: ${r}`),this):!(0,xo.isAttributeValue)(o)&&!(typeof o=="object"&&!Array.isArray(o)&&Object.keys(o).length>0)?(Ir.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,xo.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?(Ir.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&&nv.diag.warn("Can not execute the operation on emitted log record"),this._isReadonly}};Io.LogRecord=ws});var lf=d(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.Logger=void 0;var ov=(y(),E(m)),iv=Ms(),Cs=class{constructor(r,o){this.instrumentationScope=r,this._sharedState=o}emit(r){let o=r.context||ov.context.active(),c=new iv.LogRecord(this._sharedState,this.instrumentationScope,Object.assign({context:o},r));this._sharedState.activeProcessor.onEmit(c,o),c._makeReadonly()}};Lo.Logger=Cs});var pf=d(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.reconfigureLimits=Bt.loadDefaultConfig=void 0;var Lr=P();function uv(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:(0,Lr.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,Lr.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT},includeTraceContext:!0}}Bt.loadDefaultConfig=uv;function sv(u){var r,o,c,i,a,t;let e=(0,Lr.getEnvWithoutDefaults)();return{attributeCountLimit:(c=(o=(r=u.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:Lr.DEFAULT_ATTRIBUTE_COUNT_LIMIT,attributeValueLengthLimit:(t=(a=(i=u.attributeValueLengthLimit)!==null&&i!==void 0?i:e.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&a!==void 0?a:e.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&t!==void 0?t:Lr.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT}}Bt.reconfigureLimits=sv});var ff=d(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.MultiLogRecordProcessor=void 0;var av=P(),Us=class{constructor(r,o){this.processors=r,this.forceFlushTimeoutMillis=o}async forceFlush(){let r=this.forceFlushTimeoutMillis;await Promise.all(this.processors.map(o=>(0,av.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()))}};wo.MultiLogRecordProcessor=Us});var Bs=d(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.NoopLogRecordProcessor=void 0;var Ds=class{forceFlush(){return Promise.resolve()}onEmit(r,o){}shutdown(){return Promise.resolve()}};Mo.NoopLogRecordProcessor=Ds});var df=d(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.LoggerProviderSharedState=void 0;var cv=Bs(),Vs=class{constructor(r,o,c){this.resource=r,this.forceFlushTimeoutMillis=o,this.logRecordLimits=c,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new cv.NoopLogRecordProcessor}};Co.LoggerProviderSharedState=Vs});var mf=d(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.LoggerProvider=dt.DEFAULT_LOGGER_NAME=void 0;var wr=(y(),E(m)),lv=(Is(),E(ft)),pv=ct(),hf=P(),fv=lf(),_f=pf(),dv=ff(),hv=df();dt.DEFAULT_LOGGER_NAME="unknown";var ks=class{constructor(r={}){let{resource:o=pv.Resource.default(),logRecordLimits:c,forceFlushTimeoutMillis:i}=(0,hf.merge)({},(0,_f.loadDefaultConfig)(),r);this._sharedState=new hv.LoggerProviderSharedState(o,i,(0,_f.reconfigureLimits)(c)),this._shutdownOnce=new hf.BindOnceFuture(this._shutdown,this)}getLogger(r,o,c){if(this._shutdownOnce.isCalled)return wr.diag.warn("A shutdown LoggerProvider cannot provide a Logger"),lv.NOOP_LOGGER;r||wr.diag.warn("Logger requested without instrumentation scope name.");let i=r||dt.DEFAULT_LOGGER_NAME,a=`${i}@${o||""}:${c?.schemaUrl||""}`;return this._sharedState.loggers.has(a)||this._sharedState.loggers.set(a,new fv.Logger({name:i,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=>wr.diag.error("Error while trying to shutdown current log record processor",o)),this._sharedState.registeredLogRecordProcessors.push(r),this._sharedState.activeProcessor=new dv.MultiLogRecordProcessor(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)}forceFlush(){return this._shutdownOnce.isCalled?(wr.diag.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()}shutdown(){return this._shutdownOnce.isCalled?(wr.diag.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()}_shutdown(){return this._sharedState.activeProcessor.shutdown()}};dt.LoggerProvider=ks});var yf=d(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});Uo.ConsoleLogRecordExporter=void 0;var _v=P(),mv=P(),qs=class{export(r,o){this._sendLogRecords(r,o)}shutdown(){return Promise.resolve()}_exportInfo(r){var o,c,i;return{timestamp:(0,_v.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:(i=r.spanContext)===null||i===void 0?void 0:i.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:mv.ExportResultCode.SUCCESS})}};Uo.ConsoleLogRecordExporter=qs});var Ef=d(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.SimpleLogRecordProcessor=void 0;var js=P(),Gs=class{constructor(r){this._exporter=r,this._shutdownOnce=new js.BindOnceFuture(this._shutdown,this)}onEmit(r){this._shutdownOnce.isCalled||this._exporter.export([r],o=>{var c;if(o.code!==js.ExportResultCode.SUCCESS){(0,js.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()}};Do.SimpleLogRecordProcessor=Gs});var gf=d(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});Bo.InMemoryLogRecordExporter=void 0;var vf=P(),Hs=class{constructor(){this._finishedLogRecords=[],this._stopped=!1}export(r,o){if(this._stopped)return o({code:vf.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedLogRecords.push(...r),o({code:vf.ExportResultCode.SUCCESS})}shutdown(){return this._stopped=!0,this.reset(),Promise.resolve()}getFinishedLogRecords(){return this._finishedLogRecords}reset(){this._finishedLogRecords=[]}};Bo.InMemoryLogRecordExporter=Hs});var Tf=d(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.BatchLogRecordProcessorBase=void 0;var yv=(y(),E(m)),Vt=P(),Fs=class{constructor(r,o){var c,i,a,t;this._exporter=r,this._finishedLogRecords=[];let e=(0,Vt.getEnv)();this._maxExportBatchSize=(c=o?.maxExportBatchSize)!==null&&c!==void 0?c:e.OTEL_BLRP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=(i=o?.maxQueueSize)!==null&&i!==void 0?i: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 Vt.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(yv.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=[],i=Math.ceil(this._finishedLogRecords.length/this._maxExportBatchSize);for(let a=0;a<i;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,Vt.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,Vt.globalErrorHandler)(r)})},this._scheduledDelayMillis),(0,Vt.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,i=>{var a;if(i.code!==Vt.ExportResultCode.SUCCESS){c((a=i.error)!==null&&a!==void 0?a:new Error(`BatchLogRecordProcessorBase: log record export failed (status ${i})`));return}o(i)})})}};Vo.BatchLogRecordProcessorBase=Fs});var Sf=d(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.BatchLogRecordProcessor=void 0;var Ev=Tf(),Ks=class extends Ev.BatchLogRecordProcessorBase{onShutdown(){}};ko.BatchLogRecordProcessor=Ks});var bf=d(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});qo.BatchLogRecordProcessor=void 0;var vv=Sf();Object.defineProperty(qo,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return vv.BatchLogRecordProcessor}})});var Of=d(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});jo.BatchLogRecordProcessor=void 0;var gv=bf();Object.defineProperty(jo,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return gv.BatchLogRecordProcessor}})});var Af=d(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.BatchLogRecordProcessor=te.InMemoryLogRecordExporter=te.SimpleLogRecordProcessor=te.ConsoleLogRecordExporter=te.NoopLogRecordProcessor=te.LogRecord=te.LoggerProvider=void 0;var Tv=mf();Object.defineProperty(te,"LoggerProvider",{enumerable:!0,get:function(){return Tv.LoggerProvider}});var Sv=Ms();Object.defineProperty(te,"LogRecord",{enumerable:!0,get:function(){return Sv.LogRecord}});var bv=Bs();Object.defineProperty(te,"NoopLogRecordProcessor",{enumerable:!0,get:function(){return bv.NoopLogRecordProcessor}});var Ov=yf();Object.defineProperty(te,"ConsoleLogRecordExporter",{enumerable:!0,get:function(){return Ov.ConsoleLogRecordExporter}});var Av=Ef();Object.defineProperty(te,"SimpleLogRecordProcessor",{enumerable:!0,get:function(){return Av.SimpleLogRecordProcessor}});var Pv=gf();Object.defineProperty(te,"InMemoryLogRecordExporter",{enumerable:!0,get:function(){return Pv.InMemoryLogRecordExporter}});var Nv=Of();Object.defineProperty(te,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return Nv.BatchLogRecordProcessor}})});var Go=d(Mr=>{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.AggregationTemporality=void 0;var Rv;(function(u){u[u.DELTA=0]="DELTA",u[u.CUMULATIVE=1]="CUMULATIVE"})(Rv=Mr.AggregationTemporality||(Mr.AggregationTemporality={}))});var kt=d(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.DataPointType=void 0;var xv;(function(u){u[u.HISTOGRAM=0]="HISTOGRAM",u[u.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",u[u.GAUGE=2]="GAUGE",u[u.SUM=3]="SUM"})(xv=Cr.DataPointType||(Cr.DataPointType={}))});var Pe=d(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});D.equalsCaseInsensitive=D.binarySearchLB=D.setEquals=D.FlatMap=D.isPromiseAllSettledRejectionResult=D.PromiseAllSettled=D.callWithTimeout=D.TimeoutError=D.instrumentationScopeId=D.hashAttributes=D.isNotNullish=void 0;function Iv(u){return u!=null}D.isNotNullish=Iv;function Lv(u){let r=Object.keys(u);return r.length===0?"":(r=r.sort(),JSON.stringify(r.map(o=>[o,u[o]])))}D.hashAttributes=Lv;function wv(u){var r,o;return`${u.name}:${(r=u.version)!==null&&r!==void 0?r:""}:${(o=u.schemaUrl)!==null&&o!==void 0?o:""}`}D.instrumentationScopeId=wv;var Ho=class u extends Error{constructor(r){super(r),Object.setPrototypeOf(this,u.prototype)}};D.TimeoutError=Ho;function Mv(u,r){let o,c=new Promise(function(a,t){o=setTimeout(function(){t(new Ho("Operation timed out."))},r)});return Promise.race([u,c]).then(i=>(clearTimeout(o),i),i=>{throw clearTimeout(o),i})}D.callWithTimeout=Mv;async function Cv(u){return Promise.all(u.map(async r=>{try{return{status:"fulfilled",value:await r}}catch(o){return{status:"rejected",reason:o}}}))}D.PromiseAllSettled=Cv;function Uv(u){return u.status==="rejected"}D.isPromiseAllSettledRejectionResult=Uv;function Dv(u,r){let o=[];return u.forEach(c=>{o.push(...r(c))}),o}D.FlatMap=Dv;function Bv(u,r){if(u.size!==r.size)return!1;for(let o of u)if(!r.has(o))return!1;return!0}D.setEquals=Bv;function Vv(u,r){let o=0,c=u.length-1;for(;c-o>1;){let i=Math.trunc((c+o)/2);u[i]<=r?o=i:c=i-1}return u[c]<=r?c:u[o]<=r?o:-1}D.binarySearchLB=Vv;function kv(u,r){return u.toLowerCase()===r.toLowerCase()}D.equalsCaseInsensitive=kv});var qt=d(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.AggregatorKind=void 0;var qv;(function(u){u[u.DROP=0]="DROP",u[u.SUM=1]="SUM",u[u.LAST_VALUE=2]="LAST_VALUE",u[u.HISTOGRAM=3]="HISTOGRAM",u[u.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(qv=Ur.AggregatorKind||(Ur.AggregatorKind={}))});var Pf=d(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.DropAggregator=void 0;var jv=qt(),Xs=class{constructor(){this.kind=jv.AggregatorKind.DROP}createAccumulation(){}merge(r,o){}diff(r,o){}toMetricData(r,o,c,i){}};Fo.DropAggregator=Xs});var Le=d(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.isValidName=ce.isDescriptorCompatibleWith=ce.createInstrumentDescriptorWithView=ce.createInstrumentDescriptor=ce.InstrumentType=void 0;var Nf=(y(),E(m)),Gv=Pe(),Hv;(function(u){u.COUNTER="COUNTER",u.HISTOGRAM="HISTOGRAM",u.UP_DOWN_COUNTER="UP_DOWN_COUNTER",u.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",u.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",u.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(Hv=ce.InstrumentType||(ce.InstrumentType={}));function Fv(u,r,o){var c,i,a,t;return Rf(u)||Nf.diag.warn(`Invalid metric name: "${u}". The metric name should be a ASCII string with a length no greater than 255 characters.`),{name:u,type:r,description:(c=o?.description)!==null&&c!==void 0?c:"",unit:(i=o?.unit)!==null&&i!==void 0?i:"",valueType:(a=o?.valueType)!==null&&a!==void 0?a:Nf.ValueType.DOUBLE,advice:(t=o?.advice)!==null&&t!==void 0?t:{}}}ce.createInstrumentDescriptor=Fv;function Kv(u,r){var o,c;return{name:(o=u.name)!==null&&o!==void 0?o:r.name,description:(c=u.description)!==null&&c!==void 0?c:r.description,type:r.type,unit:r.unit,valueType:r.valueType,advice:r.advice}}ce.createInstrumentDescriptorWithView=Kv;function Xv(u,r){return(0,Gv.equalsCaseInsensitive)(u.name,r.name)&&u.unit===r.unit&&u.type===r.type&&u.valueType===r.valueType}ce.isDescriptorCompatibleWith=Xv;var zv=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Rf(u){return u.match(zv)!=null}ce.isValidName=Rf});var xf=d(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});Gt.HistogramAggregator=Gt.HistogramAccumulation=void 0;var $v=qt(),Yv=kt(),zs=Le(),Wv=Pe();function Jv(u){let r=u.map(()=>0);return r.push(0),{buckets:{boundaries:u,counts:r},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var jt=class{constructor(r,o,c=!0,i=Jv(o)){this.startTime=r,this._boundaries=o,this._recordMinMax=c,this._current=i}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,Wv.binarySearchLB)(this._boundaries,r);this._current.buckets.counts[o+1]+=1}setStartTime(r){this.startTime=r}toPointValue(){return this._current}};Gt.HistogramAccumulation=jt;var $s=class{constructor(r,o){this._boundaries=r,this._recordMinMax=o,this.kind=$v.AggregatorKind.HISTOGRAM}createAccumulation(r){return new jt(r,this._boundaries,this._recordMinMax)}merge(r,o){let c=r.toPointValue(),i=o.toPointValue(),a=c.buckets.counts,t=i.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&&i.hasMinMax?(n=Math.min(c.min,i.min),s=Math.max(c.max,i.max)):c.hasMinMax?(n=c.min,s=c.max):i.hasMinMax&&(n=i.min,s=i.max)),new jt(r.startTime,c.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:c.buckets.boundaries,counts:e},count:c.count+i.count,sum:c.sum+i.sum,hasMinMax:this._recordMinMax&&(c.hasMinMax||i.hasMinMax),min:n,max:s})}diff(r,o){let c=r.toPointValue(),i=o.toPointValue(),a=c.buckets.counts,t=i.buckets.counts,e=new Array(a.length);for(let n=0;n<a.length;n++)e[n]=t[n]-a[n];return new jt(o.startTime,c.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:c.buckets.boundaries,counts:e},count:i.count-c.count,sum:i.sum-c.sum,hasMinMax:!1,min:1/0,max:-1/0})}toMetricData(r,o,c,i){return{descriptor:r,aggregationTemporality:o,dataPointType:Yv.DataPointType.HISTOGRAM,dataPoints:c.map(([a,t])=>{let e=t.toPointValue(),n=r.type===zs.InstrumentType.UP_DOWN_COUNTER||r.type===zs.InstrumentType.OBSERVABLE_GAUGE||r.type===zs.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:t.startTime,endTime:i,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}}})}}};Gt.HistogramAggregator=$s});var If=d(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});Ko.Buckets=void 0;var Ys=class u{constructor(r=new Ws,o=0,c=0,i=0){this.backing=r,this.indexBase=o,this.indexStart=c,this.indexEnd=i}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,i=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&&i<o;n++)this._relocateBucket(a,i),i++,t++;a++}this.indexStart>>=r,this.indexEnd>>=r,this.indexBase=this.indexStart}clone(){return new u(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))}};Ko.Buckets=Ys;var Ws=class u{constructor(r=[0]){this._counts=r}get length(){return this._counts.length}countAt(r){return this._counts[r]}growTo(r,o,c){let i=new Array(r).fill(0);i.splice(c,this._counts.length-o,...this._counts.slice(o)),i.splice(0,o,...this._counts.slice(0,o)),this._counts=i}reverse(r,o){let c=Math.floor((r+o)/2)-r;for(let i=0;i<c;i++){let a=this._counts[r+i];this._counts[r+i]=this._counts[o-i-1],this._counts[o-i-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 u([...this._counts])}}});var Qs=d(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.getSignificand=ne.getNormalBase2=ne.MIN_VALUE=ne.MAX_NORMAL_EXPONENT=ne.MIN_NORMAL_EXPONENT=ne.SIGNIFICAND_WIDTH=void 0;ne.SIGNIFICAND_WIDTH=52;var Qv=2146435072,Zv=1048575,Js=1023;ne.MIN_NORMAL_EXPONENT=-Js+1;ne.MAX_NORMAL_EXPONENT=Js;ne.MIN_VALUE=Math.pow(2,-1022);function eg(u){let r=new DataView(new ArrayBuffer(8));return r.setFloat64(0,u),((r.getUint32(0)&Qv)>>20)-Js}ne.getNormalBase2=eg;function tg(u){let r=new DataView(new ArrayBuffer(8));r.setFloat64(0,u);let o=r.getUint32(0),c=r.getUint32(4);return(o&Zv)*Math.pow(2,32)+c}ne.getSignificand=tg});var Xo=d(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.nextGreaterSquare=Ht.ldexp=void 0;function rg(u,r){return u===0||u===Number.POSITIVE_INFINITY||u===Number.NEGATIVE_INFINITY||Number.isNaN(u)?u:u*Math.pow(2,r)}Ht.ldexp=rg;function ng(u){return u--,u|=u>>1,u|=u>>2,u|=u>>4,u|=u>>8,u|=u>>16,u++,u}Ht.nextGreaterSquare=ng});var $o=d(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.MappingError=void 0;var Zs=class extends Error{};zo.MappingError=Zs});var wf=d(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.ExponentMapping=void 0;var Ft=Qs(),og=Xo(),Lf=$o(),ea=class{constructor(r){this._shift=-r}mapToIndex(r){if(r<Ft.MIN_VALUE)return this._minNormalLowerBoundaryIndex();let o=Ft.getNormalBase2(r),c=this._rightShift(Ft.getSignificand(r)-1,Ft.SIGNIFICAND_WIDTH);return o+c>>this._shift}lowerBoundary(r){let o=this._minNormalLowerBoundaryIndex();if(r<o)throw new Lf.MappingError(`underflow: ${r} is < minimum lower boundary: ${o}`);let c=this._maxNormalLowerBoundaryIndex();if(r>c)throw new Lf.MappingError(`overflow: ${r} is > maximum lower boundary: ${c}`);return og.ldexp(1,r<<this._shift)}get scale(){return this._shift===0?0:-this._shift}_minNormalLowerBoundaryIndex(){let r=Ft.MIN_NORMAL_EXPONENT>>this._shift;return this._shift<2&&r--,r}_maxNormalLowerBoundaryIndex(){return Ft.MAX_NORMAL_EXPONENT>>this._shift}_rightShift(r,o){return Math.floor(r*Math.pow(2,-o))}};Yo.ExponentMapping=ea});var Uf=d(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.LogarithmMapping=void 0;var Kt=Qs(),Mf=Xo(),Cf=$o(),ta=class{constructor(r){this._scale=r,this._scaleFactor=Mf.ldexp(Math.LOG2E,r),this._inverseFactor=Mf.ldexp(Math.LN2,-r)}mapToIndex(r){if(r<=Kt.MIN_VALUE)return this._minNormalLowerBoundaryIndex()-1;if(Kt.getSignificand(r)===0)return(Kt.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 Cf.MappingError(`overflow: ${r} is > maximum lower boundary: ${o}`)}let c=this._minNormalLowerBoundaryIndex();if(r<=c){if(r===c)return Kt.MIN_VALUE;if(r===c-1)return Math.exp((r+(1<<this._scale))/this._scaleFactor)/2;throw new Cf.MappingError(`overflow: ${r} is < minimum lower boundary: ${c}`)}return Math.exp(r*this._inverseFactor)}get scale(){return this._scale}_minNormalLowerBoundaryIndex(){return Kt.MIN_NORMAL_EXPONENT<<this._scale}_maxNormalLowerBoundaryIndex(){return(Kt.MAX_NORMAL_EXPONENT+1<<this._scale)-1}};Wo.LogarithmMapping=ta});var Vf=d(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});Jo.getMapping=void 0;var ig=wf(),ug=Uf(),sg=$o(),Df=-10,Bf=20,ag=Array.from({length:31},(u,r)=>r>10?new ug.LogarithmMapping(r-10):new ig.ExponentMapping(r-10));function cg(u){if(u>Bf||u<Df)throw new sg.MappingError(`expected scale >= ${Df} && <= ${Bf}, got: ${u}`);return ag[u+10]}Jo.getMapping=cg});var jf=d(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.ExponentialHistogramAggregator=zt.ExponentialHistogramAccumulation=void 0;var lg=qt(),pg=kt(),fg=(y(),E(m)),ra=Le(),kf=If(),qf=Vf(),dg=Xo(),Xt=class u{constructor(r,o){this.low=r,this.high=o}static combine(r,o){return new u(Math.min(r.low,o.low),Math.max(r.high,o.high))}},hg=20,_g=160,na=2,Qo=class u{constructor(r=r,o=_g,c=!0,i=0,a=0,t=0,e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,s=new kf.Buckets,l=new kf.Buckets,h=(0,qf.getMapping)(hg)){this.startTime=r,this._maxSize=o,this._recordMinMax=c,this._sum=i,this._count=a,this._zeroCount=t,this._min=e,this._max=n,this._positive=s,this._negative=l,this._mapping=h,this._maxSize<na&&(fg.diag.warn(`Exponential Histogram Max Size set to ${this._maxSize}, changing to the minimum size of: ${na}`),this._maxSize=na)}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 u(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 i=this._mapping.mapToIndex(o),a=!1,t=0,e=0;if(r.length===0?(r.indexStart=i,r.indexEnd=r.indexStart,r.indexBase=r.indexStart):i<r.indexStart&&r.indexEnd-i>=this._maxSize?(a=!0,e=i,t=r.indexEnd):i>r.indexEnd&&i-r.indexStart>=this._maxSize&&(a=!0,e=r.indexStart,t=i),a){let n=this._changeScale(t,e);this._downscale(n),i=this._mapping.mapToIndex(o)}this._incrementIndexBy(r,i,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 i=o-r.indexBase;i<0&&(i+=r.backing.length),r.incrementBucket(i,c)}_grow(r,o){let c=r.backing.length,i=r.indexBase-r.indexStart,a=c-i,t=(0,dg.nextGreaterSquare)(o);t>this._maxSize&&(t=this._maxSize);let e=t-i;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,qf.getMapping)(o)}_minScale(r){let o=Math.min(this.scale,r.scale),c=Xt.combine(this._highLowAtScale(this.positive,this.scale,o),this._highLowAtScale(r.positive,r.scale,o)),i=Xt.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(i.high,i.low))}_highLowAtScale(r,o,c){if(r.length===0)return new Xt(0,-1);let i=o-c;return new Xt(r.indexStart>>i,r.indexEnd>>i)}_mergeBuckets(r,o,c,i){let a=c.offset,t=o.scale-i;for(let e=0;e<c.length;e++)this._incrementIndexBy(r,a+e>>t,c.at(e))}_diffBuckets(r,o,c,i){let a=c.offset,t=o.scale-i;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()}};zt.ExponentialHistogramAccumulation=Qo;var oa=class{constructor(r,o){this._maxSize=r,this._recordMinMax=o,this.kind=lg.AggregatorKind.EXPONENTIAL_HISTOGRAM}createAccumulation(r){return new Qo(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,i){return{descriptor:r,aggregationTemporality:o,dataPointType:pg.DataPointType.EXPONENTIAL_HISTOGRAM,dataPoints:c.map(([a,t])=>{let e=t.toPointValue(),n=r.type===ra.InstrumentType.UP_DOWN_COUNTER||r.type===ra.InstrumentType.OBSERVABLE_GAUGE||r.type===ra.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:t.startTime,endTime:i,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}}})}}};zt.ExponentialHistogramAggregator=oa});var Gf=d(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.LastValueAggregator=Yt.LastValueAccumulation=void 0;var mg=qt(),Dr=P(),yg=kt(),$t=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,Dr.millisToHrTime)(Date.now())}setStartTime(r){this.startTime=r}toPointValue(){return this._current}};Yt.LastValueAccumulation=$t;var ia=class{constructor(){this.kind=mg.AggregatorKind.LAST_VALUE}createAccumulation(r){return new $t(r)}merge(r,o){let c=(0,Dr.hrTimeToMicroseconds)(o.sampleTime)>=(0,Dr.hrTimeToMicroseconds)(r.sampleTime)?o:r;return new $t(r.startTime,c.toPointValue(),c.sampleTime)}diff(r,o){let c=(0,Dr.hrTimeToMicroseconds)(o.sampleTime)>=(0,Dr.hrTimeToMicroseconds)(r.sampleTime)?o:r;return new $t(o.startTime,c.toPointValue(),c.sampleTime)}toMetricData(r,o,c,i){return{descriptor:r,aggregationTemporality:o,dataPointType:yg.DataPointType.GAUGE,dataPoints:c.map(([a,t])=>({attributes:a,startTime:t.startTime,endTime:i,value:t.toPointValue()}))}}};Yt.LastValueAggregator=ia});var Hf=d(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.SumAggregator=Wt.SumAccumulation=void 0;var Eg=qt(),vg=kt(),ke=class{constructor(r,o,c=0,i=!1){this.startTime=r,this.monotonic=o,this._current=c,this.reset=i}record(r){this.monotonic&&r<0||(this._current+=r)}setStartTime(r){this.startTime=r}toPointValue(){return this._current}};Wt.SumAccumulation=ke;var ua=class{constructor(r){this.monotonic=r,this.kind=Eg.AggregatorKind.SUM}createAccumulation(r){return new ke(r,this.monotonic)}merge(r,o){let c=r.toPointValue(),i=o.toPointValue();return o.reset?new ke(o.startTime,this.monotonic,i,o.reset):new ke(r.startTime,this.monotonic,c+i)}diff(r,o){let c=r.toPointValue(),i=o.toPointValue();return this.monotonic&&c>i?new ke(o.startTime,this.monotonic,i,!0):new ke(o.startTime,this.monotonic,i-c)}toMetricData(r,o,c,i){return{descriptor:r,aggregationTemporality:o,dataPointType:vg.DataPointType.SUM,dataPoints:c.map(([a,t])=>({attributes:a,startTime:t.startTime,endTime:i,value:t.toPointValue()})),isMonotonic:this.monotonic}}};Wt.SumAggregator=ua});var Ff=d(Ee=>{"use strict";var gg=Ee&&Ee.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),Br=Ee&&Ee.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&gg(r,u,o)};Object.defineProperty(Ee,"__esModule",{value:!0});Br(Pf(),Ee);Br(xf(),Ee);Br(jf(),Ee);Br(Gf(),Ee);Br(Hf(),Ee)});var ri=d(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.DefaultAggregation=X.ExponentialHistogramAggregation=X.ExplicitBucketHistogramAggregation=X.HistogramAggregation=X.LastValueAggregation=X.SumAggregation=X.DropAggregation=X.Aggregation=void 0;var Tg=(y(),E(m)),ht=Ff(),we=Le(),Ne=class{static Drop(){return Kf}static Sum(){return Xf}static LastValue(){return zf}static Histogram(){return $f}static ExponentialHistogram(){return Sg}static Default(){return bg}};X.Aggregation=Ne;var Vr=class u extends Ne{createAggregator(r){return u.DEFAULT_INSTANCE}};X.DropAggregation=Vr;Vr.DEFAULT_INSTANCE=new ht.DropAggregator;var Jt=class u extends Ne{createAggregator(r){switch(r.type){case we.InstrumentType.COUNTER:case we.InstrumentType.OBSERVABLE_COUNTER:case we.InstrumentType.HISTOGRAM:return u.MONOTONIC_INSTANCE;default:return u.NON_MONOTONIC_INSTANCE}}};X.SumAggregation=Jt;Jt.MONOTONIC_INSTANCE=new ht.SumAggregator(!0);Jt.NON_MONOTONIC_INSTANCE=new ht.SumAggregator(!1);var kr=class u extends Ne{createAggregator(r){return u.DEFAULT_INSTANCE}};X.LastValueAggregation=kr;kr.DEFAULT_INSTANCE=new ht.LastValueAggregator;var qr=class u extends Ne{createAggregator(r){return u.DEFAULT_INSTANCE}};X.HistogramAggregation=qr;qr.DEFAULT_INSTANCE=new ht.HistogramAggregator([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0);var Zo=class extends Ne{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),i=r.indexOf(1/0);i===-1&&(i=void 0),this._boundaries=r.slice(c+1,i)}createAggregator(r){return new ht.HistogramAggregator(this._boundaries,this._recordMinMax)}};X.ExplicitBucketHistogramAggregation=Zo;var ei=class extends Ne{constructor(r=160,o=!0){super(),this._maxSize=r,this._recordMinMax=o}createAggregator(r){return new ht.ExponentialHistogramAggregator(this._maxSize,this._recordMinMax)}};X.ExponentialHistogramAggregation=ei;var ti=class extends Ne{_resolve(r){switch(r.type){case we.InstrumentType.COUNTER:case we.InstrumentType.UP_DOWN_COUNTER:case we.InstrumentType.OBSERVABLE_COUNTER:case we.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:return Xf;case we.InstrumentType.OBSERVABLE_GAUGE:return zf;case we.InstrumentType.HISTOGRAM:return r.advice.explicitBucketBoundaries?new Zo(r.advice.explicitBucketBoundaries):$f}return Tg.diag.warn(`Unable to recognize instrument type: ${r.type}`),Kf}createAggregator(r){return this._resolve(r).createAggregator(r)}};X.DefaultAggregation=ti;var Kf=new Vr,Xf=new Jt,zf=new kr,$f=new qr,Sg=new ei,bg=new ti});var sa=d(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=Qt.DEFAULT_AGGREGATION_SELECTOR=void 0;var Og=ri(),Ag=Go(),Pg=u=>Og.Aggregation.Default();Qt.DEFAULT_AGGREGATION_SELECTOR=Pg;var Ng=u=>Ag.AggregationTemporality.CUMULATIVE;Qt.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=Ng});var ca=d(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.MetricReader=void 0;var Yf=(y(),E(m)),ni=Pe(),Wf=sa(),aa=class{constructor(r){var o,c,i;this._shutdown=!1,this._aggregationSelector=(o=r?.aggregationSelector)!==null&&o!==void 0?o:Wf.DEFAULT_AGGREGATION_SELECTOR,this._aggregationTemporalitySelector=(c=r?.aggregationTemporalitySelector)!==null&&c!==void 0?c:Wf.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR,this._metricProducers=(i=r?.metricProducers)!==null&&i!==void 0?i:[]}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}))]),i=o.errors.concat((0,ni.FlatMap)(c,e=>e.errors)),a=o.resourceMetrics.resource,t=o.resourceMetrics.scopeMetrics.concat((0,ni.FlatMap)(c,e=>e.resourceMetrics.scopeMetrics));return{resourceMetrics:{resource:a,scopeMetrics:t},errors:i}}async shutdown(r){if(this._shutdown){Yf.diag.error("Cannot call shutdown twice.");return}r?.timeoutMillis==null?await this.onShutdown():await(0,ni.callWithTimeout)(this.onShutdown(),r.timeoutMillis),this._shutdown=!0}async forceFlush(r){if(this._shutdown){Yf.diag.warn("Cannot forceFlush on already shutdown MetricReader.");return}if(r?.timeoutMillis==null){await this.onForceFlush();return}await(0,ni.callWithTimeout)(this.onForceFlush(),r.timeoutMillis)}};oi.MetricReader=aa});var Zf=d(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.PeriodicExportingMetricReader=void 0;var Jf=(y(),E(m)),ii=P(),Rg=ca(),Qf=Pe(),xg=(y(),E(m)),la=class extends Rg.MetricReader{constructor(r){var o,c,i,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=(i=r.exportIntervalMillis)!==null&&i!==void 0?i:6e4,this._exportTimeout=(a=r.exportTimeoutMillis)!==null&&a!==void 0?a:3e4,this._exporter=r.exporter}async _runOnce(){try{await(0,Qf.callWithTimeout)(this._doRun(),this._exportTimeout)}catch(r){if(r instanceof Qf.TimeoutError){Jf.diag.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout);return}(0,ii.globalErrorHandler)(r)}}async _doRun(){var r,o;let{resourceMetrics:c,errors:i}=await this.collect({timeoutMillis:this._exportTimeout});i.length>0&&Jf.diag.error("PeriodicExportingMetricReader: metrics collection errors",...i);let a=async()=>{let t=await ii.internal._export(this._exporter,c);if(t.code!==ii.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=>xg.diag.debug("Error while resolving async portion of resource: ",t)):await a()}onInitialized(){this._interval=setInterval(()=>{this._runOnce()},this._exportInterval),(0,ii.unrefTimer)(this._interval)}async onForceFlush(){await this._runOnce(),await this._exporter.forceFlush()}async onShutdown(){this._interval&&clearInterval(this._interval),await this._exporter.shutdown()}};ui.PeriodicExportingMetricReader=la});var td=d(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.InMemoryMetricExporter=void 0;var ed=P(),pa=class{constructor(r){this._shutdown=!1,this._metrics=[],this._aggregationTemporality=r}export(r,o){if(this._shutdown){setTimeout(()=>o({code:ed.ExportResultCode.FAILED}),0);return}this._metrics.push(r),setTimeout(()=>o({code:ed.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()}};si.InMemoryMetricExporter=pa});var nd=d(ai=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0});ai.ConsoleMetricExporter=void 0;var rd=P(),Ig=sa(),fa=class u{constructor(r){var o;this._shutdown=!1,this._temporalitySelector=(o=r?.temporalitySelector)!==null&&o!==void 0?o:Ig.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR}export(r,o){if(this._shutdown){setImmediate(o,{code:rd.ExportResultCode.FAILED});return}return u._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 i of c.metrics)console.dir({descriptor:i.descriptor,dataPointType:i.dataPointType,dataPoints:i.dataPoints});o({code:rd.ExportResultCode.SUCCESS})}};ai.ConsoleMetricExporter=fa});var od=d(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.ViewRegistry=void 0;var da=class{constructor(){this._registeredViews=[]}addView(r){this._registeredViews.push(r)}findViews(r,o){return this._registeredViews.filter(i=>this._matchInstrument(i.instrumentSelector,r)&&this._matchMeter(i.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))}};ci.ViewRegistry=da});var li=d(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.isObservableInstrument=G.ObservableUpDownCounterInstrument=G.ObservableGaugeInstrument=G.ObservableCounterInstrument=G.ObservableInstrument=G.HistogramInstrument=G.CounterInstrument=G.UpDownCounterInstrument=G.SyncInstrument=void 0;var Zt=(y(),E(m)),Lg=P(),er=class{constructor(r,o){this._writableMetricStorage=r,this._descriptor=o}_record(r,o={},c=Zt.context.active()){if(typeof r!="number"){Zt.diag.warn(`non-number value provided to metric ${this._descriptor.name}: ${r}`);return}this._descriptor.valueType===Zt.ValueType.INT&&!Number.isInteger(r)&&(Zt.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,Lg.millisToHrTime)(Date.now()))}};G.SyncInstrument=er;var ha=class extends er{add(r,o,c){this._record(r,o,c)}};G.UpDownCounterInstrument=ha;var _a=class extends er{add(r,o,c){if(r<0){Zt.diag.warn(`negative value provided to counter ${this._descriptor.name}: ${r}`);return}this._record(r,o,c)}};G.CounterInstrument=_a;var ma=class extends er{record(r,o,c){if(r<0){Zt.diag.warn(`negative value provided to histogram ${this._descriptor.name}: ${r}`);return}this._record(r,o,c)}};G.HistogramInstrument=ma;var _t=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)}};G.ObservableInstrument=_t;var ya=class extends _t{};G.ObservableCounterInstrument=ya;var Ea=class extends _t{};G.ObservableGaugeInstrument=Ea;var va=class extends _t{};G.ObservableUpDownCounterInstrument=va;function wg(u){return u instanceof _t}G.isObservableInstrument=wg});var id=d(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.Meter=void 0;var pe=Le(),tr=li(),ga=class{constructor(r){this._meterSharedState=r}createHistogram(r,o){let c=(0,pe.createInstrumentDescriptor)(r,pe.InstrumentType.HISTOGRAM,o),i=this._meterSharedState.registerMetricStorage(c);return new tr.HistogramInstrument(i,c)}createCounter(r,o){let c=(0,pe.createInstrumentDescriptor)(r,pe.InstrumentType.COUNTER,o),i=this._meterSharedState.registerMetricStorage(c);return new tr.CounterInstrument(i,c)}createUpDownCounter(r,o){let c=(0,pe.createInstrumentDescriptor)(r,pe.InstrumentType.UP_DOWN_COUNTER,o),i=this._meterSharedState.registerMetricStorage(c);return new tr.UpDownCounterInstrument(i,c)}createObservableGauge(r,o){let c=(0,pe.createInstrumentDescriptor)(r,pe.InstrumentType.OBSERVABLE_GAUGE,o),i=this._meterSharedState.registerAsyncMetricStorage(c);return new tr.ObservableGaugeInstrument(c,i,this._meterSharedState.observableRegistry)}createObservableCounter(r,o){let c=(0,pe.createInstrumentDescriptor)(r,pe.InstrumentType.OBSERVABLE_COUNTER,o),i=this._meterSharedState.registerAsyncMetricStorage(c);return new tr.ObservableCounterInstrument(c,i,this._meterSharedState.observableRegistry)}createObservableUpDownCounter(r,o){let c=(0,pe.createInstrumentDescriptor)(r,pe.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER,o),i=this._meterSharedState.registerAsyncMetricStorage(c);return new tr.ObservableUpDownCounterInstrument(c,i,this._meterSharedState.observableRegistry)}addBatchObservableCallback(r,o){this._meterSharedState.observableRegistry.addBatchCallback(r,o)}removeBatchObservableCallback(r,o){this._meterSharedState.observableRegistry.removeBatchCallback(r,o)}};pi.Meter=ga});var Sa=d(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.MetricStorage=void 0;var Mg=Le(),Ta=class{constructor(r){this._instrumentDescriptor=r}getInstrumentDescriptor(){return this._instrumentDescriptor}updateDescription(r){this._instrumentDescriptor=(0,Mg.createInstrumentDescriptor)(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:r,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})}};fi.MetricStorage=Ta});var jr=d(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.AttributeHashMap=rr.HashMap=void 0;var Cg=Pe(),di=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 i=o();return this._keyMap.has(c)||this._keyMap.set(c,r),this._valueMap.set(c,i),i}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}};rr.HashMap=di;var ba=class extends di{constructor(){super(Cg.hashAttributes)}};rr.AttributeHashMap=ba});var Pa=d(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.DeltaMetricProcessor=void 0;var Oa=jr(),Aa=class{constructor(r){this._aggregator=r,this._activeCollectionStorage=new Oa.AttributeHashMap,this._cumulativeMemoStorage=new Oa.AttributeHashMap}record(r,o,c,i){let a=this._activeCollectionStorage.getOrDefault(o,()=>this._aggregator.createAccumulation(i));a?.record(r)}batchCumulate(r,o){Array.from(r.entries()).forEach(([c,i,a])=>{let t=this._aggregator.createAccumulation(o);t?.record(i);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 Oa.AttributeHashMap,r}};hi.DeltaMetricProcessor=Aa});var Ra=d(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.TemporalMetricProcessor=void 0;var Ug=Go(),Dg=jr(),Na=class u{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,i){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===Ug.AggregationTemporality.CUMULATIVE?t=u.merge(s.accumulations,a,this._aggregator):t=u.calibrateStartTime(s.accumulations,a,l)}else e=r.selectAggregationTemporality(o.type);this._reportHistory.set(r,{accumulations:t,collectionTime:i,aggregationTemporality:e});let n=Bg(t);if(n.length!==0)return this._aggregator.toMetricData(o,e,n,i)}_stashAccumulations(r){let o=this._unreportedAccumulations.keys();for(let c of o){let i=this._unreportedAccumulations.get(c);i===void 0&&(i=[],this._unreportedAccumulations.set(c,i)),i.push(r)}}_getMergedUnreportedAccumulations(r){let o=new Dg.AttributeHashMap,c=this._unreportedAccumulations.get(r);if(this._unreportedAccumulations.set(r,[]),c===void 0)return o;for(let i of c)o=u.merge(o,i,this._aggregator);return o}static merge(r,o,c){let i=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);i.set(e,h,s)}else i.set(e,n,s);t=a.next()}return i}static calibrateStartTime(r,o,c){for(let[i,a]of r.keys()){let t=o.get(i,a);t?.setStartTime(c)}return o}};_i.TemporalMetricProcessor=Na;function Bg(u){return Array.from(u.entries())}});var ud=d(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.AsyncMetricStorage=void 0;var Vg=Sa(),kg=Pa(),qg=Ra(),jg=jr(),xa=class extends Vg.MetricStorage{constructor(r,o,c,i){super(r),this._attributesProcessor=c,this._deltaMetricStorage=new kg.DeltaMetricProcessor(o),this._temporalMetricStorage=new qg.TemporalMetricProcessor(o,i)}record(r,o){let c=new jg.AttributeHashMap;Array.from(r.entries()).forEach(([i,a])=>{c.set(this._attributesProcessor.process(i),a)}),this._deltaMetricStorage.batchCumulate(c,o)}collect(r,o){let c=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,c,o)}};mi.AsyncMetricStorage=xa});var pd=d(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.getConflictResolutionRecipe=oe.getDescriptionResolutionRecipe=oe.getTypeConflictResolutionRecipe=oe.getUnitConflictResolutionRecipe=oe.getValueTypeConflictResolutionRecipe=oe.getIncompatibilityDetails=void 0;function Gg(u,r){let o="";return u.unit!==r.unit&&(o+=` - Unit '${u.unit}' does not match '${r.unit}'
|
|
9
9
|
`),u.type!==r.type&&(o+=` - Type '${u.type}' does not match '${r.type}'
|
|
10
10
|
`),u.valueType!==r.valueType&&(o+=` - Value Type '${u.valueType}' does not match '${r.valueType}'
|
|
11
11
|
`),u.description!==r.description&&(o+=` - Description '${u.description}' does not match '${r.description}'
|
|
12
|
-
`),o}oe.getIncompatibilityDetails=
|
|
12
|
+
`),o}oe.getIncompatibilityDetails=Gg;function sd(u,r){return` - use valueType '${u.valueType}' on instrument creation or use an instrument name other than '${r.name}'`}oe.getValueTypeConflictResolutionRecipe=sd;function ad(u,r){return` - use unit '${u.unit}' on instrument creation or use an instrument name other than '${r.name}'`}oe.getUnitConflictResolutionRecipe=ad;function cd(u,r){let o={name:r.name,type:r.type,unit:r.unit},c=JSON.stringify(o);return` - create a new view with a name other than '${u.name}' and InstrumentSelector '${c}'`}oe.getTypeConflictResolutionRecipe=cd;function ld(u,r){let o={name:r.name,type:r.type,unit:r.unit},c=JSON.stringify(o);return` - create a new view with a name other than '${u.name}' and InstrumentSelector '${c}'
|
|
13
13
|
- OR - create a new view with the name ${u.name} and description '${u.description}' and InstrumentSelector ${c}
|
|
14
|
-
- OR - create a new view with the name ${r.name} and description '${u.description}' and InstrumentSelector ${c}`}oe.getDescriptionResolutionRecipe=ld;function
|
|
14
|
+
- OR - create a new view with the name ${r.name} and description '${u.description}' and InstrumentSelector ${c}`}oe.getDescriptionResolutionRecipe=ld;function Hg(u,r){return u.valueType!==r.valueType?sd(u,r):u.unit!==r.unit?ad(u,r):u.type!==r.type?cd(u,r):u.description!==r.description?ld(u,r):""}oe.getConflictResolutionRecipe=Hg});var dd=d(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.MetricStorageRegistry=void 0;var Fg=Le(),fd=(y(),E(m)),yi=pd(),Ia=class u{constructor(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}static create(){return new u}getStorages(r){let o=[];for(let i of this._sharedRegistry.values())o=o.concat(i);let c=this._perCollectorRegistry.get(r);if(c!=null)for(let i of c.values())o=o.concat(i);return o}register(r){this._registerStorage(r,this._sharedRegistry)}registerForCollector(r,o){let c=this._perCollectorRegistry.get(r);c==null&&(c=new Map,this._perCollectorRegistry.set(r,c)),this._registerStorage(o,c)}findOrUpdateCompatibleStorage(r){let o=this._sharedRegistry.get(r.name);return o===void 0?null:this._findOrUpdateCompatibleStorage(r,o)}findOrUpdateCompatibleCollectorStorage(r,o){let c=this._perCollectorRegistry.get(r);if(c===void 0)return null;let i=c.get(o.name);return i===void 0?null:this._findOrUpdateCompatibleStorage(o,i)}_registerStorage(r,o){let c=r.getInstrumentDescriptor(),i=o.get(c.name);if(i===void 0){o.set(c.name,[r]);return}i.push(r)}_findOrUpdateCompatibleStorage(r,o){let c=null;for(let i of o){let a=i.getInstrumentDescriptor();(0,Fg.isDescriptorCompatibleWith)(a,r)?(a.description!==r.description&&(r.description.length>a.description.length&&i.updateDescription(r.description),fd.diag.warn("A view or instrument with the name ",r.name,` has already been registered, but has a different description and is incompatible with another registered view.
|
|
15
15
|
`,`Details:
|
|
16
16
|
`,(0,yi.getIncompatibilityDetails)(a,r),`The longer description will be used.
|
|
17
17
|
To resolve the conflict:`,(0,yi.getConflictResolutionRecipe)(a,r))),c=i):fd.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,yi.getIncompatibilityDetails)(a,r),`To resolve the conflict:
|
|
20
|
-
`,(0,yi.getConflictResolutionRecipe)(a,r))}return c}};Ei.MetricStorageRegistry=Ia});var hd=d(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.MultiMetricStorage=void 0;var La=class{constructor(r){this._backingStorages=r}record(r,o,c,i){this._backingStorages.forEach(a=>{a.record(r,o,c,i)})}};vi.MultiMetricStorage=La});var md=d(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.BatchObservableResultImpl=or.ObservableResultImpl=void 0;var nr=(y(),E(m)),_d=jr(),KT=li(),wa=class{constructor(r,o){this._instrumentName=r,this._valueType=o,this._buffer=new _d.AttributeHashMap}observe(r,o={}){if(typeof r!="number"){nr.diag.warn(`non-number value provided to metric ${this._instrumentName}: ${r}`);return}this._valueType===nr.ValueType.INT&&!Number.isInteger(r)&&(nr.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)}};or.ObservableResultImpl=wa;var Ma=class{constructor(){this._buffer=new Map}observe(r,o,c={}){if(!(0,KT.isObservableInstrument)(r))return;let i=this._buffer.get(r);if(i==null&&(i=new _d.AttributeHashMap,this._buffer.set(r,i)),typeof o!="number"){nr.diag.warn(`non-number value provided to metric ${r._descriptor.name}: ${o}`);return}r._descriptor.valueType===nr.ValueType.INT&&!Number.isInteger(o)&&(nr.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))||i.set(c,o)}};or.BatchObservableResultImpl=Ma});var vd=d(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.ObservableRegistry=void 0;var XT=(y(),E(m)),yd=li(),Ed=md(),Gr=Pe(),Ca=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(yd.isObservableInstrument));if(c.size===0){XT.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(yd.isObservableInstrument)),i=this._findBatchCallback(r,c);i<0||this._batchCallbacks.splice(i,1)}async observe(r,o){let c=this._observeCallbacks(r,o),i=this._observeBatchCallbacks(r,o);return(await(0,Gr.PromiseAllSettled)([...c,...i])).filter(Gr.isPromiseAllSettledRejectionResult).map(e=>e.reason)}_observeCallbacks(r,o){return this._callbacks.map(async({callback:c,instrument:i})=>{let a=new Ed.ObservableResultImpl(i._descriptor.name,i._descriptor.valueType),t=Promise.resolve(c(a));o!=null&&(t=(0,Gr.callWithTimeout)(t,o)),await t,i._metricStorages.forEach(e=>{e.record(a._buffer,r)})})}_observeBatchCallbacks(r,o){return this._batchCallbacks.map(async({callback:c,instruments:i})=>{let a=new Ed.BatchObservableResultImpl,t=Promise.resolve(c(a));o!=null&&(t=(0,Gr.callWithTimeout)(t,o)),await t,i.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,Gr.setEquals)(c.instruments,o))}};Ti.ObservableRegistry=Ca});var Td=d(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.SyncMetricStorage=void 0;var zT=Sa(),$T=Pa(),YT=Ra(),Ua=class extends zT.MetricStorage{constructor(r,o,c,i){super(r),this._attributesProcessor=c,this._deltaMetricStorage=new $T.DeltaMetricProcessor(o),this._temporalMetricStorage=new YT.TemporalMetricProcessor(o,i)}record(r,o,c,i){o=this._attributesProcessor.process(o,c),this._deltaMetricStorage.record(r,o,c,i)}collect(r,o){let c=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,c,o)}};gi.SyncMetricStorage=Ua});var Ba=d(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.FilteringAttributesProcessor=qe.NoopAttributesProcessor=qe.AttributesProcessor=void 0;var Hr=class{static Noop(){return WT}};qe.AttributesProcessor=Hr;var Si=class extends Hr{process(r,o){return r}};qe.NoopAttributesProcessor=Si;var Da=class extends Hr{constructor(r){super(),this._allowedAttributeNames=r}process(r,o){let c={};return Object.keys(r).filter(i=>this._allowedAttributeNames.includes(i)).forEach(i=>c[i]=r[i]),c}};qe.FilteringAttributesProcessor=Da;var WT=new Si});var gd=d(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.MeterSharedState=void 0;var JT=Le(),QT=id(),ZT=Pe(),eg=ud(),tg=dd(),rg=hd(),ng=vd(),og=Td(),ig=Ba(),Va=class{constructor(r,o){this._meterProviderSharedState=r,this._instrumentationScope=o,this.metricStorageRegistry=new tg.MetricStorageRegistry,this.observableRegistry=new ng.ObservableRegistry,this.meter=new QT.Meter(this)}registerMetricStorage(r){let o=this._registerMetricStorage(r,og.SyncMetricStorage);return o.length===1?o[0]:new rg.MultiMetricStorage(o)}registerAsyncMetricStorage(r){return this._registerMetricStorage(r,eg.AsyncMetricStorage)}async collect(r,o,c){let i=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(ZT.isNotNullish);return t.length===0?{errors:i}:{scopeMetrics:{scope:this._instrumentationScope,metrics:t},errors:i}}_registerMetricStorage(r,o){let i=this._meterProviderSharedState.viewRegistry.findViews(r,this._instrumentationScope).map(a=>{let t=(0,JT.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(i.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,ig.AttributesProcessor.Noop(),[e]);return this.metricStorageRegistry.registerForCollector(e,h),h});i=i.concat(t)}return i}};bi.MeterSharedState=Va});var Sd=d(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.MeterProviderSharedState=void 0;var ug=Pe(),sg=od(),ag=gd(),ka=class{constructor(r){this.resource=r,this.viewRegistry=new sg.ViewRegistry,this.metricCollectors=[],this.meterSharedStates=new Map}getMeterSharedState(r){let o=(0,ug.instrumentationScopeId)(r),c=this.meterSharedStates.get(o);return c==null&&(c=new ag.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}};Oi.MeterProviderSharedState=ka});var bd=d(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.MetricCollector=void 0;var cg=P(),qa=class{constructor(r,o){this._sharedState=r,this._metricReader=o}async collect(r){let o=(0,cg.millisToHrTime)(Date.now()),c=[],i=[],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&&i.push(...e.errors)});return await Promise.all(a),{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:c},errors:i}}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)}};Ai.MetricCollector=qa});var Ad=d(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.MeterProvider=void 0;var Pi=(y(),E(m)),Od=ct(),lg=Sd(),pg=bd(),ja=class{constructor(r){var o;this._shutdown=!1;let c=Od.Resource.default().merge((o=r?.resource)!==null&&o!==void 0?o:Od.Resource.empty());if(this._sharedState=new lg.MeterProviderSharedState(c),r?.views!=null&&r.views.length>0)for(let i of r.views)this._sharedState.viewRegistry.addView(i)}getMeter(r,o="",c={}){return this._shutdown?(Pi.diag.warn("A shutdown MeterProvider cannot provide a Meter"),(0,Pi.createNoopMeter)()):this._sharedState.getMeterSharedState({name:r,version:o,schemaUrl:c.schemaUrl}).meter}addMetricReader(r){let o=new pg.MetricCollector(this._sharedState,r);r.setMetricProducer(o),this._sharedState.metricCollectors.push(o)}async shutdown(r){if(this._shutdown){Pi.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){Pi.diag.warn("invalid attempt to force flush after MeterProvider shutdown");return}await Promise.all(this._sharedState.metricCollectors.map(o=>o.forceFlush(r)))}};Ni.MeterProvider=ja});var Ri=d(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.ExactPredicate=ir.PatternPredicate=void 0;var fg=/[\^$\\.+?()[\]{}|]/g,Ga=class u{constructor(r){r==="*"?(this._matchAll=!0,this._regexp=/.*/):(this._matchAll=!1,this._regexp=new RegExp(u.escapePattern(r)))}match(r){return this._matchAll?!0:this._regexp.test(r)}static escapePattern(r){return`^${r.replace(fg,"\\$&").replace("*",".*")}$`}static hasWildcard(r){return r.includes("*")}};ir.PatternPredicate=Ga;var Ha=class{constructor(r){this._matchAll=r===void 0,this._pattern=r}match(r){return!!(this._matchAll||r===this._pattern)}};ir.ExactPredicate=Ha});var Nd=d(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});xi.InstrumentSelector=void 0;var Pd=Ri(),Fa=class{constructor(r){var o;this._nameFilter=new Pd.PatternPredicate((o=r?.name)!==null&&o!==void 0?o:"*"),this._type=r?.type,this._unitFilter=new Pd.ExactPredicate(r?.unit)}getType(){return this._type}getNameFilter(){return this._nameFilter}getUnitFilter(){return this._unitFilter}};xi.InstrumentSelector=Fa});var Rd=d(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.MeterSelector=void 0;var Ka=Ri(),Xa=class{constructor(r){this._nameFilter=new Ka.ExactPredicate(r?.name),this._versionFilter=new Ka.ExactPredicate(r?.version),this._schemaUrlFilter=new Ka.ExactPredicate(r?.schemaUrl)}getNameFilter(){return this._nameFilter}getVersionFilter(){return this._versionFilter}getSchemaUrlFilter(){return this._schemaUrlFilter}};Ii.MeterSelector=Xa});var Id=d(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.View=void 0;var dg=Ri(),xd=Ba(),hg=Nd(),_g=Rd(),mg=ri();function yg(u){return u.instrumentName==null&&u.instrumentType==null&&u.instrumentUnit==null&&u.meterName==null&&u.meterVersion==null&&u.meterSchemaUrl==null}var za=class{constructor(r){var o;if(yg(r))throw new Error("Cannot create view with no selector arguments supplied");if(r.name!=null&&(r?.instrumentName==null||dg.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 xd.FilteringAttributesProcessor(r.attributeKeys):this.attributesProcessor=xd.AttributesProcessor.Noop(),this.name=r.name,this.description=r.description,this.aggregation=(o=r.aggregation)!==null&&o!==void 0?o:mg.Aggregation.Default(),this.instrumentSelector=new hg.InstrumentSelector({name:r.instrumentName,type:r.instrumentType,unit:r.instrumentUnit}),this.meterSelector=new _g.MeterSelector({name:r.meterName,version:r.meterVersion,schemaUrl:r.meterSchemaUrl})}};Li.View=za});var Ld=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 Eg=Go();Object.defineProperty(O,"AggregationTemporality",{enumerable:!0,get:function(){return Eg.AggregationTemporality}});var vg=kt();Object.defineProperty(O,"DataPointType",{enumerable:!0,get:function(){return vg.DataPointType}});var Tg=ca();Object.defineProperty(O,"MetricReader",{enumerable:!0,get:function(){return Tg.MetricReader}});var gg=Zf();Object.defineProperty(O,"PeriodicExportingMetricReader",{enumerable:!0,get:function(){return gg.PeriodicExportingMetricReader}});var Sg=td();Object.defineProperty(O,"InMemoryMetricExporter",{enumerable:!0,get:function(){return Sg.InMemoryMetricExporter}});var bg=nd();Object.defineProperty(O,"ConsoleMetricExporter",{enumerable:!0,get:function(){return bg.ConsoleMetricExporter}});var Og=Le();Object.defineProperty(O,"InstrumentType",{enumerable:!0,get:function(){return Og.InstrumentType}});var Ag=Ad();Object.defineProperty(O,"MeterProvider",{enumerable:!0,get:function(){return Ag.MeterProvider}});var je=ri();Object.defineProperty(O,"DefaultAggregation",{enumerable:!0,get:function(){return je.DefaultAggregation}});Object.defineProperty(O,"ExplicitBucketHistogramAggregation",{enumerable:!0,get:function(){return je.ExplicitBucketHistogramAggregation}});Object.defineProperty(O,"ExponentialHistogramAggregation",{enumerable:!0,get:function(){return je.ExponentialHistogramAggregation}});Object.defineProperty(O,"DropAggregation",{enumerable:!0,get:function(){return je.DropAggregation}});Object.defineProperty(O,"HistogramAggregation",{enumerable:!0,get:function(){return je.HistogramAggregation}});Object.defineProperty(O,"LastValueAggregation",{enumerable:!0,get:function(){return je.LastValueAggregation}});Object.defineProperty(O,"SumAggregation",{enumerable:!0,get:function(){return je.SumAggregation}});Object.defineProperty(O,"Aggregation",{enumerable:!0,get:function(){return je.Aggregation}});var Pg=Id();Object.defineProperty(O,"View",{enumerable:!0,get:function(){return Pg.View}});var Ng=Pe();Object.defineProperty(O,"TimeoutError",{enumerable:!0,get:function(){return Ng.TimeoutError}})});var wd=d(wi=>{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});wi.AbstractAsyncHooksContextManager=void 0;var Rg=K("events"),xg=["addListener","on","once","prependListener","prependOnceListener"],$a=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(r,o){return o instanceof Rg.EventEmitter?this._bindEventEmitter(r,o):typeof o=="function"?this._bindFunction(r,o):o}_bindFunction(r,o){let c=this,i=function(...a){return c.with(r,()=>o.apply(this,a))};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:o.length}),i}_bindEventEmitter(r,o){return this._getPatchMap(o)!==void 0||(this._createPatchMap(o),xg.forEach(i=>{o[i]!==void 0&&(o[i]=this._patchAddListener(o,o[i],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(i,a){var t;let e=(t=c._getPatchMap(r))===null||t===void 0?void 0:t[i];if(e===void 0)return o.call(this,i,a);let n=e.get(a);return o.call(this,i,n||a)}}_patchRemoveAllListeners(r,o){let c=this;return function(i){let a=c._getPatchMap(r);return a!==void 0&&(arguments.length===0?c._createPatchMap(r):a[i]!==void 0&&delete a[i]),o.apply(this,arguments)}}_patchAddListener(r,o,c){let i=this;return function(a,t){if(i._wrapped)return o.call(this,a,t);let e=i._getPatchMap(r);e===void 0&&(e=i._createPatchMap(r));let n=e[a];n===void 0&&(n=new WeakMap,e[a]=n);let s=i.bind(c,t);n.set(t,s),i._wrapped=!0;try{return o.call(this,a,s)}finally{i._wrapped=!1}}}_createPatchMap(r){let o=Object.create(null);return r[this._kOtListeners]=o,o}_getPatchMap(r){return r[this._kOtListeners]}};wi.AbstractAsyncHooksContextManager=$a});var Md=d(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});Mi.AsyncLocalStorageContextManager=void 0;var Ig=(y(),E(m)),Lg=K("async_hooks"),wg=wd(),Ya=class extends wg.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new Lg.AsyncLocalStorage}active(){var r;return(r=this._asyncLocalStorage.getStore())!==null&&r!==void 0?r:Ig.ROOT_CONTEXT}with(r,o,c,...i){let a=c==null?o:o.bind(c);return this._asyncLocalStorage.run(r,a,...i)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};Mi.AsyncLocalStorageContextManager=Ya});var Za=d(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.toAnyValue=Ge.toKeyValue=Ge.toAttributes=void 0;function Ug(u){return Object.keys(u).map(r=>Ja(r,u[r]))}Ge.toAttributes=Ug;function Ja(u,r){return{key:u,value:Qa(r)}}Ge.toKeyValue=Ja;function Qa(u){let r=typeof u;return r==="string"?{stringValue:u}:r==="number"?Number.isInteger(u)?{intValue:u}:{doubleValue:u}:r==="boolean"?{boolValue:u}:u instanceof Uint8Array?{bytesValue:u}:Array.isArray(u)?{arrayValue:{values:u.map(Qa)}}:r==="object"&&u!=null?{kvlistValue:{values:Object.entries(u).map(([o,c])=>Ja(o,c))}}:{}}Ge.toAnyValue=Qa});var Vd=d(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.toOtlpSpanEvent=He.toOtlpLink=He.sdkSpanToOtlpSpan=void 0;var ec=Za();function Dg(u,r){var o;let c=u.spanContext(),i=u.status;return{traceId:r.encodeSpanContext(c.traceId),spanId:r.encodeSpanContext(c.spanId),parentSpanId:r.encodeOptionalSpanContext(u.parentSpanId),traceState:(o=c.traceState)===null||o===void 0?void 0:o.serialize(),name:u.name,kind:u.kind==null?0:u.kind+1,startTimeUnixNano:r.encodeHrTime(u.startTime),endTimeUnixNano:r.encodeHrTime(u.endTime),attributes:(0,ec.toAttributes)(u.attributes),droppedAttributesCount:u.droppedAttributesCount,events:u.events.map(a=>Bd(a,r)),droppedEventsCount:u.droppedEventsCount,status:{code:i.code,message:i.message},links:u.links.map(a=>Dd(a,r)),droppedLinksCount:u.droppedLinksCount}}He.sdkSpanToOtlpSpan=Dg;function Dd(u,r){var o;return{attributes:u.attributes?(0,ec.toAttributes)(u.attributes):[],spanId:r.encodeSpanContext(u.context.spanId),traceId:r.encodeSpanContext(u.context.traceId),traceState:(o=u.context.traceState)===null||o===void 0?void 0:o.serialize(),droppedAttributesCount:u.droppedAttributesCount||0}}He.toOtlpLink=Dd;function Bd(u,r){return{attributes:u.attributes?(0,ec.toAttributes)(u.attributes):[],name:u.name,timeUnixNano:r.encodeHrTime(u.time),droppedAttributesCount:u.droppedAttributesCount||0}}He.toOtlpSpanEvent=Bd});var Hd=d(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.getOtlpEncoder=fe.encodeAsString=fe.encodeAsLongBits=fe.toLongBits=fe.hrTimeToNanos=void 0;var Bi=P(),Bg=BigInt(1e9);function tc(u){return BigInt(u[0])*Bg+BigInt(u[1])}fe.hrTimeToNanos=tc;function qd(u){let r=Number(BigInt.asUintN(32,u)),o=Number(BigInt.asUintN(32,u>>BigInt(32)));return{low:r,high:o}}fe.toLongBits=qd;function rc(u){let r=tc(u);return qd(r)}fe.encodeAsLongBits=rc;function jd(u){return tc(u).toString()}fe.encodeAsString=jd;var Vg=typeof BigInt<"u"?jd:Bi.hrTimeToNanoseconds;function kd(u){return u}function Gd(u){if(u!==void 0)return(0,Bi.hexToBase64)(u)}var kg={encodeHrTime:rc,encodeSpanContext:Bi.hexToBase64,encodeOptionalSpanContext:Gd};function qg(u){var r,o;if(u===void 0)return kg;let c=(r=u.useLongBits)!==null&&r!==void 0?r:!0,i=(o=u.useHex)!==null&&o!==void 0?o:!1;return{encodeHrTime:c?rc:Vg,encodeSpanContext:i?kd:Bi.hexToBase64,encodeOptionalSpanContext:i?kd:Gd}}fe.getOtlpEncoder=qg});var nc=d(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});Vi.createExportTraceServiceRequest=void 0;var jg=Za(),Gg=Vd(),Hg=Hd();function Fg(u,r){let o=(0,Hg.getOtlpEncoder)(r);return{resourceSpans:Xg(u,o)}}Vi.createExportTraceServiceRequest=Fg;function Kg(u){let r=new Map;for(let o of u){let c=r.get(o.resource);c||(c=new Map,r.set(o.resource,c));let i=`${o.instrumentationLibrary.name}@${o.instrumentationLibrary.version||""}:${o.instrumentationLibrary.schemaUrl||""}`,a=c.get(i);a||(a=[],c.set(i,a)),a.push(o)}return r}function Xg(u,r){let o=Kg(u),c=[],i=o.entries(),a=i.next();for(;!a.done;){let[t,e]=a.value,n=[],s=e.values(),l=s.next();for(;!l.done;){let v=l.value;if(v.length>0){let{name:b,version:N,schemaUrl:V}=v[0].instrumentationLibrary,I=v.map(U=>(0,Gg.sdkSpanToOtlpSpan)(U,r));n.push({scope:{name:b,version:N},spans:I,schemaUrl:V})}l=s.next()}let h={resource:{attributes:(0,jg.toAttributes)(t.attributes),droppedAttributesCount:0},scopeSpans:n,schemaUrl:void 0};c.push(h),a=i.next()}return c}});var mt=d(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.parseRetryAfterToMills=B.isExportRetryable=B.invalidTimeout=B.configureExporterTimeout=B.appendRootPathToUrlIfNeeded=B.appendResourcePathToUrl=B.parseHeaders=B.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=B.DEFAULT_EXPORT_MAX_BACKOFF=B.DEFAULT_EXPORT_INITIAL_BACKOFF=B.DEFAULT_EXPORT_MAX_ATTEMPTS=void 0;var oc=(y(),E(m)),Fd=P(),Kd=1e4;B.DEFAULT_EXPORT_MAX_ATTEMPTS=5;B.DEFAULT_EXPORT_INITIAL_BACKOFF=1e3;B.DEFAULT_EXPORT_MAX_BACKOFF=5e3;B.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=1.5;function zg(u={}){let r={};return Object.entries(u).forEach(([o,c])=>{typeof c<"u"?r[o]=String(c):oc.diag.warn(`Header "${o}" has wrong value and will be ignored`)}),r}B.parseHeaders=zg;function $g(u,r){return u.endsWith("/")||(u=u+"/"),u+r}B.appendResourcePathToUrl=$g;function Yg(u){try{let r=new URL(u);return r.pathname===""&&(r.pathname=r.pathname+"/"),r.toString()}catch{return oc.diag.warn(`Could not parse export URL: '${u}'`),u}}B.appendRootPathToUrlIfNeeded=Yg;function Wg(u){return typeof u=="number"?u<=0?ic(u,Kd):u:Jg()}B.configureExporterTimeout=Wg;function Jg(){var u;let r=Number((u=(0,Fd.getEnv)().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)!==null&&u!==void 0?u:(0,Fd.getEnv)().OTEL_EXPORTER_OTLP_TIMEOUT);return r<=0?ic(r,Kd):r}function ic(u,r){return oc.diag.warn("Timeout must be greater than 0",u),r}B.invalidTimeout=ic;function Qg(u){return[429,502,503,504].includes(u)}B.isExportRetryable=Qg;function Zg(u){if(u==null)return-1;let r=Number.parseInt(u,10);if(Number.isInteger(r))return r>0?r*1e3:-1;let o=new Date(u).getTime()-Date.now();return o>=0?o:0}B.parseRetryAfterToMills=Zg});var Kr=d(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.OTLPExporterBase=void 0;var Xd=(y(),E(m)),Fr=P(),eS=mt(),uc=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 Fr.BindOnceFuture(this._shutdown,this),this._concurrencyLimit=typeof r.concurrencyLimit=="number"?r.concurrencyLimit:30,this.timeoutMillis=(0,eS.configureExporterTimeout)(r.timeoutMillis),this.onInit(r)}export(r,o){if(this._shutdownOnce.isCalled){o({code:Fr.ExportResultCode.FAILED,error:new Error("Exporter has been shutdown")});return}if(this._sendingPromises.length>=this._concurrencyLimit){o({code:Fr.ExportResultCode.FAILED,error:new Error("Concurrent export limit reached")});return}this._export(r).then(()=>{o({code:Fr.ExportResultCode.SUCCESS})}).catch(c=>{o({code:Fr.ExportResultCode.FAILED,error:c})})}_export(r){return new Promise((o,c)=>{try{Xd.diag.debug("items to be sent",r),this.send(r,o,c)}catch(i){c(i)}})}shutdown(){return this._shutdownOnce.call()}forceFlush(){return Promise.all(this._sendingPromises).then(()=>{})}_shutdown(){return Xd.diag.debug("shutdown started"),this.onShutdown(),this.forceFlush()}};ki.OTLPExporterBase=uc});var sc=d(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.CompressionAlgorithm=void 0;var nS;(function(u){u.NONE="none",u.GZIP="gzip"})(nS=Xr.CompressionAlgorithm||(Xr.CompressionAlgorithm={}))});var Gi=d(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.OTLPExporterError=void 0;var ac=class extends Error{constructor(r,o,c){super(r),this.name="OTLPExporterError",this.data=c,this.code=o}};ji.OTLPExporterError=ac});var lc=d(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.configureCompression=Fe.createHttpAgent=Fe.sendWithHttp=void 0;var Wd=K("url"),Jd=K("http"),Qd=K("https"),oS=K("zlib"),iS=K("stream"),cc=(y(),E(m)),Hi=sc(),Yd=P(),zr=Gi(),ar=mt();function uS(u,r,o,c,i){let a=u.timeoutMillis,t=new Wd.URL(u.url),e=Number(process.versions.node.split(".")[0]),n,s,l=!1,h=setTimeout(()=>{if(clearTimeout(n),l=!0,s.destroyed){let V=new zr.OTLPExporterError("Request Timeout");i(V)}else e>=14?s.destroy():s.abort()},a),v={hostname:t.hostname,port:t.port,path:t.pathname,method:"POST",headers:Object.assign({"Content-Type":o},u.headers),agent:u.agent},b=t.protocol==="http:"?Jd.request:Qd.request,N=(V=ar.DEFAULT_EXPORT_MAX_ATTEMPTS,I=ar.DEFAULT_EXPORT_INITIAL_BACKOFF)=>{switch(s=b(v,U=>{let F="";U.on("data",me=>F+=me),U.on("aborted",()=>{if(l){let me=new zr.OTLPExporterError("Request Timeout");i(me)}}),U.on("end",()=>{if(l===!1)if(U.statusCode&&U.statusCode<299)cc.diag.debug(`statusCode: ${U.statusCode}`,F),c(),clearTimeout(h),clearTimeout(n);else if(U.statusCode&&(0,ar.isExportRetryable)(U.statusCode)&&V>0){let me;I=ar.DEFAULT_EXPORT_BACKOFF_MULTIPLIER*I,U.headers["retry-after"]?me=(0,ar.parseRetryAfterToMills)(U.headers["retry-after"]):me=Math.round(Math.random()*(ar.DEFAULT_EXPORT_MAX_BACKOFF-I)+I),n=setTimeout(()=>{N(V-1,I)},me)}else{let me=new zr.OTLPExporterError(U.statusMessage,U.statusCode,F);i(me),clearTimeout(h),clearTimeout(n)}})}),s.on("error",U=>{if(l){let F=new zr.OTLPExporterError("Request Timeout",U.code);i(F)}else i(U);clearTimeout(h),clearTimeout(n)}),s.on("abort",()=>{if(l){let U=new zr.OTLPExporterError("Request Timeout");i(U)}clearTimeout(h),clearTimeout(n)}),u.compression){case Hi.CompressionAlgorithm.GZIP:{s.setHeader("Content-Encoding","gzip"),sS(r).on("error",i).pipe(oS.createGzip()).on("error",i).pipe(s);break}default:s.end(r);break}};N()}Fe.sendWithHttp=uS;function sS(u){let r=new iS.Readable;return r.push(u),r.push(null),r}function aS(u){if(u.httpAgentOptions&&u.keepAlive===!1){cc.diag.warn("httpAgentOptions is used only when keepAlive is true");return}if(!(u.keepAlive===!1||!u.url))try{let o=new Wd.URL(u.url).protocol==="http:"?Jd.Agent:Qd.Agent;return new o(Object.assign({keepAlive:!0},u.httpAgentOptions))}catch(r){cc.diag.error(`collector exporter failed to create http agent. err: ${r.message}`);return}}Fe.createHttpAgent=aS;function cS(u){return u||(((0,Yd.getEnv)().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION||(0,Yd.getEnv)().OTEL_EXPORTER_OTLP_COMPRESSION)===Hi.CompressionAlgorithm.GZIP?Hi.CompressionAlgorithm.GZIP:Hi.CompressionAlgorithm.NONE)}Fe.configureCompression=cS});var th=d(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.OTLPExporterNodeBase=void 0;var lS=Kr(),pS=mt(),pc=lc(),Zd=(y(),E(m)),eh=P(),fc=class extends lS.OTLPExporterBase{constructor(r={}){super(r),this.DEFAULT_HEADERS={},r.metadata&&Zd.diag.warn("Metadata cannot be set when using http"),this.headers=Object.assign(this.DEFAULT_HEADERS,(0,pS.parseHeaders)(r.headers),eh.baggageUtils.parseKeyPairsIntoRecord((0,eh.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)),this.agent=(0,pc.createHttpAgent)(r),this.compression=(0,pc.configureCompression)(r.compression)}onInit(r){}send(r,o,c){if(this._shutdownOnce.isCalled){Zd.diag.debug("Shutdown already started. Cannot send objects");return}let i=this.convert(r),a=new Promise((e,n)=>{(0,pc.sendWithHttp)(this,JSON.stringify(i),"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(){}};Fi.OTLPExporterNodeBase=fc});var rh=d(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.CompressionAlgorithm=de.configureCompression=de.createHttpAgent=de.sendWithHttp=de.OTLPExporterNodeBase=void 0;var fS=th();Object.defineProperty(de,"OTLPExporterNodeBase",{enumerable:!0,get:function(){return fS.OTLPExporterNodeBase}});var dc=lc();Object.defineProperty(de,"sendWithHttp",{enumerable:!0,get:function(){return dc.sendWithHttp}});Object.defineProperty(de,"createHttpAgent",{enumerable:!0,get:function(){return dc.createHttpAgent}});Object.defineProperty(de,"configureCompression",{enumerable:!0,get:function(){return dc.configureCompression}});var dS=sc();Object.defineProperty(de,"CompressionAlgorithm",{enumerable:!0,get:function(){return dS.CompressionAlgorithm}})});var hc=d(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.sendWithXhr=lr.sendWithBeacon=void 0;var nh=(y(),E(m)),$r=Gi(),cr=mt();function hS(u,r,o,c,i){if(navigator.sendBeacon(r,new Blob([u],o)))nh.diag.debug("sendBeacon - can send",u),c();else{let a=new $r.OTLPExporterError(`sendBeacon - cannot send ${u}`);i(a)}}lr.sendWithBeacon=hS;function _S(u,r,o,c,i,a){let t,e,n=!1,s=setTimeout(()=>{if(clearTimeout(t),n=!0,e.readyState===XMLHttpRequest.DONE){let h=new $r.OTLPExporterError("Request Timeout");a(h)}else e.abort()},c),l=(h=cr.DEFAULT_EXPORT_MAX_ATTEMPTS,v=cr.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,V])=>{e.setRequestHeader(N,V)}),e.send(u),e.onreadystatechange=()=>{if(e.readyState===XMLHttpRequest.DONE&&n===!1)if(e.status>=200&&e.status<=299)nh.diag.debug("xhr success",u),i(),clearTimeout(s),clearTimeout(t);else if(e.status&&(0,cr.isExportRetryable)(e.status)&&h>0){let N;v=cr.DEFAULT_EXPORT_BACKOFF_MULTIPLIER*v,e.getResponseHeader("Retry-After")?N=(0,cr.parseRetryAfterToMills)(e.getResponseHeader("Retry-After")):N=Math.round(Math.random()*(cr.DEFAULT_EXPORT_MAX_BACKOFF-v)+v),t=setTimeout(()=>{l(h-1,v)},N)}else{let N=new $r.OTLPExporterError(`Failed to export with XHR (status: ${e.status})`,e.status);a(N),clearTimeout(s),clearTimeout(t)}},e.onabort=()=>{if(n){let N=new $r.OTLPExporterError("Request Timeout");a(N)}clearTimeout(s),clearTimeout(t)},e.onerror=()=>{if(n){let N=new $r.OTLPExporterError("Request Timeout");a(N)}clearTimeout(s),clearTimeout(t)}};l()}lr.sendWithXhr=_S});var ih=d(Xi=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});Xi.OTLPExporterBrowserBase=void 0;var mS=Kr(),yS=mt(),oh=hc(),ES=(y(),E(m)),Ki=P(),_c=class extends mS.OTLPExporterBase{constructor(r={}){super(r),this._useXHR=!1,this._useXHR=!!r.headers||typeof navigator.sendBeacon!="function",this._useXHR?this._headers=Object.assign({},(0,yS.parseHeaders)(r.headers),Ki.baggageUtils.parseKeyPairsIntoRecord((0,Ki.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)):this._headers={}}onInit(){Ki._globalThis.addEventListener("unload",this.shutdown)}onShutdown(){Ki._globalThis.removeEventListener("unload",this.shutdown)}send(r,o,c){if(this._shutdownOnce.isCalled){ES.diag.debug("Shutdown already started. Cannot send objects");return}let i=this.convert(r),a=JSON.stringify(i),t=new Promise((n,s)=>{this._useXHR?(0,oh.sendWithXhr)(a,this.url,this._headers,this.timeoutMillis,n,s):(0,oh.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)}};Xi.OTLPExporterBrowserBase=_c});var uh=d(pr=>{"use strict";Object.defineProperty(pr,"__esModule",{value:!0});pr.sendWithXhr=pr.OTLPExporterBrowserBase=void 0;var vS=ih();Object.defineProperty(pr,"OTLPExporterBrowserBase",{enumerable:!0,get:function(){return vS.OTLPExporterBrowserBase}});var TS=hc();Object.defineProperty(pr,"sendWithXhr",{enumerable:!0,get:function(){return TS.sendWithXhr}})});var ah=d(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.sendWithXhr=re.OTLPExporterBrowserBase=re.CompressionAlgorithm=re.configureCompression=re.createHttpAgent=re.sendWithHttp=re.OTLPExporterNodeBase=void 0;var Yr=rh();Object.defineProperty(re,"OTLPExporterNodeBase",{enumerable:!0,get:function(){return Yr.OTLPExporterNodeBase}});Object.defineProperty(re,"sendWithHttp",{enumerable:!0,get:function(){return Yr.sendWithHttp}});Object.defineProperty(re,"createHttpAgent",{enumerable:!0,get:function(){return Yr.createHttpAgent}});Object.defineProperty(re,"configureCompression",{enumerable:!0,get:function(){return Yr.configureCompression}});Object.defineProperty(re,"CompressionAlgorithm",{enumerable:!0,get:function(){return Yr.CompressionAlgorithm}});var sh=uh();Object.defineProperty(re,"OTLPExporterBrowserBase",{enumerable:!0,get:function(){return sh.OTLPExporterBrowserBase}});Object.defineProperty(re,"sendWithXhr",{enumerable:!0,get:function(){return sh.sendWithXhr}})});var zi=d(k=>{"use strict";var gS=k&&k.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),SS=k&&k.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&gS(r,u,o)};Object.defineProperty(k,"__esModule",{value:!0});k.invalidTimeout=k.configureExporterTimeout=k.appendRootPathToUrlIfNeeded=k.appendResourcePathToUrl=k.parseHeaders=k.OTLPExporterError=k.OTLPExporterBase=void 0;SS(ah(),k);var bS=Kr();Object.defineProperty(k,"OTLPExporterBase",{enumerable:!0,get:function(){return bS.OTLPExporterBase}});var OS=Gi();Object.defineProperty(k,"OTLPExporterError",{enumerable:!0,get:function(){return OS.OTLPExporterError}});var Wr=mt();Object.defineProperty(k,"parseHeaders",{enumerable:!0,get:function(){return Wr.parseHeaders}});Object.defineProperty(k,"appendResourcePathToUrl",{enumerable:!0,get:function(){return Wr.appendResourcePathToUrl}});Object.defineProperty(k,"appendRootPathToUrlIfNeeded",{enumerable:!0,get:function(){return Wr.appendRootPathToUrlIfNeeded}});Object.defineProperty(k,"configureExporterTimeout",{enumerable:!0,get:function(){return Wr.configureExporterTimeout}});Object.defineProperty(k,"invalidTimeout",{enumerable:!0,get:function(){return Wr.invalidTimeout}})});var lh=d((QP,ch)=>{"use strict";ch.exports=AS;function AS(u,r){for(var o=new Array(arguments.length-1),c=0,i=2,a=!0;i<arguments.length;)o[c++]=arguments[i++];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),v=0;v<h.length;)h[v++]=arguments[v];e.apply(null,h)}};try{u.apply(r||null,o)}catch(s){a&&(a=!1,n(s))}})}});var hh=d(dh=>{"use strict";var $i=dh;$i.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 fr=new Array(64),fh=new Array(123);for(ve=0;ve<64;)fh[fr[ve]=ve<26?ve+65:ve<52?ve+71:ve<62?ve-4:ve-59|43]=ve++;var ve;$i.encode=function(r,o,c){for(var i=null,a=[],t=0,e=0,n;o<c;){var s=r[o++];switch(e){case 0:a[t++]=fr[s>>2],n=(s&3)<<4,e=1;break;case 1:a[t++]=fr[n|s>>4],n=(s&15)<<2,e=2;break;case 2:a[t++]=fr[n|s>>6],a[t++]=fr[s&63],e=0;break}t>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,a)),t=0)}return e&&(a[t++]=fr[n],a[t++]=61,e===1&&(a[t++]=61)),i?(t&&i.push(String.fromCharCode.apply(String,a.slice(0,t))),i.join("")):String.fromCharCode.apply(String,a.slice(0,t))};var ph="invalid encoding";$i.decode=function(r,o,c){for(var i=c,a=0,t,e=0;e<r.length;){var n=r.charCodeAt(e++);if(n===61&&a>1)break;if((n=fh[n])===void 0)throw Error(ph);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(ph);return c-i};$i.test=function(r){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r)}});var mh=d((eN,_h)=>{"use strict";_h.exports=Yi;function Yi(){this._listeners={}}Yi.prototype.on=function(r,o,c){return(this._listeners[r]||(this._listeners[r]=[])).push({fn:o,ctx:c||this}),this};Yi.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],i=0;i<c.length;)c[i].fn===o?c.splice(i,1):++i;return this};Yi.prototype.emit=function(r){var o=this._listeners[r];if(o){for(var c=[],i=1;i<arguments.length;)c.push(arguments[i++]);for(i=0;i<o.length;)o[i].fn.apply(o[i++].ctx,c)}return this}});var bh=d((tN,Sh)=>{"use strict";Sh.exports=yh(yh);function yh(u){return typeof Float32Array<"u"?function(){var r=new Float32Array([-0]),o=new Uint8Array(r.buffer),c=o[3]===128;function i(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]}u.writeFloatLE=c?i:a,u.writeFloatBE=c?a:i;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]}u.readFloatLE=c?t:e,u.readFloatBE=c?e:t}():function(){function r(c,i,a,t){var e=i<0?1:0;if(e&&(i=-i),i===0)c(1/i>0?0:2147483648,a,t);else if(isNaN(i))c(2143289344,a,t);else if(i>34028234663852886e22)c((e<<31|2139095040)>>>0,a,t);else if(i<11754943508222875e-54)c((e<<31|Math.round(i/1401298464324817e-60))>>>0,a,t);else{var n=Math.floor(Math.log(i)/Math.LN2),s=Math.round(i*Math.pow(2,-n)*8388608)&8388607;c((e<<31|n+127<<23|s)>>>0,a,t)}}u.writeFloatLE=r.bind(null,Eh),u.writeFloatBE=r.bind(null,vh);function o(c,i,a){var t=c(i,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)}u.readFloatLE=o.bind(null,Th),u.readFloatBE=o.bind(null,gh)}(),typeof Float64Array<"u"?function(){var r=new Float64Array([-0]),o=new Uint8Array(r.buffer),c=o[7]===128;function i(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]}u.writeDoubleLE=c?i:a,u.writeDoubleBE=c?a:i;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]}u.readDoubleLE=c?t:e,u.readDoubleBE=c?e:t}():function(){function r(c,i,a,t,e,n){var s=t<0?1:0;if(s&&(t=-t),t===0)c(0,e,n+i),c(1/t>0?0:2147483648,e,n+a);else if(isNaN(t))c(0,e,n+i),c(2146959360,e,n+a);else if(t>17976931348623157e292)c(0,e,n+i),c((s<<31|2146435072)>>>0,e,n+a);else{var l;if(t<22250738585072014e-324)l=t/5e-324,c(l>>>0,e,n+i),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+i),c((s<<31|h+1023<<20|l*1048576&1048575)>>>0,e,n+a)}}}u.writeDoubleLE=r.bind(null,Eh,0,4),u.writeDoubleBE=r.bind(null,vh,4,0);function o(c,i,a,t,e){var n=c(t,e+i),s=c(t,e+a),l=(s>>31)*2+1,h=s>>>20&2047,v=4294967296*(s&1048575)+n;return h===2047?v?NaN:l*(1/0):h===0?l*5e-324*v:l*Math.pow(2,h-1075)*(v+4503599627370496)}u.readDoubleLE=o.bind(null,Th,0,4),u.readDoubleBE=o.bind(null,gh,4,0)}(),u}function Eh(u,r,o){r[o]=u&255,r[o+1]=u>>>8&255,r[o+2]=u>>>16&255,r[o+3]=u>>>24}function vh(u,r,o){r[o]=u>>>24,r[o+1]=u>>>16&255,r[o+2]=u>>>8&255,r[o+3]=u&255}function Th(u,r){return(u[r]|u[r+1]<<8|u[r+2]<<16|u[r+3]<<24)>>>0}function gh(u,r){return(u[r]<<24|u[r+1]<<16|u[r+2]<<8|u[r+3])>>>0}});var Oh=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(u){}return null}});var Ph=d(Ah=>{"use strict";var mc=Ah;mc.length=function(r){for(var o=0,c=0,i=0;i<r.length;++i)c=r.charCodeAt(i),c<128?o+=1:c<2048?o+=2:(c&64512)===55296&&(r.charCodeAt(i+1)&64512)===56320?(++i,o+=4):o+=3;return o};mc.read=function(r,o,c){var i=c-o;if(i<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))};mc.write=function(r,o,c){for(var i=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-i}});var Rh=d((nN,Nh)=>{"use strict";Nh.exports=PS;function PS(u,r,o){var c=o||8192,i=c>>>1,a=null,t=c;return function(n){if(n<1||n>i)return u(n);t+n>c&&(a=u(c),t=0);var s=r.call(a,t,t+=n);return t&7&&(t=(t|7)+1),s}}});var Ih=d((oN,xh)=>{"use strict";xh.exports=z;var Jr=Xe();function z(u,r){this.lo=u>>>0,this.hi=r>>>0}var yt=z.zero=new z(0,0);yt.toNumber=function(){return 0};yt.zzEncode=yt.zzDecode=function(){return this};yt.length=function(){return 1};var NS=z.zeroHash="\0\0\0\0\0\0\0\0";z.fromNumber=function(r){if(r===0)return yt;var o=r<0;o&&(r=-r);var c=r>>>0,i=(r-c)/4294967296>>>0;return o&&(i=~i>>>0,c=~c>>>0,++c>4294967295&&(c=0,++i>4294967295&&(i=0))),new z(c,i)};z.from=function(r){if(typeof r=="number")return z.fromNumber(r);if(Jr.isString(r))if(Jr.Long)r=Jr.Long.fromString(r);else return z.fromNumber(parseInt(r,10));return r.low||r.high?new z(r.low>>>0,r.high>>>0):yt};z.prototype.toNumber=function(r){if(!r&&this.hi>>>31){var o=~this.lo+1>>>0,c=~this.hi>>>0;return o||(c=c+1>>>0),-(o+c*4294967296)}return this.lo+this.hi*4294967296};z.prototype.toLong=function(r){return Jr.Long?new Jr.Long(this.lo|0,this.hi|0,!!r):{low:this.lo|0,high:this.hi|0,unsigned:!!r}};var Ke=String.prototype.charCodeAt;z.fromHash=function(r){return r===NS?yt:new z((Ke.call(r,0)|Ke.call(r,1)<<8|Ke.call(r,2)<<16|Ke.call(r,3)<<24)>>>0,(Ke.call(r,4)|Ke.call(r,5)<<8|Ke.call(r,6)<<16|Ke.call(r,7)<<24)>>>0)};z.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};z.prototype.zzEncode=function(){var r=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^r)>>>0,this.lo=(this.lo<<1^r)>>>0,this};z.prototype.zzDecode=function(){var r=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^r)>>>0,this.hi=(this.hi>>>1^r)>>>0,this};z.prototype.length=function(){var r=this.lo,o=(this.lo>>>28|this.hi<<4)>>>0,c=this.hi>>>24;return c===0?o===0?r<16384?r<128?1:2:r<2097152?3:4:o<16384?o<128?5:6:o<2097152?7:8:c<128?9:10}});var Xe=d(yc=>{"use strict";var T=yc;T.asPromise=lh();T.base64=hh();T.EventEmitter=mh();T.float=bh();T.inquire=Oh();T.utf8=Ph();T.pool=Rh();T.LongBits=Ih();T.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);T.global=T.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||yc;T.emptyArray=Object.freeze?Object.freeze([]):[];T.emptyObject=Object.freeze?Object.freeze({}):{};T.isInteger=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r};T.isString=function(r){return typeof r=="string"||r instanceof String};T.isObject=function(r){return r&&typeof r=="object"};T.isset=T.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};T.Buffer=function(){try{var u=T.inquire("buffer").Buffer;return u.prototype.utf8Write?u:null}catch{return null}}();T._Buffer_from=null;T._Buffer_allocUnsafe=null;T.newBuffer=function(r){return typeof r=="number"?T.Buffer?T._Buffer_allocUnsafe(r):new T.Array(r):T.Buffer?T._Buffer_from(r):typeof Uint8Array>"u"?r:new Uint8Array(r)};T.Array=typeof Uint8Array<"u"?Uint8Array:Array;T.Long=T.global.dcodeIO&&T.global.dcodeIO.Long||T.global.Long||T.inquire("long");T.key2Re=/^true|false|0|1$/;T.key32Re=/^-?(?:0|[1-9][0-9]*)$/;T.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;T.longToHash=function(r){return r?T.LongBits.from(r).toHash():T.LongBits.zeroHash};T.longFromHash=function(r,o){var c=T.LongBits.fromHash(r);return T.Long?T.Long.fromBits(c.lo,c.hi,o):c.toNumber(!!o)};function Lh(u,r,o){for(var c=Object.keys(r),i=0;i<c.length;++i)(u[c[i]]===void 0||!o)&&(u[c[i]]=r[c[i]]);return u}T.merge=Lh;T.lcFirst=function(r){return r.charAt(0).toLowerCase()+r.substring(1)};function wh(u){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&&Lh(this,c)}return r.prototype=Object.create(Error.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return u},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),r}T.newError=wh;T.ProtocolError=wh("ProtocolError");T.oneOfGetter=function(r){for(var o={},c=0;c<r.length;++c)o[r[c]]=1;return function(){for(var i=Object.keys(this),a=i.length-1;a>-1;--a)if(o[i[a]]===1&&this[i[a]]!==void 0&&this[i[a]]!==null)return i[a]}};T.oneOfSetter=function(r){return function(o){for(var c=0;c<r.length;++c)r[c]!==o&&delete this[r[c]]}};T.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};T._configure=function(){var u=T.Buffer;if(!u){T._Buffer_from=T._Buffer_allocUnsafe=null;return}T._Buffer_from=u.from!==Uint8Array.from&&u.from||function(o,c){return new u(o,c)},T._Buffer_allocUnsafe=u.allocUnsafe||function(o){return new u(o)}}});var Oc=d((uN,Dh)=>{"use strict";Dh.exports=R;var he=Xe(),Ec,Wi=he.LongBits,Mh=he.base64,Ch=he.utf8;function Qr(u,r,o){this.fn=u,this.len=r,this.next=void 0,this.val=o}function Tc(){}function RS(u){this.head=u.head,this.tail=u.tail,this.len=u.len,this.next=u.states}function R(){this.len=0,this.head=new Qr(Tc,0,0),this.tail=this.head,this.states=null}var Uh=function(){return he.Buffer?function(){return(R.create=function(){return new Ec})()}:function(){return new R}};R.create=Uh();R.alloc=function(r){return new he.Array(r)};he.Array!==Array&&(R.alloc=he.pool(R.alloc,he.Array.prototype.subarray));R.prototype._push=function(r,o,c){return this.tail=this.tail.next=new Qr(r,o,c),this.len+=o,this};function gc(u,r,o){r[o]=u&255}function xS(u,r,o){for(;u>127;)r[o++]=u&127|128,u>>>=7;r[o]=u}function Sc(u,r){this.len=u,this.next=void 0,this.val=r}Sc.prototype=Object.create(Qr.prototype);Sc.prototype.fn=xS;R.prototype.uint32=function(r){return this.len+=(this.tail=this.tail.next=new Sc((r=r>>>0)<128?1:r<16384?2:r<2097152?3:r<268435456?4:5,r)).len,this};R.prototype.int32=function(r){return r<0?this._push(bc,10,Wi.fromNumber(r)):this.uint32(r)};R.prototype.sint32=function(r){return this.uint32((r<<1^r>>31)>>>0)};function bc(u,r,o){for(;u.hi;)r[o++]=u.lo&127|128,u.lo=(u.lo>>>7|u.hi<<25)>>>0,u.hi>>>=7;for(;u.lo>127;)r[o++]=u.lo&127|128,u.lo=u.lo>>>7;r[o++]=u.lo}R.prototype.uint64=function(r){var o=Wi.from(r);return this._push(bc,o.length(),o)};R.prototype.int64=R.prototype.uint64;R.prototype.sint64=function(r){var o=Wi.from(r).zzEncode();return this._push(bc,o.length(),o)};R.prototype.bool=function(r){return this._push(gc,1,r?1:0)};function vc(u,r,o){r[o]=u&255,r[o+1]=u>>>8&255,r[o+2]=u>>>16&255,r[o+3]=u>>>24}R.prototype.fixed32=function(r){return this._push(vc,4,r>>>0)};R.prototype.sfixed32=R.prototype.fixed32;R.prototype.fixed64=function(r){var o=Wi.from(r);return this._push(vc,4,o.lo)._push(vc,4,o.hi)};R.prototype.sfixed64=R.prototype.fixed64;R.prototype.float=function(r){return this._push(he.float.writeFloatLE,4,r)};R.prototype.double=function(r){return this._push(he.float.writeDoubleLE,8,r)};var IS=he.Array.prototype.set?function(r,o,c){o.set(r,c)}:function(r,o,c){for(var i=0;i<r.length;++i)o[c+i]=r[i]};R.prototype.bytes=function(r){var o=r.length>>>0;if(!o)return this._push(gc,1,0);if(he.isString(r)){var c=R.alloc(o=Mh.length(r));Mh.decode(r,c,0),r=c}return this.uint32(o)._push(IS,o,r)};R.prototype.string=function(r){var o=Ch.length(r);return o?this.uint32(o)._push(Ch.write,o,r):this._push(gc,1,0)};R.prototype.fork=function(){return this.states=new RS(this),this.head=this.tail=new Qr(Tc,0,0),this.len=0,this};R.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Qr(Tc,0,0),this.len=0),this};R.prototype.ldelim=function(){var r=this.head,o=this.tail,c=this.len;return this.reset().uint32(c),c&&(this.tail.next=r.next,this.tail=o,this.len+=c),this};R.prototype.finish=function(){for(var r=this.head.next,o=this.constructor.alloc(this.len),c=0;r;)r.fn(r.val,o,c),c+=r.len,r=r.next;return o};R._configure=function(u){Ec=u,R.create=Uh(),Ec._configure()}});var kh=d((sN,Vh)=>{"use strict";Vh.exports=Re;var Bh=Oc();(Re.prototype=Object.create(Bh.prototype)).constructor=Re;var ze=Xe();function Re(){Bh.call(this)}Re._configure=function(){Re.alloc=ze._Buffer_allocUnsafe,Re.writeBytesBuffer=ze.Buffer&&ze.Buffer.prototype instanceof Uint8Array&&ze.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 i=0;i<r.length;)o[c++]=r[i++]}};Re.prototype.bytes=function(r){ze.isString(r)&&(r=ze._Buffer_from(r,"base64"));var o=r.length>>>0;return this.uint32(o),o&&this._push(Re.writeBytesBuffer,o,r),this};function LS(u,r,o){u.length<40?ze.utf8.write(u,r,o):r.utf8Write?r.utf8Write(u,o):r.write(u,o)}Re.prototype.string=function(r){var o=ze.Buffer.byteLength(r);return this.uint32(o),o&&this._push(LS,o,r),this};Re._configure()});var Nc=d((aN,Fh)=>{"use strict";Fh.exports=q;var Te=Xe(),Pc,Gh=Te.LongBits,wS=Te.utf8;function ge(u,r){return RangeError("index out of range: "+u.pos+" + "+(r||1)+" > "+u.len)}function q(u){this.buf=u,this.pos=0,this.len=u.length}var qh=typeof Uint8Array<"u"?function(r){if(r instanceof Uint8Array||Array.isArray(r))return new q(r);throw Error("illegal buffer")}:function(r){if(Array.isArray(r))return new q(r);throw Error("illegal buffer")},Hh=function(){return Te.Buffer?function(o){return(q.create=function(i){return Te.Buffer.isBuffer(i)?new Pc(i):qh(i)})(o)}:qh};q.create=Hh();q.prototype._slice=Te.Array.prototype.subarray||Te.Array.prototype.slice;q.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,ge(this,10);return r}}();q.prototype.int32=function(){return this.uint32()|0};q.prototype.sint32=function(){var r=this.uint32();return r>>>1^-(r&1)|0};function Ac(){var u=new Gh(0,0),r=0;if(this.len-this.pos>4){for(;r<4;++r)if(u.lo=(u.lo|(this.buf[this.pos]&127)<<r*7)>>>0,this.buf[this.pos++]<128)return u;if(u.lo=(u.lo|(this.buf[this.pos]&127)<<28)>>>0,u.hi=(u.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return u;r=0}else{for(;r<3;++r){if(this.pos>=this.len)throw ge(this);if(u.lo=(u.lo|(this.buf[this.pos]&127)<<r*7)>>>0,this.buf[this.pos++]<128)return u}return u.lo=(u.lo|(this.buf[this.pos++]&127)<<r*7)>>>0,u}if(this.len-this.pos>4){for(;r<5;++r)if(u.hi=(u.hi|(this.buf[this.pos]&127)<<r*7+3)>>>0,this.buf[this.pos++]<128)return u}else for(;r<5;++r){if(this.pos>=this.len)throw ge(this);if(u.hi=(u.hi|(this.buf[this.pos]&127)<<r*7+3)>>>0,this.buf[this.pos++]<128)return u}throw Error("invalid varint encoding")}q.prototype.bool=function(){return this.uint32()!==0};function Ji(u,r){return(u[r-4]|u[r-3]<<8|u[r-2]<<16|u[r-1]<<24)>>>0}q.prototype.fixed32=function(){if(this.pos+4>this.len)throw ge(this,4);return Ji(this.buf,this.pos+=4)};q.prototype.sfixed32=function(){if(this.pos+4>this.len)throw ge(this,4);return Ji(this.buf,this.pos+=4)|0};function jh(){if(this.pos+8>this.len)throw ge(this,8);return new Gh(Ji(this.buf,this.pos+=4),Ji(this.buf,this.pos+=4))}q.prototype.float=function(){if(this.pos+4>this.len)throw ge(this,4);var r=Te.float.readFloatLE(this.buf,this.pos);return this.pos+=4,r};q.prototype.double=function(){if(this.pos+8>this.len)throw ge(this,4);var r=Te.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,r};q.prototype.bytes=function(){var r=this.uint32(),o=this.pos,c=this.pos+r;if(c>this.len)throw ge(this,r);if(this.pos+=r,Array.isArray(this.buf))return this.buf.slice(o,c);if(o===c){var i=Te.Buffer;return i?i.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,o,c)};q.prototype.string=function(){var r=this.bytes();return wS.read(r,0,r.length)};q.prototype.skip=function(r){if(typeof r=="number"){if(this.pos+r>this.len)throw ge(this,r);this.pos+=r}else do if(this.pos>=this.len)throw ge(this);while(this.buf[this.pos++]&128);return this};q.prototype.skipType=function(u){switch(u){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(u=this.uint32()&7)!==4;)this.skipType(u);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+u+" at offset "+this.pos)}return this};q._configure=function(u){Pc=u,q.create=Hh(),Pc._configure();var r=Te.Long?"toLong":"toNumber";Te.merge(q.prototype,{int64:function(){return Ac.call(this)[r](!1)},uint64:function(){return Ac.call(this)[r](!0)},sint64:function(){return Ac.call(this).zzDecode()[r](!1)},fixed64:function(){return jh.call(this)[r](!0)},sfixed64:function(){return jh.call(this)[r](!1)}})}});var $h=d((cN,zh)=>{"use strict";zh.exports=Et;var Xh=Nc();(Et.prototype=Object.create(Xh.prototype)).constructor=Et;var Kh=Xe();function Et(u){Xh.call(this,u)}Et._configure=function(){Kh.Buffer&&(Et.prototype._slice=Kh.Buffer.prototype.slice)};Et.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))};Et._configure()});var Wh=d((lN,Yh)=>{"use strict";Yh.exports=Zr;var Rc=Xe();(Zr.prototype=Object.create(Rc.EventEmitter.prototype)).constructor=Zr;function Zr(u,r,o){if(typeof u!="function")throw TypeError("rpcImpl must be a function");Rc.EventEmitter.call(this),this.rpcImpl=u,this.requestDelimited=!!r,this.responseDelimited=!!o}Zr.prototype.rpcCall=function u(r,o,c,i,a){if(!i)throw TypeError("request must be specified");var t=this;if(!a)return Rc.asPromise(u,t,r,o,c,i);if(!t.rpcImpl){setTimeout(function(){a(Error("already ended"))},0);return}try{return t.rpcImpl(r,o[t.requestDelimited?"encodeDelimited":"encode"](i).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}};Zr.prototype.end=function(r){return this.rpcImpl&&(r||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var Qh=d(Jh=>{"use strict";var MS=Jh;MS.Service=Wh()});var e_=d((fN,Zh)=>{"use strict";Zh.exports={}});var n_=d(r_=>{"use strict";var ie=r_;ie.build="minimal";ie.Writer=Oc();ie.BufferWriter=kh();ie.Reader=Nc();ie.BufferReader=$h();ie.util=Xe();ie.rpc=Qh();ie.roots=e_();ie.configure=t_;function t_(){ie.util._configure(),ie.Writer._configure(ie.BufferWriter),ie.Reader._configure(ie.BufferReader)}t_()});var i_=d((hN,o_)=>{"use strict";o_.exports=n_()});var s_=d((_N,u_)=>{"use strict";var g=i_(),_=g.Reader,S=g.Writer,f=g.util,p=g.roots.default||(g.roots.default={});p.opentelemetry=function(){var u={};return u.proto=function(){var r={};return r.common=function(){var o={};return o.v1=function(){var c={};return c.AnyValue=function(){function i(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]])}i.prototype.stringValue=null,i.prototype.boolValue=null,i.prototype.intValue=null,i.prototype.doubleValue=null,i.prototype.arrayValue=null,i.prototype.kvlistValue=null,i.prototype.bytesValue=null;var a;return Object.defineProperty(i.prototype,"value",{get:f.oneOfGetter(a=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"]),set:f.oneOfSetter(a)}),i.create=function(e){return new i(e)},i.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},i.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},i.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.common.v1.AnyValue;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.stringValue=e.string();break}case 2:{l.boolValue=e.bool();break}case 3:{l.intValue=e.int64();break}case 4:{l.doubleValue=e.double();break}case 5:{l.arrayValue=p.opentelemetry.proto.common.v1.ArrayValue.decode(e,e.uint32());break}case 6:{l.kvlistValue=p.opentelemetry.proto.common.v1.KeyValueList.decode(e,e.uint32());break}case 7:{l.bytesValue=e.bytes();break}default:e.skipType(h&7);break}}return l},i.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.AnyValue"},i}(),c.ArrayValue=function(){function i(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 i.prototype.values=f.emptyArray,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.ArrayValue;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.values&&s.values.length||(s.values=[]),s.values.push(p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.ArrayValue"},i}(),c.KeyValueList=function(){function i(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 i.prototype.values=f.emptyArray,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.KeyValueList;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.values&&s.values.length||(s.values=[]),s.values.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.KeyValueList"},i}(),c.KeyValue=function(){function i(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 i.prototype.key=null,i.prototype.value=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.KeyValue;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.key=t.string();break}case 2:{s.value=p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32());break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.KeyValue"},i}(),c.InstrumentationScope=function(){function i(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 i.prototype.name=null,i.prototype.version=null,i.prototype.attributes=f.emptyArray,i.prototype.droppedAttributesCount=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.InstrumentationScope;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.name=t.string();break}case 2:{s.version=t.string();break}case 3:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 4:{s.droppedAttributesCount=t.uint32();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.InstrumentationScope"},i}(),c}(),o}(),r.resource=function(){var o={};return o.v1=function(){var c={};return c.Resource=function(){function i(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 i.prototype.attributes=f.emptyArray,i.prototype.droppedAttributesCount=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.resource.v1.Resource;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{s.droppedAttributesCount=t.uint32();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.resource.v1.Resource"},i}(),c}(),o}(),r.trace=function(){var o={};return o.v1=function(){var c={};return c.TracesData=function(){function i(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 i.prototype.resourceSpans=f.emptyArray,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.TracesData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resourceSpans&&s.resourceSpans.length||(s.resourceSpans=[]),s.resourceSpans.push(p.opentelemetry.proto.trace.v1.ResourceSpans.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.TracesData"},i}(),c.ResourceSpans=function(){function i(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 i.prototype.resource=null,i.prototype.scopeSpans=f.emptyArray,i.prototype.schemaUrl=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.ResourceSpans;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{s.scopeSpans&&s.scopeSpans.length||(s.scopeSpans=[]),s.scopeSpans.push(p.opentelemetry.proto.trace.v1.ScopeSpans.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.ResourceSpans"},i}(),c.ScopeSpans=function(){function i(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 i.prototype.scope=null,i.prototype.spans=f.emptyArray,i.prototype.schemaUrl=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.ScopeSpans;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{s.spans&&s.spans.length||(s.spans=[]),s.spans.push(p.opentelemetry.proto.trace.v1.Span.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.ScopeSpans"},i}(),c.Span=function(){function i(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 i.prototype.traceId=null,i.prototype.spanId=null,i.prototype.traceState=null,i.prototype.parentSpanId=null,i.prototype.name=null,i.prototype.kind=null,i.prototype.startTimeUnixNano=null,i.prototype.endTimeUnixNano=null,i.prototype.attributes=f.emptyArray,i.prototype.droppedAttributesCount=null,i.prototype.events=f.emptyArray,i.prototype.droppedEventsCount=null,i.prototype.links=f.emptyArray,i.prototype.droppedLinksCount=null,i.prototype.status=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.Span;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.traceId=t.bytes();break}case 2:{s.spanId=t.bytes();break}case 3:{s.traceState=t.string();break}case 4:{s.parentSpanId=t.bytes();break}case 5:{s.name=t.string();break}case 6:{s.kind=t.int32();break}case 7:{s.startTimeUnixNano=t.fixed64();break}case 8:{s.endTimeUnixNano=t.fixed64();break}case 9:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 10:{s.droppedAttributesCount=t.uint32();break}case 11:{s.events&&s.events.length||(s.events=[]),s.events.push(p.opentelemetry.proto.trace.v1.Span.Event.decode(t,t.uint32()));break}case 12:{s.droppedEventsCount=t.uint32();break}case 13:{s.links&&s.links.length||(s.links=[]),s.links.push(p.opentelemetry.proto.trace.v1.Span.Link.decode(t,t.uint32()));break}case 14:{s.droppedLinksCount=t.uint32();break}case 15:{s.status=p.opentelemetry.proto.trace.v1.Status.decode(t,t.uint32());break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Span"},i.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}(),i.Event=function(){function a(t){if(this.attributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.timeUnixNano=null,a.prototype.name=null,a.prototype.attributes=f.emptyArray,a.prototype.droppedAttributesCount=null,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=S.create()),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(9).fixed64(e.timeUnixNano),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&n.uint32(18).string(e.name),e.attributes!=null&&e.attributes.length)for(var s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],n.uint32(26).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&n.uint32(32).uint32(e.droppedAttributesCount),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.trace.v1.Span.Event;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.timeUnixNano=e.fixed64();break}case 2:{l.name=e.string();break}case 3:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 4:{l.droppedAttributesCount=e.uint32();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!f.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&f.isInteger(e.timeUnixNano.low)&&f.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.name!=null&&e.hasOwnProperty("name")&&!f.isString(e.name))return"name: string expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var n=0;n<e.attributes.length;++n){var s=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[n]);if(s)return"attributes."+s}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.trace.v1.Span.Event)return e;var n=new p.opentelemetry.proto.trace.v1.Span.Event;if(e.timeUnixNano!=null&&(f.Long?(n.timeUnixNano=f.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.name!=null&&(n.name=String(e.name)),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");n.attributes=[];for(var s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}return e.droppedAttributesCount!=null&&(n.droppedAttributesCount=e.droppedAttributesCount>>>0),n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.attributes=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.timeUnixNano=n.longs===String?"0":0;s.name="",s.droppedAttributesCount=0}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?s.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:s.timeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.name!=null&&e.hasOwnProperty("name")&&(s.name=e.name),e.attributes&&e.attributes.length){s.attributes=[];for(var h=0;h<e.attributes.length;++h)s.attributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[h],n)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(s.droppedAttributesCount=e.droppedAttributesCount),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span.Event"},a}(),i.Link=function(){function a(t){if(this.attributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.traceId=null,a.prototype.spanId=null,a.prototype.traceState=null,a.prototype.attributes=f.emptyArray,a.prototype.droppedAttributesCount=null,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=S.create()),e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId")&&n.uint32(10).bytes(e.traceId),e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId")&&n.uint32(18).bytes(e.spanId),e.traceState!=null&&Object.hasOwnProperty.call(e,"traceState")&&n.uint32(26).string(e.traceState),e.attributes!=null&&e.attributes.length)for(var s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],n.uint32(34).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&n.uint32(40).uint32(e.droppedAttributesCount),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.trace.v1.Span.Link;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.traceId=e.bytes();break}case 2:{l.spanId=e.bytes();break}case 3:{l.traceState=e.string();break}case 4:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 5:{l.droppedAttributesCount=e.uint32();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.traceId!=null&&e.hasOwnProperty("traceId")&&!(e.traceId&&typeof e.traceId.length=="number"||f.isString(e.traceId)))return"traceId: buffer expected";if(e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||f.isString(e.spanId)))return"spanId: buffer expected";if(e.traceState!=null&&e.hasOwnProperty("traceState")&&!f.isString(e.traceState))return"traceState: string expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var n=0;n<e.attributes.length;++n){var s=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[n]);if(s)return"attributes."+s}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.trace.v1.Span.Link)return e;var n=new p.opentelemetry.proto.trace.v1.Span.Link;if(e.traceId!=null&&(typeof e.traceId=="string"?f.base64.decode(e.traceId,n.traceId=f.newBuffer(f.base64.length(e.traceId)),0):e.traceId.length>=0&&(n.traceId=e.traceId)),e.spanId!=null&&(typeof e.spanId=="string"?f.base64.decode(e.spanId,n.spanId=f.newBuffer(f.base64.length(e.spanId)),0):e.spanId.length>=0&&(n.spanId=e.spanId)),e.traceState!=null&&(n.traceState=String(e.traceState)),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");n.attributes=[];for(var s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}return e.droppedAttributesCount!=null&&(n.droppedAttributesCount=e.droppedAttributesCount>>>0),n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.attributes=[]),n.defaults&&(n.bytes===String?s.traceId="":(s.traceId=[],n.bytes!==Array&&(s.traceId=f.newBuffer(s.traceId))),n.bytes===String?s.spanId="":(s.spanId=[],n.bytes!==Array&&(s.spanId=f.newBuffer(s.spanId))),s.traceState="",s.droppedAttributesCount=0),e.traceId!=null&&e.hasOwnProperty("traceId")&&(s.traceId=n.bytes===String?f.base64.encode(e.traceId,0,e.traceId.length):n.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),e.spanId!=null&&e.hasOwnProperty("spanId")&&(s.spanId=n.bytes===String?f.base64.encode(e.spanId,0,e.spanId.length):n.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),e.traceState!=null&&e.hasOwnProperty("traceState")&&(s.traceState=e.traceState),e.attributes&&e.attributes.length){s.attributes=[];for(var l=0;l<e.attributes.length;++l)s.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[l],n)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(s.droppedAttributesCount=e.droppedAttributesCount),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span.Link"},a}(),i}(),c.Status=function(){function i(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 i.prototype.message=null,i.prototype.code=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.Status;t.pos<n;){var l=t.uint32();switch(l>>>3){case 2:{s.message=t.string();break}case 3:{s.code=t.int32();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Status"},i.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}(),i}(),c}(),o}(),r.collector=function(){var o={};return o.trace=function(){var c={};return c.v1=function(){var i={};return i.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}(),i.ExportTraceServiceRequest=function(){function a(t){if(this.resourceSpans=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.resourceSpans=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=S.create()),e.resourceSpans!=null&&e.resourceSpans.length)for(var s=0;s<e.resourceSpans.length;++s)p.opentelemetry.proto.trace.v1.ResourceSpans.encode(e.resourceSpans[s],n.uint32(10).fork()).ldelim();return n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.resourceSpans&&l.resourceSpans.length||(l.resourceSpans=[]),l.resourceSpans.push(p.opentelemetry.proto.trace.v1.ResourceSpans.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceSpans!=null&&e.hasOwnProperty("resourceSpans")){if(!Array.isArray(e.resourceSpans))return"resourceSpans: array expected";for(var n=0;n<e.resourceSpans.length;++n){var s=p.opentelemetry.proto.trace.v1.ResourceSpans.verify(e.resourceSpans[n]);if(s)return"resourceSpans."+s}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;if(e.resourceSpans){if(!Array.isArray(e.resourceSpans))throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected");n.resourceSpans=[];for(var s=0;s<e.resourceSpans.length;++s){if(typeof e.resourceSpans[s]!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected");n.resourceSpans[s]=p.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(e.resourceSpans[s])}}return n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.resourceSpans=[]),e.resourceSpans&&e.resourceSpans.length){s.resourceSpans=[];for(var l=0;l<e.resourceSpans.length;++l)s.resourceSpans[l]=p.opentelemetry.proto.trace.v1.ResourceSpans.toObject(e.resourceSpans[l],n)}return s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"},a}(),i.ExportTraceServiceResponse=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.partialSuccess=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=S.create()),e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess")&&p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(e.partialSuccess,n.uint32(10).fork()).ldelim(),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(e,e.uint32());break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(e.partialSuccess)}return n},a.toObject=function(e,n){n||(n={});var s={};return n.defaults&&(s.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(s.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(e.partialSuccess,n)),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},a}(),i.ExportTracePartialSuccess=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.rejectedSpans=null,a.prototype.errorMessage=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=S.create()),e.rejectedSpans!=null&&Object.hasOwnProperty.call(e,"rejectedSpans")&&n.uint32(8).int64(e.rejectedSpans),e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage")&&n.uint32(18).string(e.errorMessage),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.rejectedSpans=e.int64();break}case 2:{l.errorMessage=e.string();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedSpans!=null&&e.hasOwnProperty("rejectedSpans")&&!f.isInteger(e.rejectedSpans)&&!(e.rejectedSpans&&f.isInteger(e.rejectedSpans.low)&&f.isInteger(e.rejectedSpans.high))?"rejectedSpans: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!f.isString(e.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;return e.rejectedSpans!=null&&(f.Long?(n.rejectedSpans=f.Long.fromValue(e.rejectedSpans)).unsigned=!1:typeof e.rejectedSpans=="string"?n.rejectedSpans=parseInt(e.rejectedSpans,10):typeof e.rejectedSpans=="number"?n.rejectedSpans=e.rejectedSpans:typeof e.rejectedSpans=="object"&&(n.rejectedSpans=new f.LongBits(e.rejectedSpans.low>>>0,e.rejectedSpans.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},a.toObject=function(e,n){n||(n={});var s={};if(n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.rejectedSpans=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.rejectedSpans=n.longs===String?"0":0;s.errorMessage=""}return e.rejectedSpans!=null&&e.hasOwnProperty("rejectedSpans")&&(typeof e.rejectedSpans=="number"?s.rejectedSpans=n.longs===String?String(e.rejectedSpans):e.rejectedSpans:s.rejectedSpans=n.longs===String?f.Long.prototype.toString.call(e.rejectedSpans):n.longs===Number?new f.LongBits(e.rejectedSpans.low>>>0,e.rejectedSpans.high>>>0).toNumber():e.rejectedSpans),e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&(s.errorMessage=e.errorMessage),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},a}(),i}(),c}(),o.metrics=function(){var c={};return c.v1=function(){var i={};return i.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}(),i.ExportMetricsServiceRequest=function(){function a(t){if(this.resourceMetrics=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.resourceMetrics=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=S.create()),e.resourceMetrics!=null&&e.resourceMetrics.length)for(var s=0;s<e.resourceMetrics.length;++s)p.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(e.resourceMetrics[s],n.uint32(10).fork()).ldelim();return n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.resourceMetrics&&l.resourceMetrics.length||(l.resourceMetrics=[]),l.resourceMetrics.push(p.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceMetrics!=null&&e.hasOwnProperty("resourceMetrics")){if(!Array.isArray(e.resourceMetrics))return"resourceMetrics: array expected";for(var n=0;n<e.resourceMetrics.length;++n){var s=p.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(e.resourceMetrics[n]);if(s)return"resourceMetrics."+s}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;if(e.resourceMetrics){if(!Array.isArray(e.resourceMetrics))throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected");n.resourceMetrics=[];for(var s=0;s<e.resourceMetrics.length;++s){if(typeof e.resourceMetrics[s]!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected");n.resourceMetrics[s]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(e.resourceMetrics[s])}}return n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.resourceMetrics=[]),e.resourceMetrics&&e.resourceMetrics.length){s.resourceMetrics=[];for(var l=0;l<e.resourceMetrics.length;++l)s.resourceMetrics[l]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(e.resourceMetrics[l],n)}return s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"},a}(),i.ExportMetricsServiceResponse=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.partialSuccess=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=S.create()),e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess")&&p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(e.partialSuccess,n.uint32(10).fork()).ldelim(),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(e,e.uint32());break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(e.partialSuccess)}return n},a.toObject=function(e,n){n||(n={});var s={};return n.defaults&&(s.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(s.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(e.partialSuccess,n)),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},a}(),i.ExportMetricsPartialSuccess=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.rejectedDataPoints=null,a.prototype.errorMessage=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=S.create()),e.rejectedDataPoints!=null&&Object.hasOwnProperty.call(e,"rejectedDataPoints")&&n.uint32(8).int64(e.rejectedDataPoints),e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage")&&n.uint32(18).string(e.errorMessage),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.rejectedDataPoints=e.int64();break}case 2:{l.errorMessage=e.string();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedDataPoints!=null&&e.hasOwnProperty("rejectedDataPoints")&&!f.isInteger(e.rejectedDataPoints)&&!(e.rejectedDataPoints&&f.isInteger(e.rejectedDataPoints.low)&&f.isInteger(e.rejectedDataPoints.high))?"rejectedDataPoints: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!f.isString(e.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;return e.rejectedDataPoints!=null&&(f.Long?(n.rejectedDataPoints=f.Long.fromValue(e.rejectedDataPoints)).unsigned=!1:typeof e.rejectedDataPoints=="string"?n.rejectedDataPoints=parseInt(e.rejectedDataPoints,10):typeof e.rejectedDataPoints=="number"?n.rejectedDataPoints=e.rejectedDataPoints:typeof e.rejectedDataPoints=="object"&&(n.rejectedDataPoints=new f.LongBits(e.rejectedDataPoints.low>>>0,e.rejectedDataPoints.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},a.toObject=function(e,n){n||(n={});var s={};if(n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.rejectedDataPoints=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.rejectedDataPoints=n.longs===String?"0":0;s.errorMessage=""}return e.rejectedDataPoints!=null&&e.hasOwnProperty("rejectedDataPoints")&&(typeof e.rejectedDataPoints=="number"?s.rejectedDataPoints=n.longs===String?String(e.rejectedDataPoints):e.rejectedDataPoints:s.rejectedDataPoints=n.longs===String?f.Long.prototype.toString.call(e.rejectedDataPoints):n.longs===Number?new f.LongBits(e.rejectedDataPoints.low>>>0,e.rejectedDataPoints.high>>>0).toNumber():e.rejectedDataPoints),e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&(s.errorMessage=e.errorMessage),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},a}(),i}(),c}(),o.logs=function(){var c={};return c.v1=function(){var i={};return i.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}(),i.ExportLogsServiceRequest=function(){function a(t){if(this.resourceLogs=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.resourceLogs=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=S.create()),e.resourceLogs!=null&&e.resourceLogs.length)for(var s=0;s<e.resourceLogs.length;++s)p.opentelemetry.proto.logs.v1.ResourceLogs.encode(e.resourceLogs[s],n.uint32(10).fork()).ldelim();return n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.resourceLogs&&l.resourceLogs.length||(l.resourceLogs=[]),l.resourceLogs.push(p.opentelemetry.proto.logs.v1.ResourceLogs.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceLogs!=null&&e.hasOwnProperty("resourceLogs")){if(!Array.isArray(e.resourceLogs))return"resourceLogs: array expected";for(var n=0;n<e.resourceLogs.length;++n){var s=p.opentelemetry.proto.logs.v1.ResourceLogs.verify(e.resourceLogs[n]);if(s)return"resourceLogs."+s}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;if(e.resourceLogs){if(!Array.isArray(e.resourceLogs))throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected");n.resourceLogs=[];for(var s=0;s<e.resourceLogs.length;++s){if(typeof e.resourceLogs[s]!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected");n.resourceLogs[s]=p.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(e.resourceLogs[s])}}return n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.resourceLogs=[]),e.resourceLogs&&e.resourceLogs.length){s.resourceLogs=[];for(var l=0;l<e.resourceLogs.length;++l)s.resourceLogs[l]=p.opentelemetry.proto.logs.v1.ResourceLogs.toObject(e.resourceLogs[l],n)}return s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"},a}(),i.ExportLogsServiceResponse=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.partialSuccess=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=S.create()),e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess")&&p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(e.partialSuccess,n.uint32(10).fork()).ldelim(),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(e,e.uint32());break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(e.partialSuccess)}return n},a.toObject=function(e,n){n||(n={});var s={};return n.defaults&&(s.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(s.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(e.partialSuccess,n)),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},a}(),i.ExportLogsPartialSuccess=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.rejectedLogRecords=null,a.prototype.errorMessage=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=S.create()),e.rejectedLogRecords!=null&&Object.hasOwnProperty.call(e,"rejectedLogRecords")&&n.uint32(8).int64(e.rejectedLogRecords),e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage")&&n.uint32(18).string(e.errorMessage),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.rejectedLogRecords=e.int64();break}case 2:{l.errorMessage=e.string();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedLogRecords!=null&&e.hasOwnProperty("rejectedLogRecords")&&!f.isInteger(e.rejectedLogRecords)&&!(e.rejectedLogRecords&&f.isInteger(e.rejectedLogRecords.low)&&f.isInteger(e.rejectedLogRecords.high))?"rejectedLogRecords: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!f.isString(e.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;return e.rejectedLogRecords!=null&&(f.Long?(n.rejectedLogRecords=f.Long.fromValue(e.rejectedLogRecords)).unsigned=!1:typeof e.rejectedLogRecords=="string"?n.rejectedLogRecords=parseInt(e.rejectedLogRecords,10):typeof e.rejectedLogRecords=="number"?n.rejectedLogRecords=e.rejectedLogRecords:typeof e.rejectedLogRecords=="object"&&(n.rejectedLogRecords=new f.LongBits(e.rejectedLogRecords.low>>>0,e.rejectedLogRecords.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},a.toObject=function(e,n){n||(n={});var s={};if(n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.rejectedLogRecords=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.rejectedLogRecords=n.longs===String?"0":0;s.errorMessage=""}return e.rejectedLogRecords!=null&&e.hasOwnProperty("rejectedLogRecords")&&(typeof e.rejectedLogRecords=="number"?s.rejectedLogRecords=n.longs===String?String(e.rejectedLogRecords):e.rejectedLogRecords:s.rejectedLogRecords=n.longs===String?f.Long.prototype.toString.call(e.rejectedLogRecords):n.longs===Number?new f.LongBits(e.rejectedLogRecords.low>>>0,e.rejectedLogRecords.high>>>0).toNumber():e.rejectedLogRecords),e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&(s.errorMessage=e.errorMessage),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},a}(),i}(),c}(),o}(),r.metrics=function(){var o={};return o.v1=function(){var c={};return c.MetricsData=function(){function i(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 i.prototype.resourceMetrics=f.emptyArray,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.MetricsData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resourceMetrics&&s.resourceMetrics.length||(s.resourceMetrics=[]),s.resourceMetrics.push(p.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.MetricsData"},i}(),c.ResourceMetrics=function(){function i(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 i.prototype.resource=null,i.prototype.scopeMetrics=f.emptyArray,i.prototype.schemaUrl=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.ResourceMetrics;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{s.scopeMetrics&&s.scopeMetrics.length||(s.scopeMetrics=[]),s.scopeMetrics.push(p.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ResourceMetrics"},i}(),c.ScopeMetrics=function(){function i(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 i.prototype.scope=null,i.prototype.metrics=f.emptyArray,i.prototype.schemaUrl=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.ScopeMetrics;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{s.metrics&&s.metrics.length||(s.metrics=[]),s.metrics.push(p.opentelemetry.proto.metrics.v1.Metric.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ScopeMetrics"},i}(),c.Metric=function(){function i(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]])}i.prototype.name=null,i.prototype.description=null,i.prototype.unit=null,i.prototype.gauge=null,i.prototype.sum=null,i.prototype.histogram=null,i.prototype.exponentialHistogram=null,i.prototype.summary=null;var a;return Object.defineProperty(i.prototype,"data",{get:f.oneOfGetter(a=["gauge","sum","histogram","exponentialHistogram","summary"]),set:f.oneOfSetter(a)}),i.create=function(e){return new i(e)},i.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},i.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},i.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.Metric;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.name=e.string();break}case 2:{l.description=e.string();break}case 3:{l.unit=e.string();break}case 5:{l.gauge=p.opentelemetry.proto.metrics.v1.Gauge.decode(e,e.uint32());break}case 7:{l.sum=p.opentelemetry.proto.metrics.v1.Sum.decode(e,e.uint32());break}case 9:{l.histogram=p.opentelemetry.proto.metrics.v1.Histogram.decode(e,e.uint32());break}case 10:{l.exponentialHistogram=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(e,e.uint32());break}case 11:{l.summary=p.opentelemetry.proto.metrics.v1.Summary.decode(e,e.uint32());break}default:e.skipType(h&7);break}}return l},i.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Metric"},i}(),c.Gauge=function(){function i(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 i.prototype.dataPoints=f.emptyArray,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Gauge;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Gauge"},i}(),c.Sum=function(){function i(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 i.prototype.dataPoints=f.emptyArray,i.prototype.aggregationTemporality=null,i.prototype.isMonotonic=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Sum;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(t,t.uint32()));break}case 2:{s.aggregationTemporality=t.int32();break}case 3:{s.isMonotonic=t.bool();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Sum"},i}(),c.Histogram=function(){function i(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 i.prototype.dataPoints=f.emptyArray,i.prototype.aggregationTemporality=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Histogram;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(t,t.uint32()));break}case 2:{s.aggregationTemporality=t.int32();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Histogram"},i}(),c.ExponentialHistogram=function(){function i(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 i.prototype.dataPoints=f.emptyArray,i.prototype.aggregationTemporality=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.ExponentialHistogram;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(t,t.uint32()));break}case 2:{s.aggregationTemporality=t.int32();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ExponentialHistogram"},i}(),c.Summary=function(){function i(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 i.prototype.dataPoints=f.emptyArray,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Summary;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Summary"},i}(),c.AggregationTemporality=function(){var i={},a=Object.create(i);return a[i[0]="AGGREGATION_TEMPORALITY_UNSPECIFIED"]=0,a[i[1]="AGGREGATION_TEMPORALITY_DELTA"]=1,a[i[2]="AGGREGATION_TEMPORALITY_CUMULATIVE"]=2,a}(),c.DataPointFlags=function(){var i={},a=Object.create(i);return a[i[0]="DATA_POINT_FLAGS_DO_NOT_USE"]=0,a[i[1]="DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"]=1,a}(),c.NumberDataPoint=function(){function i(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]])}i.prototype.attributes=f.emptyArray,i.prototype.startTimeUnixNano=null,i.prototype.timeUnixNano=null,i.prototype.asDouble=null,i.prototype.asInt=null,i.prototype.exemplars=f.emptyArray,i.prototype.flags=null;var a;return Object.defineProperty(i.prototype,"value",{get:f.oneOfGetter(a=["asDouble","asInt"]),set:f.oneOfSetter(a)}),i.create=function(e){return new i(e)},i.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},i.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},i.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.NumberDataPoint;e.pos<s;){var h=e.uint32();switch(h>>>3){case 7:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.startTimeUnixNano=e.fixed64();break}case 3:{l.timeUnixNano=e.fixed64();break}case 4:{l.asDouble=e.double();break}case 6:{l.asInt=e.sfixed64();break}case 5:{l.exemplars&&l.exemplars.length||(l.exemplars=[]),l.exemplars.push(p.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 8:{l.flags=e.uint32();break}default:e.skipType(h&7);break}}return l},i.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.NumberDataPoint"},i}(),c.HistogramDataPoint=function(){function i(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]])}i.prototype.attributes=f.emptyArray,i.prototype.startTimeUnixNano=null,i.prototype.timeUnixNano=null,i.prototype.count=null,i.prototype.sum=null,i.prototype.bucketCounts=f.emptyArray,i.prototype.explicitBounds=f.emptyArray,i.prototype.exemplars=f.emptyArray,i.prototype.flags=null,i.prototype.min=null,i.prototype.max=null;var a;return Object.defineProperty(i.prototype,"_sum",{get:f.oneOfGetter(a=["sum"]),set:f.oneOfSetter(a)}),Object.defineProperty(i.prototype,"_min",{get:f.oneOfGetter(a=["min"]),set:f.oneOfSetter(a)}),Object.defineProperty(i.prototype,"_max",{get:f.oneOfGetter(a=["max"]),set:f.oneOfSetter(a)}),i.create=function(e){return new i(e)},i.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},i.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},i.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.HistogramDataPoint;e.pos<s;){var h=e.uint32();switch(h>>>3){case 9:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.startTimeUnixNano=e.fixed64();break}case 3:{l.timeUnixNano=e.fixed64();break}case 4:{l.count=e.fixed64();break}case 5:{l.sum=e.double();break}case 6:{if(l.bucketCounts&&l.bucketCounts.length||(l.bucketCounts=[]),(h&7)===2)for(var v=e.uint32()+e.pos;e.pos<v;)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 v=e.uint32()+e.pos;e.pos<v;)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},i.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.HistogramDataPoint"},i}(),c.ExponentialHistogramDataPoint=function(){function i(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]])}i.prototype.attributes=f.emptyArray,i.prototype.startTimeUnixNano=null,i.prototype.timeUnixNano=null,i.prototype.count=null,i.prototype.sum=null,i.prototype.scale=null,i.prototype.zeroCount=null,i.prototype.positive=null,i.prototype.negative=null,i.prototype.flags=null,i.prototype.exemplars=f.emptyArray,i.prototype.min=null,i.prototype.max=null,i.prototype.zeroThreshold=null;var a;return Object.defineProperty(i.prototype,"_sum",{get:f.oneOfGetter(a=["sum"]),set:f.oneOfSetter(a)}),Object.defineProperty(i.prototype,"_min",{get:f.oneOfGetter(a=["min"]),set:f.oneOfSetter(a)}),Object.defineProperty(i.prototype,"_max",{get:f.oneOfGetter(a=["max"]),set:f.oneOfSetter(a)}),i.create=function(e){return new i(e)},i.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},i.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},i.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.startTimeUnixNano=e.fixed64();break}case 3:{l.timeUnixNano=e.fixed64();break}case 4:{l.count=e.fixed64();break}case 5:{l.sum=e.double();break}case 6:{l.scale=e.sint32();break}case 7:{l.zeroCount=e.fixed64();break}case 8:{l.positive=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(e,e.uint32());break}case 9:{l.negative=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(e,e.uint32());break}case 10:{l.flags=e.uint32();break}case 11:{l.exemplars&&l.exemplars.length||(l.exemplars=[]),l.exemplars.push(p.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 12:{l.min=e.double();break}case 13:{l.max=e.double();break}case 14:{l.zeroThreshold=e.double();break}default:e.skipType(h&7);break}}return l},i.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"},i.Buckets=function(){function t(e){if(this.bucketCounts=[],e)for(var n=Object.keys(e),s=0;s<n.length;++s)e[n[s]]!=null&&(this[n[s]]=e[n[s]])}return t.prototype.offset=null,t.prototype.bucketCounts=f.emptyArray,t.create=function(n){return new t(n)},t.encode=function(n,s){if(s||(s=S.create()),n.offset!=null&&Object.hasOwnProperty.call(n,"offset")&&s.uint32(8).sint32(n.offset),n.bucketCounts!=null&&n.bucketCounts.length){s.uint32(18).fork();for(var l=0;l<n.bucketCounts.length;++l)s.uint64(n.bucketCounts[l]);s.ldelim()}return s},t.encodeDelimited=function(n,s){return this.encode(n,s).ldelim()},t.decode=function(n,s){n instanceof _||(n=_.create(n));for(var l=s===void 0?n.len:n.pos+s,h=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;n.pos<l;){var v=n.uint32();switch(v>>>3){case 1:{h.offset=n.sint32();break}case 2:{if(h.bucketCounts&&h.bucketCounts.length||(h.bucketCounts=[]),(v&7)===2)for(var b=n.uint32()+n.pos;n.pos<b;)h.bucketCounts.push(n.uint64());else h.bucketCounts.push(n.uint64());break}default:n.skipType(v&7);break}}return h},t.decodeDelimited=function(n){return n instanceof _||(n=new _(n)),this.decode(n,n.uint32())},t.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.offset!=null&&n.hasOwnProperty("offset")&&!f.isInteger(n.offset))return"offset: integer expected";if(n.bucketCounts!=null&&n.hasOwnProperty("bucketCounts")){if(!Array.isArray(n.bucketCounts))return"bucketCounts: array expected";for(var s=0;s<n.bucketCounts.length;++s)if(!f.isInteger(n.bucketCounts[s])&&!(n.bucketCounts[s]&&f.isInteger(n.bucketCounts[s].low)&&f.isInteger(n.bucketCounts[s].high)))return"bucketCounts: integer|Long[] expected"}return null},t.fromObject=function(n){if(n instanceof p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets)return n;var s=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;if(n.offset!=null&&(s.offset=n.offset|0),n.bucketCounts){if(!Array.isArray(n.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected");s.bucketCounts=[];for(var l=0;l<n.bucketCounts.length;++l)f.Long?(s.bucketCounts[l]=f.Long.fromValue(n.bucketCounts[l])).unsigned=!0:typeof n.bucketCounts[l]=="string"?s.bucketCounts[l]=parseInt(n.bucketCounts[l],10):typeof n.bucketCounts[l]=="number"?s.bucketCounts[l]=n.bucketCounts[l]:typeof n.bucketCounts[l]=="object"&&(s.bucketCounts[l]=new f.LongBits(n.bucketCounts[l].low>>>0,n.bucketCounts[l].high>>>0).toNumber(!0))}return s},t.toObject=function(n,s){s||(s={});var l={};if((s.arrays||s.defaults)&&(l.bucketCounts=[]),s.defaults&&(l.offset=0),n.offset!=null&&n.hasOwnProperty("offset")&&(l.offset=n.offset),n.bucketCounts&&n.bucketCounts.length){l.bucketCounts=[];for(var h=0;h<n.bucketCounts.length;++h)typeof n.bucketCounts[h]=="number"?l.bucketCounts[h]=s.longs===String?String(n.bucketCounts[h]):n.bucketCounts[h]:l.bucketCounts[h]=s.longs===String?f.Long.prototype.toString.call(n.bucketCounts[h]):s.longs===Number?new f.LongBits(n.bucketCounts[h].low>>>0,n.bucketCounts[h].high>>>0).toNumber(!0):n.bucketCounts[h]}return l},t.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},t.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},t}(),i}(),c.SummaryDataPoint=function(){function i(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 i.prototype.attributes=f.emptyArray,i.prototype.startTimeUnixNano=null,i.prototype.timeUnixNano=null,i.prototype.count=null,i.prototype.sum=null,i.prototype.quantileValues=f.emptyArray,i.prototype.flags=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint;t.pos<n;){var l=t.uint32();switch(l>>>3){case 7:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{s.startTimeUnixNano=t.fixed64();break}case 3:{s.timeUnixNano=t.fixed64();break}case 4:{s.count=t.fixed64();break}case 5:{s.sum=t.double();break}case 6:{s.quantileValues&&s.quantileValues.length||(s.quantileValues=[]),s.quantileValues.push(p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(t,t.uint32()));break}case 8:{s.flags=t.uint32();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.SummaryDataPoint"},i.ValueAtQuantile=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.quantile=null,a.prototype.value=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=S.create()),e.quantile!=null&&Object.hasOwnProperty.call(e,"quantile")&&n.uint32(9).double(e.quantile),e.value!=null&&Object.hasOwnProperty.call(e,"value")&&n.uint32(17).double(e.value),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.quantile=e.double();break}case 2:{l.value=e.double();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.quantile!=null&&e.hasOwnProperty("quantile")&&typeof e.quantile!="number"?"quantile: number expected":e.value!=null&&e.hasOwnProperty("value")&&typeof e.value!="number"?"value: number expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return e;var n=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;return e.quantile!=null&&(n.quantile=Number(e.quantile)),e.value!=null&&(n.value=Number(e.value)),n},a.toObject=function(e,n){n||(n={});var s={};return n.defaults&&(s.quantile=0,s.value=0),e.quantile!=null&&e.hasOwnProperty("quantile")&&(s.quantile=n.json&&!isFinite(e.quantile)?String(e.quantile):e.quantile),e.value!=null&&e.hasOwnProperty("value")&&(s.value=n.json&&!isFinite(e.value)?String(e.value):e.value),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},a}(),i}(),c.Exemplar=function(){function i(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]])}i.prototype.filteredAttributes=f.emptyArray,i.prototype.timeUnixNano=null,i.prototype.asDouble=null,i.prototype.asInt=null,i.prototype.spanId=null,i.prototype.traceId=null;var a;return Object.defineProperty(i.prototype,"value",{get:f.oneOfGetter(a=["asDouble","asInt"]),set:f.oneOfSetter(a)}),i.create=function(e){return new i(e)},i.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},i.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},i.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.Exemplar;e.pos<s;){var h=e.uint32();switch(h>>>3){case 7:{l.filteredAttributes&&l.filteredAttributes.length||(l.filteredAttributes=[]),l.filteredAttributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.timeUnixNano=e.fixed64();break}case 3:{l.asDouble=e.double();break}case 6:{l.asInt=e.sfixed64();break}case 4:{l.spanId=e.bytes();break}case 5:{l.traceId=e.bytes();break}default:e.skipType(h&7);break}}return l},i.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Exemplar"},i}(),c}(),o}(),r.logs=function(){var o={};return o.v1=function(){var c={};return c.LogsData=function(){function i(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 i.prototype.resourceLogs=f.emptyArray,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.LogsData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resourceLogs&&s.resourceLogs.length||(s.resourceLogs=[]),s.resourceLogs.push(p.opentelemetry.proto.logs.v1.ResourceLogs.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.LogsData"},i}(),c.ResourceLogs=function(){function i(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 i.prototype.resource=null,i.prototype.scopeLogs=f.emptyArray,i.prototype.schemaUrl=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.ResourceLogs;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{s.scopeLogs&&s.scopeLogs.length||(s.scopeLogs=[]),s.scopeLogs.push(p.opentelemetry.proto.logs.v1.ScopeLogs.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.ResourceLogs"},i}(),c.ScopeLogs=function(){function i(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 i.prototype.scope=null,i.prototype.logRecords=f.emptyArray,i.prototype.schemaUrl=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.ScopeLogs;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{s.logRecords&&s.logRecords.length||(s.logRecords=[]),s.logRecords.push(p.opentelemetry.proto.logs.v1.LogRecord.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.ScopeLogs"},i}(),c.SeverityNumber=function(){var i={},a=Object.create(i);return a[i[0]="SEVERITY_NUMBER_UNSPECIFIED"]=0,a[i[1]="SEVERITY_NUMBER_TRACE"]=1,a[i[2]="SEVERITY_NUMBER_TRACE2"]=2,a[i[3]="SEVERITY_NUMBER_TRACE3"]=3,a[i[4]="SEVERITY_NUMBER_TRACE4"]=4,a[i[5]="SEVERITY_NUMBER_DEBUG"]=5,a[i[6]="SEVERITY_NUMBER_DEBUG2"]=6,a[i[7]="SEVERITY_NUMBER_DEBUG3"]=7,a[i[8]="SEVERITY_NUMBER_DEBUG4"]=8,a[i[9]="SEVERITY_NUMBER_INFO"]=9,a[i[10]="SEVERITY_NUMBER_INFO2"]=10,a[i[11]="SEVERITY_NUMBER_INFO3"]=11,a[i[12]="SEVERITY_NUMBER_INFO4"]=12,a[i[13]="SEVERITY_NUMBER_WARN"]=13,a[i[14]="SEVERITY_NUMBER_WARN2"]=14,a[i[15]="SEVERITY_NUMBER_WARN3"]=15,a[i[16]="SEVERITY_NUMBER_WARN4"]=16,a[i[17]="SEVERITY_NUMBER_ERROR"]=17,a[i[18]="SEVERITY_NUMBER_ERROR2"]=18,a[i[19]="SEVERITY_NUMBER_ERROR3"]=19,a[i[20]="SEVERITY_NUMBER_ERROR4"]=20,a[i[21]="SEVERITY_NUMBER_FATAL"]=21,a[i[22]="SEVERITY_NUMBER_FATAL2"]=22,a[i[23]="SEVERITY_NUMBER_FATAL3"]=23,a[i[24]="SEVERITY_NUMBER_FATAL4"]=24,a}(),c.LogRecordFlags=function(){var i={},a=Object.create(i);return a[i[0]="LOG_RECORD_FLAGS_DO_NOT_USE"]=0,a[i[255]="LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"]=255,a}(),c.LogRecord=function(){function i(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 i.prototype.timeUnixNano=null,i.prototype.observedTimeUnixNano=null,i.prototype.severityNumber=null,i.prototype.severityText=null,i.prototype.body=null,i.prototype.attributes=f.emptyArray,i.prototype.droppedAttributesCount=null,i.prototype.flags=null,i.prototype.traceId=null,i.prototype.spanId=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.LogRecord;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.timeUnixNano=t.fixed64();break}case 11:{s.observedTimeUnixNano=t.fixed64();break}case 2:{s.severityNumber=t.int32();break}case 3:{s.severityText=t.string();break}case 5:{s.body=p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32());break}case 6:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 7:{s.droppedAttributesCount=t.uint32();break}case 8:{s.flags=t.fixed32();break}case 9:{s.traceId=t.bytes();break}case 10:{s.spanId=t.bytes();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,g.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.LogRecord"},i}(),c}(),o}(),r}(),u}();u_.exports=p});var Qi=d(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.ServiceClientType=void 0;var CS;(function(u){u[u.SPANS=0]="SPANS",u[u.METRICS=1]="METRICS",u[u.LOGS=2]="LOGS"})(CS=en.ServiceClientType||(en.ServiceClientType={}))});var tn=d(Zi=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.getExportRequestProto=void 0;var xc=s_(),a_=Qi();function US(u){return u===a_.ServiceClientType.SPANS?xc.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest:u===a_.ServiceClientType.LOGS?xc.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest:xc.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest}Zi.getExportRequestProto=US});var Ic=d(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});eu.send=void 0;var c_=zi(),DS=tn();function BS(u,r,o,c,i){let a=u.convert(r),t=(0,DS.getExportRequestProto)(u.getServiceClientType()),e=t.create(a);if(e){let n=t.encode(e).finish();n&&(0,c_.sendWithHttp)(u,Buffer.from(n),"application/x-protobuf",c,i)}else i(new c_.OTLPExporterError("No proto"))}eu.send=BS});var l_=d(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});tu.OTLPProtoExporterNodeBase=void 0;var VS=(y(),E(m)),kS=zi(),Lc=class extends kS.OTLPExporterNodeBase{constructor(r={}){super(r)}_sendPromise(r,o,c){let i=new Promise((t,e)=>{this._send(this,r,this.compression,t,e)}).then(o,c);this._sendingPromises.push(i);let a=()=>{let t=this._sendingPromises.indexOf(i);this._sendingPromises.splice(t,1)};i.then(a,a)}send(r,o,c){if(this._shutdownOnce.isCalled){VS.diag.debug("Shutdown already started. Cannot send objects");return}this._send?this._sendPromise(r,o,c):setImmediate(()=>{let{send:i}=Ic();this._send=i,this._sendPromise(r,o,c)})}};tu.OTLPProtoExporterNodeBase=Lc});var p_=d(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.send=dr.OTLPProtoExporterNodeBase=void 0;var qS=l_();Object.defineProperty(dr,"OTLPProtoExporterNodeBase",{enumerable:!0,get:function(){return qS.OTLPProtoExporterNodeBase}});var jS=Ic();Object.defineProperty(dr,"send",{enumerable:!0,get:function(){return jS.send}})});var f_=d(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.OTLPProtoExporterBrowserBase=void 0;var GS=(y(),E(m)),wc=zi(),HS=tn(),Mc=class extends wc.OTLPExporterBrowserBase{constructor(r={}){super(r)}send(r,o,c){if(this._shutdownOnce.isCalled){GS.diag.debug("Shutdown already started. Cannot send objects");return}let i=this.convert(r),a=(0,HS.getExportRequestProto)(this.getServiceClientType()),t=a.create(i);if(t){let e=a.encode(t).finish();e&&(0,wc.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 wc.OTLPExporterError("No proto"))}};ru.OTLPProtoExporterBrowserBase=Mc});var d_=d(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.ServiceClientType=hr.OTLPProtoExporterBrowserBase=void 0;var FS=f_();Object.defineProperty(hr,"OTLPProtoExporterBrowserBase",{enumerable:!0,get:function(){return FS.OTLPProtoExporterBrowserBase}});var KS=Qi();Object.defineProperty(hr,"ServiceClientType",{enumerable:!0,get:function(){return KS.ServiceClientType}})});var __=d(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.getExportRequestProto=_e.ServiceClientType=_e.OTLPProtoExporterBrowserBase=_e.send=_e.OTLPProtoExporterNodeBase=void 0;var h_=p_();Object.defineProperty(_e,"OTLPProtoExporterNodeBase",{enumerable:!0,get:function(){return h_.OTLPProtoExporterNodeBase}});Object.defineProperty(_e,"send",{enumerable:!0,get:function(){return h_.send}});var XS=d_();Object.defineProperty(_e,"OTLPProtoExporterBrowserBase",{enumerable:!0,get:function(){return XS.OTLPProtoExporterBrowserBase}});var zS=Qi();Object.defineProperty(_e,"ServiceClientType",{enumerable:!0,get:function(){return zS.ServiceClientType}});var $S=tn();Object.defineProperty(_e,"getExportRequestProto",{enumerable:!0,get:function(){return $S.getExportRequestProto}})});var j=W(As(),1);y();Is();var g_=W(cf(),1),yr=W(ct(),1),S_=W(Af(),1),b_=W(Ld(),1),O_=W(le(),1),Er=W(cn(),1),A_=W(Md(),1),Se=W(P(),1);y();var Mg=Symbol.for("@vercel/request-context");function Ci(){return globalThis[Mg]?.get()}var Wa=W(le(),1);function Ui(u){return Object.fromEntries(Object.entries(u).filter(([r,o])=>o!==void 0))}function Cd(u){return u?u.split("::").at(-1):void 0}function Ud(u=Ci()){if(u)return Ui({[Wa.SemanticAttributes.HTTP_HOST]:u.headers.host,[Wa.SemanticAttributes.HTTP_USER_AGENT]:u.headers["user-agent"],"http.referer":u.headers.referer,"vercel.request_id":Cd(u.headers["x-vercel-id"]),"vercel.matched_path":u.headers["x-matched-path"],"vercel.edge_region":u.headers["x-vercel-edge-region"]})}var Di=class{constructor(r){this.processors=r;this.rootSpanIds=new Map}forceFlush(){return Promise.all(this.processors.map(r=>r.forceFlush().catch(o=>{m.diag.error("@vercel/otel: forceFlush failed:",o)}))).then(()=>{})}shutdown(){return Promise.all(this.processors.map(r=>r.shutdown().catch(()=>{}))).then(()=>{})}onStart(r,o){let{traceId:c,spanId:i,traceFlags:a}=r.spanContext(),t=!r.parentSpanId||!this.rootSpanIds.has(c);if(t&&this.rootSpanIds.set(c,i),t&&Cg(a)){let e=Ud();e&&r.setAttributes(e);let n=Ci();n&&n.waitUntil(()=>this.forceFlush())}for(let e of this.processors)e.onStart(r,o)}onEnd(r){let{traceId:o,spanId:c}=r.spanContext();this.rootSpanIds.get(o)===c&&this.rootSpanIds.delete(o);for(let a of this.processors)a.onEnd(r)}};function Cg(u){return(u&m.TraceFlags.SAMPLED)!==0}var $d=W(nc(),1);var zd=W(Kr(),1);y();var ur=class extends zd.OTLPExporterBase{constructor(r={}){super(r),r.headers&&(this._headers=r.headers)}onShutdown(){m.diag.debug("@vercel/otel/otlp: onShutdown")}onInit(){m.diag.debug("@vercel/otel/otlp: onInit")}send(r,o,c){if(this._shutdownOnce.isCalled){m.diag.debug("@vercel/otel/otlp: Shutdown already started. Cannot send objects");return}let i=this.convert(r),a,t,e;try{({body:a,contentType:t,headers:e}=this.toMessage(i))}catch(s){m.diag.warn("@vercel/otel/otlp: no proto",s);return}let n=fetch(this.url,{method:"POST",body:a,headers:{...this._headers,...e,"Content-Type":t,"User-Agent":"OTel-OTLP-Exporter-JavaScript/0.46.0"},next:{internal:!0}}).then(s=>{m.diag.debug("@vercel/otel/otlp: onSuccess",s.status,s.statusText),o()}).catch(s=>{m.diag.error("@vercel/otel/otlp: onError",s),c(s)}).finally(()=>{let s=this._sendingPromises.indexOf(n);this._sendingPromises.splice(s,1)});this._sendingPromises.push(n)}getDefaultUrl(r){throw new Error("Method not implemented.")}};var tS="v1/traces",rS=`http://localhost:4318/${tS}`;function qi(u){return typeof u.url=="string"?u.url:rS}var sr=class extends ur{convert(r){return(0,$d.createExportTraceServiceRequest)(r,{useHex:!0,useLongBits:!1})}toMessage(r){return{body:JSON.stringify(r),contentType:"application/json"}}getDefaultUrl(r){return qi(r)}};var m_=W(nc(),1),y_=W(__(),1),E_=W(tn(),1);var vt=class extends ur{convert(r){return(0,m_.createExportTraceServiceRequest)(r,void 0)}toMessage(r){let o=y_.ServiceClientType.SPANS,c=(0,E_.getExportRequestProto)(o),i=c.create(r);return{body:c.encode(i).finish(),contentType:"application/x-protobuf",headers:{accept:"application/x-protobuf"}}}getDefaultUrl(r){return qi(r)}};y();var $e=W(le(),1),_r=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??[],i=h=>{if(c.length===0)return!1;let v=h.toString();return c.some(b=>typeof b=="string"?v.startsWith(b):b.test(v))},a=process.env.VERCEL_URL||process.env.NEXT_PUBLIC_VERCEL_URL||null,t=this.config.propagateContextUrls??[],e=this.config.dontPropagateContextUrls??[],n=h=>{let v=h.toString();return e.length>0&&e.some(b=>typeof b=="string"?v.startsWith(b):b.test(v))?!1:a&&h.protocol==="https:"&&h.host===a?!0:t.some(b=>typeof b=="string"?v.startsWith(b):b.test(v))};process.env.NEXT_OTEL_FETCH_DISABLED="1";let s=globalThis.fetch;this.originalFetch=s;let l=(h,v)=>{if(v?.next?.internal)return s(h,v);let b=new Request(h,v),N=new URL(b.url);return i(N)?s(h,v):o.startActiveSpan(`fetch ${b.method} ${b.url}`,{kind:m.SpanKind.CLIENT,attributes:{[$e.SemanticAttributes.HTTP_METHOD]:b.method,[$e.SemanticAttributes.HTTP_URL]:b.url,[$e.SemanticAttributes.HTTP_HOST]:N.host,[$e.SemanticAttributes.HTTP_SCHEME]:N.protocol.replace(":",""),[$e.SemanticAttributes.NET_PEER_NAME]:N.hostname,[$e.SemanticAttributes.NET_PEER_PORT]:N.port}},async V=>{n(N)&&m.propagation.inject(m.context.active(),b.headers,YS);try{let I=await s(h,{...v,headers:b.headers});return V.setAttribute($e.SemanticAttributes.HTTP_STATUS_CODE,I.status),I.status>=500&&V.setStatus({code:m.SpanStatusCode.ERROR,message:`Status: ${I.status} (${I.statusText})`}),V.end(),I}catch(I){throw I instanceof Error?(V.recordException(I),V.setStatus({code:m.SpanStatusCode.ERROR,message:I.message})):V.setStatus({code:m.SpanStatusCode.ERROR,message:String(I)}),V.end(),I}})};globalThis.fetch=l}disable(){this.originalFetch&&(globalThis.fetch=this.originalFetch)}},YS={set(u,r,o){u.set(r,o)}};var nu=class{constructor(r={}){this.configuration=r}start(){let r=WS(),o=(0,Er.getEnvWithoutDefaults)(),c=this.configuration,i=process.env.NEXT_RUNTIME||"nodejs",a=!!r.OTEL_SDK_DISABLED;if(o.OTEL_LOG_LEVEL&&m.diag.setLogger(new m.DiagConsoleLogger,{logLevel:o.OTEL_LOG_LEVEL}),a)return;let t=c.idGenerator??new j.RandomIdGenerator,e=c.contextManager??new A_.AsyncLocalStorageContextManager;e.enable(),this.contextManager=e;let n=r.OTEL_SERVICE_NAME||c.serviceName||"app",s=new yr.Resource(Ui({[O_.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":i,"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,...c.attributes})),l=c.resourceDetectors??[yr.envDetectorSync];if(c.autoDetectResources??!0){let F={detectors:l};s=s.merge((0,yr.detectResourcesSync)(F))}let v=QS(c.propagators,r),b=ZS(c.traceSampler,r),N=eb(c.spanProcessors,c,r);N.length===0&&m.diag.warn("@vercel/otel: No span processors configured. No spans will be exported.");let V=c.spanLimits,I=new j.BasicTracerProvider({resource:s,idGenerator:t,sampler:b,spanLimits:V});if(I.addSpanProcessor(new Di(N)),I.register({contextManager:e,propagator:new Se.CompositePropagator({propagators:v})}),this.tracerProvider=I,c.logRecordProcessor){let F=new S_.LoggerProvider({resource:s});this.loggerProvider=F,F.addLogRecordProcessor(c.logRecordProcessor),ft.logs.setGlobalLoggerProvider(F)}if(c.metricReader||c.views){let F=new b_.MeterProvider({resource:s,views:c.views??[]});c.metricReader&&F.addMetricReader(c.metricReader),m.metrics.setGlobalMeterProvider(F),this.meterProvider=F}let U=JS(c.instrumentations,c.instrumentationConfig);this.disableInstumentations=(0,g_.registerInstrumentations)({instrumentations:U}),m.diag.info("@vercel/otel: started",n,i)}async shutdown(){let r=[];this.tracerProvider&&r.push(this.tracerProvider.shutdown()),this.loggerProvider&&r.push(this.loggerProvider.shutdown()),this.meterProvider&&r.push(this.meterProvider.shutdown()),m.diag.info("@vercel/otel: shutting down",r.length,process.env.NEXT_RUNTIME),await Promise.all(r),this.contextManager&&this.contextManager.disable();let{disableInstumentations:o}=this;o&&o()}};function WS(){let u=(0,Er.parseEnvironment)(process.env);return{...Er.DEFAULT_ENVIRONMENT,...u}}function JS(u,r){return(u??["auto"]).map(o=>o==="auto"?(m.diag.debug("@vercel/otel: Configure instrumentations: fetch",r?.fetch),[new _r(r?.fetch)]):o==="fetch"?(m.diag.debug("@vercel/otel: Configure instrumentations: fetch",r?.fetch),new _r(r?.fetch)):o).flat()}function QS(u,r){let o=r.OTEL_PROPAGATORS&&r.OTEL_PROPAGATORS.length>0?r.OTEL_PROPAGATORS:void 0;return(u??o??["auto"]).map(c=>{if(c==="none")return[];if(c==="auto")return m.diag.debug("@vercel/otel: Configure propagators: tracecontext, baggage"),[new Se.W3CTraceContextPropagator,new Se.W3CBaggagePropagator];if(c==="tracecontext")return m.diag.debug("@vercel/otel: Configure propagator: tracecontext"),new Se.W3CTraceContextPropagator;if(c==="baggage")return m.diag.debug("@vercel/otel: Configure propagator: baggage"),new Se.W3CBaggagePropagator;if(typeof c=="string")throw new Error(`Unknown propagator: "${c}"`);return c}).flat()}var v_="always_on",mr=1;function ZS(u,r){if(u&&typeof u!="string")return u;let o=u&&u!=="auto"?u:r.OTEL_TRACES_SAMPLER||v_;switch(m.diag.debug("@vercel/otel: Configure sampler: ",o),o){case"always_on":return new j.AlwaysOnSampler;case"always_off":return new j.AlwaysOffSampler;case"parentbased_always_on":return new j.ParentBasedSampler({root:new j.AlwaysOnSampler});case"parentbased_always_off":return new j.ParentBasedSampler({root:new j.AlwaysOffSampler});case"traceidratio":return new j.TraceIdRatioBasedSampler(T_(r));case"parentbased_traceidratio":return new j.ParentBasedSampler({root:new j.TraceIdRatioBasedSampler(T_(r))});default:return m.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER value "${String(r.OTEL_TRACES_SAMPLER)} invalid, defaulting to ${v_}".`),new j.AlwaysOnSampler}}function T_(u){if(u.OTEL_TRACES_SAMPLER_ARG===void 0||u.OTEL_TRACES_SAMPLER_ARG==="")return m.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${mr}.`),mr;m.diag.debug("@vercel/otel: Configure sampler probability: ",u.OTEL_TRACES_SAMPLER_ARG);let r=Number(u.OTEL_TRACES_SAMPLER_ARG);return isNaN(r)?(m.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${u.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${mr}.`),mr):r<0||r>1?(m.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${u.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${mr}.`),mr):r}function eb(u,r,o){return(u??["auto"]).map(c=>{if(c==="auto"){if(process.env.VERCEL_OTEL_ENDPOINTS){let i=process.env.VERCEL_OTEL_ENDPOINTS_PORT||"4318",a=process.env.VERCEL_OTEL_ENDPOINTS_PROTOCOL||"http/protobuf";m.diag.debug("@vercel/otel: Configure vercel otel collector on port: ",i,a);let t={url:`http://localhost:${i}/v1/traces`,headers:{}},e=a==="http/protobuf"?new vt(t):new sr(t);return new j.BatchSpanProcessor(e)}return r.traceExporter||o.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT||o.OTEL_EXPORTER_OTLP_ENDPOINT?new j.BatchSpanProcessor(tb(r.traceExporter,o)):void 0}return c}).filter(ob)}function tb(u,r){if(u&&u!=="auto")return u;let o=process.env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL??process.env.OTEL_EXPORTER_OTLP_PROTOCOL??"http/protobuf",c=nb(r),i={...Se.baggageUtils.parseKeyPairsIntoRecord(r.OTEL_EXPORTER_OTLP_HEADERS),...Se.baggageUtils.parseKeyPairsIntoRecord(r.OTEL_EXPORTER_OTLP_TRACES_HEADERS)};switch(m.diag.debug("@vercel/otel: Configure trace exporter: ",o,c,`headers: ${Object.keys(i).join(",")||"<none>"}`),o){case"http/json":return new sr({url:c,headers:i});case"http/protobuf":return new vt({url:c,headers:i});default:return m.diag.warn(`@vercel/otel: Unsupported OTLP traces protocol: ${o}. Using http/protobuf.`),new vt}}var P_="v1/traces",rb=`http://localhost:4318/${P_}`;function nb(u){let r=u.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT;if(r&&typeof r=="string")return r;let o=u.OTEL_EXPORTER_OTLP_ENDPOINT;return o&&typeof o=="string"?`${o}/${P_}`:rb}function ob(u){return u!=null}function VN(u){let r;u?typeof u=="string"?r={serviceName:u}:r=u:r={},new nu(r).start()}export{_r as FetchInstrumentation,sr as OTLPHttpJsonTraceExporter,vt as OTLPHttpProtoTraceExporter,VN as registerOTel};
|
|
20
|
+
`,(0,yi.getConflictResolutionRecipe)(a,r))}return c}};Ei.MetricStorageRegistry=Ia});var hd=d(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.MultiMetricStorage=void 0;var La=class{constructor(r){this._backingStorages=r}record(r,o,c,i){this._backingStorages.forEach(a=>{a.record(r,o,c,i)})}};vi.MultiMetricStorage=La});var md=d(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.BatchObservableResultImpl=or.ObservableResultImpl=void 0;var nr=(y(),E(m)),_d=jr(),Kg=li(),wa=class{constructor(r,o){this._instrumentName=r,this._valueType=o,this._buffer=new _d.AttributeHashMap}observe(r,o={}){if(typeof r!="number"){nr.diag.warn(`non-number value provided to metric ${this._instrumentName}: ${r}`);return}this._valueType===nr.ValueType.INT&&!Number.isInteger(r)&&(nr.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)}};or.ObservableResultImpl=wa;var Ma=class{constructor(){this._buffer=new Map}observe(r,o,c={}){if(!(0,Kg.isObservableInstrument)(r))return;let i=this._buffer.get(r);if(i==null&&(i=new _d.AttributeHashMap,this._buffer.set(r,i)),typeof o!="number"){nr.diag.warn(`non-number value provided to metric ${r._descriptor.name}: ${o}`);return}r._descriptor.valueType===nr.ValueType.INT&&!Number.isInteger(o)&&(nr.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))||i.set(c,o)}};or.BatchObservableResultImpl=Ma});var vd=d(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.ObservableRegistry=void 0;var Xg=(y(),E(m)),yd=li(),Ed=md(),Gr=Pe(),Ca=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(yd.isObservableInstrument));if(c.size===0){Xg.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(yd.isObservableInstrument)),i=this._findBatchCallback(r,c);i<0||this._batchCallbacks.splice(i,1)}async observe(r,o){let c=this._observeCallbacks(r,o),i=this._observeBatchCallbacks(r,o);return(await(0,Gr.PromiseAllSettled)([...c,...i])).filter(Gr.isPromiseAllSettledRejectionResult).map(e=>e.reason)}_observeCallbacks(r,o){return this._callbacks.map(async({callback:c,instrument:i})=>{let a=new Ed.ObservableResultImpl(i._descriptor.name,i._descriptor.valueType),t=Promise.resolve(c(a));o!=null&&(t=(0,Gr.callWithTimeout)(t,o)),await t,i._metricStorages.forEach(e=>{e.record(a._buffer,r)})})}_observeBatchCallbacks(r,o){return this._batchCallbacks.map(async({callback:c,instruments:i})=>{let a=new Ed.BatchObservableResultImpl,t=Promise.resolve(c(a));o!=null&&(t=(0,Gr.callWithTimeout)(t,o)),await t,i.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,Gr.setEquals)(c.instruments,o))}};gi.ObservableRegistry=Ca});var gd=d(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.SyncMetricStorage=void 0;var zg=Sa(),$g=Pa(),Yg=Ra(),Ua=class extends zg.MetricStorage{constructor(r,o,c,i){super(r),this._attributesProcessor=c,this._deltaMetricStorage=new $g.DeltaMetricProcessor(o),this._temporalMetricStorage=new Yg.TemporalMetricProcessor(o,i)}record(r,o,c,i){o=this._attributesProcessor.process(o,c),this._deltaMetricStorage.record(r,o,c,i)}collect(r,o){let c=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,c,o)}};Ti.SyncMetricStorage=Ua});var Ba=d(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.FilteringAttributesProcessor=qe.NoopAttributesProcessor=qe.AttributesProcessor=void 0;var Hr=class{static Noop(){return Wg}};qe.AttributesProcessor=Hr;var Si=class extends Hr{process(r,o){return r}};qe.NoopAttributesProcessor=Si;var Da=class extends Hr{constructor(r){super(),this._allowedAttributeNames=r}process(r,o){let c={};return Object.keys(r).filter(i=>this._allowedAttributeNames.includes(i)).forEach(i=>c[i]=r[i]),c}};qe.FilteringAttributesProcessor=Da;var Wg=new Si});var Td=d(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.MeterSharedState=void 0;var Jg=Le(),Qg=id(),Zg=Pe(),eT=ud(),tT=dd(),rT=hd(),nT=vd(),oT=gd(),iT=Ba(),Va=class{constructor(r,o){this._meterProviderSharedState=r,this._instrumentationScope=o,this.metricStorageRegistry=new tT.MetricStorageRegistry,this.observableRegistry=new nT.ObservableRegistry,this.meter=new Qg.Meter(this)}registerMetricStorage(r){let o=this._registerMetricStorage(r,oT.SyncMetricStorage);return o.length===1?o[0]:new rT.MultiMetricStorage(o)}registerAsyncMetricStorage(r){return this._registerMetricStorage(r,eT.AsyncMetricStorage)}async collect(r,o,c){let i=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(Zg.isNotNullish);return t.length===0?{errors:i}:{scopeMetrics:{scope:this._instrumentationScope,metrics:t},errors:i}}_registerMetricStorage(r,o){let i=this._meterProviderSharedState.viewRegistry.findViews(r,this._instrumentationScope).map(a=>{let t=(0,Jg.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(i.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,iT.AttributesProcessor.Noop(),[e]);return this.metricStorageRegistry.registerForCollector(e,h),h});i=i.concat(t)}return i}};bi.MeterSharedState=Va});var Sd=d(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.MeterProviderSharedState=void 0;var uT=Pe(),sT=od(),aT=Td(),ka=class{constructor(r){this.resource=r,this.viewRegistry=new sT.ViewRegistry,this.metricCollectors=[],this.meterSharedStates=new Map}getMeterSharedState(r){let o=(0,uT.instrumentationScopeId)(r),c=this.meterSharedStates.get(o);return c==null&&(c=new aT.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}};Oi.MeterProviderSharedState=ka});var bd=d(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.MetricCollector=void 0;var cT=P(),qa=class{constructor(r,o){this._sharedState=r,this._metricReader=o}async collect(r){let o=(0,cT.millisToHrTime)(Date.now()),c=[],i=[],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&&i.push(...e.errors)});return await Promise.all(a),{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:c},errors:i}}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)}};Ai.MetricCollector=qa});var Ad=d(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.MeterProvider=void 0;var Pi=(y(),E(m)),Od=ct(),lT=Sd(),pT=bd(),ja=class{constructor(r){var o;this._shutdown=!1;let c=Od.Resource.default().merge((o=r?.resource)!==null&&o!==void 0?o:Od.Resource.empty());if(this._sharedState=new lT.MeterProviderSharedState(c),r?.views!=null&&r.views.length>0)for(let i of r.views)this._sharedState.viewRegistry.addView(i)}getMeter(r,o="",c={}){return this._shutdown?(Pi.diag.warn("A shutdown MeterProvider cannot provide a Meter"),(0,Pi.createNoopMeter)()):this._sharedState.getMeterSharedState({name:r,version:o,schemaUrl:c.schemaUrl}).meter}addMetricReader(r){let o=new pT.MetricCollector(this._sharedState,r);r.setMetricProducer(o),this._sharedState.metricCollectors.push(o)}async shutdown(r){if(this._shutdown){Pi.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){Pi.diag.warn("invalid attempt to force flush after MeterProvider shutdown");return}await Promise.all(this._sharedState.metricCollectors.map(o=>o.forceFlush(r)))}};Ni.MeterProvider=ja});var Ri=d(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.ExactPredicate=ir.PatternPredicate=void 0;var fT=/[\^$\\.+?()[\]{}|]/g,Ga=class u{constructor(r){r==="*"?(this._matchAll=!0,this._regexp=/.*/):(this._matchAll=!1,this._regexp=new RegExp(u.escapePattern(r)))}match(r){return this._matchAll?!0:this._regexp.test(r)}static escapePattern(r){return`^${r.replace(fT,"\\$&").replace("*",".*")}$`}static hasWildcard(r){return r.includes("*")}};ir.PatternPredicate=Ga;var Ha=class{constructor(r){this._matchAll=r===void 0,this._pattern=r}match(r){return!!(this._matchAll||r===this._pattern)}};ir.ExactPredicate=Ha});var Nd=d(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});xi.InstrumentSelector=void 0;var Pd=Ri(),Fa=class{constructor(r){var o;this._nameFilter=new Pd.PatternPredicate((o=r?.name)!==null&&o!==void 0?o:"*"),this._type=r?.type,this._unitFilter=new Pd.ExactPredicate(r?.unit)}getType(){return this._type}getNameFilter(){return this._nameFilter}getUnitFilter(){return this._unitFilter}};xi.InstrumentSelector=Fa});var Rd=d(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.MeterSelector=void 0;var Ka=Ri(),Xa=class{constructor(r){this._nameFilter=new Ka.ExactPredicate(r?.name),this._versionFilter=new Ka.ExactPredicate(r?.version),this._schemaUrlFilter=new Ka.ExactPredicate(r?.schemaUrl)}getNameFilter(){return this._nameFilter}getVersionFilter(){return this._versionFilter}getSchemaUrlFilter(){return this._schemaUrlFilter}};Ii.MeterSelector=Xa});var Id=d(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.View=void 0;var dT=Ri(),xd=Ba(),hT=Nd(),_T=Rd(),mT=ri();function yT(u){return u.instrumentName==null&&u.instrumentType==null&&u.instrumentUnit==null&&u.meterName==null&&u.meterVersion==null&&u.meterSchemaUrl==null}var za=class{constructor(r){var o;if(yT(r))throw new Error("Cannot create view with no selector arguments supplied");if(r.name!=null&&(r?.instrumentName==null||dT.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 xd.FilteringAttributesProcessor(r.attributeKeys):this.attributesProcessor=xd.AttributesProcessor.Noop(),this.name=r.name,this.description=r.description,this.aggregation=(o=r.aggregation)!==null&&o!==void 0?o:mT.Aggregation.Default(),this.instrumentSelector=new hT.InstrumentSelector({name:r.instrumentName,type:r.instrumentType,unit:r.instrumentUnit}),this.meterSelector=new _T.MeterSelector({name:r.meterName,version:r.meterVersion,schemaUrl:r.meterSchemaUrl})}};Li.View=za});var Ld=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 ET=Go();Object.defineProperty(O,"AggregationTemporality",{enumerable:!0,get:function(){return ET.AggregationTemporality}});var vT=kt();Object.defineProperty(O,"DataPointType",{enumerable:!0,get:function(){return vT.DataPointType}});var gT=ca();Object.defineProperty(O,"MetricReader",{enumerable:!0,get:function(){return gT.MetricReader}});var TT=Zf();Object.defineProperty(O,"PeriodicExportingMetricReader",{enumerable:!0,get:function(){return TT.PeriodicExportingMetricReader}});var ST=td();Object.defineProperty(O,"InMemoryMetricExporter",{enumerable:!0,get:function(){return ST.InMemoryMetricExporter}});var bT=nd();Object.defineProperty(O,"ConsoleMetricExporter",{enumerable:!0,get:function(){return bT.ConsoleMetricExporter}});var OT=Le();Object.defineProperty(O,"InstrumentType",{enumerable:!0,get:function(){return OT.InstrumentType}});var AT=Ad();Object.defineProperty(O,"MeterProvider",{enumerable:!0,get:function(){return AT.MeterProvider}});var je=ri();Object.defineProperty(O,"DefaultAggregation",{enumerable:!0,get:function(){return je.DefaultAggregation}});Object.defineProperty(O,"ExplicitBucketHistogramAggregation",{enumerable:!0,get:function(){return je.ExplicitBucketHistogramAggregation}});Object.defineProperty(O,"ExponentialHistogramAggregation",{enumerable:!0,get:function(){return je.ExponentialHistogramAggregation}});Object.defineProperty(O,"DropAggregation",{enumerable:!0,get:function(){return je.DropAggregation}});Object.defineProperty(O,"HistogramAggregation",{enumerable:!0,get:function(){return je.HistogramAggregation}});Object.defineProperty(O,"LastValueAggregation",{enumerable:!0,get:function(){return je.LastValueAggregation}});Object.defineProperty(O,"SumAggregation",{enumerable:!0,get:function(){return je.SumAggregation}});Object.defineProperty(O,"Aggregation",{enumerable:!0,get:function(){return je.Aggregation}});var PT=Id();Object.defineProperty(O,"View",{enumerable:!0,get:function(){return PT.View}});var NT=Pe();Object.defineProperty(O,"TimeoutError",{enumerable:!0,get:function(){return NT.TimeoutError}})});var wd=d(wi=>{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});wi.AbstractAsyncHooksContextManager=void 0;var RT=K("events"),xT=["addListener","on","once","prependListener","prependOnceListener"],$a=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(r,o){return o instanceof RT.EventEmitter?this._bindEventEmitter(r,o):typeof o=="function"?this._bindFunction(r,o):o}_bindFunction(r,o){let c=this,i=function(...a){return c.with(r,()=>o.apply(this,a))};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:o.length}),i}_bindEventEmitter(r,o){return this._getPatchMap(o)!==void 0||(this._createPatchMap(o),xT.forEach(i=>{o[i]!==void 0&&(o[i]=this._patchAddListener(o,o[i],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(i,a){var t;let e=(t=c._getPatchMap(r))===null||t===void 0?void 0:t[i];if(e===void 0)return o.call(this,i,a);let n=e.get(a);return o.call(this,i,n||a)}}_patchRemoveAllListeners(r,o){let c=this;return function(i){let a=c._getPatchMap(r);return a!==void 0&&(arguments.length===0?c._createPatchMap(r):a[i]!==void 0&&delete a[i]),o.apply(this,arguments)}}_patchAddListener(r,o,c){let i=this;return function(a,t){if(i._wrapped)return o.call(this,a,t);let e=i._getPatchMap(r);e===void 0&&(e=i._createPatchMap(r));let n=e[a];n===void 0&&(n=new WeakMap,e[a]=n);let s=i.bind(c,t);n.set(t,s),i._wrapped=!0;try{return o.call(this,a,s)}finally{i._wrapped=!1}}}_createPatchMap(r){let o=Object.create(null);return r[this._kOtListeners]=o,o}_getPatchMap(r){return r[this._kOtListeners]}};wi.AbstractAsyncHooksContextManager=$a});var Md=d(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});Mi.AsyncLocalStorageContextManager=void 0;var IT=(y(),E(m)),LT=K("async_hooks"),wT=wd(),Ya=class extends wT.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new LT.AsyncLocalStorage}active(){var r;return(r=this._asyncLocalStorage.getStore())!==null&&r!==void 0?r:IT.ROOT_CONTEXT}with(r,o,c,...i){let a=c==null?o:o.bind(c);return this._asyncLocalStorage.run(r,a,...i)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};Mi.AsyncLocalStorageContextManager=Ya});var Za=d(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.toAnyValue=Ge.toKeyValue=Ge.toAttributes=void 0;function UT(u){return Object.keys(u).map(r=>Ja(r,u[r]))}Ge.toAttributes=UT;function Ja(u,r){return{key:u,value:Qa(r)}}Ge.toKeyValue=Ja;function Qa(u){let r=typeof u;return r==="string"?{stringValue:u}:r==="number"?Number.isInteger(u)?{intValue:u}:{doubleValue:u}:r==="boolean"?{boolValue:u}:u instanceof Uint8Array?{bytesValue:u}:Array.isArray(u)?{arrayValue:{values:u.map(Qa)}}:r==="object"&&u!=null?{kvlistValue:{values:Object.entries(u).map(([o,c])=>Ja(o,c))}}:{}}Ge.toAnyValue=Qa});var Vd=d(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.toOtlpSpanEvent=He.toOtlpLink=He.sdkSpanToOtlpSpan=void 0;var ec=Za();function DT(u,r){var o;let c=u.spanContext(),i=u.status;return{traceId:r.encodeSpanContext(c.traceId),spanId:r.encodeSpanContext(c.spanId),parentSpanId:r.encodeOptionalSpanContext(u.parentSpanId),traceState:(o=c.traceState)===null||o===void 0?void 0:o.serialize(),name:u.name,kind:u.kind==null?0:u.kind+1,startTimeUnixNano:r.encodeHrTime(u.startTime),endTimeUnixNano:r.encodeHrTime(u.endTime),attributes:(0,ec.toAttributes)(u.attributes),droppedAttributesCount:u.droppedAttributesCount,events:u.events.map(a=>Bd(a,r)),droppedEventsCount:u.droppedEventsCount,status:{code:i.code,message:i.message},links:u.links.map(a=>Dd(a,r)),droppedLinksCount:u.droppedLinksCount}}He.sdkSpanToOtlpSpan=DT;function Dd(u,r){var o;return{attributes:u.attributes?(0,ec.toAttributes)(u.attributes):[],spanId:r.encodeSpanContext(u.context.spanId),traceId:r.encodeSpanContext(u.context.traceId),traceState:(o=u.context.traceState)===null||o===void 0?void 0:o.serialize(),droppedAttributesCount:u.droppedAttributesCount||0}}He.toOtlpLink=Dd;function Bd(u,r){return{attributes:u.attributes?(0,ec.toAttributes)(u.attributes):[],name:u.name,timeUnixNano:r.encodeHrTime(u.time),droppedAttributesCount:u.droppedAttributesCount||0}}He.toOtlpSpanEvent=Bd});var Hd=d(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.getOtlpEncoder=fe.encodeAsString=fe.encodeAsLongBits=fe.toLongBits=fe.hrTimeToNanos=void 0;var Bi=P(),BT=BigInt(1e9);function tc(u){return BigInt(u[0])*BT+BigInt(u[1])}fe.hrTimeToNanos=tc;function qd(u){let r=Number(BigInt.asUintN(32,u)),o=Number(BigInt.asUintN(32,u>>BigInt(32)));return{low:r,high:o}}fe.toLongBits=qd;function rc(u){let r=tc(u);return qd(r)}fe.encodeAsLongBits=rc;function jd(u){return tc(u).toString()}fe.encodeAsString=jd;var VT=typeof BigInt<"u"?jd:Bi.hrTimeToNanoseconds;function kd(u){return u}function Gd(u){if(u!==void 0)return(0,Bi.hexToBase64)(u)}var kT={encodeHrTime:rc,encodeSpanContext:Bi.hexToBase64,encodeOptionalSpanContext:Gd};function qT(u){var r,o;if(u===void 0)return kT;let c=(r=u.useLongBits)!==null&&r!==void 0?r:!0,i=(o=u.useHex)!==null&&o!==void 0?o:!1;return{encodeHrTime:c?rc:VT,encodeSpanContext:i?kd:Bi.hexToBase64,encodeOptionalSpanContext:i?kd:Gd}}fe.getOtlpEncoder=qT});var nc=d(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});Vi.createExportTraceServiceRequest=void 0;var jT=Za(),GT=Vd(),HT=Hd();function FT(u,r){let o=(0,HT.getOtlpEncoder)(r);return{resourceSpans:XT(u,o)}}Vi.createExportTraceServiceRequest=FT;function KT(u){let r=new Map;for(let o of u){let c=r.get(o.resource);c||(c=new Map,r.set(o.resource,c));let i=`${o.instrumentationLibrary.name}@${o.instrumentationLibrary.version||""}:${o.instrumentationLibrary.schemaUrl||""}`,a=c.get(i);a||(a=[],c.set(i,a)),a.push(o)}return r}function XT(u,r){let o=KT(u),c=[],i=o.entries(),a=i.next();for(;!a.done;){let[t,e]=a.value,n=[],s=e.values(),l=s.next();for(;!l.done;){let v=l.value;if(v.length>0){let{name:b,version:N,schemaUrl:V}=v[0].instrumentationLibrary,I=v.map(U=>(0,GT.sdkSpanToOtlpSpan)(U,r));n.push({scope:{name:b,version:N},spans:I,schemaUrl:V})}l=s.next()}let h={resource:{attributes:(0,jT.toAttributes)(t.attributes),droppedAttributesCount:0},scopeSpans:n,schemaUrl:void 0};c.push(h),a=i.next()}return c}});var mt=d(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.parseRetryAfterToMills=B.isExportRetryable=B.invalidTimeout=B.configureExporterTimeout=B.appendRootPathToUrlIfNeeded=B.appendResourcePathToUrl=B.parseHeaders=B.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=B.DEFAULT_EXPORT_MAX_BACKOFF=B.DEFAULT_EXPORT_INITIAL_BACKOFF=B.DEFAULT_EXPORT_MAX_ATTEMPTS=void 0;var oc=(y(),E(m)),Fd=P(),Kd=1e4;B.DEFAULT_EXPORT_MAX_ATTEMPTS=5;B.DEFAULT_EXPORT_INITIAL_BACKOFF=1e3;B.DEFAULT_EXPORT_MAX_BACKOFF=5e3;B.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=1.5;function zT(u={}){let r={};return Object.entries(u).forEach(([o,c])=>{typeof c<"u"?r[o]=String(c):oc.diag.warn(`Header "${o}" has wrong value and will be ignored`)}),r}B.parseHeaders=zT;function $T(u,r){return u.endsWith("/")||(u=u+"/"),u+r}B.appendResourcePathToUrl=$T;function YT(u){try{let r=new URL(u);return r.pathname===""&&(r.pathname=r.pathname+"/"),r.toString()}catch{return oc.diag.warn(`Could not parse export URL: '${u}'`),u}}B.appendRootPathToUrlIfNeeded=YT;function WT(u){return typeof u=="number"?u<=0?ic(u,Kd):u:JT()}B.configureExporterTimeout=WT;function JT(){var u;let r=Number((u=(0,Fd.getEnv)().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)!==null&&u!==void 0?u:(0,Fd.getEnv)().OTEL_EXPORTER_OTLP_TIMEOUT);return r<=0?ic(r,Kd):r}function ic(u,r){return oc.diag.warn("Timeout must be greater than 0",u),r}B.invalidTimeout=ic;function QT(u){return[429,502,503,504].includes(u)}B.isExportRetryable=QT;function ZT(u){if(u==null)return-1;let r=Number.parseInt(u,10);if(Number.isInteger(r))return r>0?r*1e3:-1;let o=new Date(u).getTime()-Date.now();return o>=0?o:0}B.parseRetryAfterToMills=ZT});var Kr=d(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.OTLPExporterBase=void 0;var Xd=(y(),E(m)),Fr=P(),eS=mt(),uc=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 Fr.BindOnceFuture(this._shutdown,this),this._concurrencyLimit=typeof r.concurrencyLimit=="number"?r.concurrencyLimit:30,this.timeoutMillis=(0,eS.configureExporterTimeout)(r.timeoutMillis),this.onInit(r)}export(r,o){if(this._shutdownOnce.isCalled){o({code:Fr.ExportResultCode.FAILED,error:new Error("Exporter has been shutdown")});return}if(this._sendingPromises.length>=this._concurrencyLimit){o({code:Fr.ExportResultCode.FAILED,error:new Error("Concurrent export limit reached")});return}this._export(r).then(()=>{o({code:Fr.ExportResultCode.SUCCESS})}).catch(c=>{o({code:Fr.ExportResultCode.FAILED,error:c})})}_export(r){return new Promise((o,c)=>{try{Xd.diag.debug("items to be sent",r),this.send(r,o,c)}catch(i){c(i)}})}shutdown(){return this._shutdownOnce.call()}forceFlush(){return Promise.all(this._sendingPromises).then(()=>{})}_shutdown(){return Xd.diag.debug("shutdown started"),this.onShutdown(),this.forceFlush()}};ki.OTLPExporterBase=uc});var sc=d(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.CompressionAlgorithm=void 0;var nS;(function(u){u.NONE="none",u.GZIP="gzip"})(nS=Xr.CompressionAlgorithm||(Xr.CompressionAlgorithm={}))});var Gi=d(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.OTLPExporterError=void 0;var ac=class extends Error{constructor(r,o,c){super(r),this.name="OTLPExporterError",this.data=c,this.code=o}};ji.OTLPExporterError=ac});var lc=d(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.configureCompression=Fe.createHttpAgent=Fe.sendWithHttp=void 0;var Wd=K("url"),Jd=K("http"),Qd=K("https"),oS=K("zlib"),iS=K("stream"),cc=(y(),E(m)),Hi=sc(),Yd=P(),zr=Gi(),ar=mt();function uS(u,r,o,c,i){let a=u.timeoutMillis,t=new Wd.URL(u.url),e=Number(process.versions.node.split(".")[0]),n,s,l=!1,h=setTimeout(()=>{if(clearTimeout(n),l=!0,s.destroyed){let V=new zr.OTLPExporterError("Request Timeout");i(V)}else e>=14?s.destroy():s.abort()},a),v={hostname:t.hostname,port:t.port,path:t.pathname,method:"POST",headers:Object.assign({"Content-Type":o},u.headers),agent:u.agent},b=t.protocol==="http:"?Jd.request:Qd.request,N=(V=ar.DEFAULT_EXPORT_MAX_ATTEMPTS,I=ar.DEFAULT_EXPORT_INITIAL_BACKOFF)=>{switch(s=b(v,U=>{let F="";U.on("data",me=>F+=me),U.on("aborted",()=>{if(l){let me=new zr.OTLPExporterError("Request Timeout");i(me)}}),U.on("end",()=>{if(l===!1)if(U.statusCode&&U.statusCode<299)cc.diag.debug(`statusCode: ${U.statusCode}`,F),c(),clearTimeout(h),clearTimeout(n);else if(U.statusCode&&(0,ar.isExportRetryable)(U.statusCode)&&V>0){let me;I=ar.DEFAULT_EXPORT_BACKOFF_MULTIPLIER*I,U.headers["retry-after"]?me=(0,ar.parseRetryAfterToMills)(U.headers["retry-after"]):me=Math.round(Math.random()*(ar.DEFAULT_EXPORT_MAX_BACKOFF-I)+I),n=setTimeout(()=>{N(V-1,I)},me)}else{let me=new zr.OTLPExporterError(U.statusMessage,U.statusCode,F);i(me),clearTimeout(h),clearTimeout(n)}})}),s.on("error",U=>{if(l){let F=new zr.OTLPExporterError("Request Timeout",U.code);i(F)}else i(U);clearTimeout(h),clearTimeout(n)}),s.on("abort",()=>{if(l){let U=new zr.OTLPExporterError("Request Timeout");i(U)}clearTimeout(h),clearTimeout(n)}),u.compression){case Hi.CompressionAlgorithm.GZIP:{s.setHeader("Content-Encoding","gzip"),sS(r).on("error",i).pipe(oS.createGzip()).on("error",i).pipe(s);break}default:s.end(r);break}};N()}Fe.sendWithHttp=uS;function sS(u){let r=new iS.Readable;return r.push(u),r.push(null),r}function aS(u){if(u.httpAgentOptions&&u.keepAlive===!1){cc.diag.warn("httpAgentOptions is used only when keepAlive is true");return}if(!(u.keepAlive===!1||!u.url))try{let o=new Wd.URL(u.url).protocol==="http:"?Jd.Agent:Qd.Agent;return new o(Object.assign({keepAlive:!0},u.httpAgentOptions))}catch(r){cc.diag.error(`collector exporter failed to create http agent. err: ${r.message}`);return}}Fe.createHttpAgent=aS;function cS(u){return u||(((0,Yd.getEnv)().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION||(0,Yd.getEnv)().OTEL_EXPORTER_OTLP_COMPRESSION)===Hi.CompressionAlgorithm.GZIP?Hi.CompressionAlgorithm.GZIP:Hi.CompressionAlgorithm.NONE)}Fe.configureCompression=cS});var th=d(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.OTLPExporterNodeBase=void 0;var lS=Kr(),pS=mt(),pc=lc(),Zd=(y(),E(m)),eh=P(),fc=class extends lS.OTLPExporterBase{constructor(r={}){super(r),this.DEFAULT_HEADERS={},r.metadata&&Zd.diag.warn("Metadata cannot be set when using http"),this.headers=Object.assign(this.DEFAULT_HEADERS,(0,pS.parseHeaders)(r.headers),eh.baggageUtils.parseKeyPairsIntoRecord((0,eh.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)),this.agent=(0,pc.createHttpAgent)(r),this.compression=(0,pc.configureCompression)(r.compression)}onInit(r){}send(r,o,c){if(this._shutdownOnce.isCalled){Zd.diag.debug("Shutdown already started. Cannot send objects");return}let i=this.convert(r),a=new Promise((e,n)=>{(0,pc.sendWithHttp)(this,JSON.stringify(i),"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(){}};Fi.OTLPExporterNodeBase=fc});var rh=d(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.CompressionAlgorithm=de.configureCompression=de.createHttpAgent=de.sendWithHttp=de.OTLPExporterNodeBase=void 0;var fS=th();Object.defineProperty(de,"OTLPExporterNodeBase",{enumerable:!0,get:function(){return fS.OTLPExporterNodeBase}});var dc=lc();Object.defineProperty(de,"sendWithHttp",{enumerable:!0,get:function(){return dc.sendWithHttp}});Object.defineProperty(de,"createHttpAgent",{enumerable:!0,get:function(){return dc.createHttpAgent}});Object.defineProperty(de,"configureCompression",{enumerable:!0,get:function(){return dc.configureCompression}});var dS=sc();Object.defineProperty(de,"CompressionAlgorithm",{enumerable:!0,get:function(){return dS.CompressionAlgorithm}})});var hc=d(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.sendWithXhr=lr.sendWithBeacon=void 0;var nh=(y(),E(m)),$r=Gi(),cr=mt();function hS(u,r,o,c,i){if(navigator.sendBeacon(r,new Blob([u],o)))nh.diag.debug("sendBeacon - can send",u),c();else{let a=new $r.OTLPExporterError(`sendBeacon - cannot send ${u}`);i(a)}}lr.sendWithBeacon=hS;function _S(u,r,o,c,i,a){let t,e,n=!1,s=setTimeout(()=>{if(clearTimeout(t),n=!0,e.readyState===XMLHttpRequest.DONE){let h=new $r.OTLPExporterError("Request Timeout");a(h)}else e.abort()},c),l=(h=cr.DEFAULT_EXPORT_MAX_ATTEMPTS,v=cr.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,V])=>{e.setRequestHeader(N,V)}),e.send(u),e.onreadystatechange=()=>{if(e.readyState===XMLHttpRequest.DONE&&n===!1)if(e.status>=200&&e.status<=299)nh.diag.debug("xhr success",u),i(),clearTimeout(s),clearTimeout(t);else if(e.status&&(0,cr.isExportRetryable)(e.status)&&h>0){let N;v=cr.DEFAULT_EXPORT_BACKOFF_MULTIPLIER*v,e.getResponseHeader("Retry-After")?N=(0,cr.parseRetryAfterToMills)(e.getResponseHeader("Retry-After")):N=Math.round(Math.random()*(cr.DEFAULT_EXPORT_MAX_BACKOFF-v)+v),t=setTimeout(()=>{l(h-1,v)},N)}else{let N=new $r.OTLPExporterError(`Failed to export with XHR (status: ${e.status})`,e.status);a(N),clearTimeout(s),clearTimeout(t)}},e.onabort=()=>{if(n){let N=new $r.OTLPExporterError("Request Timeout");a(N)}clearTimeout(s),clearTimeout(t)},e.onerror=()=>{if(n){let N=new $r.OTLPExporterError("Request Timeout");a(N)}clearTimeout(s),clearTimeout(t)}};l()}lr.sendWithXhr=_S});var ih=d(Xi=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});Xi.OTLPExporterBrowserBase=void 0;var mS=Kr(),yS=mt(),oh=hc(),ES=(y(),E(m)),Ki=P(),_c=class extends mS.OTLPExporterBase{constructor(r={}){super(r),this._useXHR=!1,this._useXHR=!!r.headers||typeof navigator.sendBeacon!="function",this._useXHR?this._headers=Object.assign({},(0,yS.parseHeaders)(r.headers),Ki.baggageUtils.parseKeyPairsIntoRecord((0,Ki.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)):this._headers={}}onInit(){Ki._globalThis.addEventListener("unload",this.shutdown)}onShutdown(){Ki._globalThis.removeEventListener("unload",this.shutdown)}send(r,o,c){if(this._shutdownOnce.isCalled){ES.diag.debug("Shutdown already started. Cannot send objects");return}let i=this.convert(r),a=JSON.stringify(i),t=new Promise((n,s)=>{this._useXHR?(0,oh.sendWithXhr)(a,this.url,this._headers,this.timeoutMillis,n,s):(0,oh.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)}};Xi.OTLPExporterBrowserBase=_c});var uh=d(pr=>{"use strict";Object.defineProperty(pr,"__esModule",{value:!0});pr.sendWithXhr=pr.OTLPExporterBrowserBase=void 0;var vS=ih();Object.defineProperty(pr,"OTLPExporterBrowserBase",{enumerable:!0,get:function(){return vS.OTLPExporterBrowserBase}});var gS=hc();Object.defineProperty(pr,"sendWithXhr",{enumerable:!0,get:function(){return gS.sendWithXhr}})});var ah=d(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.sendWithXhr=re.OTLPExporterBrowserBase=re.CompressionAlgorithm=re.configureCompression=re.createHttpAgent=re.sendWithHttp=re.OTLPExporterNodeBase=void 0;var Yr=rh();Object.defineProperty(re,"OTLPExporterNodeBase",{enumerable:!0,get:function(){return Yr.OTLPExporterNodeBase}});Object.defineProperty(re,"sendWithHttp",{enumerable:!0,get:function(){return Yr.sendWithHttp}});Object.defineProperty(re,"createHttpAgent",{enumerable:!0,get:function(){return Yr.createHttpAgent}});Object.defineProperty(re,"configureCompression",{enumerable:!0,get:function(){return Yr.configureCompression}});Object.defineProperty(re,"CompressionAlgorithm",{enumerable:!0,get:function(){return Yr.CompressionAlgorithm}});var sh=uh();Object.defineProperty(re,"OTLPExporterBrowserBase",{enumerable:!0,get:function(){return sh.OTLPExporterBrowserBase}});Object.defineProperty(re,"sendWithXhr",{enumerable:!0,get:function(){return sh.sendWithXhr}})});var zi=d(k=>{"use strict";var TS=k&&k.__createBinding||(Object.create?function(u,r,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return r[o]}})}:function(u,r,o,c){c===void 0&&(c=o),u[c]=r[o]}),SS=k&&k.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&TS(r,u,o)};Object.defineProperty(k,"__esModule",{value:!0});k.invalidTimeout=k.configureExporterTimeout=k.appendRootPathToUrlIfNeeded=k.appendResourcePathToUrl=k.parseHeaders=k.OTLPExporterError=k.OTLPExporterBase=void 0;SS(ah(),k);var bS=Kr();Object.defineProperty(k,"OTLPExporterBase",{enumerable:!0,get:function(){return bS.OTLPExporterBase}});var OS=Gi();Object.defineProperty(k,"OTLPExporterError",{enumerable:!0,get:function(){return OS.OTLPExporterError}});var Wr=mt();Object.defineProperty(k,"parseHeaders",{enumerable:!0,get:function(){return Wr.parseHeaders}});Object.defineProperty(k,"appendResourcePathToUrl",{enumerable:!0,get:function(){return Wr.appendResourcePathToUrl}});Object.defineProperty(k,"appendRootPathToUrlIfNeeded",{enumerable:!0,get:function(){return Wr.appendRootPathToUrlIfNeeded}});Object.defineProperty(k,"configureExporterTimeout",{enumerable:!0,get:function(){return Wr.configureExporterTimeout}});Object.defineProperty(k,"invalidTimeout",{enumerable:!0,get:function(){return Wr.invalidTimeout}})});var lh=d((QP,ch)=>{"use strict";ch.exports=AS;function AS(u,r){for(var o=new Array(arguments.length-1),c=0,i=2,a=!0;i<arguments.length;)o[c++]=arguments[i++];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),v=0;v<h.length;)h[v++]=arguments[v];e.apply(null,h)}};try{u.apply(r||null,o)}catch(s){a&&(a=!1,n(s))}})}});var hh=d(dh=>{"use strict";var $i=dh;$i.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 fr=new Array(64),fh=new Array(123);for(ve=0;ve<64;)fh[fr[ve]=ve<26?ve+65:ve<52?ve+71:ve<62?ve-4:ve-59|43]=ve++;var ve;$i.encode=function(r,o,c){for(var i=null,a=[],t=0,e=0,n;o<c;){var s=r[o++];switch(e){case 0:a[t++]=fr[s>>2],n=(s&3)<<4,e=1;break;case 1:a[t++]=fr[n|s>>4],n=(s&15)<<2,e=2;break;case 2:a[t++]=fr[n|s>>6],a[t++]=fr[s&63],e=0;break}t>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,a)),t=0)}return e&&(a[t++]=fr[n],a[t++]=61,e===1&&(a[t++]=61)),i?(t&&i.push(String.fromCharCode.apply(String,a.slice(0,t))),i.join("")):String.fromCharCode.apply(String,a.slice(0,t))};var ph="invalid encoding";$i.decode=function(r,o,c){for(var i=c,a=0,t,e=0;e<r.length;){var n=r.charCodeAt(e++);if(n===61&&a>1)break;if((n=fh[n])===void 0)throw Error(ph);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(ph);return c-i};$i.test=function(r){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r)}});var mh=d((eN,_h)=>{"use strict";_h.exports=Yi;function Yi(){this._listeners={}}Yi.prototype.on=function(r,o,c){return(this._listeners[r]||(this._listeners[r]=[])).push({fn:o,ctx:c||this}),this};Yi.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],i=0;i<c.length;)c[i].fn===o?c.splice(i,1):++i;return this};Yi.prototype.emit=function(r){var o=this._listeners[r];if(o){for(var c=[],i=1;i<arguments.length;)c.push(arguments[i++]);for(i=0;i<o.length;)o[i].fn.apply(o[i++].ctx,c)}return this}});var bh=d((tN,Sh)=>{"use strict";Sh.exports=yh(yh);function yh(u){return typeof Float32Array<"u"?function(){var r=new Float32Array([-0]),o=new Uint8Array(r.buffer),c=o[3]===128;function i(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]}u.writeFloatLE=c?i:a,u.writeFloatBE=c?a:i;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]}u.readFloatLE=c?t:e,u.readFloatBE=c?e:t}():function(){function r(c,i,a,t){var e=i<0?1:0;if(e&&(i=-i),i===0)c(1/i>0?0:2147483648,a,t);else if(isNaN(i))c(2143289344,a,t);else if(i>34028234663852886e22)c((e<<31|2139095040)>>>0,a,t);else if(i<11754943508222875e-54)c((e<<31|Math.round(i/1401298464324817e-60))>>>0,a,t);else{var n=Math.floor(Math.log(i)/Math.LN2),s=Math.round(i*Math.pow(2,-n)*8388608)&8388607;c((e<<31|n+127<<23|s)>>>0,a,t)}}u.writeFloatLE=r.bind(null,Eh),u.writeFloatBE=r.bind(null,vh);function o(c,i,a){var t=c(i,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)}u.readFloatLE=o.bind(null,gh),u.readFloatBE=o.bind(null,Th)}(),typeof Float64Array<"u"?function(){var r=new Float64Array([-0]),o=new Uint8Array(r.buffer),c=o[7]===128;function i(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]}u.writeDoubleLE=c?i:a,u.writeDoubleBE=c?a:i;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]}u.readDoubleLE=c?t:e,u.readDoubleBE=c?e:t}():function(){function r(c,i,a,t,e,n){var s=t<0?1:0;if(s&&(t=-t),t===0)c(0,e,n+i),c(1/t>0?0:2147483648,e,n+a);else if(isNaN(t))c(0,e,n+i),c(2146959360,e,n+a);else if(t>17976931348623157e292)c(0,e,n+i),c((s<<31|2146435072)>>>0,e,n+a);else{var l;if(t<22250738585072014e-324)l=t/5e-324,c(l>>>0,e,n+i),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+i),c((s<<31|h+1023<<20|l*1048576&1048575)>>>0,e,n+a)}}}u.writeDoubleLE=r.bind(null,Eh,0,4),u.writeDoubleBE=r.bind(null,vh,4,0);function o(c,i,a,t,e){var n=c(t,e+i),s=c(t,e+a),l=(s>>31)*2+1,h=s>>>20&2047,v=4294967296*(s&1048575)+n;return h===2047?v?NaN:l*(1/0):h===0?l*5e-324*v:l*Math.pow(2,h-1075)*(v+4503599627370496)}u.readDoubleLE=o.bind(null,gh,0,4),u.readDoubleBE=o.bind(null,Th,4,0)}(),u}function Eh(u,r,o){r[o]=u&255,r[o+1]=u>>>8&255,r[o+2]=u>>>16&255,r[o+3]=u>>>24}function vh(u,r,o){r[o]=u>>>24,r[o+1]=u>>>16&255,r[o+2]=u>>>8&255,r[o+3]=u&255}function gh(u,r){return(u[r]|u[r+1]<<8|u[r+2]<<16|u[r+3]<<24)>>>0}function Th(u,r){return(u[r]<<24|u[r+1]<<16|u[r+2]<<8|u[r+3])>>>0}});var Oh=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(u){}return null}});var Ph=d(Ah=>{"use strict";var mc=Ah;mc.length=function(r){for(var o=0,c=0,i=0;i<r.length;++i)c=r.charCodeAt(i),c<128?o+=1:c<2048?o+=2:(c&64512)===55296&&(r.charCodeAt(i+1)&64512)===56320?(++i,o+=4):o+=3;return o};mc.read=function(r,o,c){var i=c-o;if(i<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))};mc.write=function(r,o,c){for(var i=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-i}});var Rh=d((nN,Nh)=>{"use strict";Nh.exports=PS;function PS(u,r,o){var c=o||8192,i=c>>>1,a=null,t=c;return function(n){if(n<1||n>i)return u(n);t+n>c&&(a=u(c),t=0);var s=r.call(a,t,t+=n);return t&7&&(t=(t|7)+1),s}}});var Ih=d((oN,xh)=>{"use strict";xh.exports=z;var Jr=Xe();function z(u,r){this.lo=u>>>0,this.hi=r>>>0}var yt=z.zero=new z(0,0);yt.toNumber=function(){return 0};yt.zzEncode=yt.zzDecode=function(){return this};yt.length=function(){return 1};var NS=z.zeroHash="\0\0\0\0\0\0\0\0";z.fromNumber=function(r){if(r===0)return yt;var o=r<0;o&&(r=-r);var c=r>>>0,i=(r-c)/4294967296>>>0;return o&&(i=~i>>>0,c=~c>>>0,++c>4294967295&&(c=0,++i>4294967295&&(i=0))),new z(c,i)};z.from=function(r){if(typeof r=="number")return z.fromNumber(r);if(Jr.isString(r))if(Jr.Long)r=Jr.Long.fromString(r);else return z.fromNumber(parseInt(r,10));return r.low||r.high?new z(r.low>>>0,r.high>>>0):yt};z.prototype.toNumber=function(r){if(!r&&this.hi>>>31){var o=~this.lo+1>>>0,c=~this.hi>>>0;return o||(c=c+1>>>0),-(o+c*4294967296)}return this.lo+this.hi*4294967296};z.prototype.toLong=function(r){return Jr.Long?new Jr.Long(this.lo|0,this.hi|0,!!r):{low:this.lo|0,high:this.hi|0,unsigned:!!r}};var Ke=String.prototype.charCodeAt;z.fromHash=function(r){return r===NS?yt:new z((Ke.call(r,0)|Ke.call(r,1)<<8|Ke.call(r,2)<<16|Ke.call(r,3)<<24)>>>0,(Ke.call(r,4)|Ke.call(r,5)<<8|Ke.call(r,6)<<16|Ke.call(r,7)<<24)>>>0)};z.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};z.prototype.zzEncode=function(){var r=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^r)>>>0,this.lo=(this.lo<<1^r)>>>0,this};z.prototype.zzDecode=function(){var r=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^r)>>>0,this.hi=(this.hi>>>1^r)>>>0,this};z.prototype.length=function(){var r=this.lo,o=(this.lo>>>28|this.hi<<4)>>>0,c=this.hi>>>24;return c===0?o===0?r<16384?r<128?1:2:r<2097152?3:4:o<16384?o<128?5:6:o<2097152?7:8:c<128?9:10}});var Xe=d(yc=>{"use strict";var g=yc;g.asPromise=lh();g.base64=hh();g.EventEmitter=mh();g.float=bh();g.inquire=Oh();g.utf8=Ph();g.pool=Rh();g.LongBits=Ih();g.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);g.global=g.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||yc;g.emptyArray=Object.freeze?Object.freeze([]):[];g.emptyObject=Object.freeze?Object.freeze({}):{};g.isInteger=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r};g.isString=function(r){return typeof r=="string"||r instanceof String};g.isObject=function(r){return r&&typeof r=="object"};g.isset=g.isSet=function(r,o){var c=r[o];return c!=null&&r.hasOwnProperty(o)?typeof c!="object"||(Array.isArray(c)?c.length:Object.keys(c).length)>0:!1};g.Buffer=function(){try{var u=g.inquire("buffer").Buffer;return u.prototype.utf8Write?u:null}catch{return null}}();g._Buffer_from=null;g._Buffer_allocUnsafe=null;g.newBuffer=function(r){return typeof r=="number"?g.Buffer?g._Buffer_allocUnsafe(r):new g.Array(r):g.Buffer?g._Buffer_from(r):typeof Uint8Array>"u"?r:new Uint8Array(r)};g.Array=typeof Uint8Array<"u"?Uint8Array:Array;g.Long=g.global.dcodeIO&&g.global.dcodeIO.Long||g.global.Long||g.inquire("long");g.key2Re=/^true|false|0|1$/;g.key32Re=/^-?(?:0|[1-9][0-9]*)$/;g.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;g.longToHash=function(r){return r?g.LongBits.from(r).toHash():g.LongBits.zeroHash};g.longFromHash=function(r,o){var c=g.LongBits.fromHash(r);return g.Long?g.Long.fromBits(c.lo,c.hi,o):c.toNumber(!!o)};function Lh(u,r,o){for(var c=Object.keys(r),i=0;i<c.length;++i)(u[c[i]]===void 0||!o)&&(u[c[i]]=r[c[i]]);return u}g.merge=Lh;g.lcFirst=function(r){return r.charAt(0).toLowerCase()+r.substring(1)};function wh(u){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&&Lh(this,c)}return r.prototype=Object.create(Error.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return u},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),r}g.newError=wh;g.ProtocolError=wh("ProtocolError");g.oneOfGetter=function(r){for(var o={},c=0;c<r.length;++c)o[r[c]]=1;return function(){for(var i=Object.keys(this),a=i.length-1;a>-1;--a)if(o[i[a]]===1&&this[i[a]]!==void 0&&this[i[a]]!==null)return i[a]}};g.oneOfSetter=function(r){return function(o){for(var c=0;c<r.length;++c)r[c]!==o&&delete this[r[c]]}};g.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};g._configure=function(){var u=g.Buffer;if(!u){g._Buffer_from=g._Buffer_allocUnsafe=null;return}g._Buffer_from=u.from!==Uint8Array.from&&u.from||function(o,c){return new u(o,c)},g._Buffer_allocUnsafe=u.allocUnsafe||function(o){return new u(o)}}});var Oc=d((uN,Dh)=>{"use strict";Dh.exports=R;var he=Xe(),Ec,Wi=he.LongBits,Mh=he.base64,Ch=he.utf8;function Qr(u,r,o){this.fn=u,this.len=r,this.next=void 0,this.val=o}function gc(){}function RS(u){this.head=u.head,this.tail=u.tail,this.len=u.len,this.next=u.states}function R(){this.len=0,this.head=new Qr(gc,0,0),this.tail=this.head,this.states=null}var Uh=function(){return he.Buffer?function(){return(R.create=function(){return new Ec})()}:function(){return new R}};R.create=Uh();R.alloc=function(r){return new he.Array(r)};he.Array!==Array&&(R.alloc=he.pool(R.alloc,he.Array.prototype.subarray));R.prototype._push=function(r,o,c){return this.tail=this.tail.next=new Qr(r,o,c),this.len+=o,this};function Tc(u,r,o){r[o]=u&255}function xS(u,r,o){for(;u>127;)r[o++]=u&127|128,u>>>=7;r[o]=u}function Sc(u,r){this.len=u,this.next=void 0,this.val=r}Sc.prototype=Object.create(Qr.prototype);Sc.prototype.fn=xS;R.prototype.uint32=function(r){return this.len+=(this.tail=this.tail.next=new Sc((r=r>>>0)<128?1:r<16384?2:r<2097152?3:r<268435456?4:5,r)).len,this};R.prototype.int32=function(r){return r<0?this._push(bc,10,Wi.fromNumber(r)):this.uint32(r)};R.prototype.sint32=function(r){return this.uint32((r<<1^r>>31)>>>0)};function bc(u,r,o){for(;u.hi;)r[o++]=u.lo&127|128,u.lo=(u.lo>>>7|u.hi<<25)>>>0,u.hi>>>=7;for(;u.lo>127;)r[o++]=u.lo&127|128,u.lo=u.lo>>>7;r[o++]=u.lo}R.prototype.uint64=function(r){var o=Wi.from(r);return this._push(bc,o.length(),o)};R.prototype.int64=R.prototype.uint64;R.prototype.sint64=function(r){var o=Wi.from(r).zzEncode();return this._push(bc,o.length(),o)};R.prototype.bool=function(r){return this._push(Tc,1,r?1:0)};function vc(u,r,o){r[o]=u&255,r[o+1]=u>>>8&255,r[o+2]=u>>>16&255,r[o+3]=u>>>24}R.prototype.fixed32=function(r){return this._push(vc,4,r>>>0)};R.prototype.sfixed32=R.prototype.fixed32;R.prototype.fixed64=function(r){var o=Wi.from(r);return this._push(vc,4,o.lo)._push(vc,4,o.hi)};R.prototype.sfixed64=R.prototype.fixed64;R.prototype.float=function(r){return this._push(he.float.writeFloatLE,4,r)};R.prototype.double=function(r){return this._push(he.float.writeDoubleLE,8,r)};var IS=he.Array.prototype.set?function(r,o,c){o.set(r,c)}:function(r,o,c){for(var i=0;i<r.length;++i)o[c+i]=r[i]};R.prototype.bytes=function(r){var o=r.length>>>0;if(!o)return this._push(Tc,1,0);if(he.isString(r)){var c=R.alloc(o=Mh.length(r));Mh.decode(r,c,0),r=c}return this.uint32(o)._push(IS,o,r)};R.prototype.string=function(r){var o=Ch.length(r);return o?this.uint32(o)._push(Ch.write,o,r):this._push(Tc,1,0)};R.prototype.fork=function(){return this.states=new RS(this),this.head=this.tail=new Qr(gc,0,0),this.len=0,this};R.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Qr(gc,0,0),this.len=0),this};R.prototype.ldelim=function(){var r=this.head,o=this.tail,c=this.len;return this.reset().uint32(c),c&&(this.tail.next=r.next,this.tail=o,this.len+=c),this};R.prototype.finish=function(){for(var r=this.head.next,o=this.constructor.alloc(this.len),c=0;r;)r.fn(r.val,o,c),c+=r.len,r=r.next;return o};R._configure=function(u){Ec=u,R.create=Uh(),Ec._configure()}});var kh=d((sN,Vh)=>{"use strict";Vh.exports=Re;var Bh=Oc();(Re.prototype=Object.create(Bh.prototype)).constructor=Re;var ze=Xe();function Re(){Bh.call(this)}Re._configure=function(){Re.alloc=ze._Buffer_allocUnsafe,Re.writeBytesBuffer=ze.Buffer&&ze.Buffer.prototype instanceof Uint8Array&&ze.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 i=0;i<r.length;)o[c++]=r[i++]}};Re.prototype.bytes=function(r){ze.isString(r)&&(r=ze._Buffer_from(r,"base64"));var o=r.length>>>0;return this.uint32(o),o&&this._push(Re.writeBytesBuffer,o,r),this};function LS(u,r,o){u.length<40?ze.utf8.write(u,r,o):r.utf8Write?r.utf8Write(u,o):r.write(u,o)}Re.prototype.string=function(r){var o=ze.Buffer.byteLength(r);return this.uint32(o),o&&this._push(LS,o,r),this};Re._configure()});var Nc=d((aN,Fh)=>{"use strict";Fh.exports=q;var ge=Xe(),Pc,Gh=ge.LongBits,wS=ge.utf8;function Te(u,r){return RangeError("index out of range: "+u.pos+" + "+(r||1)+" > "+u.len)}function q(u){this.buf=u,this.pos=0,this.len=u.length}var qh=typeof Uint8Array<"u"?function(r){if(r instanceof Uint8Array||Array.isArray(r))return new q(r);throw Error("illegal buffer")}:function(r){if(Array.isArray(r))return new q(r);throw Error("illegal buffer")},Hh=function(){return ge.Buffer?function(o){return(q.create=function(i){return ge.Buffer.isBuffer(i)?new Pc(i):qh(i)})(o)}:qh};q.create=Hh();q.prototype._slice=ge.Array.prototype.subarray||ge.Array.prototype.slice;q.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,Te(this,10);return r}}();q.prototype.int32=function(){return this.uint32()|0};q.prototype.sint32=function(){var r=this.uint32();return r>>>1^-(r&1)|0};function Ac(){var u=new Gh(0,0),r=0;if(this.len-this.pos>4){for(;r<4;++r)if(u.lo=(u.lo|(this.buf[this.pos]&127)<<r*7)>>>0,this.buf[this.pos++]<128)return u;if(u.lo=(u.lo|(this.buf[this.pos]&127)<<28)>>>0,u.hi=(u.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return u;r=0}else{for(;r<3;++r){if(this.pos>=this.len)throw Te(this);if(u.lo=(u.lo|(this.buf[this.pos]&127)<<r*7)>>>0,this.buf[this.pos++]<128)return u}return u.lo=(u.lo|(this.buf[this.pos++]&127)<<r*7)>>>0,u}if(this.len-this.pos>4){for(;r<5;++r)if(u.hi=(u.hi|(this.buf[this.pos]&127)<<r*7+3)>>>0,this.buf[this.pos++]<128)return u}else for(;r<5;++r){if(this.pos>=this.len)throw Te(this);if(u.hi=(u.hi|(this.buf[this.pos]&127)<<r*7+3)>>>0,this.buf[this.pos++]<128)return u}throw Error("invalid varint encoding")}q.prototype.bool=function(){return this.uint32()!==0};function Ji(u,r){return(u[r-4]|u[r-3]<<8|u[r-2]<<16|u[r-1]<<24)>>>0}q.prototype.fixed32=function(){if(this.pos+4>this.len)throw Te(this,4);return Ji(this.buf,this.pos+=4)};q.prototype.sfixed32=function(){if(this.pos+4>this.len)throw Te(this,4);return Ji(this.buf,this.pos+=4)|0};function jh(){if(this.pos+8>this.len)throw Te(this,8);return new Gh(Ji(this.buf,this.pos+=4),Ji(this.buf,this.pos+=4))}q.prototype.float=function(){if(this.pos+4>this.len)throw Te(this,4);var r=ge.float.readFloatLE(this.buf,this.pos);return this.pos+=4,r};q.prototype.double=function(){if(this.pos+8>this.len)throw Te(this,4);var r=ge.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,r};q.prototype.bytes=function(){var r=this.uint32(),o=this.pos,c=this.pos+r;if(c>this.len)throw Te(this,r);if(this.pos+=r,Array.isArray(this.buf))return this.buf.slice(o,c);if(o===c){var i=ge.Buffer;return i?i.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,o,c)};q.prototype.string=function(){var r=this.bytes();return wS.read(r,0,r.length)};q.prototype.skip=function(r){if(typeof r=="number"){if(this.pos+r>this.len)throw Te(this,r);this.pos+=r}else do if(this.pos>=this.len)throw Te(this);while(this.buf[this.pos++]&128);return this};q.prototype.skipType=function(u){switch(u){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(u=this.uint32()&7)!==4;)this.skipType(u);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+u+" at offset "+this.pos)}return this};q._configure=function(u){Pc=u,q.create=Hh(),Pc._configure();var r=ge.Long?"toLong":"toNumber";ge.merge(q.prototype,{int64:function(){return Ac.call(this)[r](!1)},uint64:function(){return Ac.call(this)[r](!0)},sint64:function(){return Ac.call(this).zzDecode()[r](!1)},fixed64:function(){return jh.call(this)[r](!0)},sfixed64:function(){return jh.call(this)[r](!1)}})}});var $h=d((cN,zh)=>{"use strict";zh.exports=Et;var Xh=Nc();(Et.prototype=Object.create(Xh.prototype)).constructor=Et;var Kh=Xe();function Et(u){Xh.call(this,u)}Et._configure=function(){Kh.Buffer&&(Et.prototype._slice=Kh.Buffer.prototype.slice)};Et.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))};Et._configure()});var Wh=d((lN,Yh)=>{"use strict";Yh.exports=Zr;var Rc=Xe();(Zr.prototype=Object.create(Rc.EventEmitter.prototype)).constructor=Zr;function Zr(u,r,o){if(typeof u!="function")throw TypeError("rpcImpl must be a function");Rc.EventEmitter.call(this),this.rpcImpl=u,this.requestDelimited=!!r,this.responseDelimited=!!o}Zr.prototype.rpcCall=function u(r,o,c,i,a){if(!i)throw TypeError("request must be specified");var t=this;if(!a)return Rc.asPromise(u,t,r,o,c,i);if(!t.rpcImpl){setTimeout(function(){a(Error("already ended"))},0);return}try{return t.rpcImpl(r,o[t.requestDelimited?"encodeDelimited":"encode"](i).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}};Zr.prototype.end=function(r){return this.rpcImpl&&(r||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var Qh=d(Jh=>{"use strict";var MS=Jh;MS.Service=Wh()});var e_=d((fN,Zh)=>{"use strict";Zh.exports={}});var n_=d(r_=>{"use strict";var ie=r_;ie.build="minimal";ie.Writer=Oc();ie.BufferWriter=kh();ie.Reader=Nc();ie.BufferReader=$h();ie.util=Xe();ie.rpc=Qh();ie.roots=e_();ie.configure=t_;function t_(){ie.util._configure(),ie.Writer._configure(ie.BufferWriter),ie.Reader._configure(ie.BufferReader)}t_()});var i_=d((hN,o_)=>{"use strict";o_.exports=n_()});var s_=d((_N,u_)=>{"use strict";var T=i_(),_=T.Reader,S=T.Writer,f=T.util,p=T.roots.default||(T.roots.default={});p.opentelemetry=function(){var u={};return u.proto=function(){var r={};return r.common=function(){var o={};return o.v1=function(){var c={};return c.AnyValue=function(){function i(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]])}i.prototype.stringValue=null,i.prototype.boolValue=null,i.prototype.intValue=null,i.prototype.doubleValue=null,i.prototype.arrayValue=null,i.prototype.kvlistValue=null,i.prototype.bytesValue=null;var a;return Object.defineProperty(i.prototype,"value",{get:f.oneOfGetter(a=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"]),set:f.oneOfSetter(a)}),i.create=function(e){return new i(e)},i.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},i.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},i.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.common.v1.AnyValue;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.stringValue=e.string();break}case 2:{l.boolValue=e.bool();break}case 3:{l.intValue=e.int64();break}case 4:{l.doubleValue=e.double();break}case 5:{l.arrayValue=p.opentelemetry.proto.common.v1.ArrayValue.decode(e,e.uint32());break}case 6:{l.kvlistValue=p.opentelemetry.proto.common.v1.KeyValueList.decode(e,e.uint32());break}case 7:{l.bytesValue=e.bytes();break}default:e.skipType(h&7);break}}return l},i.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.AnyValue"},i}(),c.ArrayValue=function(){function i(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 i.prototype.values=f.emptyArray,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.ArrayValue;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.values&&s.values.length||(s.values=[]),s.values.push(p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.ArrayValue"},i}(),c.KeyValueList=function(){function i(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 i.prototype.values=f.emptyArray,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.KeyValueList;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.values&&s.values.length||(s.values=[]),s.values.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.KeyValueList"},i}(),c.KeyValue=function(){function i(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 i.prototype.key=null,i.prototype.value=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.KeyValue;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.key=t.string();break}case 2:{s.value=p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32());break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.KeyValue"},i}(),c.InstrumentationScope=function(){function i(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 i.prototype.name=null,i.prototype.version=null,i.prototype.attributes=f.emptyArray,i.prototype.droppedAttributesCount=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.InstrumentationScope;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.name=t.string();break}case 2:{s.version=t.string();break}case 3:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 4:{s.droppedAttributesCount=t.uint32();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.InstrumentationScope"},i}(),c}(),o}(),r.resource=function(){var o={};return o.v1=function(){var c={};return c.Resource=function(){function i(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 i.prototype.attributes=f.emptyArray,i.prototype.droppedAttributesCount=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.resource.v1.Resource;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{s.droppedAttributesCount=t.uint32();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.resource.v1.Resource"},i}(),c}(),o}(),r.trace=function(){var o={};return o.v1=function(){var c={};return c.TracesData=function(){function i(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 i.prototype.resourceSpans=f.emptyArray,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.TracesData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resourceSpans&&s.resourceSpans.length||(s.resourceSpans=[]),s.resourceSpans.push(p.opentelemetry.proto.trace.v1.ResourceSpans.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.TracesData"},i}(),c.ResourceSpans=function(){function i(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 i.prototype.resource=null,i.prototype.scopeSpans=f.emptyArray,i.prototype.schemaUrl=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.ResourceSpans;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{s.scopeSpans&&s.scopeSpans.length||(s.scopeSpans=[]),s.scopeSpans.push(p.opentelemetry.proto.trace.v1.ScopeSpans.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.ResourceSpans"},i}(),c.ScopeSpans=function(){function i(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 i.prototype.scope=null,i.prototype.spans=f.emptyArray,i.prototype.schemaUrl=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.ScopeSpans;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{s.spans&&s.spans.length||(s.spans=[]),s.spans.push(p.opentelemetry.proto.trace.v1.Span.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.ScopeSpans"},i}(),c.Span=function(){function i(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 i.prototype.traceId=null,i.prototype.spanId=null,i.prototype.traceState=null,i.prototype.parentSpanId=null,i.prototype.name=null,i.prototype.kind=null,i.prototype.startTimeUnixNano=null,i.prototype.endTimeUnixNano=null,i.prototype.attributes=f.emptyArray,i.prototype.droppedAttributesCount=null,i.prototype.events=f.emptyArray,i.prototype.droppedEventsCount=null,i.prototype.links=f.emptyArray,i.prototype.droppedLinksCount=null,i.prototype.status=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.Span;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.traceId=t.bytes();break}case 2:{s.spanId=t.bytes();break}case 3:{s.traceState=t.string();break}case 4:{s.parentSpanId=t.bytes();break}case 5:{s.name=t.string();break}case 6:{s.kind=t.int32();break}case 7:{s.startTimeUnixNano=t.fixed64();break}case 8:{s.endTimeUnixNano=t.fixed64();break}case 9:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 10:{s.droppedAttributesCount=t.uint32();break}case 11:{s.events&&s.events.length||(s.events=[]),s.events.push(p.opentelemetry.proto.trace.v1.Span.Event.decode(t,t.uint32()));break}case 12:{s.droppedEventsCount=t.uint32();break}case 13:{s.links&&s.links.length||(s.links=[]),s.links.push(p.opentelemetry.proto.trace.v1.Span.Link.decode(t,t.uint32()));break}case 14:{s.droppedLinksCount=t.uint32();break}case 15:{s.status=p.opentelemetry.proto.trace.v1.Status.decode(t,t.uint32());break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Span"},i.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}(),i.Event=function(){function a(t){if(this.attributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.timeUnixNano=null,a.prototype.name=null,a.prototype.attributes=f.emptyArray,a.prototype.droppedAttributesCount=null,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=S.create()),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(9).fixed64(e.timeUnixNano),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&n.uint32(18).string(e.name),e.attributes!=null&&e.attributes.length)for(var s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],n.uint32(26).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&n.uint32(32).uint32(e.droppedAttributesCount),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.trace.v1.Span.Event;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.timeUnixNano=e.fixed64();break}case 2:{l.name=e.string();break}case 3:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 4:{l.droppedAttributesCount=e.uint32();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!f.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&f.isInteger(e.timeUnixNano.low)&&f.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.name!=null&&e.hasOwnProperty("name")&&!f.isString(e.name))return"name: string expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var n=0;n<e.attributes.length;++n){var s=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[n]);if(s)return"attributes."+s}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.trace.v1.Span.Event)return e;var n=new p.opentelemetry.proto.trace.v1.Span.Event;if(e.timeUnixNano!=null&&(f.Long?(n.timeUnixNano=f.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.name!=null&&(n.name=String(e.name)),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");n.attributes=[];for(var s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}return e.droppedAttributesCount!=null&&(n.droppedAttributesCount=e.droppedAttributesCount>>>0),n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.attributes=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.timeUnixNano=n.longs===String?"0":0;s.name="",s.droppedAttributesCount=0}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?s.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:s.timeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.name!=null&&e.hasOwnProperty("name")&&(s.name=e.name),e.attributes&&e.attributes.length){s.attributes=[];for(var h=0;h<e.attributes.length;++h)s.attributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[h],n)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(s.droppedAttributesCount=e.droppedAttributesCount),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span.Event"},a}(),i.Link=function(){function a(t){if(this.attributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.traceId=null,a.prototype.spanId=null,a.prototype.traceState=null,a.prototype.attributes=f.emptyArray,a.prototype.droppedAttributesCount=null,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=S.create()),e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId")&&n.uint32(10).bytes(e.traceId),e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId")&&n.uint32(18).bytes(e.spanId),e.traceState!=null&&Object.hasOwnProperty.call(e,"traceState")&&n.uint32(26).string(e.traceState),e.attributes!=null&&e.attributes.length)for(var s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],n.uint32(34).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&n.uint32(40).uint32(e.droppedAttributesCount),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.trace.v1.Span.Link;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.traceId=e.bytes();break}case 2:{l.spanId=e.bytes();break}case 3:{l.traceState=e.string();break}case 4:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 5:{l.droppedAttributesCount=e.uint32();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.traceId!=null&&e.hasOwnProperty("traceId")&&!(e.traceId&&typeof e.traceId.length=="number"||f.isString(e.traceId)))return"traceId: buffer expected";if(e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||f.isString(e.spanId)))return"spanId: buffer expected";if(e.traceState!=null&&e.hasOwnProperty("traceState")&&!f.isString(e.traceState))return"traceState: string expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var n=0;n<e.attributes.length;++n){var s=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[n]);if(s)return"attributes."+s}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.trace.v1.Span.Link)return e;var n=new p.opentelemetry.proto.trace.v1.Span.Link;if(e.traceId!=null&&(typeof e.traceId=="string"?f.base64.decode(e.traceId,n.traceId=f.newBuffer(f.base64.length(e.traceId)),0):e.traceId.length>=0&&(n.traceId=e.traceId)),e.spanId!=null&&(typeof e.spanId=="string"?f.base64.decode(e.spanId,n.spanId=f.newBuffer(f.base64.length(e.spanId)),0):e.spanId.length>=0&&(n.spanId=e.spanId)),e.traceState!=null&&(n.traceState=String(e.traceState)),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");n.attributes=[];for(var s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}return e.droppedAttributesCount!=null&&(n.droppedAttributesCount=e.droppedAttributesCount>>>0),n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.attributes=[]),n.defaults&&(n.bytes===String?s.traceId="":(s.traceId=[],n.bytes!==Array&&(s.traceId=f.newBuffer(s.traceId))),n.bytes===String?s.spanId="":(s.spanId=[],n.bytes!==Array&&(s.spanId=f.newBuffer(s.spanId))),s.traceState="",s.droppedAttributesCount=0),e.traceId!=null&&e.hasOwnProperty("traceId")&&(s.traceId=n.bytes===String?f.base64.encode(e.traceId,0,e.traceId.length):n.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),e.spanId!=null&&e.hasOwnProperty("spanId")&&(s.spanId=n.bytes===String?f.base64.encode(e.spanId,0,e.spanId.length):n.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),e.traceState!=null&&e.hasOwnProperty("traceState")&&(s.traceState=e.traceState),e.attributes&&e.attributes.length){s.attributes=[];for(var l=0;l<e.attributes.length;++l)s.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[l],n)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(s.droppedAttributesCount=e.droppedAttributesCount),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span.Link"},a}(),i}(),c.Status=function(){function i(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 i.prototype.message=null,i.prototype.code=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.Status;t.pos<n;){var l=t.uint32();switch(l>>>3){case 2:{s.message=t.string();break}case 3:{s.code=t.int32();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Status"},i.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}(),i}(),c}(),o}(),r.collector=function(){var o={};return o.trace=function(){var c={};return c.v1=function(){var i={};return i.TraceService=function(){function a(t,e,n){T.rpc.Service.call(this,t,e,n)}return(a.prototype=Object.create(T.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}(),i.ExportTraceServiceRequest=function(){function a(t){if(this.resourceSpans=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.resourceSpans=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=S.create()),e.resourceSpans!=null&&e.resourceSpans.length)for(var s=0;s<e.resourceSpans.length;++s)p.opentelemetry.proto.trace.v1.ResourceSpans.encode(e.resourceSpans[s],n.uint32(10).fork()).ldelim();return n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.resourceSpans&&l.resourceSpans.length||(l.resourceSpans=[]),l.resourceSpans.push(p.opentelemetry.proto.trace.v1.ResourceSpans.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceSpans!=null&&e.hasOwnProperty("resourceSpans")){if(!Array.isArray(e.resourceSpans))return"resourceSpans: array expected";for(var n=0;n<e.resourceSpans.length;++n){var s=p.opentelemetry.proto.trace.v1.ResourceSpans.verify(e.resourceSpans[n]);if(s)return"resourceSpans."+s}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;if(e.resourceSpans){if(!Array.isArray(e.resourceSpans))throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected");n.resourceSpans=[];for(var s=0;s<e.resourceSpans.length;++s){if(typeof e.resourceSpans[s]!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected");n.resourceSpans[s]=p.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(e.resourceSpans[s])}}return n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.resourceSpans=[]),e.resourceSpans&&e.resourceSpans.length){s.resourceSpans=[];for(var l=0;l<e.resourceSpans.length;++l)s.resourceSpans[l]=p.opentelemetry.proto.trace.v1.ResourceSpans.toObject(e.resourceSpans[l],n)}return s},a.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"},a}(),i.ExportTraceServiceResponse=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.partialSuccess=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=S.create()),e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess")&&p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(e.partialSuccess,n.uint32(10).fork()).ldelim(),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(e,e.uint32());break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(e.partialSuccess)}return n},a.toObject=function(e,n){n||(n={});var s={};return n.defaults&&(s.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(s.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(e.partialSuccess,n)),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},a}(),i.ExportTracePartialSuccess=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.rejectedSpans=null,a.prototype.errorMessage=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=S.create()),e.rejectedSpans!=null&&Object.hasOwnProperty.call(e,"rejectedSpans")&&n.uint32(8).int64(e.rejectedSpans),e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage")&&n.uint32(18).string(e.errorMessage),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.rejectedSpans=e.int64();break}case 2:{l.errorMessage=e.string();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedSpans!=null&&e.hasOwnProperty("rejectedSpans")&&!f.isInteger(e.rejectedSpans)&&!(e.rejectedSpans&&f.isInteger(e.rejectedSpans.low)&&f.isInteger(e.rejectedSpans.high))?"rejectedSpans: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!f.isString(e.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;return e.rejectedSpans!=null&&(f.Long?(n.rejectedSpans=f.Long.fromValue(e.rejectedSpans)).unsigned=!1:typeof e.rejectedSpans=="string"?n.rejectedSpans=parseInt(e.rejectedSpans,10):typeof e.rejectedSpans=="number"?n.rejectedSpans=e.rejectedSpans:typeof e.rejectedSpans=="object"&&(n.rejectedSpans=new f.LongBits(e.rejectedSpans.low>>>0,e.rejectedSpans.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},a.toObject=function(e,n){n||(n={});var s={};if(n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.rejectedSpans=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.rejectedSpans=n.longs===String?"0":0;s.errorMessage=""}return e.rejectedSpans!=null&&e.hasOwnProperty("rejectedSpans")&&(typeof e.rejectedSpans=="number"?s.rejectedSpans=n.longs===String?String(e.rejectedSpans):e.rejectedSpans:s.rejectedSpans=n.longs===String?f.Long.prototype.toString.call(e.rejectedSpans):n.longs===Number?new f.LongBits(e.rejectedSpans.low>>>0,e.rejectedSpans.high>>>0).toNumber():e.rejectedSpans),e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&(s.errorMessage=e.errorMessage),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},a}(),i}(),c}(),o.metrics=function(){var c={};return c.v1=function(){var i={};return i.MetricsService=function(){function a(t,e,n){T.rpc.Service.call(this,t,e,n)}return(a.prototype=Object.create(T.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}(),i.ExportMetricsServiceRequest=function(){function a(t){if(this.resourceMetrics=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.resourceMetrics=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=S.create()),e.resourceMetrics!=null&&e.resourceMetrics.length)for(var s=0;s<e.resourceMetrics.length;++s)p.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(e.resourceMetrics[s],n.uint32(10).fork()).ldelim();return n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.resourceMetrics&&l.resourceMetrics.length||(l.resourceMetrics=[]),l.resourceMetrics.push(p.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceMetrics!=null&&e.hasOwnProperty("resourceMetrics")){if(!Array.isArray(e.resourceMetrics))return"resourceMetrics: array expected";for(var n=0;n<e.resourceMetrics.length;++n){var s=p.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(e.resourceMetrics[n]);if(s)return"resourceMetrics."+s}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;if(e.resourceMetrics){if(!Array.isArray(e.resourceMetrics))throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected");n.resourceMetrics=[];for(var s=0;s<e.resourceMetrics.length;++s){if(typeof e.resourceMetrics[s]!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected");n.resourceMetrics[s]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(e.resourceMetrics[s])}}return n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.resourceMetrics=[]),e.resourceMetrics&&e.resourceMetrics.length){s.resourceMetrics=[];for(var l=0;l<e.resourceMetrics.length;++l)s.resourceMetrics[l]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(e.resourceMetrics[l],n)}return s},a.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"},a}(),i.ExportMetricsServiceResponse=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.partialSuccess=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=S.create()),e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess")&&p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(e.partialSuccess,n.uint32(10).fork()).ldelim(),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(e,e.uint32());break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(e.partialSuccess)}return n},a.toObject=function(e,n){n||(n={});var s={};return n.defaults&&(s.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(s.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(e.partialSuccess,n)),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},a}(),i.ExportMetricsPartialSuccess=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.rejectedDataPoints=null,a.prototype.errorMessage=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=S.create()),e.rejectedDataPoints!=null&&Object.hasOwnProperty.call(e,"rejectedDataPoints")&&n.uint32(8).int64(e.rejectedDataPoints),e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage")&&n.uint32(18).string(e.errorMessage),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.rejectedDataPoints=e.int64();break}case 2:{l.errorMessage=e.string();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedDataPoints!=null&&e.hasOwnProperty("rejectedDataPoints")&&!f.isInteger(e.rejectedDataPoints)&&!(e.rejectedDataPoints&&f.isInteger(e.rejectedDataPoints.low)&&f.isInteger(e.rejectedDataPoints.high))?"rejectedDataPoints: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!f.isString(e.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;return e.rejectedDataPoints!=null&&(f.Long?(n.rejectedDataPoints=f.Long.fromValue(e.rejectedDataPoints)).unsigned=!1:typeof e.rejectedDataPoints=="string"?n.rejectedDataPoints=parseInt(e.rejectedDataPoints,10):typeof e.rejectedDataPoints=="number"?n.rejectedDataPoints=e.rejectedDataPoints:typeof e.rejectedDataPoints=="object"&&(n.rejectedDataPoints=new f.LongBits(e.rejectedDataPoints.low>>>0,e.rejectedDataPoints.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},a.toObject=function(e,n){n||(n={});var s={};if(n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.rejectedDataPoints=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.rejectedDataPoints=n.longs===String?"0":0;s.errorMessage=""}return e.rejectedDataPoints!=null&&e.hasOwnProperty("rejectedDataPoints")&&(typeof e.rejectedDataPoints=="number"?s.rejectedDataPoints=n.longs===String?String(e.rejectedDataPoints):e.rejectedDataPoints:s.rejectedDataPoints=n.longs===String?f.Long.prototype.toString.call(e.rejectedDataPoints):n.longs===Number?new f.LongBits(e.rejectedDataPoints.low>>>0,e.rejectedDataPoints.high>>>0).toNumber():e.rejectedDataPoints),e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&(s.errorMessage=e.errorMessage),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},a}(),i}(),c}(),o.logs=function(){var c={};return c.v1=function(){var i={};return i.LogsService=function(){function a(t,e,n){T.rpc.Service.call(this,t,e,n)}return(a.prototype=Object.create(T.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}(),i.ExportLogsServiceRequest=function(){function a(t){if(this.resourceLogs=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.resourceLogs=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=S.create()),e.resourceLogs!=null&&e.resourceLogs.length)for(var s=0;s<e.resourceLogs.length;++s)p.opentelemetry.proto.logs.v1.ResourceLogs.encode(e.resourceLogs[s],n.uint32(10).fork()).ldelim();return n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.resourceLogs&&l.resourceLogs.length||(l.resourceLogs=[]),l.resourceLogs.push(p.opentelemetry.proto.logs.v1.ResourceLogs.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceLogs!=null&&e.hasOwnProperty("resourceLogs")){if(!Array.isArray(e.resourceLogs))return"resourceLogs: array expected";for(var n=0;n<e.resourceLogs.length;++n){var s=p.opentelemetry.proto.logs.v1.ResourceLogs.verify(e.resourceLogs[n]);if(s)return"resourceLogs."+s}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;if(e.resourceLogs){if(!Array.isArray(e.resourceLogs))throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected");n.resourceLogs=[];for(var s=0;s<e.resourceLogs.length;++s){if(typeof e.resourceLogs[s]!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected");n.resourceLogs[s]=p.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(e.resourceLogs[s])}}return n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.resourceLogs=[]),e.resourceLogs&&e.resourceLogs.length){s.resourceLogs=[];for(var l=0;l<e.resourceLogs.length;++l)s.resourceLogs[l]=p.opentelemetry.proto.logs.v1.ResourceLogs.toObject(e.resourceLogs[l],n)}return s},a.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"},a}(),i.ExportLogsServiceResponse=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.partialSuccess=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=S.create()),e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess")&&p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(e.partialSuccess,n.uint32(10).fork()).ldelim(),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(e,e.uint32());break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(e.partialSuccess)}return n},a.toObject=function(e,n){n||(n={});var s={};return n.defaults&&(s.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(s.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(e.partialSuccess,n)),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},a}(),i.ExportLogsPartialSuccess=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.rejectedLogRecords=null,a.prototype.errorMessage=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=S.create()),e.rejectedLogRecords!=null&&Object.hasOwnProperty.call(e,"rejectedLogRecords")&&n.uint32(8).int64(e.rejectedLogRecords),e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage")&&n.uint32(18).string(e.errorMessage),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.rejectedLogRecords=e.int64();break}case 2:{l.errorMessage=e.string();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedLogRecords!=null&&e.hasOwnProperty("rejectedLogRecords")&&!f.isInteger(e.rejectedLogRecords)&&!(e.rejectedLogRecords&&f.isInteger(e.rejectedLogRecords.low)&&f.isInteger(e.rejectedLogRecords.high))?"rejectedLogRecords: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!f.isString(e.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;return e.rejectedLogRecords!=null&&(f.Long?(n.rejectedLogRecords=f.Long.fromValue(e.rejectedLogRecords)).unsigned=!1:typeof e.rejectedLogRecords=="string"?n.rejectedLogRecords=parseInt(e.rejectedLogRecords,10):typeof e.rejectedLogRecords=="number"?n.rejectedLogRecords=e.rejectedLogRecords:typeof e.rejectedLogRecords=="object"&&(n.rejectedLogRecords=new f.LongBits(e.rejectedLogRecords.low>>>0,e.rejectedLogRecords.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},a.toObject=function(e,n){n||(n={});var s={};if(n.defaults){if(f.Long){var l=new f.Long(0,0,!1);s.rejectedLogRecords=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.rejectedLogRecords=n.longs===String?"0":0;s.errorMessage=""}return e.rejectedLogRecords!=null&&e.hasOwnProperty("rejectedLogRecords")&&(typeof e.rejectedLogRecords=="number"?s.rejectedLogRecords=n.longs===String?String(e.rejectedLogRecords):e.rejectedLogRecords:s.rejectedLogRecords=n.longs===String?f.Long.prototype.toString.call(e.rejectedLogRecords):n.longs===Number?new f.LongBits(e.rejectedLogRecords.low>>>0,e.rejectedLogRecords.high>>>0).toNumber():e.rejectedLogRecords),e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&(s.errorMessage=e.errorMessage),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},a}(),i}(),c}(),o}(),r.metrics=function(){var o={};return o.v1=function(){var c={};return c.MetricsData=function(){function i(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 i.prototype.resourceMetrics=f.emptyArray,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.MetricsData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resourceMetrics&&s.resourceMetrics.length||(s.resourceMetrics=[]),s.resourceMetrics.push(p.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.MetricsData"},i}(),c.ResourceMetrics=function(){function i(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 i.prototype.resource=null,i.prototype.scopeMetrics=f.emptyArray,i.prototype.schemaUrl=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.ResourceMetrics;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{s.scopeMetrics&&s.scopeMetrics.length||(s.scopeMetrics=[]),s.scopeMetrics.push(p.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ResourceMetrics"},i}(),c.ScopeMetrics=function(){function i(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 i.prototype.scope=null,i.prototype.metrics=f.emptyArray,i.prototype.schemaUrl=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.ScopeMetrics;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{s.metrics&&s.metrics.length||(s.metrics=[]),s.metrics.push(p.opentelemetry.proto.metrics.v1.Metric.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ScopeMetrics"},i}(),c.Metric=function(){function i(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]])}i.prototype.name=null,i.prototype.description=null,i.prototype.unit=null,i.prototype.gauge=null,i.prototype.sum=null,i.prototype.histogram=null,i.prototype.exponentialHistogram=null,i.prototype.summary=null;var a;return Object.defineProperty(i.prototype,"data",{get:f.oneOfGetter(a=["gauge","sum","histogram","exponentialHistogram","summary"]),set:f.oneOfSetter(a)}),i.create=function(e){return new i(e)},i.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},i.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},i.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.Metric;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.name=e.string();break}case 2:{l.description=e.string();break}case 3:{l.unit=e.string();break}case 5:{l.gauge=p.opentelemetry.proto.metrics.v1.Gauge.decode(e,e.uint32());break}case 7:{l.sum=p.opentelemetry.proto.metrics.v1.Sum.decode(e,e.uint32());break}case 9:{l.histogram=p.opentelemetry.proto.metrics.v1.Histogram.decode(e,e.uint32());break}case 10:{l.exponentialHistogram=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(e,e.uint32());break}case 11:{l.summary=p.opentelemetry.proto.metrics.v1.Summary.decode(e,e.uint32());break}default:e.skipType(h&7);break}}return l},i.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Metric"},i}(),c.Gauge=function(){function i(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 i.prototype.dataPoints=f.emptyArray,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Gauge;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Gauge"},i}(),c.Sum=function(){function i(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 i.prototype.dataPoints=f.emptyArray,i.prototype.aggregationTemporality=null,i.prototype.isMonotonic=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Sum;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(t,t.uint32()));break}case 2:{s.aggregationTemporality=t.int32();break}case 3:{s.isMonotonic=t.bool();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Sum"},i}(),c.Histogram=function(){function i(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 i.prototype.dataPoints=f.emptyArray,i.prototype.aggregationTemporality=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Histogram;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(t,t.uint32()));break}case 2:{s.aggregationTemporality=t.int32();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Histogram"},i}(),c.ExponentialHistogram=function(){function i(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 i.prototype.dataPoints=f.emptyArray,i.prototype.aggregationTemporality=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.ExponentialHistogram;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(t,t.uint32()));break}case 2:{s.aggregationTemporality=t.int32();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ExponentialHistogram"},i}(),c.Summary=function(){function i(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 i.prototype.dataPoints=f.emptyArray,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Summary;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Summary"},i}(),c.AggregationTemporality=function(){var i={},a=Object.create(i);return a[i[0]="AGGREGATION_TEMPORALITY_UNSPECIFIED"]=0,a[i[1]="AGGREGATION_TEMPORALITY_DELTA"]=1,a[i[2]="AGGREGATION_TEMPORALITY_CUMULATIVE"]=2,a}(),c.DataPointFlags=function(){var i={},a=Object.create(i);return a[i[0]="DATA_POINT_FLAGS_DO_NOT_USE"]=0,a[i[1]="DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"]=1,a}(),c.NumberDataPoint=function(){function i(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]])}i.prototype.attributes=f.emptyArray,i.prototype.startTimeUnixNano=null,i.prototype.timeUnixNano=null,i.prototype.asDouble=null,i.prototype.asInt=null,i.prototype.exemplars=f.emptyArray,i.prototype.flags=null;var a;return Object.defineProperty(i.prototype,"value",{get:f.oneOfGetter(a=["asDouble","asInt"]),set:f.oneOfSetter(a)}),i.create=function(e){return new i(e)},i.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},i.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},i.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.NumberDataPoint;e.pos<s;){var h=e.uint32();switch(h>>>3){case 7:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.startTimeUnixNano=e.fixed64();break}case 3:{l.timeUnixNano=e.fixed64();break}case 4:{l.asDouble=e.double();break}case 6:{l.asInt=e.sfixed64();break}case 5:{l.exemplars&&l.exemplars.length||(l.exemplars=[]),l.exemplars.push(p.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 8:{l.flags=e.uint32();break}default:e.skipType(h&7);break}}return l},i.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.NumberDataPoint"},i}(),c.HistogramDataPoint=function(){function i(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]])}i.prototype.attributes=f.emptyArray,i.prototype.startTimeUnixNano=null,i.prototype.timeUnixNano=null,i.prototype.count=null,i.prototype.sum=null,i.prototype.bucketCounts=f.emptyArray,i.prototype.explicitBounds=f.emptyArray,i.prototype.exemplars=f.emptyArray,i.prototype.flags=null,i.prototype.min=null,i.prototype.max=null;var a;return Object.defineProperty(i.prototype,"_sum",{get:f.oneOfGetter(a=["sum"]),set:f.oneOfSetter(a)}),Object.defineProperty(i.prototype,"_min",{get:f.oneOfGetter(a=["min"]),set:f.oneOfSetter(a)}),Object.defineProperty(i.prototype,"_max",{get:f.oneOfGetter(a=["max"]),set:f.oneOfSetter(a)}),i.create=function(e){return new i(e)},i.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},i.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},i.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.HistogramDataPoint;e.pos<s;){var h=e.uint32();switch(h>>>3){case 9:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.startTimeUnixNano=e.fixed64();break}case 3:{l.timeUnixNano=e.fixed64();break}case 4:{l.count=e.fixed64();break}case 5:{l.sum=e.double();break}case 6:{if(l.bucketCounts&&l.bucketCounts.length||(l.bucketCounts=[]),(h&7)===2)for(var v=e.uint32()+e.pos;e.pos<v;)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 v=e.uint32()+e.pos;e.pos<v;)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},i.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.HistogramDataPoint"},i}(),c.ExponentialHistogramDataPoint=function(){function i(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]])}i.prototype.attributes=f.emptyArray,i.prototype.startTimeUnixNano=null,i.prototype.timeUnixNano=null,i.prototype.count=null,i.prototype.sum=null,i.prototype.scale=null,i.prototype.zeroCount=null,i.prototype.positive=null,i.prototype.negative=null,i.prototype.flags=null,i.prototype.exemplars=f.emptyArray,i.prototype.min=null,i.prototype.max=null,i.prototype.zeroThreshold=null;var a;return Object.defineProperty(i.prototype,"_sum",{get:f.oneOfGetter(a=["sum"]),set:f.oneOfSetter(a)}),Object.defineProperty(i.prototype,"_min",{get:f.oneOfGetter(a=["min"]),set:f.oneOfSetter(a)}),Object.defineProperty(i.prototype,"_max",{get:f.oneOfGetter(a=["max"]),set:f.oneOfSetter(a)}),i.create=function(e){return new i(e)},i.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},i.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},i.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.startTimeUnixNano=e.fixed64();break}case 3:{l.timeUnixNano=e.fixed64();break}case 4:{l.count=e.fixed64();break}case 5:{l.sum=e.double();break}case 6:{l.scale=e.sint32();break}case 7:{l.zeroCount=e.fixed64();break}case 8:{l.positive=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(e,e.uint32());break}case 9:{l.negative=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(e,e.uint32());break}case 10:{l.flags=e.uint32();break}case 11:{l.exemplars&&l.exemplars.length||(l.exemplars=[]),l.exemplars.push(p.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 12:{l.min=e.double();break}case 13:{l.max=e.double();break}case 14:{l.zeroThreshold=e.double();break}default:e.skipType(h&7);break}}return l},i.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"},i.Buckets=function(){function t(e){if(this.bucketCounts=[],e)for(var n=Object.keys(e),s=0;s<n.length;++s)e[n[s]]!=null&&(this[n[s]]=e[n[s]])}return t.prototype.offset=null,t.prototype.bucketCounts=f.emptyArray,t.create=function(n){return new t(n)},t.encode=function(n,s){if(s||(s=S.create()),n.offset!=null&&Object.hasOwnProperty.call(n,"offset")&&s.uint32(8).sint32(n.offset),n.bucketCounts!=null&&n.bucketCounts.length){s.uint32(18).fork();for(var l=0;l<n.bucketCounts.length;++l)s.uint64(n.bucketCounts[l]);s.ldelim()}return s},t.encodeDelimited=function(n,s){return this.encode(n,s).ldelim()},t.decode=function(n,s){n instanceof _||(n=_.create(n));for(var l=s===void 0?n.len:n.pos+s,h=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;n.pos<l;){var v=n.uint32();switch(v>>>3){case 1:{h.offset=n.sint32();break}case 2:{if(h.bucketCounts&&h.bucketCounts.length||(h.bucketCounts=[]),(v&7)===2)for(var b=n.uint32()+n.pos;n.pos<b;)h.bucketCounts.push(n.uint64());else h.bucketCounts.push(n.uint64());break}default:n.skipType(v&7);break}}return h},t.decodeDelimited=function(n){return n instanceof _||(n=new _(n)),this.decode(n,n.uint32())},t.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.offset!=null&&n.hasOwnProperty("offset")&&!f.isInteger(n.offset))return"offset: integer expected";if(n.bucketCounts!=null&&n.hasOwnProperty("bucketCounts")){if(!Array.isArray(n.bucketCounts))return"bucketCounts: array expected";for(var s=0;s<n.bucketCounts.length;++s)if(!f.isInteger(n.bucketCounts[s])&&!(n.bucketCounts[s]&&f.isInteger(n.bucketCounts[s].low)&&f.isInteger(n.bucketCounts[s].high)))return"bucketCounts: integer|Long[] expected"}return null},t.fromObject=function(n){if(n instanceof p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets)return n;var s=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;if(n.offset!=null&&(s.offset=n.offset|0),n.bucketCounts){if(!Array.isArray(n.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected");s.bucketCounts=[];for(var l=0;l<n.bucketCounts.length;++l)f.Long?(s.bucketCounts[l]=f.Long.fromValue(n.bucketCounts[l])).unsigned=!0:typeof n.bucketCounts[l]=="string"?s.bucketCounts[l]=parseInt(n.bucketCounts[l],10):typeof n.bucketCounts[l]=="number"?s.bucketCounts[l]=n.bucketCounts[l]:typeof n.bucketCounts[l]=="object"&&(s.bucketCounts[l]=new f.LongBits(n.bucketCounts[l].low>>>0,n.bucketCounts[l].high>>>0).toNumber(!0))}return s},t.toObject=function(n,s){s||(s={});var l={};if((s.arrays||s.defaults)&&(l.bucketCounts=[]),s.defaults&&(l.offset=0),n.offset!=null&&n.hasOwnProperty("offset")&&(l.offset=n.offset),n.bucketCounts&&n.bucketCounts.length){l.bucketCounts=[];for(var h=0;h<n.bucketCounts.length;++h)typeof n.bucketCounts[h]=="number"?l.bucketCounts[h]=s.longs===String?String(n.bucketCounts[h]):n.bucketCounts[h]:l.bucketCounts[h]=s.longs===String?f.Long.prototype.toString.call(n.bucketCounts[h]):s.longs===Number?new f.LongBits(n.bucketCounts[h].low>>>0,n.bucketCounts[h].high>>>0).toNumber(!0):n.bucketCounts[h]}return l},t.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},t.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},t}(),i}(),c.SummaryDataPoint=function(){function i(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 i.prototype.attributes=f.emptyArray,i.prototype.startTimeUnixNano=null,i.prototype.timeUnixNano=null,i.prototype.count=null,i.prototype.sum=null,i.prototype.quantileValues=f.emptyArray,i.prototype.flags=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint;t.pos<n;){var l=t.uint32();switch(l>>>3){case 7:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{s.startTimeUnixNano=t.fixed64();break}case 3:{s.timeUnixNano=t.fixed64();break}case 4:{s.count=t.fixed64();break}case 5:{s.sum=t.double();break}case 6:{s.quantileValues&&s.quantileValues.length||(s.quantileValues=[]),s.quantileValues.push(p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(t,t.uint32()));break}case 8:{s.flags=t.uint32();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.SummaryDataPoint"},i.ValueAtQuantile=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.quantile=null,a.prototype.value=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=S.create()),e.quantile!=null&&Object.hasOwnProperty.call(e,"quantile")&&n.uint32(9).double(e.quantile),e.value!=null&&Object.hasOwnProperty.call(e,"value")&&n.uint32(17).double(e.value),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;e.pos<s;){var h=e.uint32();switch(h>>>3){case 1:{l.quantile=e.double();break}case 2:{l.value=e.double();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.quantile!=null&&e.hasOwnProperty("quantile")&&typeof e.quantile!="number"?"quantile: number expected":e.value!=null&&e.hasOwnProperty("value")&&typeof e.value!="number"?"value: number expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return e;var n=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;return e.quantile!=null&&(n.quantile=Number(e.quantile)),e.value!=null&&(n.value=Number(e.value)),n},a.toObject=function(e,n){n||(n={});var s={};return n.defaults&&(s.quantile=0,s.value=0),e.quantile!=null&&e.hasOwnProperty("quantile")&&(s.quantile=n.json&&!isFinite(e.quantile)?String(e.quantile):e.quantile),e.value!=null&&e.hasOwnProperty("value")&&(s.value=n.json&&!isFinite(e.value)?String(e.value):e.value),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},a}(),i}(),c.Exemplar=function(){function i(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]])}i.prototype.filteredAttributes=f.emptyArray,i.prototype.timeUnixNano=null,i.prototype.asDouble=null,i.prototype.asInt=null,i.prototype.spanId=null,i.prototype.traceId=null;var a;return Object.defineProperty(i.prototype,"value",{get:f.oneOfGetter(a=["asDouble","asInt"]),set:f.oneOfSetter(a)}),i.create=function(e){return new i(e)},i.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},i.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},i.decode=function(e,n){e instanceof _||(e=_.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.Exemplar;e.pos<s;){var h=e.uint32();switch(h>>>3){case 7:{l.filteredAttributes&&l.filteredAttributes.length||(l.filteredAttributes=[]),l.filteredAttributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.timeUnixNano=e.fixed64();break}case 3:{l.asDouble=e.double();break}case 6:{l.asInt=e.sfixed64();break}case 4:{l.spanId=e.bytes();break}case 5:{l.traceId=e.bytes();break}default:e.skipType(h&7);break}}return l},i.decodeDelimited=function(e){return e instanceof _||(e=new _(e)),this.decode(e,e.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Exemplar"},i}(),c}(),o}(),r.logs=function(){var o={};return o.v1=function(){var c={};return c.LogsData=function(){function i(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 i.prototype.resourceLogs=f.emptyArray,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.LogsData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resourceLogs&&s.resourceLogs.length||(s.resourceLogs=[]),s.resourceLogs.push(p.opentelemetry.proto.logs.v1.ResourceLogs.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.LogsData"},i}(),c.ResourceLogs=function(){function i(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 i.prototype.resource=null,i.prototype.scopeLogs=f.emptyArray,i.prototype.schemaUrl=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.ResourceLogs;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{s.scopeLogs&&s.scopeLogs.length||(s.scopeLogs=[]),s.scopeLogs.push(p.opentelemetry.proto.logs.v1.ScopeLogs.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.ResourceLogs"},i}(),c.ScopeLogs=function(){function i(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 i.prototype.scope=null,i.prototype.logRecords=f.emptyArray,i.prototype.schemaUrl=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.ScopeLogs;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{s.logRecords&&s.logRecords.length||(s.logRecords=[]),s.logRecords.push(p.opentelemetry.proto.logs.v1.LogRecord.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.ScopeLogs"},i}(),c.SeverityNumber=function(){var i={},a=Object.create(i);return a[i[0]="SEVERITY_NUMBER_UNSPECIFIED"]=0,a[i[1]="SEVERITY_NUMBER_TRACE"]=1,a[i[2]="SEVERITY_NUMBER_TRACE2"]=2,a[i[3]="SEVERITY_NUMBER_TRACE3"]=3,a[i[4]="SEVERITY_NUMBER_TRACE4"]=4,a[i[5]="SEVERITY_NUMBER_DEBUG"]=5,a[i[6]="SEVERITY_NUMBER_DEBUG2"]=6,a[i[7]="SEVERITY_NUMBER_DEBUG3"]=7,a[i[8]="SEVERITY_NUMBER_DEBUG4"]=8,a[i[9]="SEVERITY_NUMBER_INFO"]=9,a[i[10]="SEVERITY_NUMBER_INFO2"]=10,a[i[11]="SEVERITY_NUMBER_INFO3"]=11,a[i[12]="SEVERITY_NUMBER_INFO4"]=12,a[i[13]="SEVERITY_NUMBER_WARN"]=13,a[i[14]="SEVERITY_NUMBER_WARN2"]=14,a[i[15]="SEVERITY_NUMBER_WARN3"]=15,a[i[16]="SEVERITY_NUMBER_WARN4"]=16,a[i[17]="SEVERITY_NUMBER_ERROR"]=17,a[i[18]="SEVERITY_NUMBER_ERROR2"]=18,a[i[19]="SEVERITY_NUMBER_ERROR3"]=19,a[i[20]="SEVERITY_NUMBER_ERROR4"]=20,a[i[21]="SEVERITY_NUMBER_FATAL"]=21,a[i[22]="SEVERITY_NUMBER_FATAL2"]=22,a[i[23]="SEVERITY_NUMBER_FATAL3"]=23,a[i[24]="SEVERITY_NUMBER_FATAL4"]=24,a}(),c.LogRecordFlags=function(){var i={},a=Object.create(i);return a[i[0]="LOG_RECORD_FLAGS_DO_NOT_USE"]=0,a[i[255]="LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"]=255,a}(),c.LogRecord=function(){function i(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 i.prototype.timeUnixNano=null,i.prototype.observedTimeUnixNano=null,i.prototype.severityNumber=null,i.prototype.severityText=null,i.prototype.body=null,i.prototype.attributes=f.emptyArray,i.prototype.droppedAttributesCount=null,i.prototype.flags=null,i.prototype.traceId=null,i.prototype.spanId=null,i.create=function(t){return new i(t)},i.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},i.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},i.decode=function(t,e){t instanceof _||(t=_.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.LogRecord;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.timeUnixNano=t.fixed64();break}case 11:{s.observedTimeUnixNano=t.fixed64();break}case 2:{s.severityNumber=t.int32();break}case 3:{s.severityText=t.string();break}case 5:{s.body=p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32());break}case 6:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 7:{s.droppedAttributesCount=t.uint32();break}case 8:{s.flags=t.fixed32();break}case 9:{s.traceId=t.bytes();break}case 10:{s.spanId=t.bytes();break}default:t.skipType(l&7);break}}return s},i.decodeDelimited=function(t){return t instanceof _||(t=new _(t)),this.decode(t,t.uint32())},i.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},i.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},i.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},i.prototype.toJSON=function(){return this.constructor.toObject(this,T.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.LogRecord"},i}(),c}(),o}(),r}(),u}();u_.exports=p});var Qi=d(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.ServiceClientType=void 0;var CS;(function(u){u[u.SPANS=0]="SPANS",u[u.METRICS=1]="METRICS",u[u.LOGS=2]="LOGS"})(CS=en.ServiceClientType||(en.ServiceClientType={}))});var tn=d(Zi=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.getExportRequestProto=void 0;var xc=s_(),a_=Qi();function US(u){return u===a_.ServiceClientType.SPANS?xc.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest:u===a_.ServiceClientType.LOGS?xc.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest:xc.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest}Zi.getExportRequestProto=US});var Ic=d(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});eu.send=void 0;var c_=zi(),DS=tn();function BS(u,r,o,c,i){let a=u.convert(r),t=(0,DS.getExportRequestProto)(u.getServiceClientType()),e=t.create(a);if(e){let n=t.encode(e).finish();n&&(0,c_.sendWithHttp)(u,Buffer.from(n),"application/x-protobuf",c,i)}else i(new c_.OTLPExporterError("No proto"))}eu.send=BS});var l_=d(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});tu.OTLPProtoExporterNodeBase=void 0;var VS=(y(),E(m)),kS=zi(),Lc=class extends kS.OTLPExporterNodeBase{constructor(r={}){super(r)}_sendPromise(r,o,c){let i=new Promise((t,e)=>{this._send(this,r,this.compression,t,e)}).then(o,c);this._sendingPromises.push(i);let a=()=>{let t=this._sendingPromises.indexOf(i);this._sendingPromises.splice(t,1)};i.then(a,a)}send(r,o,c){if(this._shutdownOnce.isCalled){VS.diag.debug("Shutdown already started. Cannot send objects");return}this._send?this._sendPromise(r,o,c):setImmediate(()=>{let{send:i}=Ic();this._send=i,this._sendPromise(r,o,c)})}};tu.OTLPProtoExporterNodeBase=Lc});var p_=d(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.send=dr.OTLPProtoExporterNodeBase=void 0;var qS=l_();Object.defineProperty(dr,"OTLPProtoExporterNodeBase",{enumerable:!0,get:function(){return qS.OTLPProtoExporterNodeBase}});var jS=Ic();Object.defineProperty(dr,"send",{enumerable:!0,get:function(){return jS.send}})});var f_=d(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.OTLPProtoExporterBrowserBase=void 0;var GS=(y(),E(m)),wc=zi(),HS=tn(),Mc=class extends wc.OTLPExporterBrowserBase{constructor(r={}){super(r)}send(r,o,c){if(this._shutdownOnce.isCalled){GS.diag.debug("Shutdown already started. Cannot send objects");return}let i=this.convert(r),a=(0,HS.getExportRequestProto)(this.getServiceClientType()),t=a.create(i);if(t){let e=a.encode(t).finish();e&&(0,wc.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 wc.OTLPExporterError("No proto"))}};ru.OTLPProtoExporterBrowserBase=Mc});var d_=d(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.ServiceClientType=hr.OTLPProtoExporterBrowserBase=void 0;var FS=f_();Object.defineProperty(hr,"OTLPProtoExporterBrowserBase",{enumerable:!0,get:function(){return FS.OTLPProtoExporterBrowserBase}});var KS=Qi();Object.defineProperty(hr,"ServiceClientType",{enumerable:!0,get:function(){return KS.ServiceClientType}})});var __=d(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.getExportRequestProto=_e.ServiceClientType=_e.OTLPProtoExporterBrowserBase=_e.send=_e.OTLPProtoExporterNodeBase=void 0;var h_=p_();Object.defineProperty(_e,"OTLPProtoExporterNodeBase",{enumerable:!0,get:function(){return h_.OTLPProtoExporterNodeBase}});Object.defineProperty(_e,"send",{enumerable:!0,get:function(){return h_.send}});var XS=d_();Object.defineProperty(_e,"OTLPProtoExporterBrowserBase",{enumerable:!0,get:function(){return XS.OTLPProtoExporterBrowserBase}});var zS=Qi();Object.defineProperty(_e,"ServiceClientType",{enumerable:!0,get:function(){return zS.ServiceClientType}});var $S=tn();Object.defineProperty(_e,"getExportRequestProto",{enumerable:!0,get:function(){return $S.getExportRequestProto}})});var j=W(As(),1);y();Is();var T_=W(cf(),1),yr=W(ct(),1),S_=W(Af(),1),b_=W(Ld(),1),O_=W(le(),1),Er=W(cn(),1),A_=W(Md(),1),Se=W(P(),1);y();var MT=Symbol.for("@vercel/request-context");function Ci(){return globalThis[MT]?.get()}var Wa=W(le(),1);function Ui(u){return Object.fromEntries(Object.entries(u).filter(([r,o])=>o!==void 0))}function Cd(u){return u?u.split("::").at(-1):void 0}function Ud(u=Ci()){if(u)return Ui({[Wa.SemanticAttributes.HTTP_HOST]:u.headers.host,[Wa.SemanticAttributes.HTTP_USER_AGENT]:u.headers["user-agent"],"http.referer":u.headers.referer,"vercel.request_id":Cd(u.headers["x-vercel-id"]),"vercel.matched_path":u.headers["x-matched-path"],"vercel.edge_region":u.headers["x-vercel-edge-region"]})}var Di=class{constructor(r){this.processors=r;this.rootSpanIds=new Map;this.waitSpanEnd=new Map}forceFlush(){return Promise.all(this.processors.map(r=>r.forceFlush().catch(o=>{m.diag.error("@vercel/otel: forceFlush failed:",o)}))).then(()=>{})}shutdown(){return Promise.all(this.processors.map(r=>r.shutdown().catch(()=>{}))).then(()=>{})}onStart(r,o){let{traceId:c,spanId:i,traceFlags:a}=r.spanContext(),t=!r.parentSpanId||!this.rootSpanIds.has(c);if(t&&this.rootSpanIds.set(c,i),t&&CT(a)){let e=Ud();e&&r.setAttributes(e);let n=Ci();n&&n.waitUntil(async()=>{if(console.log("QQQQ: waitUntil: pending? ",c,this.rootSpanIds.has(c)),this.rootSpanIds.has(c)){let s=new Promise(l=>{this.waitSpanEnd.set(c,l)});await Promise.race([s,new Promise(l=>{setTimeout(()=>{console.log("QQQQ: waitUntil: timeout",c),this.waitSpanEnd.delete(c),l(void 0)},50)})])}return console.log("QQQQ: waitUntil: execute",c),this.forceFlush()})}for(let e of this.processors)e.onStart(r,o)}onEnd(r){let{traceId:o,spanId:c}=r.spanContext(),i=this.rootSpanIds.get(o)===c;for(let a of this.processors)a.onEnd(r);if(i){this.rootSpanIds.delete(o);let a=this.waitSpanEnd.get(o);a&&(console.log("QQQQ: onEnd: resolve pending",o),this.waitSpanEnd.delete(o),a())}}};function CT(u){return(u&m.TraceFlags.SAMPLED)!==0}var $d=W(nc(),1);var zd=W(Kr(),1);y();var ur=class extends zd.OTLPExporterBase{constructor(r={}){super(r),r.headers&&(this._headers=r.headers)}onShutdown(){m.diag.debug("@vercel/otel/otlp: onShutdown")}onInit(){m.diag.debug("@vercel/otel/otlp: onInit")}send(r,o,c){if(this._shutdownOnce.isCalled){m.diag.debug("@vercel/otel/otlp: Shutdown already started. Cannot send objects");return}let i=this.convert(r),a,t,e;try{({body:a,contentType:t,headers:e}=this.toMessage(i))}catch(s){m.diag.warn("@vercel/otel/otlp: no proto",s);return}let n=fetch(this.url,{method:"POST",body:a,headers:{...this._headers,...e,"Content-Type":t,"User-Agent":"OTel-OTLP-Exporter-JavaScript/0.46.0"},next:{internal:!0}}).then(s=>{m.diag.debug("@vercel/otel/otlp: onSuccess",s.status,s.statusText),o()}).catch(s=>{m.diag.error("@vercel/otel/otlp: onError",s),c(s)}).finally(()=>{let s=this._sendingPromises.indexOf(n);this._sendingPromises.splice(s,1)});this._sendingPromises.push(n)}getDefaultUrl(r){throw new Error("Method not implemented.")}};var tS="v1/traces",rS=`http://localhost:4318/${tS}`;function qi(u){return typeof u.url=="string"?u.url:rS}var sr=class extends ur{convert(r){return(0,$d.createExportTraceServiceRequest)(r,{useHex:!0,useLongBits:!1})}toMessage(r){return{body:JSON.stringify(r),contentType:"application/json"}}getDefaultUrl(r){return qi(r)}};var m_=W(nc(),1),y_=W(__(),1),E_=W(tn(),1);var vt=class extends ur{convert(r){return(0,m_.createExportTraceServiceRequest)(r,void 0)}toMessage(r){let o=y_.ServiceClientType.SPANS,c=(0,E_.getExportRequestProto)(o),i=c.create(r);return{body:c.encode(i).finish(),contentType:"application/x-protobuf",headers:{accept:"application/x-protobuf"}}}getDefaultUrl(r){return qi(r)}};y();var $e=W(le(),1),_r=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??[],i=h=>{if(c.length===0)return!1;let v=h.toString();return c.some(b=>typeof b=="string"?v.startsWith(b):b.test(v))},a=process.env.VERCEL_URL||process.env.NEXT_PUBLIC_VERCEL_URL||null,t=this.config.propagateContextUrls??[],e=this.config.dontPropagateContextUrls??[],n=h=>{let v=h.toString();return e.length>0&&e.some(b=>typeof b=="string"?v.startsWith(b):b.test(v))?!1:a&&h.protocol==="https:"&&h.host===a?!0:t.some(b=>typeof b=="string"?v.startsWith(b):b.test(v))};process.env.NEXT_OTEL_FETCH_DISABLED="1";let s=globalThis.fetch;this.originalFetch=s;let l=(h,v)=>{if(v?.next?.internal)return s(h,v);let b=new Request(h,v),N=new URL(b.url);return i(N)?s(h,v):o.startActiveSpan(`fetch ${b.method} ${b.url}`,{kind:m.SpanKind.CLIENT,attributes:{[$e.SemanticAttributes.HTTP_METHOD]:b.method,[$e.SemanticAttributes.HTTP_URL]:b.url,[$e.SemanticAttributes.HTTP_HOST]:N.host,[$e.SemanticAttributes.HTTP_SCHEME]:N.protocol.replace(":",""),[$e.SemanticAttributes.NET_PEER_NAME]:N.hostname,[$e.SemanticAttributes.NET_PEER_PORT]:N.port}},async V=>{n(N)&&m.propagation.inject(m.context.active(),b.headers,YS);try{let I=await s(h,{...v,headers:b.headers});return V.setAttribute($e.SemanticAttributes.HTTP_STATUS_CODE,I.status),I.status>=500&&V.setStatus({code:m.SpanStatusCode.ERROR,message:`Status: ${I.status} (${I.statusText})`}),V.end(),I}catch(I){throw I instanceof Error?(V.recordException(I),V.setStatus({code:m.SpanStatusCode.ERROR,message:I.message})):V.setStatus({code:m.SpanStatusCode.ERROR,message:String(I)}),V.end(),I}})};globalThis.fetch=l}disable(){this.originalFetch&&(globalThis.fetch=this.originalFetch)}},YS={set(u,r,o){u.set(r,o)}};var nu=class{constructor(r={}){this.configuration=r}start(){let r=WS(),o=(0,Er.getEnvWithoutDefaults)(),c=this.configuration,i=process.env.NEXT_RUNTIME||"nodejs",a=!!r.OTEL_SDK_DISABLED;if(o.OTEL_LOG_LEVEL&&m.diag.setLogger(new m.DiagConsoleLogger,{logLevel:o.OTEL_LOG_LEVEL}),a)return;let t=c.idGenerator??new j.RandomIdGenerator,e=c.contextManager??new A_.AsyncLocalStorageContextManager;e.enable(),this.contextManager=e;let n=r.OTEL_SERVICE_NAME||c.serviceName||"app",s=new yr.Resource(Ui({[O_.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":i,"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,...c.attributes})),l=c.resourceDetectors??[yr.envDetectorSync];if(c.autoDetectResources??!0){let F={detectors:l};s=s.merge((0,yr.detectResourcesSync)(F))}let v=QS(c.propagators,r),b=ZS(c.traceSampler,r),N=eb(c.spanProcessors,c,r);N.length===0&&m.diag.warn("@vercel/otel: No span processors configured. No spans will be exported.");let V=c.spanLimits,I=new j.BasicTracerProvider({resource:s,idGenerator:t,sampler:b,spanLimits:V});if(I.addSpanProcessor(new Di(N)),I.register({contextManager:e,propagator:new Se.CompositePropagator({propagators:v})}),this.tracerProvider=I,c.logRecordProcessor){let F=new S_.LoggerProvider({resource:s});this.loggerProvider=F,F.addLogRecordProcessor(c.logRecordProcessor),ft.logs.setGlobalLoggerProvider(F)}if(c.metricReader||c.views){let F=new b_.MeterProvider({resource:s,views:c.views??[]});c.metricReader&&F.addMetricReader(c.metricReader),m.metrics.setGlobalMeterProvider(F),this.meterProvider=F}let U=JS(c.instrumentations,c.instrumentationConfig);this.disableInstumentations=(0,T_.registerInstrumentations)({instrumentations:U}),m.diag.info("@vercel/otel: started",n,i)}async shutdown(){let r=[];this.tracerProvider&&r.push(this.tracerProvider.shutdown()),this.loggerProvider&&r.push(this.loggerProvider.shutdown()),this.meterProvider&&r.push(this.meterProvider.shutdown()),m.diag.info("@vercel/otel: shutting down",r.length,process.env.NEXT_RUNTIME),await Promise.all(r),this.contextManager&&this.contextManager.disable();let{disableInstumentations:o}=this;o&&o()}};function WS(){let u=(0,Er.parseEnvironment)(process.env);return{...Er.DEFAULT_ENVIRONMENT,...u}}function JS(u,r){return(u??["auto"]).map(o=>o==="auto"?(m.diag.debug("@vercel/otel: Configure instrumentations: fetch",r?.fetch),[new _r(r?.fetch)]):o==="fetch"?(m.diag.debug("@vercel/otel: Configure instrumentations: fetch",r?.fetch),new _r(r?.fetch)):o).flat()}function QS(u,r){let o=r.OTEL_PROPAGATORS&&r.OTEL_PROPAGATORS.length>0?r.OTEL_PROPAGATORS:void 0;return(u??o??["auto"]).map(c=>{if(c==="none")return[];if(c==="auto")return m.diag.debug("@vercel/otel: Configure propagators: tracecontext, baggage"),[new Se.W3CTraceContextPropagator,new Se.W3CBaggagePropagator];if(c==="tracecontext")return m.diag.debug("@vercel/otel: Configure propagator: tracecontext"),new Se.W3CTraceContextPropagator;if(c==="baggage")return m.diag.debug("@vercel/otel: Configure propagator: baggage"),new Se.W3CBaggagePropagator;if(typeof c=="string")throw new Error(`Unknown propagator: "${c}"`);return c}).flat()}var v_="always_on",mr=1;function ZS(u,r){if(u&&typeof u!="string")return u;let o=u&&u!=="auto"?u:r.OTEL_TRACES_SAMPLER||v_;switch(m.diag.debug("@vercel/otel: Configure sampler: ",o),o){case"always_on":return new j.AlwaysOnSampler;case"always_off":return new j.AlwaysOffSampler;case"parentbased_always_on":return new j.ParentBasedSampler({root:new j.AlwaysOnSampler});case"parentbased_always_off":return new j.ParentBasedSampler({root:new j.AlwaysOffSampler});case"traceidratio":return new j.TraceIdRatioBasedSampler(g_(r));case"parentbased_traceidratio":return new j.ParentBasedSampler({root:new j.TraceIdRatioBasedSampler(g_(r))});default:return m.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER value "${String(r.OTEL_TRACES_SAMPLER)} invalid, defaulting to ${v_}".`),new j.AlwaysOnSampler}}function g_(u){if(u.OTEL_TRACES_SAMPLER_ARG===void 0||u.OTEL_TRACES_SAMPLER_ARG==="")return m.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${mr}.`),mr;m.diag.debug("@vercel/otel: Configure sampler probability: ",u.OTEL_TRACES_SAMPLER_ARG);let r=Number(u.OTEL_TRACES_SAMPLER_ARG);return isNaN(r)?(m.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${u.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${mr}.`),mr):r<0||r>1?(m.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${u.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${mr}.`),mr):r}function eb(u,r,o){return(u??["auto"]).map(c=>{if(c==="auto"){if(process.env.VERCEL_OTEL_ENDPOINTS){let i=process.env.VERCEL_OTEL_ENDPOINTS_PORT||"4318",a=process.env.VERCEL_OTEL_ENDPOINTS_PROTOCOL||"http/protobuf";m.diag.debug("@vercel/otel: Configure vercel otel collector on port: ",i,a);let t={url:`http://localhost:${i}/v1/traces`,headers:{}},e=a==="http/protobuf"?new vt(t):new sr(t);return new j.BatchSpanProcessor(e)}return r.traceExporter||o.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT||o.OTEL_EXPORTER_OTLP_ENDPOINT?new j.BatchSpanProcessor(tb(r.traceExporter,o)):void 0}return c}).filter(ob)}function tb(u,r){if(u&&u!=="auto")return u;let o=process.env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL??process.env.OTEL_EXPORTER_OTLP_PROTOCOL??"http/protobuf",c=nb(r),i={...Se.baggageUtils.parseKeyPairsIntoRecord(r.OTEL_EXPORTER_OTLP_HEADERS),...Se.baggageUtils.parseKeyPairsIntoRecord(r.OTEL_EXPORTER_OTLP_TRACES_HEADERS)};switch(m.diag.debug("@vercel/otel: Configure trace exporter: ",o,c,`headers: ${Object.keys(i).join(",")||"<none>"}`),o){case"http/json":return new sr({url:c,headers:i});case"http/protobuf":return new vt({url:c,headers:i});default:return m.diag.warn(`@vercel/otel: Unsupported OTLP traces protocol: ${o}. Using http/protobuf.`),new vt}}var P_="v1/traces",rb=`http://localhost:4318/${P_}`;function nb(u){let r=u.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT;if(r&&typeof r=="string")return r;let o=u.OTEL_EXPORTER_OTLP_ENDPOINT;return o&&typeof o=="string"?`${o}/${P_}`:rb}function ob(u){return u!=null}function VN(u){let r;u?typeof u=="string"?r={serviceName:u}:r=u:r={},new nu(r).start()}export{_r as FetchInstrumentation,sr as OTLPHttpJsonTraceExporter,vt as OTLPHttpProtoTraceExporter,VN as registerOTel};
|
|
21
21
|
//# sourceMappingURL=index.js.map
|