@vercel/otel 1.2.1 → 1.3.0-6e36e10c-20240205201923
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/edge/index.js +4 -4
- package/dist/edge/index.js.map +3 -3
- package/dist/node/index.js +10 -10
- package/dist/node/index.js.map +3 -3
- package/package.json +1 -1
package/dist/edge/index.js
CHANGED
|
@@ -2,17 +2,17 @@ if (globalThis.performance === undefined) {
|
|
|
2
2
|
const timeOrigin = Date.now() - 1;
|
|
3
3
|
globalThis.performance = { timeOrigin: timeOrigin, now: () => Date.now() - timeOrigin };
|
|
4
4
|
}
|
|
5
|
-
var Pl=Object.create;var Vr=Object.defineProperty;var xl=Object.getOwnPropertyDescriptor;var Rl=Object.getOwnPropertyNames;var Ll=Object.getPrototypeOf,Il=Object.prototype.hasOwnProperty;var Gr=(u,n)=>()=>(u&&(n=u(u=0)),n);var m=(u,n)=>()=>(n||u((n={exports:{}}).exports,n),n.exports);var Ae=(u,n,o,c)=>{if(n&&typeof n=="object"||typeof n=="function")for(let l of Rl(n))!Il.call(u,l)&&l!==o&&Vr(u,l,{get:()=>n[l],enumerable:!(c=xl(n,l))||c.enumerable});return u},Q=(u,n,o)=>(Ae(u,n,"default"),o&&Ae(o,n,"default")),N=(u,n,o)=>(o=u!=null?Pl(Ll(u)):{},Ae(n||!u||!u.__esModule?Vr(o,"default",{value:u,enumerable:!0}):o,u)),C=u=>Ae(Vr({},"__esModule",{value:!0}),u);var y={};import*as Up from"@opentelemetry/api";var S=Gr(()=>{Q(y,Up)});var ue=m(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.isTracingSuppressed=ht.unsuppressTracing=ht.suppressTracing=void 0;var wl=(S(),C(y)),Hr=(0,wl.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Cl(u){return u.setValue(Hr,!0)}ht.suppressTracing=Cl;function Ul(u){return u.deleteValue(Hr)}ht.unsuppressTracing=Ul;function Ml(u){return u.getValue(Hr)===!0}ht.isTracingSuppressed=Ml});var jr=m(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.BAGGAGE_MAX_TOTAL_LENGTH=H.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=H.BAGGAGE_MAX_NAME_VALUE_PAIRS=H.BAGGAGE_HEADER=H.BAGGAGE_ITEMS_SEPARATOR=H.BAGGAGE_PROPERTIES_SEPARATOR=H.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;H.BAGGAGE_KEY_PAIR_SEPARATOR="=";H.BAGGAGE_PROPERTIES_SEPARATOR=";";H.BAGGAGE_ITEMS_SEPARATOR=",";H.BAGGAGE_HEADER="baggage";H.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;H.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;H.BAGGAGE_MAX_TOTAL_LENGTH=8192});var Fr=m(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.parseKeyPairsIntoRecord=at.parsePairKeyValue=at.getKeyPairs=at.serializeKeyPairs=void 0;var Dl=(S(),C(y)),It=jr();function Bl(u){return u.reduce((n,o)=>{let c=`${n}${n!==""?It.BAGGAGE_ITEMS_SEPARATOR:""}${o}`;return c.length>It.BAGGAGE_MAX_TOTAL_LENGTH?n:c},"")}at.serializeKeyPairs=Bl;function kl(u){return u.getAllEntries().map(([n,o])=>{let c=`${encodeURIComponent(n)}=${encodeURIComponent(o.value)}`;return o.metadata!==void 0&&(c+=It.BAGGAGE_PROPERTIES_SEPARATOR+o.metadata.toString()),c})}at.getKeyPairs=kl;function Eo(u){let n=u.split(It.BAGGAGE_PROPERTIES_SEPARATOR);if(n.length<=0)return;let o=n.shift();if(!o)return;let c=o.indexOf(It.BAGGAGE_KEY_PAIR_SEPARATOR);if(c<=0)return;let l=decodeURIComponent(o.substring(0,c).trim()),i=decodeURIComponent(o.substring(c+1).trim()),e;return n.length>0&&(e=(0,Dl.baggageEntryMetadataFromString)(n.join(It.BAGGAGE_PROPERTIES_SEPARATOR))),{key:l,value:i,metadata:e}}at.parsePairKeyValue=Eo;function Vl(u){return typeof u!="string"||u.length===0?{}:u.split(It.BAGGAGE_ITEMS_SEPARATOR).map(n=>Eo(n)).filter(n=>n!==void 0&&n.value.length>0).reduce((n,o)=>(n[o.key]=o.value,n),{})}at.parseKeyPairsIntoRecord=Vl});var bo=m(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.W3CBaggagePropagator=void 0;var qr=(S(),C(y)),Gl=ue(),wt=jr(),Kr=Fr(),Xr=class{inject(n,o,c){let l=qr.propagation.getBaggage(n);if(!l||(0,Gl.isTracingSuppressed)(n))return;let i=(0,Kr.getKeyPairs)(l).filter(t=>t.length<=wt.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,wt.BAGGAGE_MAX_NAME_VALUE_PAIRS),e=(0,Kr.serializeKeyPairs)(i);e.length>0&&c.set(o,wt.BAGGAGE_HEADER,e)}extract(n,o,c){let l=c.get(o,wt.BAGGAGE_HEADER),i=Array.isArray(l)?l.join(wt.BAGGAGE_ITEMS_SEPARATOR):l;if(!i)return n;let e={};return i.length===0||(i.split(wt.BAGGAGE_ITEMS_SEPARATOR).forEach(r=>{let a=(0,Kr.parsePairKeyValue)(r);if(a){let s={value:a.value};a.metadata&&(s.metadata=a.metadata),e[a.key]=s}}),Object.entries(e).length===0)?n:qr.propagation.setBaggage(n,qr.propagation.createBaggage(e))}fields(){return[wt.BAGGAGE_HEADER]}};Ne.W3CBaggagePropagator=Xr});var So=m(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.AnchoredClock=void 0;var Yr=class{constructor(n,o){this._monotonicClock=o,this._epochMillis=n.now(),this._performanceMillis=o.now()}now(){let n=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+n}};Pe.AnchoredClock=Yr});var No=m(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.isAttributeValue=mt.isAttributeKey=mt.sanitizeAttributes=void 0;var To=(S(),C(y));function Hl(u){let n={};if(typeof u!="object"||u==null)return n;for(let[o,c]of Object.entries(u)){if(!Oo(o)){To.diag.warn(`Invalid attribute key: ${o}`);continue}if(!go(c)){To.diag.warn(`Invalid attribute value set for key: ${o}`);continue}Array.isArray(c)?n[o]=c.slice():n[o]=c}return n}mt.sanitizeAttributes=Hl;function Oo(u){return typeof u=="string"&&u.length>0}mt.isAttributeKey=Oo;function go(u){return u==null?!0:Array.isArray(u)?jl(u):Ao(u)}mt.isAttributeValue=go;function jl(u){let n;for(let o of u)if(o!=null){if(!n){if(Ao(o)){n=typeof o;continue}return!1}if(typeof o!==n)return!1}return!0}function Ao(u){switch(typeof u){case"number":case"boolean":case"string":return!0}return!1}});var Jr=m(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.loggingErrorHandler=void 0;var Fl=(S(),C(y));function ql(){return u=>{Fl.diag.error(Kl(u))}}xe.loggingErrorHandler=ql;function Kl(u){return typeof u=="string"?u:JSON.stringify(Xl(u))}function Xl(u){let n={},o=u;for(;o!==null;)Object.getOwnPropertyNames(o).forEach(c=>{if(n[c])return;let l=o[c];l&&(n[c]=String(l))}),o=Object.getPrototypeOf(o);return n}});var zr=m(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.globalErrorHandler=Ht.setGlobalErrorHandler=void 0;var Yl=Jr(),Po=(0,Yl.loggingErrorHandler)();function Jl(u){Po=u}Ht.setGlobalErrorHandler=Jl;function zl(u){try{Po(u)}catch{}}Ht.globalErrorHandler=zl});var Wr=m(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.TracesSamplerValues=void 0;var Wl;(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"})(Wl=le.TracesSamplerValues||(le.TracesSamplerValues={}))});var Le=m(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re._globalThis=void 0;Re._globalThis=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});var Ie=m(I=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0});I.getEnvWithoutDefaults=I.parseEnvironment=I.DEFAULT_ENVIRONMENT=I.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=I.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=I.DEFAULT_ATTRIBUTE_COUNT_LIMIT=I.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=void 0;var vt=(S(),C(y)),$l=Wr(),Ql=Le(),Zl=",",tc=["OTEL_SDK_DISABLED"];function ec(u){return tc.indexOf(u)>-1}var rc=["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 nc(u){return rc.indexOf(u)>-1}var oc=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function ic(u){return oc.indexOf(u)>-1}I.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=1/0;I.DEFAULT_ATTRIBUTE_COUNT_LIMIT=128;I.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=128;I.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=128;I.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:vt.DiagLogLevel.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:I.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_ATTRIBUTE_COUNT_LIMIT:I.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:I.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:I.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:I.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:I.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:I.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:I.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:$l.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 ac(u,n,o){if(typeof o[u]>"u")return;let c=String(o[u]);n[u]=c.toLowerCase()==="true"}function uc(u,n,o,c=-1/0,l=1/0){if(typeof o[u]<"u"){let i=Number(o[u]);isNaN(i)||(i<c?n[u]=c:i>l?n[u]=l:n[u]=i)}}function lc(u,n,o,c=Zl){let l=o[u];typeof l=="string"&&(n[u]=l.split(c).map(i=>i.trim()))}var cc={ALL:vt.DiagLogLevel.ALL,VERBOSE:vt.DiagLogLevel.VERBOSE,DEBUG:vt.DiagLogLevel.DEBUG,INFO:vt.DiagLogLevel.INFO,WARN:vt.DiagLogLevel.WARN,ERROR:vt.DiagLogLevel.ERROR,NONE:vt.DiagLogLevel.NONE};function sc(u,n,o){let c=o[u];if(typeof c=="string"){let l=cc[c.toUpperCase()];l!=null&&(n[u]=l)}}function $r(u){let n={};for(let o in I.DEFAULT_ENVIRONMENT){let c=o;switch(c){case"OTEL_LOG_LEVEL":sc(c,n,u);break;default:if(ec(c))ac(c,n,u);else if(nc(c))uc(c,n,u);else if(ic(c))lc(c,n,u);else{let l=u[c];typeof l<"u"&&l!==null&&(n[c]=String(l))}}}return n}I.parseEnvironment=$r;function fc(){return typeof process<"u"&&process&&process.env?$r(process.env):$r(Ql._globalThis)}I.getEnvWithoutDefaults=fc});var Ro=m(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.getEnv=void 0;var xo=Ie(),pc=Le();function dc(){let u=(0,xo.parseEnvironment)(pc._globalThis);return Object.assign({},xo.DEFAULT_ENVIRONMENT,u)}we.getEnv=dc});var Lo=m(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.hexToBase64=void 0;function yc(u){let n=u.length,o="";for(let c=0;c<n;c+=2){let l=u.substring(c,c+2),i=parseInt(l,16);o+=String.fromCharCode(i)}return btoa(o)}Ce.hexToBase64=yc});var wo=m(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.RandomIdGenerator=void 0;var hc=8,mc=16,Qr=class{constructor(){this.generateTraceId=Io(mc),this.generateSpanId=Io(hc)}};Me.RandomIdGenerator=Qr;var Ue=Array(32);function Io(u){return function(){for(let o=0;o<u*2;o++)Ue[o]=Math.floor(Math.random()*16)+48,Ue[o]>=58&&(Ue[o]+=39);return String.fromCharCode.apply(null,Ue.slice(0,u*2))}}});var Co=m(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.otperformance=void 0;De.otperformance=performance});var Zr=m(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.VERSION=void 0;Be.VERSION="1.19.0"});var Uo=m(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.MessageTypeValues=P.RpcGrpcStatusCodeValues=P.MessagingOperationValues=P.MessagingDestinationKindValues=P.HttpFlavorValues=P.NetHostConnectionSubtypeValues=P.NetHostConnectionTypeValues=P.NetTransportValues=P.FaasInvokedProviderValues=P.FaasDocumentOperationValues=P.FaasTriggerValues=P.DbCassandraConsistencyLevelValues=P.DbSystemValues=P.SemanticAttributes=void 0;P.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"};P.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"};P.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"};P.FaasTriggerValues={DATASOURCE:"datasource",HTTP:"http",PUBSUB:"pubsub",TIMER:"timer",OTHER:"other"};P.FaasDocumentOperationValues={INSERT:"insert",EDIT:"edit",DELETE:"delete"};P.FaasInvokedProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};P.NetTransportValues={IP_TCP:"ip_tcp",IP_UDP:"ip_udp",IP:"ip",UNIX:"unix",PIPE:"pipe",INPROC:"inproc",OTHER:"other"};P.NetHostConnectionTypeValues={WIFI:"wifi",WIRED:"wired",CELL:"cell",UNAVAILABLE:"unavailable",UNKNOWN:"unknown"};P.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"};P.HttpFlavorValues={HTTP_1_0:"1.0",HTTP_1_1:"1.1",HTTP_2_0:"2.0",SPDY:"SPDY",QUIC:"QUIC"};P.MessagingDestinationKindValues={QUEUE:"queue",TOPIC:"topic"};P.MessagingOperationValues={RECEIVE:"receive",PROCESS:"process"};P.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};P.MessageTypeValues={SENT:"SENT",RECEIVED:"RECEIVED"}});var Mo=m(Ct=>{"use strict";var vc=Ct&&Ct.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),_c=Ct&&Ct.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&vc(n,u,o)};Object.defineProperty(Ct,"__esModule",{value:!0});_c(Uo(),Ct)});var Do=m(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.TelemetrySdkLanguageValues=j.OsTypeValues=j.HostArchValues=j.AwsEcsLaunchtypeValues=j.CloudPlatformValues=j.CloudProviderValues=j.SemanticResourceAttributes=void 0;j.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"};j.CloudProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};j.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"};j.AwsEcsLaunchtypeValues={EC2:"ec2",FARGATE:"fargate"};j.HostArchValues={AMD64:"amd64",ARM32:"arm32",ARM64:"arm64",IA64:"ia64",PPC32:"ppc32",PPC64:"ppc64",X86:"x86"};j.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"};j.TelemetrySdkLanguageValues={CPP:"cpp",DOTNET:"dotnet",ERLANG:"erlang",GO:"go",JAVA:"java",NODEJS:"nodejs",PHP:"php",PYTHON:"python",RUBY:"ruby",WEBJS:"webjs"}});var Bo=m(Ut=>{"use strict";var Ec=Ut&&Ut.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),bc=Ut&&Ut.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&Ec(n,u,o)};Object.defineProperty(Ut,"__esModule",{value:!0});bc(Do(),Ut)});var Et=m(_t=>{"use strict";var Sc=_t&&_t.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),ko=_t&&_t.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&Sc(n,u,o)};Object.defineProperty(_t,"__esModule",{value:!0});ko(Mo(),_t);ko(Bo(),_t)});var Vo=m(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.SDK_INFO=void 0;var Tc=Zr(),ce=Et();ke.SDK_INFO={[ce.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:"opentelemetry",[ce.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"browser",[ce.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:ce.TelemetrySdkLanguageValues.WEBJS,[ce.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:Tc.VERSION}});var Go=m(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.unrefTimer=void 0;function Oc(u){}Ve.unrefTimer=Oc});var tn=m(X=>{"use strict";var gc=X&&X.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),Mt=X&&X.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&gc(n,u,o)};Object.defineProperty(X,"__esModule",{value:!0});Mt(Ro(),X);Mt(Le(),X);Mt(Lo(),X);Mt(wo(),X);Mt(Co(),X);Mt(Vo(),X);Mt(Go(),X)});var qo=m(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.addHrTimes=R.isTimeInput=R.isTimeInputHrTime=R.hrTimeToMicroseconds=R.hrTimeToMilliseconds=R.hrTimeToNanoseconds=R.hrTimeToTimeStamp=R.hrTimeDuration=R.timeInputToHrTime=R.hrTime=R.getTimeOrigin=R.millisToHrTime=void 0;var en=tn(),Ho=9,Ac=6,Nc=Math.pow(10,Ac),Ge=Math.pow(10,Ho);function se(u){let n=u/1e3,o=Math.trunc(n),c=Math.round(u%1e3*Nc);return[o,c]}R.millisToHrTime=se;function rn(){let u=en.otperformance.timeOrigin;if(typeof u!="number"){let n=en.otperformance;u=n.timing&&n.timing.fetchStart}return u}R.getTimeOrigin=rn;function jo(u){let n=se(rn()),o=se(typeof u=="number"?u:en.otperformance.now());return Fo(n,o)}R.hrTime=jo;function Pc(u){if(nn(u))return u;if(typeof u=="number")return u<rn()?jo(u):se(u);if(u instanceof Date)return se(u.getTime());throw TypeError("Invalid input type")}R.timeInputToHrTime=Pc;function xc(u,n){let o=n[0]-u[0],c=n[1]-u[1];return c<0&&(o-=1,c+=Ge),[o,c]}R.hrTimeDuration=xc;function Rc(u){let n=Ho,o=`${"0".repeat(n)}${u[1]}Z`,c=o.substr(o.length-n-1);return new Date(u[0]*1e3).toISOString().replace("000Z",c)}R.hrTimeToTimeStamp=Rc;function Lc(u){return u[0]*Ge+u[1]}R.hrTimeToNanoseconds=Lc;function Ic(u){return u[0]*1e3+u[1]/1e6}R.hrTimeToMilliseconds=Ic;function wc(u){return u[0]*1e6+u[1]/1e3}R.hrTimeToMicroseconds=wc;function nn(u){return Array.isArray(u)&&u.length===2&&typeof u[0]=="number"&&typeof u[1]=="number"}R.isTimeInputHrTime=nn;function Cc(u){return nn(u)||typeof u=="number"||u instanceof Date}R.isTimeInput=Cc;function Fo(u,n){let o=[u[0]+n[0],u[1]+n[1]];return o[1]>=Ge&&(o[1]-=Ge,o[0]+=1),o}R.addHrTimes=Fo});var Xo=m(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0})});var Yo=m(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.ExportResultCode=void 0;var Uc;(function(u){u[u.SUCCESS=0]="SUCCESS",u[u.FAILED=1]="FAILED"})(Uc=fe.ExportResultCode||(fe.ExportResultCode={}))});var zo=m(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.CompositePropagator=void 0;var Jo=(S(),C(y)),on=class{constructor(n={}){var o;this._propagators=(o=n.propagators)!==null&&o!==void 0?o:[],this._fields=Array.from(new Set(this._propagators.map(c=>typeof c.fields=="function"?c.fields():[]).reduce((c,l)=>c.concat(l),[])))}inject(n,o,c){for(let l of this._propagators)try{l.inject(n,o,c)}catch(i){Jo.diag.warn(`Failed to inject with ${l.constructor.name}. Err: ${i.message}`)}}extract(n,o,c){return this._propagators.reduce((l,i)=>{try{return i.extract(l,o,c)}catch(e){Jo.diag.warn(`Failed to inject with ${i.constructor.name}. Err: ${e.message}`)}return l},n)}fields(){return this._fields.slice()}};He.CompositePropagator=on});var Wo=m(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.validateValue=jt.validateKey=void 0;var an="[_0-9a-z-*/]",Mc=`[a-z]${an}{0,255}`,Dc=`[a-z0-9]${an}{0,240}@[a-z]${an}{0,13}`,Bc=new RegExp(`^(?:${Mc}|${Dc})$`),kc=/^[ -~]{0,255}[!-~]$/,Vc=/,|=/;function Gc(u){return Bc.test(u)}jt.validateKey=Gc;function Hc(u){return kc.test(u)&&!Vc.test(u)}jt.validateValue=Hc});var ln=m(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.TraceState=void 0;var $o=Wo(),Qo=32,jc=512,Zo=",",ti="=",un=class u{constructor(n){this._internalState=new Map,n&&this._parse(n)}set(n,o){let c=this._clone();return c._internalState.has(n)&&c._internalState.delete(n),c._internalState.set(n,o),c}unset(n){let o=this._clone();return o._internalState.delete(n),o}get(n){return this._internalState.get(n)}serialize(){return this._keys().reduce((n,o)=>(n.push(o+ti+this.get(o)),n),[]).join(Zo)}_parse(n){n.length>jc||(this._internalState=n.split(Zo).reverse().reduce((o,c)=>{let l=c.trim(),i=l.indexOf(ti);if(i!==-1){let e=l.slice(0,i),t=l.slice(i+1,c.length);(0,$o.validateKey)(e)&&(0,$o.validateValue)(t)&&o.set(e,t)}return o},new Map),this._internalState.size>Qo&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Qo))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let n=new u;return n._internalState=new Map(this._internalState),n}};je.TraceState=un});var ri=m(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.W3CTraceContextPropagator=F.parseTraceParent=F.TRACE_STATE_HEADER=F.TRACE_PARENT_HEADER=void 0;var Fe=(S(),C(y)),Fc=ue(),qc=ln();F.TRACE_PARENT_HEADER="traceparent";F.TRACE_STATE_HEADER="tracestate";var Kc="00",Xc="(?!ff)[\\da-f]{2}",Yc="(?![0]{32})[\\da-f]{32}",Jc="(?![0]{16})[\\da-f]{16}",zc="[\\da-f]{2}",Wc=new RegExp(`^\\s?(${Xc})-(${Yc})-(${Jc})-(${zc})(-.*)?\\s?$`);function ei(u){let n=Wc.exec(u);return!n||n[1]==="00"&&n[5]?null:{traceId:n[2],spanId:n[3],traceFlags:parseInt(n[4],16)}}F.parseTraceParent=ei;var cn=class{inject(n,o,c){let l=Fe.trace.getSpanContext(n);if(!l||(0,Fc.isTracingSuppressed)(n)||!(0,Fe.isSpanContextValid)(l))return;let i=`${Kc}-${l.traceId}-${l.spanId}-0${Number(l.traceFlags||Fe.TraceFlags.NONE).toString(16)}`;c.set(o,F.TRACE_PARENT_HEADER,i),l.traceState&&c.set(o,F.TRACE_STATE_HEADER,l.traceState.serialize())}extract(n,o,c){let l=c.get(o,F.TRACE_PARENT_HEADER);if(!l)return n;let i=Array.isArray(l)?l[0]:l;if(typeof i!="string")return n;let e=ei(i);if(!e)return n;e.isRemote=!0;let t=c.get(o,F.TRACE_STATE_HEADER);if(t){let r=Array.isArray(t)?t.join(","):t;e.traceState=new qc.TraceState(typeof r=="string"?r:void 0)}return Fe.trace.setSpanContext(n,e)}fields(){return[F.TRACE_PARENT_HEADER,F.TRACE_STATE_HEADER]}};F.W3CTraceContextPropagator=cn});var oi=m(ni=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0})});var ii=m(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.getRPCMetadata=Z.deleteRPCMetadata=Z.setRPCMetadata=Z.RPCType=void 0;var $c=(S(),C(y)),sn=(0,$c.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),Qc;(function(u){u.HTTP="http"})(Qc=Z.RPCType||(Z.RPCType={}));function Zc(u,n){return u.setValue(sn,n)}Z.setRPCMetadata=Zc;function ts(u){return u.deleteValue(sn)}Z.deleteRPCMetadata=ts;function es(u){return u.getValue(sn)}Z.getRPCMetadata=es});var pn=m(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.AlwaysOffSampler=void 0;var rs=(S(),C(y)),fn=class{shouldSample(){return{decision:rs.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};qe.AlwaysOffSampler=fn});var yn=m(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.AlwaysOnSampler=void 0;var ns=(S(),C(y)),dn=class{shouldSample(){return{decision:ns.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};Ke.AlwaysOnSampler=dn});var ui=m(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.ParentBasedSampler=void 0;var Xe=(S(),C(y)),os=zr(),ai=pn(),hn=yn(),mn=class{constructor(n){var o,c,l,i;this._root=n.root,this._root||((0,os.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new hn.AlwaysOnSampler),this._remoteParentSampled=(o=n.remoteParentSampled)!==null&&o!==void 0?o:new hn.AlwaysOnSampler,this._remoteParentNotSampled=(c=n.remoteParentNotSampled)!==null&&c!==void 0?c:new ai.AlwaysOffSampler,this._localParentSampled=(l=n.localParentSampled)!==null&&l!==void 0?l:new hn.AlwaysOnSampler,this._localParentNotSampled=(i=n.localParentNotSampled)!==null&&i!==void 0?i:new ai.AlwaysOffSampler}shouldSample(n,o,c,l,i,e){let t=Xe.trace.getSpanContext(n);return!t||!(0,Xe.isSpanContextValid)(t)?this._root.shouldSample(n,o,c,l,i,e):t.isRemote?t.traceFlags&Xe.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(n,o,c,l,i,e):this._remoteParentNotSampled.shouldSample(n,o,c,l,i,e):t.traceFlags&Xe.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(n,o,c,l,i,e):this._localParentNotSampled.shouldSample(n,o,c,l,i,e)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};Ye.ParentBasedSampler=mn});var li=m(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.TraceIdRatioBasedSampler=void 0;var vn=(S(),C(y)),_n=class{constructor(n=0){this._ratio=n,this._ratio=this._normalize(n),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(n,o){return{decision:(0,vn.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?vn.SamplingDecision.RECORD_AND_SAMPLED:vn.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(n){return typeof n!="number"||isNaN(n)?0:n>=1?1:n<=0?0:n}_accumulate(n){let o=0;for(let c=0;c<n.length/8;c++){let l=c*8,i=parseInt(n.slice(l,l+8),16);o=(o^i)>>>0}return o}};Je.TraceIdRatioBasedSampler=_n});var di=m(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.isPlainObject=void 0;var is="[object Object]",as="[object Null]",us="[object Undefined]",ls=Function.prototype,ci=ls.toString,cs=ci.call(Object),ss=fs(Object.getPrototypeOf,Object),si=Object.prototype,fi=si.hasOwnProperty,Dt=Symbol?Symbol.toStringTag:void 0,pi=si.toString;function fs(u,n){return function(o){return u(n(o))}}function ps(u){if(!ds(u)||ys(u)!==is)return!1;let n=ss(u);if(n===null)return!0;let o=fi.call(n,"constructor")&&n.constructor;return typeof o=="function"&&o instanceof o&&ci.call(o)===cs}ze.isPlainObject=ps;function ds(u){return u!=null&&typeof u=="object"}function ys(u){return u==null?u===void 0?us:as:Dt&&Dt in Object(u)?hs(u):ms(u)}function hs(u){let n=fi.call(u,Dt),o=u[Dt],c=!1;try{u[Dt]=void 0,c=!0}catch{}let l=pi.call(u);return c&&(n?u[Dt]=o:delete u[Dt]),l}function ms(u){return pi.call(u)}});var _i=m(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.merge=void 0;var yi=di(),vs=20;function _s(...u){let n=u.shift(),o=new WeakMap;for(;u.length>0;)n=mi(n,u.shift(),0,o);return n}Qe.merge=_s;function En(u){return $e(u)?u.slice():u}function mi(u,n,o=0,c){let l;if(!(o>vs)){if(o++,We(u)||We(n)||vi(n))l=En(n);else if($e(u)){if(l=u.slice(),$e(n))for(let i=0,e=n.length;i<e;i++)l.push(En(n[i]));else if(pe(n)){let i=Object.keys(n);for(let e=0,t=i.length;e<t;e++){let r=i[e];l[r]=En(n[r])}}}else if(pe(u))if(pe(n)){if(!Es(u,n))return n;l=Object.assign({},u);let i=Object.keys(n);for(let e=0,t=i.length;e<t;e++){let r=i[e],a=n[r];if(We(a))typeof a>"u"?delete l[r]:l[r]=a;else{let s=l[r],d=a;if(hi(u,r,c)||hi(n,r,c))delete l[r];else{if(pe(s)&&pe(d)){let v=c.get(s)||[],b=c.get(d)||[];v.push({obj:u,key:r}),b.push({obj:n,key:r}),c.set(s,v),c.set(d,b)}l[r]=mi(l[r],a,o,c)}}}}else l=n;return l}}function hi(u,n,o){let c=o.get(u[n])||[];for(let l=0,i=c.length;l<i;l++){let e=c[l];if(e.key===n&&e.obj===u)return!0}return!1}function $e(u){return Array.isArray(u)}function vi(u){return typeof u=="function"}function pe(u){return!We(u)&&!$e(u)&&!vi(u)&&typeof u=="object"}function We(u){return typeof u=="string"||typeof u=="number"||typeof u=="boolean"||typeof u>"u"||u instanceof Date||u instanceof RegExp||u===null}function Es(u,n){return!(!(0,yi.isPlainObject)(u)||!(0,yi.isPlainObject)(n))}});var Ei=m(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.callWithTimeout=Ft.TimeoutError=void 0;var Ze=class u extends Error{constructor(n){super(n),Object.setPrototypeOf(this,u.prototype)}};Ft.TimeoutError=Ze;function bs(u,n){let o,c=new Promise(function(i,e){o=setTimeout(function(){e(new Ze("Operation timed out."))},n)});return Promise.race([u,c]).then(l=>(clearTimeout(o),l),l=>{throw clearTimeout(o),l})}Ft.callWithTimeout=bs});var Si=m(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.isUrlIgnored=qt.urlMatches=void 0;function bi(u,n){return typeof n=="string"?u===n:!!u.match(n)}qt.urlMatches=bi;function Ss(u,n){if(!n)return!1;for(let o of n)if(bi(u,o))return!0;return!1}qt.isUrlIgnored=Ss});var Ti=m(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.isWrapped=void 0;function Ts(u){return typeof u=="function"&&typeof u.__original=="function"&&typeof u.__unwrap=="function"&&u.__wrapped===!0}tr.isWrapped=Ts});var Oi=m(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.Deferred=void 0;var bn=class{constructor(){this._promise=new Promise((n,o)=>{this._resolve=n,this._reject=o})}get promise(){return this._promise}resolve(n){this._resolve(n)}reject(n){this._reject(n)}};er.Deferred=bn});var gi=m(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.BindOnceFuture=void 0;var Os=Oi(),Sn=class{constructor(n,o){this._callback=n,this._that=o,this._isCalled=!1,this._deferred=new Os.Deferred}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...n){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...n)).then(o=>this._deferred.resolve(o),o=>this._deferred.reject(o))}catch(o){this._deferred.reject(o)}}return this._deferred.promise}};rr.BindOnceFuture=Sn});var Ni=m(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr._export=void 0;var Ai=(S(),C(y)),gs=ue();function As(u,n){return new Promise(o=>{Ai.context.with((0,gs.suppressTracing)(Ai.context.active()),()=>{u.export(n,c=>{o(c)})})})}nr._export=As});var U=m(O=>{"use strict";var Ns=O&&O.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),x=O&&O.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&Ns(n,u,o)};Object.defineProperty(O,"__esModule",{value:!0});O.internal=O.baggageUtils=void 0;x(bo(),O);x(So(),O);x(No(),O);x(zr(),O);x(Jr(),O);x(qo(),O);x(Xo(),O);x(Yo(),O);O.baggageUtils=Fr();x(tn(),O);x(zo(),O);x(ri(),O);x(oi(),O);x(ii(),O);x(pn(),O);x(yn(),O);x(ui(),O);x(li(),O);x(ue(),O);x(ln(),O);x(Ie(),O);x(_i(),O);x(Wr(),O);x(Ei(),O);x(Si(),O);x(Ti(),O);x(gi(),O);x(Zr(),O);var Ps=Ni();O.internal={_export:Ps._export}});var Yi=m(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.disableInstrumentations=gt.enableInstrumentations=gt.parseInstrumentationOptions=void 0;function Xi(u=[]){let n=[];for(let o=0,c=u.length;o<c;o++){let l=u[o];if(Array.isArray(l)){let i=Xi(l);n=n.concat(i.instrumentations)}else typeof l=="function"?n.push(new l):l.instrumentationName&&n.push(l)}return{instrumentations:n}}gt.parseInstrumentationOptions=Xi;function qs(u,n,o){for(let c=0,l=u.length;c<l;c++){let i=u[c];n&&i.setTracerProvider(n),o&&i.setMeterProvider(o),i.getConfig().enabled||i.enable()}}gt.enableInstrumentations=qs;function Ks(u){u.forEach(n=>n.disable())}gt.disableInstrumentations=Ks});var zi=m(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.registerInstrumentations=void 0;var Ji=(S(),C(y)),On=Yi();function Xs(u){let{instrumentations:n}=(0,On.parseInstrumentationOptions)(u.instrumentations),o=u.tracerProvider||Ji.trace.getTracerProvider(),c=u.meterProvider||Ji.metrics.getMeterProvider();return(0,On.enableInstrumentations)(n,o,c),()=>{(0,On.disableInstrumentations)(n)}}cr.registerInstrumentations=Xs});var he={};import*as fm from"async_hooks";var qa=Gr(()=>{Q(he,fm)});var me={};import*as pm from"events";var Ka=Gr(()=>{Q(me,pm)});var Xa=m(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.AbstractAsyncHooksContextManager=void 0;var Tf=(Ka(),C(me)),Of=["addListener","on","once","prependListener","prependOnceListener"],Mn=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(n,o){return o instanceof Tf.EventEmitter?this._bindEventEmitter(n,o):typeof o=="function"?this._bindFunction(n,o):o}_bindFunction(n,o){let c=this,l=function(...i){return c.with(n,()=>o.apply(this,i))};return Object.defineProperty(l,"length",{enumerable:!1,configurable:!0,writable:!1,value:o.length}),l}_bindEventEmitter(n,o){return this._getPatchMap(o)!==void 0||(this._createPatchMap(o),Of.forEach(l=>{o[l]!==void 0&&(o[l]=this._patchAddListener(o,o[l],n))}),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(n,o){let c=this;return function(l,i){var e;let t=(e=c._getPatchMap(n))===null||e===void 0?void 0:e[l];if(t===void 0)return o.call(this,l,i);let r=t.get(i);return o.call(this,l,r||i)}}_patchRemoveAllListeners(n,o){let c=this;return function(l){let i=c._getPatchMap(n);return i!==void 0&&(arguments.length===0?c._createPatchMap(n):i[l]!==void 0&&delete i[l]),o.apply(this,arguments)}}_patchAddListener(n,o,c){let l=this;return function(i,e){if(l._wrapped)return o.call(this,i,e);let t=l._getPatchMap(n);t===void 0&&(t=l._createPatchMap(n));let r=t[i];r===void 0&&(r=new WeakMap,t[i]=r);let a=l.bind(c,e);r.set(e,a),l._wrapped=!0;try{return o.call(this,i,a)}finally{l._wrapped=!1}}}_createPatchMap(n){let o=Object.create(null);return n[this._kOtListeners]=o,o}_getPatchMap(n){return n[this._kOtListeners]}};Er.AbstractAsyncHooksContextManager=Mn});var Ya=m(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.AsyncLocalStorageContextManager=void 0;var gf=(S(),C(y)),Af=(qa(),C(he)),Nf=Xa(),Dn=class extends Nf.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new Af.AsyncLocalStorage}active(){var n;return(n=this._asyncLocalStorage.getStore())!==null&&n!==void 0?n:gf.ROOT_CONTEXT}with(n,o,c,...l){let i=c==null?o:o.bind(c);return this._asyncLocalStorage.run(n,i,...l)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};br.AsyncLocalStorageContextManager=Dn});var Gn=m(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.toAnyValue=At.toKeyValue=At.toAttributes=void 0;function Rf(u){return Object.keys(u).map(n=>kn(n,u[n]))}At.toAttributes=Rf;function kn(u,n){return{key:u,value:Vn(n)}}At.toKeyValue=kn;function Vn(u){let n=typeof u;return n==="string"?{stringValue:u}:n==="number"?Number.isInteger(u)?{intValue:u}:{doubleValue:u}:n==="boolean"?{boolValue:u}:u instanceof Uint8Array?{bytesValue:u}:Array.isArray(u)?{arrayValue:{values:u.map(Vn)}}:n==="object"&&u!=null?{kvlistValue:{values:Object.entries(u).map(([o,c])=>kn(o,c))}}:{}}At.toAnyValue=Vn});var Qa=m(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.toOtlpSpanEvent=Nt.toOtlpLink=Nt.sdkSpanToOtlpSpan=void 0;var Hn=Gn();function Lf(u,n){var o;let c=u.spanContext(),l=u.status;return{traceId:n.encodeSpanContext(c.traceId),spanId:n.encodeSpanContext(c.spanId),parentSpanId:n.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:n.encodeHrTime(u.startTime),endTimeUnixNano:n.encodeHrTime(u.endTime),attributes:(0,Hn.toAttributes)(u.attributes),droppedAttributesCount:u.droppedAttributesCount,events:u.events.map(i=>$a(i,n)),droppedEventsCount:u.droppedEventsCount,status:{code:l.code,message:l.message},links:u.links.map(i=>Wa(i,n)),droppedLinksCount:u.droppedLinksCount}}Nt.sdkSpanToOtlpSpan=Lf;function Wa(u,n){var o;return{attributes:u.attributes?(0,Hn.toAttributes)(u.attributes):[],spanId:n.encodeSpanContext(u.context.spanId),traceId:n.encodeSpanContext(u.context.traceId),traceState:(o=u.context.traceState)===null||o===void 0?void 0:o.serialize(),droppedAttributesCount:u.droppedAttributesCount||0}}Nt.toOtlpLink=Wa;function $a(u,n){return{attributes:u.attributes?(0,Hn.toAttributes)(u.attributes):[],name:u.name,timeUnixNano:n.encodeHrTime(u.time),droppedAttributesCount:u.droppedAttributesCount||0}}Nt.toOtlpSpanEvent=$a});var nu=m(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.getOtlpEncoder=z.encodeAsString=z.encodeAsLongBits=z.toLongBits=z.hrTimeToNanos=void 0;var gr=U(),If=BigInt(1e9);function jn(u){return BigInt(u[0])*If+BigInt(u[1])}z.hrTimeToNanos=jn;function tu(u){let n=Number(BigInt.asUintN(32,u)),o=Number(BigInt.asUintN(32,u>>BigInt(32)));return{low:n,high:o}}z.toLongBits=tu;function Fn(u){let n=jn(u);return tu(n)}z.encodeAsLongBits=Fn;function eu(u){return jn(u).toString()}z.encodeAsString=eu;var wf=typeof BigInt<"u"?eu:gr.hrTimeToNanoseconds;function Za(u){return u}function ru(u){if(u!==void 0)return(0,gr.hexToBase64)(u)}var Cf={encodeHrTime:Fn,encodeSpanContext:gr.hexToBase64,encodeOptionalSpanContext:ru};function Uf(u){var n,o;if(u===void 0)return Cf;let c=(n=u.useLongBits)!==null&&n!==void 0?n:!0,l=(o=u.useHex)!==null&&o!==void 0?o:!1;return{encodeHrTime:c?Fn:wf,encodeSpanContext:l?Za:gr.hexToBase64,encodeOptionalSpanContext:l?Za:ru}}z.getOtlpEncoder=Uf});var qn=m(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.createExportTraceServiceRequest=void 0;var Mf=Gn(),Df=Qa(),Bf=nu();function kf(u,n){let o=(0,Bf.getOtlpEncoder)(n);return{resourceSpans:Gf(u,o)}}Ar.createExportTraceServiceRequest=kf;function Vf(u){let n=new Map;for(let o of u){let c=n.get(o.resource);c||(c=new Map,n.set(o.resource,c));let l=`${o.instrumentationLibrary.name}@${o.instrumentationLibrary.version||""}:${o.instrumentationLibrary.schemaUrl||""}`,i=c.get(l);i||(i=[],c.set(l,i)),i.push(o)}return n}function Gf(u,n){let o=Vf(u),c=[],l=o.entries(),i=l.next();for(;!i.done;){let[e,t]=i.value,r=[],a=t.values(),s=a.next();for(;!s.done;){let v=s.value;if(v.length>0){let{name:b,version:g,schemaUrl:G}=v[0].instrumentationLibrary,B=v.map(yt=>(0,Df.sdkSpanToOtlpSpan)(yt,n));r.push({scope:{name:b,version:g},spans:B,schemaUrl:G})}s=a.next()}let d={resource:{attributes:(0,Mf.toAttributes)(e.attributes),droppedAttributesCount:0},scopeSpans:r,schemaUrl:void 0};c.push(d),i=l.next()}return c}});var ve=m(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.parseRetryAfterToMills=w.isExportRetryable=w.invalidTimeout=w.configureExporterTimeout=w.appendRootPathToUrlIfNeeded=w.appendResourcePathToUrl=w.parseHeaders=w.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=w.DEFAULT_EXPORT_MAX_BACKOFF=w.DEFAULT_EXPORT_INITIAL_BACKOFF=w.DEFAULT_EXPORT_MAX_ATTEMPTS=void 0;var Kn=(S(),C(y)),ou=U(),iu=1e4;w.DEFAULT_EXPORT_MAX_ATTEMPTS=5;w.DEFAULT_EXPORT_INITIAL_BACKOFF=1e3;w.DEFAULT_EXPORT_MAX_BACKOFF=5e3;w.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=1.5;function Hf(u={}){let n={};return Object.entries(u).forEach(([o,c])=>{typeof c<"u"?n[o]=String(c):Kn.diag.warn(`Header "${o}" has wrong value and will be ignored`)}),n}w.parseHeaders=Hf;function jf(u,n){return u.endsWith("/")||(u=u+"/"),u+n}w.appendResourcePathToUrl=jf;function Ff(u){try{let n=new URL(u);return n.pathname===""&&(n.pathname=n.pathname+"/"),n.toString()}catch{return Kn.diag.warn(`Could not parse export URL: '${u}'`),u}}w.appendRootPathToUrlIfNeeded=Ff;function qf(u){return typeof u=="number"?u<=0?Xn(u,iu):u:Kf()}w.configureExporterTimeout=qf;function Kf(){var u;let n=Number((u=(0,ou.getEnv)().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)!==null&&u!==void 0?u:(0,ou.getEnv)().OTEL_EXPORTER_OTLP_TIMEOUT);return n<=0?Xn(n,iu):n}function Xn(u,n){return Kn.diag.warn("Timeout must be greater than 0",u),n}w.invalidTimeout=Xn;function Xf(u){return[429,502,503,504].includes(u)}w.isExportRetryable=Xf;function Yf(u){if(u==null)return-1;let n=Number.parseInt(u,10);if(Number.isInteger(n))return n>0?n*1e3:-1;let o=new Date(u).getTime()-Date.now();return o>=0?o:0}w.parseRetryAfterToMills=Yf});var Pr=m(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.OTLPExporterBase=void 0;var au=(S(),C(y)),_e=U(),Jf=ve(),Yn=class{constructor(n={}){this._sendingPromises=[],this.url=this.getDefaultUrl(n),typeof n.hostname=="string"&&(this.hostname=n.hostname),this.shutdown=this.shutdown.bind(this),this._shutdownOnce=new _e.BindOnceFuture(this._shutdown,this),this._concurrencyLimit=typeof n.concurrencyLimit=="number"?n.concurrencyLimit:30,this.timeoutMillis=(0,Jf.configureExporterTimeout)(n.timeoutMillis),this.onInit(n)}export(n,o){if(this._shutdownOnce.isCalled){o({code:_e.ExportResultCode.FAILED,error:new Error("Exporter has been shutdown")});return}if(this._sendingPromises.length>=this._concurrencyLimit){o({code:_e.ExportResultCode.FAILED,error:new Error("Concurrent export limit reached")});return}this._export(n).then(()=>{o({code:_e.ExportResultCode.SUCCESS})}).catch(c=>{o({code:_e.ExportResultCode.FAILED,error:c})})}_export(n){return new Promise((o,c)=>{try{au.diag.debug("items to be sent",n),this.send(n,o,c)}catch(l){c(l)}})}shutdown(){return this._shutdownOnce.call()}forceFlush(){return Promise.all(this._sendingPromises).then(()=>{})}_shutdown(){return au.diag.debug("shutdown started"),this.onShutdown(),this.forceFlush()}};Nr.OTLPExporterBase=Yn});var zn=m(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.OTLPExporterError=void 0;var Jn=class extends Error{constructor(n,o,c){super(n),this.name="OTLPExporterError",this.data=c,this.code=o}};Rr.OTLPExporterError=Jn});var Wn=m(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.sendWithXhr=te.sendWithBeacon=void 0;var cu=(S(),C(y)),Ee=zn(),Zt=ve();function $f(u,n,o,c,l){if(navigator.sendBeacon(n,new Blob([u],o)))cu.diag.debug("sendBeacon - can send",u),c();else{let i=new Ee.OTLPExporterError(`sendBeacon - cannot send ${u}`);l(i)}}te.sendWithBeacon=$f;function Qf(u,n,o,c,l,i){let e,t,r=!1,a=setTimeout(()=>{if(clearTimeout(e),r=!0,t.readyState===XMLHttpRequest.DONE){let d=new Ee.OTLPExporterError("Request Timeout");i(d)}else t.abort()},c),s=(d=Zt.DEFAULT_EXPORT_MAX_ATTEMPTS,v=Zt.DEFAULT_EXPORT_INITIAL_BACKOFF)=>{t=new XMLHttpRequest,t.open("POST",n),Object.entries(Object.assign(Object.assign({},{Accept:"application/json","Content-Type":"application/json"}),o)).forEach(([g,G])=>{t.setRequestHeader(g,G)}),t.send(u),t.onreadystatechange=()=>{if(t.readyState===XMLHttpRequest.DONE&&r===!1)if(t.status>=200&&t.status<=299)cu.diag.debug("xhr success",u),l(),clearTimeout(a),clearTimeout(e);else if(t.status&&(0,Zt.isExportRetryable)(t.status)&&d>0){let g;v=Zt.DEFAULT_EXPORT_BACKOFF_MULTIPLIER*v,t.getResponseHeader("Retry-After")?g=(0,Zt.parseRetryAfterToMills)(t.getResponseHeader("Retry-After")):g=Math.round(Math.random()*(Zt.DEFAULT_EXPORT_MAX_BACKOFF-v)+v),e=setTimeout(()=>{s(d-1,v)},g)}else{let g=new Ee.OTLPExporterError(`Failed to export with XHR (status: ${t.status})`,t.status);i(g),clearTimeout(a),clearTimeout(e)}},t.onabort=()=>{if(r){let g=new Ee.OTLPExporterError("Request Timeout");i(g)}clearTimeout(a),clearTimeout(e)},t.onerror=()=>{if(r){let g=new Ee.OTLPExporterError("Request Timeout");i(g)}clearTimeout(a),clearTimeout(e)}};s()}te.sendWithXhr=Qf});var fu=m(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.OTLPExporterBrowserBase=void 0;var Zf=Pr(),tp=ve(),su=Wn(),ep=(S(),C(y)),Lr=U(),$n=class extends Zf.OTLPExporterBase{constructor(n={}){super(n),this._useXHR=!1,this._useXHR=!!n.headers||typeof navigator.sendBeacon!="function",this._useXHR?this._headers=Object.assign({},(0,tp.parseHeaders)(n.headers),Lr.baggageUtils.parseKeyPairsIntoRecord((0,Lr.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)):this._headers={}}onInit(){Lr._globalThis.addEventListener("unload",this.shutdown)}onShutdown(){Lr._globalThis.removeEventListener("unload",this.shutdown)}send(n,o,c){if(this._shutdownOnce.isCalled){ep.diag.debug("Shutdown already started. Cannot send objects");return}let l=this.convert(n),i=JSON.stringify(l),e=new Promise((r,a)=>{this._useXHR?(0,su.sendWithXhr)(i,this.url,this._headers,this.timeoutMillis,r,a):(0,su.sendWithBeacon)(i,this.url,{type:"application/json"},r,a)}).then(o,c);this._sendingPromises.push(e);let t=()=>{let r=this._sendingPromises.indexOf(e);this._sendingPromises.splice(r,1)};e.then(t,t)}};Ir.OTLPExporterBrowserBase=$n});var pu=m(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.sendWithXhr=ee.OTLPExporterBrowserBase=void 0;var rp=fu();Object.defineProperty(ee,"OTLPExporterBrowserBase",{enumerable:!0,get:function(){return rp.OTLPExporterBrowserBase}});var np=Wn();Object.defineProperty(ee,"sendWithXhr",{enumerable:!0,get:function(){return np.sendWithXhr}})});var du=m(M=>{"use strict";var op=M&&M.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),ip=M&&M.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&op(n,u,o)};Object.defineProperty(M,"__esModule",{value:!0});M.invalidTimeout=M.configureExporterTimeout=M.appendRootPathToUrlIfNeeded=M.appendResourcePathToUrl=M.parseHeaders=M.OTLPExporterError=M.OTLPExporterBase=void 0;ip(pu(),M);var ap=Pr();Object.defineProperty(M,"OTLPExporterBase",{enumerable:!0,get:function(){return ap.OTLPExporterBase}});var up=zn();Object.defineProperty(M,"OTLPExporterError",{enumerable:!0,get:function(){return up.OTLPExporterError}});var be=ve();Object.defineProperty(M,"parseHeaders",{enumerable:!0,get:function(){return be.parseHeaders}});Object.defineProperty(M,"appendResourcePathToUrl",{enumerable:!0,get:function(){return be.appendResourcePathToUrl}});Object.defineProperty(M,"appendRootPathToUrlIfNeeded",{enumerable:!0,get:function(){return be.appendRootPathToUrlIfNeeded}});Object.defineProperty(M,"configureExporterTimeout",{enumerable:!0,get:function(){return be.configureExporterTimeout}});Object.defineProperty(M,"invalidTimeout",{enumerable:!0,get:function(){return be.invalidTimeout}})});var hu=m((Fm,yu)=>{"use strict";yu.exports=lp;function lp(u,n){for(var o=new Array(arguments.length-1),c=0,l=2,i=!0;l<arguments.length;)o[c++]=arguments[l++];return new Promise(function(t,r){o[c]=function(s){if(i)if(i=!1,s)r(s);else{for(var d=new Array(arguments.length-1),v=0;v<d.length;)d[v++]=arguments[v];t.apply(null,d)}};try{u.apply(n||null,o)}catch(a){i&&(i=!1,r(a))}})}});var Eu=m(_u=>{"use strict";var wr=_u;wr.length=function(n){var o=n.length;if(!o)return 0;for(var c=0;--o%4>1&&n.charAt(o)==="=";)++c;return Math.ceil(n.length*3)/4-c};var re=new Array(64),vu=new Array(123);for(rt=0;rt<64;)vu[re[rt]=rt<26?rt+65:rt<52?rt+71:rt<62?rt-4:rt-59|43]=rt++;var rt;wr.encode=function(n,o,c){for(var l=null,i=[],e=0,t=0,r;o<c;){var a=n[o++];switch(t){case 0:i[e++]=re[a>>2],r=(a&3)<<4,t=1;break;case 1:i[e++]=re[r|a>>4],r=(a&15)<<2,t=2;break;case 2:i[e++]=re[r|a>>6],i[e++]=re[a&63],t=0;break}e>8191&&((l||(l=[])).push(String.fromCharCode.apply(String,i)),e=0)}return t&&(i[e++]=re[r],i[e++]=61,t===1&&(i[e++]=61)),l?(e&&l.push(String.fromCharCode.apply(String,i.slice(0,e))),l.join("")):String.fromCharCode.apply(String,i.slice(0,e))};var mu="invalid encoding";wr.decode=function(n,o,c){for(var l=c,i=0,e,t=0;t<n.length;){var r=n.charCodeAt(t++);if(r===61&&i>1)break;if((r=vu[r])===void 0)throw Error(mu);switch(i){case 0:e=r,i=1;break;case 1:o[c++]=e<<2|(r&48)>>4,e=r,i=2;break;case 2:o[c++]=(e&15)<<4|(r&60)>>2,e=r,i=3;break;case 3:o[c++]=(e&3)<<6|r,i=0;break}}if(i===1)throw Error(mu);return c-l};wr.test=function(n){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(n)}});var Su=m((Km,bu)=>{"use strict";bu.exports=Cr;function Cr(){this._listeners={}}Cr.prototype.on=function(n,o,c){return(this._listeners[n]||(this._listeners[n]=[])).push({fn:o,ctx:c||this}),this};Cr.prototype.off=function(n,o){if(n===void 0)this._listeners={};else if(o===void 0)this._listeners[n]=[];else for(var c=this._listeners[n],l=0;l<c.length;)c[l].fn===o?c.splice(l,1):++l;return this};Cr.prototype.emit=function(n){var o=this._listeners[n];if(o){for(var c=[],l=1;l<arguments.length;)c.push(arguments[l++]);for(l=0;l<o.length;)o[l].fn.apply(o[l++].ctx,c)}return this}});var xu=m((Xm,Pu)=>{"use strict";Pu.exports=Tu(Tu);function Tu(u){return typeof Float32Array<"u"?function(){var n=new Float32Array([-0]),o=new Uint8Array(n.buffer),c=o[3]===128;function l(r,a,s){n[0]=r,a[s]=o[0],a[s+1]=o[1],a[s+2]=o[2],a[s+3]=o[3]}function i(r,a,s){n[0]=r,a[s]=o[3],a[s+1]=o[2],a[s+2]=o[1],a[s+3]=o[0]}u.writeFloatLE=c?l:i,u.writeFloatBE=c?i:l;function e(r,a){return o[0]=r[a],o[1]=r[a+1],o[2]=r[a+2],o[3]=r[a+3],n[0]}function t(r,a){return o[3]=r[a],o[2]=r[a+1],o[1]=r[a+2],o[0]=r[a+3],n[0]}u.readFloatLE=c?e:t,u.readFloatBE=c?t:e}():function(){function n(c,l,i,e){var t=l<0?1:0;if(t&&(l=-l),l===0)c(1/l>0?0:2147483648,i,e);else if(isNaN(l))c(2143289344,i,e);else if(l>34028234663852886e22)c((t<<31|2139095040)>>>0,i,e);else if(l<11754943508222875e-54)c((t<<31|Math.round(l/1401298464324817e-60))>>>0,i,e);else{var r=Math.floor(Math.log(l)/Math.LN2),a=Math.round(l*Math.pow(2,-r)*8388608)&8388607;c((t<<31|r+127<<23|a)>>>0,i,e)}}u.writeFloatLE=n.bind(null,Ou),u.writeFloatBE=n.bind(null,gu);function o(c,l,i){var e=c(l,i),t=(e>>31)*2+1,r=e>>>23&255,a=e&8388607;return r===255?a?NaN:t*(1/0):r===0?t*1401298464324817e-60*a:t*Math.pow(2,r-150)*(a+8388608)}u.readFloatLE=o.bind(null,Au),u.readFloatBE=o.bind(null,Nu)}(),typeof Float64Array<"u"?function(){var n=new Float64Array([-0]),o=new Uint8Array(n.buffer),c=o[7]===128;function l(r,a,s){n[0]=r,a[s]=o[0],a[s+1]=o[1],a[s+2]=o[2],a[s+3]=o[3],a[s+4]=o[4],a[s+5]=o[5],a[s+6]=o[6],a[s+7]=o[7]}function i(r,a,s){n[0]=r,a[s]=o[7],a[s+1]=o[6],a[s+2]=o[5],a[s+3]=o[4],a[s+4]=o[3],a[s+5]=o[2],a[s+6]=o[1],a[s+7]=o[0]}u.writeDoubleLE=c?l:i,u.writeDoubleBE=c?i:l;function e(r,a){return o[0]=r[a],o[1]=r[a+1],o[2]=r[a+2],o[3]=r[a+3],o[4]=r[a+4],o[5]=r[a+5],o[6]=r[a+6],o[7]=r[a+7],n[0]}function t(r,a){return o[7]=r[a],o[6]=r[a+1],o[5]=r[a+2],o[4]=r[a+3],o[3]=r[a+4],o[2]=r[a+5],o[1]=r[a+6],o[0]=r[a+7],n[0]}u.readDoubleLE=c?e:t,u.readDoubleBE=c?t:e}():function(){function n(c,l,i,e,t,r){var a=e<0?1:0;if(a&&(e=-e),e===0)c(0,t,r+l),c(1/e>0?0:2147483648,t,r+i);else if(isNaN(e))c(0,t,r+l),c(2146959360,t,r+i);else if(e>17976931348623157e292)c(0,t,r+l),c((a<<31|2146435072)>>>0,t,r+i);else{var s;if(e<22250738585072014e-324)s=e/5e-324,c(s>>>0,t,r+l),c((a<<31|s/4294967296)>>>0,t,r+i);else{var d=Math.floor(Math.log(e)/Math.LN2);d===1024&&(d=1023),s=e*Math.pow(2,-d),c(s*4503599627370496>>>0,t,r+l),c((a<<31|d+1023<<20|s*1048576&1048575)>>>0,t,r+i)}}}u.writeDoubleLE=n.bind(null,Ou,0,4),u.writeDoubleBE=n.bind(null,gu,4,0);function o(c,l,i,e,t){var r=c(e,t+l),a=c(e,t+i),s=(a>>31)*2+1,d=a>>>20&2047,v=4294967296*(a&1048575)+r;return d===2047?v?NaN:s*(1/0):d===0?s*5e-324*v:s*Math.pow(2,d-1075)*(v+4503599627370496)}u.readDoubleLE=o.bind(null,Au,0,4),u.readDoubleBE=o.bind(null,Nu,4,0)}(),u}function Ou(u,n,o){n[o]=u&255,n[o+1]=u>>>8&255,n[o+2]=u>>>16&255,n[o+3]=u>>>24}function gu(u,n,o){n[o]=u>>>24,n[o+1]=u>>>16&255,n[o+2]=u>>>8&255,n[o+3]=u&255}function Au(u,n){return(u[n]|u[n+1]<<8|u[n+2]<<16|u[n+3]<<24)>>>0}function Nu(u,n){return(u[n]<<24|u[n+1]<<16|u[n+2]<<8|u[n+3])>>>0}});var Ru=m((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 Iu=m(Lu=>{"use strict";var Qn=Lu;Qn.length=function(n){for(var o=0,c=0,l=0;l<n.length;++l)c=n.charCodeAt(l),c<128?o+=1:c<2048?o+=2:(c&64512)===55296&&(n.charCodeAt(l+1)&64512)===56320?(++l,o+=4):o+=3;return o};Qn.read=function(n,o,c){var l=c-o;if(l<1)return"";for(var i=null,e=[],t=0,r;o<c;)r=n[o++],r<128?e[t++]=r:r>191&&r<224?e[t++]=(r&31)<<6|n[o++]&63:r>239&&r<365?(r=((r&7)<<18|(n[o++]&63)<<12|(n[o++]&63)<<6|n[o++]&63)-65536,e[t++]=55296+(r>>10),e[t++]=56320+(r&1023)):e[t++]=(r&15)<<12|(n[o++]&63)<<6|n[o++]&63,t>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,e)),t=0);return i?(t&&i.push(String.fromCharCode.apply(String,e.slice(0,t))),i.join("")):String.fromCharCode.apply(String,e.slice(0,t))};Qn.write=function(n,o,c){for(var l=c,i,e,t=0;t<n.length;++t)i=n.charCodeAt(t),i<128?o[c++]=i:i<2048?(o[c++]=i>>6|192,o[c++]=i&63|128):(i&64512)===55296&&((e=n.charCodeAt(t+1))&64512)===56320?(i=65536+((i&1023)<<10)+(e&1023),++t,o[c++]=i>>18|240,o[c++]=i>>12&63|128,o[c++]=i>>6&63|128,o[c++]=i&63|128):(o[c++]=i>>12|224,o[c++]=i>>6&63|128,o[c++]=i&63|128);return c-l}});var Cu=m((Jm,wu)=>{"use strict";wu.exports=cp;function cp(u,n,o){var c=o||8192,l=c>>>1,i=null,e=c;return function(r){if(r<1||r>l)return u(r);e+r>c&&(i=u(c),e=0);var a=n.call(i,e,e+=r);return e&7&&(e=(e|7)+1),a}}});var Mu=m((zm,Uu)=>{"use strict";Uu.exports=V;var Se=xt();function V(u,n){this.lo=u>>>0,this.hi=n>>>0}var kt=V.zero=new V(0,0);kt.toNumber=function(){return 0};kt.zzEncode=kt.zzDecode=function(){return this};kt.length=function(){return 1};var sp=V.zeroHash="\0\0\0\0\0\0\0\0";V.fromNumber=function(n){if(n===0)return kt;var o=n<0;o&&(n=-n);var c=n>>>0,l=(n-c)/4294967296>>>0;return o&&(l=~l>>>0,c=~c>>>0,++c>4294967295&&(c=0,++l>4294967295&&(l=0))),new V(c,l)};V.from=function(n){if(typeof n=="number")return V.fromNumber(n);if(Se.isString(n))if(Se.Long)n=Se.Long.fromString(n);else return V.fromNumber(parseInt(n,10));return n.low||n.high?new V(n.low>>>0,n.high>>>0):kt};V.prototype.toNumber=function(n){if(!n&&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};V.prototype.toLong=function(n){return Se.Long?new Se.Long(this.lo|0,this.hi|0,!!n):{low:this.lo|0,high:this.hi|0,unsigned:!!n}};var Pt=String.prototype.charCodeAt;V.fromHash=function(n){return n===sp?kt:new V((Pt.call(n,0)|Pt.call(n,1)<<8|Pt.call(n,2)<<16|Pt.call(n,3)<<24)>>>0,(Pt.call(n,4)|Pt.call(n,5)<<8|Pt.call(n,6)<<16|Pt.call(n,7)<<24)>>>0)};V.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)};V.prototype.zzEncode=function(){var n=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^n)>>>0,this.lo=(this.lo<<1^n)>>>0,this};V.prototype.zzDecode=function(){var n=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^n)>>>0,this.hi=(this.hi>>>1^n)>>>0,this};V.prototype.length=function(){var n=this.lo,o=(this.lo>>>28|this.hi<<4)>>>0,c=this.hi>>>24;return c===0?o===0?n<16384?n<128?1:2:n<2097152?3:4:o<16384?o<128?5:6:o<2097152?7:8:c<128?9:10}});var xt=m(Zn=>{"use strict";var _=Zn;_.asPromise=hu();_.base64=Eu();_.EventEmitter=Su();_.float=xu();_.inquire=Ru();_.utf8=Iu();_.pool=Cu();_.LongBits=Mu();_.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);_.global=_.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||Zn;_.emptyArray=Object.freeze?Object.freeze([]):[];_.emptyObject=Object.freeze?Object.freeze({}):{};_.isInteger=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n};_.isString=function(n){return typeof n=="string"||n instanceof String};_.isObject=function(n){return n&&typeof n=="object"};_.isset=_.isSet=function(n,o){var c=n[o];return c!=null&&n.hasOwnProperty(o)?typeof c!="object"||(Array.isArray(c)?c.length:Object.keys(c).length)>0:!1};_.Buffer=function(){try{var u=_.inquire("buffer").Buffer;return u.prototype.utf8Write?u:null}catch{return null}}();_._Buffer_from=null;_._Buffer_allocUnsafe=null;_.newBuffer=function(n){return typeof n=="number"?_.Buffer?_._Buffer_allocUnsafe(n):new _.Array(n):_.Buffer?_._Buffer_from(n):typeof Uint8Array>"u"?n:new Uint8Array(n)};_.Array=typeof Uint8Array<"u"?Uint8Array:Array;_.Long=_.global.dcodeIO&&_.global.dcodeIO.Long||_.global.Long||_.inquire("long");_.key2Re=/^true|false|0|1$/;_.key32Re=/^-?(?:0|[1-9][0-9]*)$/;_.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;_.longToHash=function(n){return n?_.LongBits.from(n).toHash():_.LongBits.zeroHash};_.longFromHash=function(n,o){var c=_.LongBits.fromHash(n);return _.Long?_.Long.fromBits(c.lo,c.hi,o):c.toNumber(!!o)};function Du(u,n,o){for(var c=Object.keys(n),l=0;l<c.length;++l)(u[c[l]]===void 0||!o)&&(u[c[l]]=n[c[l]]);return u}_.merge=Du;_.lcFirst=function(n){return n.charAt(0).toLowerCase()+n.substring(1)};function Bu(u){function n(o,c){if(!(this instanceof n))return new n(o,c);Object.defineProperty(this,"message",{get:function(){return o}}),Error.captureStackTrace?Error.captureStackTrace(this,n):Object.defineProperty(this,"stack",{value:new Error().stack||""}),c&&Du(this,c)}return n.prototype=Object.create(Error.prototype,{constructor:{value:n,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}}),n}_.newError=Bu;_.ProtocolError=Bu("ProtocolError");_.oneOfGetter=function(n){for(var o={},c=0;c<n.length;++c)o[n[c]]=1;return function(){for(var l=Object.keys(this),i=l.length-1;i>-1;--i)if(o[l[i]]===1&&this[l[i]]!==void 0&&this[l[i]]!==null)return l[i]}};_.oneOfSetter=function(n){return function(o){for(var c=0;c<n.length;++c)n[c]!==o&&delete this[n[c]]}};_.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};_._configure=function(){var u=_.Buffer;if(!u){_._Buffer_from=_._Buffer_allocUnsafe=null;return}_._Buffer_from=u.from!==Uint8Array.from&&u.from||function(o,c){return new u(o,c)},_._Buffer_allocUnsafe=u.allocUnsafe||function(o){return new u(o)}}});var ao=m(($m,Hu)=>{"use strict";Hu.exports=A;var W=xt(),to,Ur=W.LongBits,ku=W.base64,Vu=W.utf8;function Te(u,n,o){this.fn=u,this.len=n,this.next=void 0,this.val=o}function ro(){}function fp(u){this.head=u.head,this.tail=u.tail,this.len=u.len,this.next=u.states}function A(){this.len=0,this.head=new Te(ro,0,0),this.tail=this.head,this.states=null}var Gu=function(){return W.Buffer?function(){return(A.create=function(){return new to})()}:function(){return new A}};A.create=Gu();A.alloc=function(n){return new W.Array(n)};W.Array!==Array&&(A.alloc=W.pool(A.alloc,W.Array.prototype.subarray));A.prototype._push=function(n,o,c){return this.tail=this.tail.next=new Te(n,o,c),this.len+=o,this};function no(u,n,o){n[o]=u&255}function pp(u,n,o){for(;u>127;)n[o++]=u&127|128,u>>>=7;n[o]=u}function oo(u,n){this.len=u,this.next=void 0,this.val=n}oo.prototype=Object.create(Te.prototype);oo.prototype.fn=pp;A.prototype.uint32=function(n){return this.len+=(this.tail=this.tail.next=new oo((n=n>>>0)<128?1:n<16384?2:n<2097152?3:n<268435456?4:5,n)).len,this};A.prototype.int32=function(n){return n<0?this._push(io,10,Ur.fromNumber(n)):this.uint32(n)};A.prototype.sint32=function(n){return this.uint32((n<<1^n>>31)>>>0)};function io(u,n,o){for(;u.hi;)n[o++]=u.lo&127|128,u.lo=(u.lo>>>7|u.hi<<25)>>>0,u.hi>>>=7;for(;u.lo>127;)n[o++]=u.lo&127|128,u.lo=u.lo>>>7;n[o++]=u.lo}A.prototype.uint64=function(n){var o=Ur.from(n);return this._push(io,o.length(),o)};A.prototype.int64=A.prototype.uint64;A.prototype.sint64=function(n){var o=Ur.from(n).zzEncode();return this._push(io,o.length(),o)};A.prototype.bool=function(n){return this._push(no,1,n?1:0)};function eo(u,n,o){n[o]=u&255,n[o+1]=u>>>8&255,n[o+2]=u>>>16&255,n[o+3]=u>>>24}A.prototype.fixed32=function(n){return this._push(eo,4,n>>>0)};A.prototype.sfixed32=A.prototype.fixed32;A.prototype.fixed64=function(n){var o=Ur.from(n);return this._push(eo,4,o.lo)._push(eo,4,o.hi)};A.prototype.sfixed64=A.prototype.fixed64;A.prototype.float=function(n){return this._push(W.float.writeFloatLE,4,n)};A.prototype.double=function(n){return this._push(W.float.writeDoubleLE,8,n)};var dp=W.Array.prototype.set?function(n,o,c){o.set(n,c)}:function(n,o,c){for(var l=0;l<n.length;++l)o[c+l]=n[l]};A.prototype.bytes=function(n){var o=n.length>>>0;if(!o)return this._push(no,1,0);if(W.isString(n)){var c=A.alloc(o=ku.length(n));ku.decode(n,c,0),n=c}return this.uint32(o)._push(dp,o,n)};A.prototype.string=function(n){var o=Vu.length(n);return o?this.uint32(o)._push(Vu.write,o,n):this._push(no,1,0)};A.prototype.fork=function(){return this.states=new fp(this),this.head=this.tail=new Te(ro,0,0),this.len=0,this};A.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 Te(ro,0,0),this.len=0),this};A.prototype.ldelim=function(){var n=this.head,o=this.tail,c=this.len;return this.reset().uint32(c),c&&(this.tail.next=n.next,this.tail=o,this.len+=c),this};A.prototype.finish=function(){for(var n=this.head.next,o=this.constructor.alloc(this.len),c=0;n;)n.fn(n.val,o,c),c+=n.len,n=n.next;return o};A._configure=function(u){to=u,A.create=Gu(),to._configure()}});var qu=m((Qm,Fu)=>{"use strict";Fu.exports=ut;var ju=ao();(ut.prototype=Object.create(ju.prototype)).constructor=ut;var Rt=xt();function ut(){ju.call(this)}ut._configure=function(){ut.alloc=Rt._Buffer_allocUnsafe,ut.writeBytesBuffer=Rt.Buffer&&Rt.Buffer.prototype instanceof Uint8Array&&Rt.Buffer.prototype.set.name==="set"?function(n,o,c){o.set(n,c)}:function(n,o,c){if(n.copy)n.copy(o,c,0,n.length);else for(var l=0;l<n.length;)o[c++]=n[l++]}};ut.prototype.bytes=function(n){Rt.isString(n)&&(n=Rt._Buffer_from(n,"base64"));var o=n.length>>>0;return this.uint32(o),o&&this._push(ut.writeBytesBuffer,o,n),this};function yp(u,n,o){u.length<40?Rt.utf8.write(u,n,o):n.utf8Write?n.utf8Write(u,o):n.write(u,o)}ut.prototype.string=function(n){var o=Rt.Buffer.byteLength(n);return this.uint32(o),o&&this._push(yp,o,n),this};ut._configure()});var co=m((Zm,zu)=>{"use strict";zu.exports=D;var nt=xt(),lo,Yu=nt.LongBits,hp=nt.utf8;function ot(u,n){return RangeError("index out of range: "+u.pos+" + "+(n||1)+" > "+u.len)}function D(u){this.buf=u,this.pos=0,this.len=u.length}var Ku=typeof Uint8Array<"u"?function(n){if(n instanceof Uint8Array||Array.isArray(n))return new D(n);throw Error("illegal buffer")}:function(n){if(Array.isArray(n))return new D(n);throw Error("illegal buffer")},Ju=function(){return nt.Buffer?function(o){return(D.create=function(l){return nt.Buffer.isBuffer(l)?new lo(l):Ku(l)})(o)}:Ku};D.create=Ju();D.prototype._slice=nt.Array.prototype.subarray||nt.Array.prototype.slice;D.prototype.uint32=function(){var n=4294967295;return function(){if(n=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(n=(n|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return n;if((this.pos+=5)>this.len)throw this.pos=this.len,ot(this,10);return n}}();D.prototype.int32=function(){return this.uint32()|0};D.prototype.sint32=function(){var n=this.uint32();return n>>>1^-(n&1)|0};function uo(){var u=new Yu(0,0),n=0;if(this.len-this.pos>4){for(;n<4;++n)if(u.lo=(u.lo|(this.buf[this.pos]&127)<<n*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;n=0}else{for(;n<3;++n){if(this.pos>=this.len)throw ot(this);if(u.lo=(u.lo|(this.buf[this.pos]&127)<<n*7)>>>0,this.buf[this.pos++]<128)return u}return u.lo=(u.lo|(this.buf[this.pos++]&127)<<n*7)>>>0,u}if(this.len-this.pos>4){for(;n<5;++n)if(u.hi=(u.hi|(this.buf[this.pos]&127)<<n*7+3)>>>0,this.buf[this.pos++]<128)return u}else for(;n<5;++n){if(this.pos>=this.len)throw ot(this);if(u.hi=(u.hi|(this.buf[this.pos]&127)<<n*7+3)>>>0,this.buf[this.pos++]<128)return u}throw Error("invalid varint encoding")}D.prototype.bool=function(){return this.uint32()!==0};function Mr(u,n){return(u[n-4]|u[n-3]<<8|u[n-2]<<16|u[n-1]<<24)>>>0}D.prototype.fixed32=function(){if(this.pos+4>this.len)throw ot(this,4);return Mr(this.buf,this.pos+=4)};D.prototype.sfixed32=function(){if(this.pos+4>this.len)throw ot(this,4);return Mr(this.buf,this.pos+=4)|0};function Xu(){if(this.pos+8>this.len)throw ot(this,8);return new Yu(Mr(this.buf,this.pos+=4),Mr(this.buf,this.pos+=4))}D.prototype.float=function(){if(this.pos+4>this.len)throw ot(this,4);var n=nt.float.readFloatLE(this.buf,this.pos);return this.pos+=4,n};D.prototype.double=function(){if(this.pos+8>this.len)throw ot(this,4);var n=nt.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,n};D.prototype.bytes=function(){var n=this.uint32(),o=this.pos,c=this.pos+n;if(c>this.len)throw ot(this,n);if(this.pos+=n,Array.isArray(this.buf))return this.buf.slice(o,c);if(o===c){var l=nt.Buffer;return l?l.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,o,c)};D.prototype.string=function(){var n=this.bytes();return hp.read(n,0,n.length)};D.prototype.skip=function(n){if(typeof n=="number"){if(this.pos+n>this.len)throw ot(this,n);this.pos+=n}else do if(this.pos>=this.len)throw ot(this);while(this.buf[this.pos++]&128);return this};D.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};D._configure=function(u){lo=u,D.create=Ju(),lo._configure();var n=nt.Long?"toLong":"toNumber";nt.merge(D.prototype,{int64:function(){return uo.call(this)[n](!1)},uint64:function(){return uo.call(this)[n](!0)},sint64:function(){return uo.call(this).zzDecode()[n](!1)},fixed64:function(){return Xu.call(this)[n](!0)},sfixed64:function(){return Xu.call(this)[n](!1)}})}});var Zu=m((tv,Qu)=>{"use strict";Qu.exports=Vt;var $u=co();(Vt.prototype=Object.create($u.prototype)).constructor=Vt;var Wu=xt();function Vt(u){$u.call(this,u)}Vt._configure=function(){Wu.Buffer&&(Vt.prototype._slice=Wu.Buffer.prototype.slice)};Vt.prototype.string=function(){var n=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+n,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+n,this.len))};Vt._configure()});var el=m((ev,tl)=>{"use strict";tl.exports=Oe;var so=xt();(Oe.prototype=Object.create(so.EventEmitter.prototype)).constructor=Oe;function Oe(u,n,o){if(typeof u!="function")throw TypeError("rpcImpl must be a function");so.EventEmitter.call(this),this.rpcImpl=u,this.requestDelimited=!!n,this.responseDelimited=!!o}Oe.prototype.rpcCall=function u(n,o,c,l,i){if(!l)throw TypeError("request must be specified");var e=this;if(!i)return so.asPromise(u,e,n,o,c,l);if(!e.rpcImpl){setTimeout(function(){i(Error("already ended"))},0);return}try{return e.rpcImpl(n,o[e.requestDelimited?"encodeDelimited":"encode"](l).finish(),function(r,a){if(r)return e.emit("error",r,n),i(r);if(a===null){e.end(!0);return}if(!(a instanceof c))try{a=c[e.responseDelimited?"decodeDelimited":"decode"](a)}catch(s){return e.emit("error",s,n),i(s)}return e.emit("data",a,n),i(null,a)})}catch(t){e.emit("error",t,n),setTimeout(function(){i(t)},0);return}};Oe.prototype.end=function(n){return this.rpcImpl&&(n||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var nl=m(rl=>{"use strict";var mp=rl;mp.Service=el()});var il=m((nv,ol)=>{"use strict";ol.exports={}});var ll=m(ul=>{"use strict";var K=ul;K.build="minimal";K.Writer=ao();K.BufferWriter=qu();K.Reader=co();K.BufferReader=Zu();K.util=xt();K.rpc=nl();K.roots=il();K.configure=al;function al(){K.util._configure(),K.Writer._configure(K.BufferWriter),K.Reader._configure(K.BufferReader)}al()});var sl=m((iv,cl)=>{"use strict";cl.exports=ll()});var pl=m((av,fl)=>{"use strict";var E=sl(),h=E.Reader,T=E.Writer,p=E.util,f=E.roots.default||(E.roots.default={});f.opentelemetry=function(){var u={};return u.proto=function(){var n={};return n.common=function(){var o={};return o.v1=function(){var c={};return c.AnyValue=function(){function l(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.stringValue=null,l.prototype.boolValue=null,l.prototype.intValue=null,l.prototype.doubleValue=null,l.prototype.arrayValue=null,l.prototype.kvlistValue=null,l.prototype.bytesValue=null;var i;return Object.defineProperty(l.prototype,"value",{get:p.oneOfGetter(i=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){return r||(r=T.create()),t.stringValue!=null&&Object.hasOwnProperty.call(t,"stringValue")&&r.uint32(10).string(t.stringValue),t.boolValue!=null&&Object.hasOwnProperty.call(t,"boolValue")&&r.uint32(16).bool(t.boolValue),t.intValue!=null&&Object.hasOwnProperty.call(t,"intValue")&&r.uint32(24).int64(t.intValue),t.doubleValue!=null&&Object.hasOwnProperty.call(t,"doubleValue")&&r.uint32(33).double(t.doubleValue),t.arrayValue!=null&&Object.hasOwnProperty.call(t,"arrayValue")&&f.opentelemetry.proto.common.v1.ArrayValue.encode(t.arrayValue,r.uint32(42).fork()).ldelim(),t.kvlistValue!=null&&Object.hasOwnProperty.call(t,"kvlistValue")&&f.opentelemetry.proto.common.v1.KeyValueList.encode(t.kvlistValue,r.uint32(50).fork()).ldelim(),t.bytesValue!=null&&Object.hasOwnProperty.call(t,"bytesValue")&&r.uint32(58).bytes(t.bytesValue),r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.common.v1.AnyValue;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.stringValue=t.string();break}case 2:{s.boolValue=t.bool();break}case 3:{s.intValue=t.int64();break}case 4:{s.doubleValue=t.double();break}case 5:{s.arrayValue=f.opentelemetry.proto.common.v1.ArrayValue.decode(t,t.uint32());break}case 6:{s.kvlistValue=f.opentelemetry.proto.common.v1.KeyValueList.decode(t,t.uint32());break}case 7:{s.bytesValue=t.bytes();break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.stringValue!=null&&t.hasOwnProperty("stringValue")&&(r.value=1,!p.isString(t.stringValue)))return"stringValue: string expected";if(t.boolValue!=null&&t.hasOwnProperty("boolValue")){if(r.value===1)return"value: multiple values";if(r.value=1,typeof t.boolValue!="boolean")return"boolValue: boolean expected"}if(t.intValue!=null&&t.hasOwnProperty("intValue")){if(r.value===1)return"value: multiple values";if(r.value=1,!p.isInteger(t.intValue)&&!(t.intValue&&p.isInteger(t.intValue.low)&&p.isInteger(t.intValue.high)))return"intValue: integer|Long expected"}if(t.doubleValue!=null&&t.hasOwnProperty("doubleValue")){if(r.value===1)return"value: multiple values";if(r.value=1,typeof t.doubleValue!="number")return"doubleValue: number expected"}if(t.arrayValue!=null&&t.hasOwnProperty("arrayValue")){if(r.value===1)return"value: multiple values";r.value=1;{var a=f.opentelemetry.proto.common.v1.ArrayValue.verify(t.arrayValue);if(a)return"arrayValue."+a}}if(t.kvlistValue!=null&&t.hasOwnProperty("kvlistValue")){if(r.value===1)return"value: multiple values";r.value=1;{var a=f.opentelemetry.proto.common.v1.KeyValueList.verify(t.kvlistValue);if(a)return"kvlistValue."+a}}if(t.bytesValue!=null&&t.hasOwnProperty("bytesValue")){if(r.value===1)return"value: multiple values";if(r.value=1,!(t.bytesValue&&typeof t.bytesValue.length=="number"||p.isString(t.bytesValue)))return"bytesValue: buffer expected"}return null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.common.v1.AnyValue)return t;var r=new f.opentelemetry.proto.common.v1.AnyValue;if(t.stringValue!=null&&(r.stringValue=String(t.stringValue)),t.boolValue!=null&&(r.boolValue=!!t.boolValue),t.intValue!=null&&(p.Long?(r.intValue=p.Long.fromValue(t.intValue)).unsigned=!1:typeof t.intValue=="string"?r.intValue=parseInt(t.intValue,10):typeof t.intValue=="number"?r.intValue=t.intValue:typeof t.intValue=="object"&&(r.intValue=new p.LongBits(t.intValue.low>>>0,t.intValue.high>>>0).toNumber())),t.doubleValue!=null&&(r.doubleValue=Number(t.doubleValue)),t.arrayValue!=null){if(typeof t.arrayValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected");r.arrayValue=f.opentelemetry.proto.common.v1.ArrayValue.fromObject(t.arrayValue)}if(t.kvlistValue!=null){if(typeof t.kvlistValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected");r.kvlistValue=f.opentelemetry.proto.common.v1.KeyValueList.fromObject(t.kvlistValue)}return t.bytesValue!=null&&(typeof t.bytesValue=="string"?p.base64.decode(t.bytesValue,r.bytesValue=p.newBuffer(p.base64.length(t.bytesValue)),0):t.bytesValue.length>=0&&(r.bytesValue=t.bytesValue)),r},l.toObject=function(t,r){r||(r={});var a={};return t.stringValue!=null&&t.hasOwnProperty("stringValue")&&(a.stringValue=t.stringValue,r.oneofs&&(a.value="stringValue")),t.boolValue!=null&&t.hasOwnProperty("boolValue")&&(a.boolValue=t.boolValue,r.oneofs&&(a.value="boolValue")),t.intValue!=null&&t.hasOwnProperty("intValue")&&(typeof t.intValue=="number"?a.intValue=r.longs===String?String(t.intValue):t.intValue:a.intValue=r.longs===String?p.Long.prototype.toString.call(t.intValue):r.longs===Number?new p.LongBits(t.intValue.low>>>0,t.intValue.high>>>0).toNumber():t.intValue,r.oneofs&&(a.value="intValue")),t.doubleValue!=null&&t.hasOwnProperty("doubleValue")&&(a.doubleValue=r.json&&!isFinite(t.doubleValue)?String(t.doubleValue):t.doubleValue,r.oneofs&&(a.value="doubleValue")),t.arrayValue!=null&&t.hasOwnProperty("arrayValue")&&(a.arrayValue=f.opentelemetry.proto.common.v1.ArrayValue.toObject(t.arrayValue,r),r.oneofs&&(a.value="arrayValue")),t.kvlistValue!=null&&t.hasOwnProperty("kvlistValue")&&(a.kvlistValue=f.opentelemetry.proto.common.v1.KeyValueList.toObject(t.kvlistValue,r),r.oneofs&&(a.value="kvlistValue")),t.bytesValue!=null&&t.hasOwnProperty("bytesValue")&&(a.bytesValue=r.bytes===String?p.base64.encode(t.bytesValue,0,t.bytesValue.length):r.bytes===Array?Array.prototype.slice.call(t.bytesValue):t.bytesValue,r.oneofs&&(a.value="bytesValue")),a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.AnyValue"},l}(),c.ArrayValue=function(){function l(i){if(this.values=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.values=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.values!=null&&e.values.length)for(var r=0;r<e.values.length;++r)f.opentelemetry.proto.common.v1.AnyValue.encode(e.values[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.common.v1.ArrayValue;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.values&&a.values.length||(a.values=[]),a.values.push(f.opentelemetry.proto.common.v1.AnyValue.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.values!=null&&e.hasOwnProperty("values")){if(!Array.isArray(e.values))return"values: array expected";for(var t=0;t<e.values.length;++t){var r=f.opentelemetry.proto.common.v1.AnyValue.verify(e.values[t]);if(r)return"values."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.common.v1.ArrayValue)return e;var t=new f.opentelemetry.proto.common.v1.ArrayValue;if(e.values){if(!Array.isArray(e.values))throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: array expected");t.values=[];for(var r=0;r<e.values.length;++r){if(typeof e.values[r]!="object")throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: object expected");t.values[r]=f.opentelemetry.proto.common.v1.AnyValue.fromObject(e.values[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.values=[]),e.values&&e.values.length){r.values=[];for(var a=0;a<e.values.length;++a)r.values[a]=f.opentelemetry.proto.common.v1.AnyValue.toObject(e.values[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.ArrayValue"},l}(),c.KeyValueList=function(){function l(i){if(this.values=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.values=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.values!=null&&e.values.length)for(var r=0;r<e.values.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.values[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.common.v1.KeyValueList;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.values&&a.values.length||(a.values=[]),a.values.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.values!=null&&e.hasOwnProperty("values")){if(!Array.isArray(e.values))return"values: array expected";for(var t=0;t<e.values.length;++t){var r=f.opentelemetry.proto.common.v1.KeyValue.verify(e.values[t]);if(r)return"values."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.common.v1.KeyValueList)return e;var t=new f.opentelemetry.proto.common.v1.KeyValueList;if(e.values){if(!Array.isArray(e.values))throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: array expected");t.values=[];for(var r=0;r<e.values.length;++r){if(typeof e.values[r]!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: object expected");t.values[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.values[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.values=[]),e.values&&e.values.length){r.values=[];for(var a=0;a<e.values.length;++a)r.values[a]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.values[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.KeyValueList"},l}(),c.KeyValue=function(){function l(i){if(i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.key=null,l.prototype.value=null,l.create=function(e){return new l(e)},l.encode=function(e,t){return t||(t=T.create()),e.key!=null&&Object.hasOwnProperty.call(e,"key")&&t.uint32(10).string(e.key),e.value!=null&&Object.hasOwnProperty.call(e,"value")&&f.opentelemetry.proto.common.v1.AnyValue.encode(e.value,t.uint32(18).fork()).ldelim(),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.common.v1.KeyValue;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.key=e.string();break}case 2:{a.value=f.opentelemetry.proto.common.v1.AnyValue.decode(e,e.uint32());break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.key!=null&&e.hasOwnProperty("key")&&!p.isString(e.key))return"key: string expected";if(e.value!=null&&e.hasOwnProperty("value")){var t=f.opentelemetry.proto.common.v1.AnyValue.verify(e.value);if(t)return"value."+t}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.common.v1.KeyValue)return e;var t=new f.opentelemetry.proto.common.v1.KeyValue;if(e.key!=null&&(t.key=String(e.key)),e.value!=null){if(typeof e.value!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected");t.value=f.opentelemetry.proto.common.v1.AnyValue.fromObject(e.value)}return t},l.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.key="",r.value=null),e.key!=null&&e.hasOwnProperty("key")&&(r.key=e.key),e.value!=null&&e.hasOwnProperty("value")&&(r.value=f.opentelemetry.proto.common.v1.AnyValue.toObject(e.value,t)),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.KeyValue"},l}(),c.InstrumentationScope=function(){function l(i){if(this.attributes=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.name=null,l.prototype.version=null,l.prototype.attributes=p.emptyArray,l.prototype.droppedAttributesCount=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),e.version!=null&&Object.hasOwnProperty.call(e,"version")&&t.uint32(18).string(e.version),e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(26).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(32).uint32(e.droppedAttributesCount),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.common.v1.InstrumentationScope;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.name=e.string();break}case 2:{a.version=e.string();break}case 3:{a.attributes&&a.attributes.length||(a.attributes=[]),a.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 4:{a.droppedAttributesCount=e.uint32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.name!=null&&e.hasOwnProperty("name")&&!p.isString(e.name))return"name: string expected";if(e.version!=null&&e.hasOwnProperty("version")&&!p.isString(e.version))return"version: string expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var r=f.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(r)return"attributes."+r}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.common.v1.InstrumentationScope)return e;var t=new f.opentelemetry.proto.common.v1.InstrumentationScope;if(e.name!=null&&(t.name=String(e.name)),e.version!=null&&(t.version=String(e.version)),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: object expected");t.attributes[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}return e.droppedAttributesCount!=null&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.attributes=[]),t.defaults&&(r.name="",r.version="",r.droppedAttributesCount=0),e.name!=null&&e.hasOwnProperty("name")&&(r.name=e.name),e.version!=null&&e.hasOwnProperty("version")&&(r.version=e.version),e.attributes&&e.attributes.length){r.attributes=[];for(var a=0;a<e.attributes.length;++a)r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[a],t)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(r.droppedAttributesCount=e.droppedAttributesCount),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.InstrumentationScope"},l}(),c}(),o}(),n.resource=function(){var o={};return o.v1=function(){var c={};return c.Resource=function(){function l(i){if(this.attributes=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.attributes=p.emptyArray,l.prototype.droppedAttributesCount=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(10).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(16).uint32(e.droppedAttributesCount),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.resource.v1.Resource;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.attributes&&a.attributes.length||(a.attributes=[]),a.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{a.droppedAttributesCount=e.uint32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var r=f.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(r)return"attributes."+r}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.resource.v1.Resource)return e;var t=new f.opentelemetry.proto.resource.v1.Resource;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: object expected");t.attributes[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}return e.droppedAttributesCount!=null&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.attributes=[]),t.defaults&&(r.droppedAttributesCount=0),e.attributes&&e.attributes.length){r.attributes=[];for(var a=0;a<e.attributes.length;++a)r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[a],t)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(r.droppedAttributesCount=e.droppedAttributesCount),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.resource.v1.Resource"},l}(),c}(),o}(),n.trace=function(){var o={};return o.v1=function(){var c={};return c.TracesData=function(){function l(i){if(this.resourceSpans=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resourceSpans=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resourceSpans!=null&&e.resourceSpans.length)for(var r=0;r<e.resourceSpans.length;++r)f.opentelemetry.proto.trace.v1.ResourceSpans.encode(e.resourceSpans[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.trace.v1.TracesData;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resourceSpans&&a.resourceSpans.length||(a.resourceSpans=[]),a.resourceSpans.push(f.opentelemetry.proto.trace.v1.ResourceSpans.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.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 t=0;t<e.resourceSpans.length;++t){var r=f.opentelemetry.proto.trace.v1.ResourceSpans.verify(e.resourceSpans[t]);if(r)return"resourceSpans."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.trace.v1.TracesData)return e;var t=new f.opentelemetry.proto.trace.v1.TracesData;if(e.resourceSpans){if(!Array.isArray(e.resourceSpans))throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: array expected");t.resourceSpans=[];for(var r=0;r<e.resourceSpans.length;++r){if(typeof e.resourceSpans[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: object expected");t.resourceSpans[r]=f.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(e.resourceSpans[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.resourceSpans=[]),e.resourceSpans&&e.resourceSpans.length){r.resourceSpans=[];for(var a=0;a<e.resourceSpans.length;++a)r.resourceSpans[a]=f.opentelemetry.proto.trace.v1.ResourceSpans.toObject(e.resourceSpans[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.TracesData"},l}(),c.ResourceSpans=function(){function l(i){if(this.scopeSpans=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resource=null,l.prototype.scopeSpans=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resource!=null&&Object.hasOwnProperty.call(e,"resource")&&f.opentelemetry.proto.resource.v1.Resource.encode(e.resource,t.uint32(10).fork()).ldelim(),e.scopeSpans!=null&&e.scopeSpans.length)for(var r=0;r<e.scopeSpans.length;++r)f.opentelemetry.proto.trace.v1.ScopeSpans.encode(e.scopeSpans[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.trace.v1.ResourceSpans;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resource=f.opentelemetry.proto.resource.v1.Resource.decode(e,e.uint32());break}case 2:{a.scopeSpans&&a.scopeSpans.length||(a.scopeSpans=[]),a.scopeSpans.push(f.opentelemetry.proto.trace.v1.ScopeSpans.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resource!=null&&e.hasOwnProperty("resource")){var t=f.opentelemetry.proto.resource.v1.Resource.verify(e.resource);if(t)return"resource."+t}if(e.scopeSpans!=null&&e.hasOwnProperty("scopeSpans")){if(!Array.isArray(e.scopeSpans))return"scopeSpans: array expected";for(var r=0;r<e.scopeSpans.length;++r){var t=f.opentelemetry.proto.trace.v1.ScopeSpans.verify(e.scopeSpans[r]);if(t)return"scopeSpans."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.trace.v1.ResourceSpans)return e;var t=new f.opentelemetry.proto.trace.v1.ResourceSpans;if(e.resource!=null){if(typeof e.resource!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.resource: object expected");t.resource=f.opentelemetry.proto.resource.v1.Resource.fromObject(e.resource)}if(e.scopeSpans){if(!Array.isArray(e.scopeSpans))throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: array expected");t.scopeSpans=[];for(var r=0;r<e.scopeSpans.length;++r){if(typeof e.scopeSpans[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: object expected");t.scopeSpans[r]=f.opentelemetry.proto.trace.v1.ScopeSpans.fromObject(e.scopeSpans[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.scopeSpans=[]),t.defaults&&(r.resource=null,r.schemaUrl=""),e.resource!=null&&e.hasOwnProperty("resource")&&(r.resource=f.opentelemetry.proto.resource.v1.Resource.toObject(e.resource,t)),e.scopeSpans&&e.scopeSpans.length){r.scopeSpans=[];for(var a=0;a<e.scopeSpans.length;++a)r.scopeSpans[a]=f.opentelemetry.proto.trace.v1.ScopeSpans.toObject(e.scopeSpans[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.ResourceSpans"},l}(),c.ScopeSpans=function(){function l(i){if(this.spans=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.scope=null,l.prototype.spans=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.scope!=null&&Object.hasOwnProperty.call(e,"scope")&&f.opentelemetry.proto.common.v1.InstrumentationScope.encode(e.scope,t.uint32(10).fork()).ldelim(),e.spans!=null&&e.spans.length)for(var r=0;r<e.spans.length;++r)f.opentelemetry.proto.trace.v1.Span.encode(e.spans[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.trace.v1.ScopeSpans;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.decode(e,e.uint32());break}case 2:{a.spans&&a.spans.length||(a.spans=[]),a.spans.push(f.opentelemetry.proto.trace.v1.Span.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.scope!=null&&e.hasOwnProperty("scope")){var t=f.opentelemetry.proto.common.v1.InstrumentationScope.verify(e.scope);if(t)return"scope."+t}if(e.spans!=null&&e.hasOwnProperty("spans")){if(!Array.isArray(e.spans))return"spans: array expected";for(var r=0;r<e.spans.length;++r){var t=f.opentelemetry.proto.trace.v1.Span.verify(e.spans[r]);if(t)return"spans."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.trace.v1.ScopeSpans)return e;var t=new f.opentelemetry.proto.trace.v1.ScopeSpans;if(e.scope!=null){if(typeof e.scope!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.scope: object expected");t.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(e.scope)}if(e.spans){if(!Array.isArray(e.spans))throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: array expected");t.spans=[];for(var r=0;r<e.spans.length;++r){if(typeof e.spans[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: object expected");t.spans[r]=f.opentelemetry.proto.trace.v1.Span.fromObject(e.spans[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.spans=[]),t.defaults&&(r.scope=null,r.schemaUrl=""),e.scope!=null&&e.hasOwnProperty("scope")&&(r.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.toObject(e.scope,t)),e.spans&&e.spans.length){r.spans=[];for(var a=0;a<e.spans.length;++a)r.spans[a]=f.opentelemetry.proto.trace.v1.Span.toObject(e.spans[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.ScopeSpans"},l}(),c.Span=function(){function l(i){if(this.attributes=[],this.events=[],this.links=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.traceId=null,l.prototype.spanId=null,l.prototype.traceState=null,l.prototype.parentSpanId=null,l.prototype.name=null,l.prototype.kind=null,l.prototype.startTimeUnixNano=null,l.prototype.endTimeUnixNano=null,l.prototype.attributes=p.emptyArray,l.prototype.droppedAttributesCount=null,l.prototype.events=p.emptyArray,l.prototype.droppedEventsCount=null,l.prototype.links=p.emptyArray,l.prototype.droppedLinksCount=null,l.prototype.status=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId")&&t.uint32(10).bytes(e.traceId),e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId")&&t.uint32(18).bytes(e.spanId),e.traceState!=null&&Object.hasOwnProperty.call(e,"traceState")&&t.uint32(26).string(e.traceState),e.parentSpanId!=null&&Object.hasOwnProperty.call(e,"parentSpanId")&&t.uint32(34).bytes(e.parentSpanId),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&t.uint32(42).string(e.name),e.kind!=null&&Object.hasOwnProperty.call(e,"kind")&&t.uint32(48).int32(e.kind),e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&t.uint32(57).fixed64(e.startTimeUnixNano),e.endTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"endTimeUnixNano")&&t.uint32(65).fixed64(e.endTimeUnixNano),e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(74).fork()).ldelim();if(e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(80).uint32(e.droppedAttributesCount),e.events!=null&&e.events.length)for(var r=0;r<e.events.length;++r)f.opentelemetry.proto.trace.v1.Span.Event.encode(e.events[r],t.uint32(90).fork()).ldelim();if(e.droppedEventsCount!=null&&Object.hasOwnProperty.call(e,"droppedEventsCount")&&t.uint32(96).uint32(e.droppedEventsCount),e.links!=null&&e.links.length)for(var r=0;r<e.links.length;++r)f.opentelemetry.proto.trace.v1.Span.Link.encode(e.links[r],t.uint32(106).fork()).ldelim();return e.droppedLinksCount!=null&&Object.hasOwnProperty.call(e,"droppedLinksCount")&&t.uint32(112).uint32(e.droppedLinksCount),e.status!=null&&Object.hasOwnProperty.call(e,"status")&&f.opentelemetry.proto.trace.v1.Status.encode(e.status,t.uint32(122).fork()).ldelim(),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.trace.v1.Span;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.traceId=e.bytes();break}case 2:{a.spanId=e.bytes();break}case 3:{a.traceState=e.string();break}case 4:{a.parentSpanId=e.bytes();break}case 5:{a.name=e.string();break}case 6:{a.kind=e.int32();break}case 7:{a.startTimeUnixNano=e.fixed64();break}case 8:{a.endTimeUnixNano=e.fixed64();break}case 9:{a.attributes&&a.attributes.length||(a.attributes=[]),a.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 10:{a.droppedAttributesCount=e.uint32();break}case 11:{a.events&&a.events.length||(a.events=[]),a.events.push(f.opentelemetry.proto.trace.v1.Span.Event.decode(e,e.uint32()));break}case 12:{a.droppedEventsCount=e.uint32();break}case 13:{a.links&&a.links.length||(a.links=[]),a.links.push(f.opentelemetry.proto.trace.v1.Span.Link.decode(e,e.uint32()));break}case 14:{a.droppedLinksCount=e.uint32();break}case 15:{a.status=f.opentelemetry.proto.trace.v1.Status.decode(e,e.uint32());break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.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"||p.isString(e.traceId)))return"traceId: buffer expected";if(e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||p.isString(e.spanId)))return"spanId: buffer expected";if(e.traceState!=null&&e.hasOwnProperty("traceState")&&!p.isString(e.traceState))return"traceState: string expected";if(e.parentSpanId!=null&&e.hasOwnProperty("parentSpanId")&&!(e.parentSpanId&&typeof e.parentSpanId.length=="number"||p.isString(e.parentSpanId)))return"parentSpanId: buffer expected";if(e.name!=null&&e.hasOwnProperty("name")&&!p.isString(e.name))return"name: string expected";if(e.kind!=null&&e.hasOwnProperty("kind"))switch(e.kind){default:return"kind: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!p.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&p.isInteger(e.startTimeUnixNano.low)&&p.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.endTimeUnixNano!=null&&e.hasOwnProperty("endTimeUnixNano")&&!p.isInteger(e.endTimeUnixNano)&&!(e.endTimeUnixNano&&p.isInteger(e.endTimeUnixNano.low)&&p.isInteger(e.endTimeUnixNano.high)))return"endTimeUnixNano: integer|Long expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var r=f.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(r)return"attributes."+r}}if(e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(e.droppedAttributesCount))return"droppedAttributesCount: integer expected";if(e.events!=null&&e.hasOwnProperty("events")){if(!Array.isArray(e.events))return"events: array expected";for(var t=0;t<e.events.length;++t){var r=f.opentelemetry.proto.trace.v1.Span.Event.verify(e.events[t]);if(r)return"events."+r}}if(e.droppedEventsCount!=null&&e.hasOwnProperty("droppedEventsCount")&&!p.isInteger(e.droppedEventsCount))return"droppedEventsCount: integer expected";if(e.links!=null&&e.hasOwnProperty("links")){if(!Array.isArray(e.links))return"links: array expected";for(var t=0;t<e.links.length;++t){var r=f.opentelemetry.proto.trace.v1.Span.Link.verify(e.links[t]);if(r)return"links."+r}}if(e.droppedLinksCount!=null&&e.hasOwnProperty("droppedLinksCount")&&!p.isInteger(e.droppedLinksCount))return"droppedLinksCount: integer expected";if(e.status!=null&&e.hasOwnProperty("status")){var r=f.opentelemetry.proto.trace.v1.Status.verify(e.status);if(r)return"status."+r}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.trace.v1.Span)return e;var t=new f.opentelemetry.proto.trace.v1.Span;switch(e.traceId!=null&&(typeof e.traceId=="string"?p.base64.decode(e.traceId,t.traceId=p.newBuffer(p.base64.length(e.traceId)),0):e.traceId.length>=0&&(t.traceId=e.traceId)),e.spanId!=null&&(typeof e.spanId=="string"?p.base64.decode(e.spanId,t.spanId=p.newBuffer(p.base64.length(e.spanId)),0):e.spanId.length>=0&&(t.spanId=e.spanId)),e.traceState!=null&&(t.traceState=String(e.traceState)),e.parentSpanId!=null&&(typeof e.parentSpanId=="string"?p.base64.decode(e.parentSpanId,t.parentSpanId=p.newBuffer(p.base64.length(e.parentSpanId)),0):e.parentSpanId.length>=0&&(t.parentSpanId=e.parentSpanId)),e.name!=null&&(t.name=String(e.name)),e.kind){default:if(typeof e.kind=="number"){t.kind=e.kind;break}break;case"SPAN_KIND_UNSPECIFIED":case 0:t.kind=0;break;case"SPAN_KIND_INTERNAL":case 1:t.kind=1;break;case"SPAN_KIND_SERVER":case 2:t.kind=2;break;case"SPAN_KIND_CLIENT":case 3:t.kind=3;break;case"SPAN_KIND_PRODUCER":case 4:t.kind=4;break;case"SPAN_KIND_CONSUMER":case 5:t.kind=5;break}if(e.startTimeUnixNano!=null&&(p.Long?(t.startTimeUnixNano=p.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?t.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?t.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(t.startTimeUnixNano=new p.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.endTimeUnixNano!=null&&(p.Long?(t.endTimeUnixNano=p.Long.fromValue(e.endTimeUnixNano)).unsigned=!1:typeof e.endTimeUnixNano=="string"?t.endTimeUnixNano=parseInt(e.endTimeUnixNano,10):typeof e.endTimeUnixNano=="number"?t.endTimeUnixNano=e.endTimeUnixNano:typeof e.endTimeUnixNano=="object"&&(t.endTimeUnixNano=new p.LongBits(e.endTimeUnixNano.low>>>0,e.endTimeUnixNano.high>>>0).toNumber())),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: object expected");t.attributes[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}if(e.droppedAttributesCount!=null&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),e.events){if(!Array.isArray(e.events))throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected");t.events=[];for(var r=0;r<e.events.length;++r){if(typeof e.events[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.events: object expected");t.events[r]=f.opentelemetry.proto.trace.v1.Span.Event.fromObject(e.events[r])}}if(e.droppedEventsCount!=null&&(t.droppedEventsCount=e.droppedEventsCount>>>0),e.links){if(!Array.isArray(e.links))throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected");t.links=[];for(var r=0;r<e.links.length;++r){if(typeof e.links[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.links: object expected");t.links[r]=f.opentelemetry.proto.trace.v1.Span.Link.fromObject(e.links[r])}}if(e.droppedLinksCount!=null&&(t.droppedLinksCount=e.droppedLinksCount>>>0),e.status!=null){if(typeof e.status!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected");t.status=f.opentelemetry.proto.trace.v1.Status.fromObject(e.status)}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.attributes=[],r.events=[],r.links=[]),t.defaults){if(t.bytes===String?r.traceId="":(r.traceId=[],t.bytes!==Array&&(r.traceId=p.newBuffer(r.traceId))),t.bytes===String?r.spanId="":(r.spanId=[],t.bytes!==Array&&(r.spanId=p.newBuffer(r.spanId))),r.traceState="",t.bytes===String?r.parentSpanId="":(r.parentSpanId=[],t.bytes!==Array&&(r.parentSpanId=p.newBuffer(r.parentSpanId))),r.name="",r.kind=t.enums===String?"SPAN_KIND_UNSPECIFIED":0,p.Long){var a=new p.Long(0,0,!1);r.startTimeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.startTimeUnixNano=t.longs===String?"0":0;if(p.Long){var a=new p.Long(0,0,!1);r.endTimeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.endTimeUnixNano=t.longs===String?"0":0;r.droppedAttributesCount=0,r.droppedEventsCount=0,r.droppedLinksCount=0,r.status=null}if(e.traceId!=null&&e.hasOwnProperty("traceId")&&(r.traceId=t.bytes===String?p.base64.encode(e.traceId,0,e.traceId.length):t.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),e.spanId!=null&&e.hasOwnProperty("spanId")&&(r.spanId=t.bytes===String?p.base64.encode(e.spanId,0,e.spanId.length):t.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),e.traceState!=null&&e.hasOwnProperty("traceState")&&(r.traceState=e.traceState),e.parentSpanId!=null&&e.hasOwnProperty("parentSpanId")&&(r.parentSpanId=t.bytes===String?p.base64.encode(e.parentSpanId,0,e.parentSpanId.length):t.bytes===Array?Array.prototype.slice.call(e.parentSpanId):e.parentSpanId),e.name!=null&&e.hasOwnProperty("name")&&(r.name=e.name),e.kind!=null&&e.hasOwnProperty("kind")&&(r.kind=t.enums===String?f.opentelemetry.proto.trace.v1.Span.SpanKind[e.kind]===void 0?e.kind:f.opentelemetry.proto.trace.v1.Span.SpanKind[e.kind]:e.kind),e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?r.startTimeUnixNano=t.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:r.startTimeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.startTimeUnixNano):t.longs===Number?new p.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.endTimeUnixNano!=null&&e.hasOwnProperty("endTimeUnixNano")&&(typeof e.endTimeUnixNano=="number"?r.endTimeUnixNano=t.longs===String?String(e.endTimeUnixNano):e.endTimeUnixNano:r.endTimeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.endTimeUnixNano):t.longs===Number?new p.LongBits(e.endTimeUnixNano.low>>>0,e.endTimeUnixNano.high>>>0).toNumber():e.endTimeUnixNano),e.attributes&&e.attributes.length){r.attributes=[];for(var s=0;s<e.attributes.length;++s)r.attributes[s]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[s],t)}if(e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(r.droppedAttributesCount=e.droppedAttributesCount),e.events&&e.events.length){r.events=[];for(var s=0;s<e.events.length;++s)r.events[s]=f.opentelemetry.proto.trace.v1.Span.Event.toObject(e.events[s],t)}if(e.droppedEventsCount!=null&&e.hasOwnProperty("droppedEventsCount")&&(r.droppedEventsCount=e.droppedEventsCount),e.links&&e.links.length){r.links=[];for(var s=0;s<e.links.length;++s)r.links[s]=f.opentelemetry.proto.trace.v1.Span.Link.toObject(e.links[s],t)}return e.droppedLinksCount!=null&&e.hasOwnProperty("droppedLinksCount")&&(r.droppedLinksCount=e.droppedLinksCount),e.status!=null&&e.hasOwnProperty("status")&&(r.status=f.opentelemetry.proto.trace.v1.Status.toObject(e.status,t)),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span"},l.SpanKind=function(){var i={},e=Object.create(i);return e[i[0]="SPAN_KIND_UNSPECIFIED"]=0,e[i[1]="SPAN_KIND_INTERNAL"]=1,e[i[2]="SPAN_KIND_SERVER"]=2,e[i[3]="SPAN_KIND_CLIENT"]=3,e[i[4]="SPAN_KIND_PRODUCER"]=4,e[i[5]="SPAN_KIND_CONSUMER"]=5,e}(),l.Event=function(){function i(e){if(this.attributes=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.timeUnixNano=null,i.prototype.name=null,i.prototype.attributes=p.emptyArray,i.prototype.droppedAttributesCount=null,i.create=function(t){return new i(t)},i.encode=function(t,r){if(r||(r=T.create()),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(9).fixed64(t.timeUnixNano),t.name!=null&&Object.hasOwnProperty.call(t,"name")&&r.uint32(18).string(t.name),t.attributes!=null&&t.attributes.length)for(var a=0;a<t.attributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[a],r.uint32(26).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&r.uint32(32).uint32(t.droppedAttributesCount),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.trace.v1.Span.Event;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.timeUnixNano=t.fixed64();break}case 2:{s.name=t.string();break}case 3:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 4:{s.droppedAttributesCount=t.uint32();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(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")&&!p.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&p.isInteger(t.timeUnixNano.low)&&p.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.name!=null&&t.hasOwnProperty("name")&&!p.isString(t.name))return"name: string expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var r=0;r<t.attributes.length;++r){var a=f.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[r]);if(a)return"attributes."+a}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.trace.v1.Span.Event)return t;var r=new f.opentelemetry.proto.trace.v1.Span.Event;if(t.timeUnixNano!=null&&(p.Long?(r.timeUnixNano=p.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.name!=null&&(r.name=String(t.name)),t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");r.attributes=[];for(var a=0;a<t.attributes.length;++a){if(typeof t.attributes[a]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected");r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[a])}}return t.droppedAttributesCount!=null&&(r.droppedAttributesCount=t.droppedAttributesCount>>>0),r},i.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.attributes=[]),r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.timeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.timeUnixNano=r.longs===String?"0":0;a.name="",a.droppedAttributesCount=0}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?a.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:a.timeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.name!=null&&t.hasOwnProperty("name")&&(a.name=t.name),t.attributes&&t.attributes.length){a.attributes=[];for(var d=0;d<t.attributes.length;++d)a.attributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[d],r)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(a.droppedAttributesCount=t.droppedAttributesCount),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Span.Event"},i}(),l.Link=function(){function i(e){if(this.attributes=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.traceId=null,i.prototype.spanId=null,i.prototype.traceState=null,i.prototype.attributes=p.emptyArray,i.prototype.droppedAttributesCount=null,i.create=function(t){return new i(t)},i.encode=function(t,r){if(r||(r=T.create()),t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId")&&r.uint32(10).bytes(t.traceId),t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId")&&r.uint32(18).bytes(t.spanId),t.traceState!=null&&Object.hasOwnProperty.call(t,"traceState")&&r.uint32(26).string(t.traceState),t.attributes!=null&&t.attributes.length)for(var a=0;a<t.attributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[a],r.uint32(34).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&r.uint32(40).uint32(t.droppedAttributesCount),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.trace.v1.Span.Link;t.pos<a;){var d=t.uint32();switch(d>>>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.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 5:{s.droppedAttributesCount=t.uint32();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(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"||p.isString(t.traceId)))return"traceId: buffer expected";if(t.spanId!=null&&t.hasOwnProperty("spanId")&&!(t.spanId&&typeof t.spanId.length=="number"||p.isString(t.spanId)))return"spanId: buffer expected";if(t.traceState!=null&&t.hasOwnProperty("traceState")&&!p.isString(t.traceState))return"traceState: string expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var r=0;r<t.attributes.length;++r){var a=f.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[r]);if(a)return"attributes."+a}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.trace.v1.Span.Link)return t;var r=new f.opentelemetry.proto.trace.v1.Span.Link;if(t.traceId!=null&&(typeof t.traceId=="string"?p.base64.decode(t.traceId,r.traceId=p.newBuffer(p.base64.length(t.traceId)),0):t.traceId.length>=0&&(r.traceId=t.traceId)),t.spanId!=null&&(typeof t.spanId=="string"?p.base64.decode(t.spanId,r.spanId=p.newBuffer(p.base64.length(t.spanId)),0):t.spanId.length>=0&&(r.spanId=t.spanId)),t.traceState!=null&&(r.traceState=String(t.traceState)),t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");r.attributes=[];for(var a=0;a<t.attributes.length;++a){if(typeof t.attributes[a]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected");r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[a])}}return t.droppedAttributesCount!=null&&(r.droppedAttributesCount=t.droppedAttributesCount>>>0),r},i.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.attributes=[]),r.defaults&&(r.bytes===String?a.traceId="":(a.traceId=[],r.bytes!==Array&&(a.traceId=p.newBuffer(a.traceId))),r.bytes===String?a.spanId="":(a.spanId=[],r.bytes!==Array&&(a.spanId=p.newBuffer(a.spanId))),a.traceState="",a.droppedAttributesCount=0),t.traceId!=null&&t.hasOwnProperty("traceId")&&(a.traceId=r.bytes===String?p.base64.encode(t.traceId,0,t.traceId.length):r.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId),t.spanId!=null&&t.hasOwnProperty("spanId")&&(a.spanId=r.bytes===String?p.base64.encode(t.spanId,0,t.spanId.length):r.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId),t.traceState!=null&&t.hasOwnProperty("traceState")&&(a.traceState=t.traceState),t.attributes&&t.attributes.length){a.attributes=[];for(var s=0;s<t.attributes.length;++s)a.attributes[s]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[s],r)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(a.droppedAttributesCount=t.droppedAttributesCount),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Span.Link"},i}(),l}(),c.Status=function(){function l(i){if(i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.message=null,l.prototype.code=null,l.create=function(e){return new l(e)},l.encode=function(e,t){return t||(t=T.create()),e.message!=null&&Object.hasOwnProperty.call(e,"message")&&t.uint32(18).string(e.message),e.code!=null&&Object.hasOwnProperty.call(e,"code")&&t.uint32(24).int32(e.code),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.trace.v1.Status;e.pos<r;){var s=e.uint32();switch(s>>>3){case 2:{a.message=e.string();break}case 3:{a.code=e.int32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.message!=null&&e.hasOwnProperty("message")&&!p.isString(e.message))return"message: string expected";if(e.code!=null&&e.hasOwnProperty("code"))switch(e.code){default:return"code: enum value expected";case 0:case 1:case 2:break}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.trace.v1.Status)return e;var t=new f.opentelemetry.proto.trace.v1.Status;switch(e.message!=null&&(t.message=String(e.message)),e.code){default:if(typeof e.code=="number"){t.code=e.code;break}break;case"STATUS_CODE_UNSET":case 0:t.code=0;break;case"STATUS_CODE_OK":case 1:t.code=1;break;case"STATUS_CODE_ERROR":case 2:t.code=2;break}return t},l.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.message="",r.code=t.enums===String?"STATUS_CODE_UNSET":0),e.message!=null&&e.hasOwnProperty("message")&&(r.message=e.message),e.code!=null&&e.hasOwnProperty("code")&&(r.code=t.enums===String?f.opentelemetry.proto.trace.v1.Status.StatusCode[e.code]===void 0?e.code:f.opentelemetry.proto.trace.v1.Status.StatusCode[e.code]:e.code),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Status"},l.StatusCode=function(){var i={},e=Object.create(i);return e[i[0]="STATUS_CODE_UNSET"]=0,e[i[1]="STATUS_CODE_OK"]=1,e[i[2]="STATUS_CODE_ERROR"]=2,e}(),l}(),c}(),o}(),n.collector=function(){var o={};return o.trace=function(){var c={};return c.v1=function(){var l={};return l.TraceService=function(){function i(e,t,r){E.rpc.Service.call(this,e,t,r)}return(i.prototype=Object.create(E.rpc.Service.prototype)).constructor=i,i.create=function(t,r,a){return new this(t,r,a)},Object.defineProperty(i.prototype.export=function e(t,r){return this.rpcCall(e,f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,t,r)},"name",{value:"Export"}),i}(),l.ExportTraceServiceRequest=function(){function i(e){if(this.resourceSpans=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.resourceSpans=p.emptyArray,i.create=function(t){return new i(t)},i.encode=function(t,r){if(r||(r=T.create()),t.resourceSpans!=null&&t.resourceSpans.length)for(var a=0;a<t.resourceSpans.length;++a)f.opentelemetry.proto.trace.v1.ResourceSpans.encode(t.resourceSpans[a],r.uint32(10).fork()).ldelim();return r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.resourceSpans&&s.resourceSpans.length||(s.resourceSpans=[]),s.resourceSpans.push(f.opentelemetry.proto.trace.v1.ResourceSpans.decode(t,t.uint32()));break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(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 r=0;r<t.resourceSpans.length;++r){var a=f.opentelemetry.proto.trace.v1.ResourceSpans.verify(t.resourceSpans[r]);if(a)return"resourceSpans."+a}}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest)return t;var r=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;if(t.resourceSpans){if(!Array.isArray(t.resourceSpans))throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected");r.resourceSpans=[];for(var a=0;a<t.resourceSpans.length;++a){if(typeof t.resourceSpans[a]!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected");r.resourceSpans[a]=f.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(t.resourceSpans[a])}}return r},i.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.resourceSpans=[]),t.resourceSpans&&t.resourceSpans.length){a.resourceSpans=[];for(var s=0;s<t.resourceSpans.length;++s)a.resourceSpans[s]=f.opentelemetry.proto.trace.v1.ResourceSpans.toObject(t.resourceSpans[s],r)}return a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"},i}(),l.ExportTraceServiceResponse=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.partialSuccess=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.partialSuccess!=null&&Object.hasOwnProperty.call(t,"partialSuccess")&&f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(t.partialSuccess,r.uint32(10).fork()).ldelim(),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.partialSuccess=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(t,t.uint32());break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")){var r=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(t.partialSuccess);if(r)return"partialSuccess."+r}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return t;var r=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(t.partialSuccess!=null){if(typeof t.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");r.partialSuccess=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(t.partialSuccess)}return r},i.toObject=function(t,r){r||(r={});var a={};return r.defaults&&(a.partialSuccess=null),t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")&&(a.partialSuccess=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(t.partialSuccess,r)),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},i}(),l.ExportTracePartialSuccess=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.rejectedSpans=null,i.prototype.errorMessage=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.rejectedSpans!=null&&Object.hasOwnProperty.call(t,"rejectedSpans")&&r.uint32(8).int64(t.rejectedSpans),t.errorMessage!=null&&Object.hasOwnProperty.call(t,"errorMessage")&&r.uint32(18).string(t.errorMessage),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.rejectedSpans=t.int64();break}case 2:{s.errorMessage=t.string();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){return typeof t!="object"||t===null?"object expected":t.rejectedSpans!=null&&t.hasOwnProperty("rejectedSpans")&&!p.isInteger(t.rejectedSpans)&&!(t.rejectedSpans&&p.isInteger(t.rejectedSpans.low)&&p.isInteger(t.rejectedSpans.high))?"rejectedSpans: integer|Long expected":t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&!p.isString(t.errorMessage)?"errorMessage: string expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return t;var r=new f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;return t.rejectedSpans!=null&&(p.Long?(r.rejectedSpans=p.Long.fromValue(t.rejectedSpans)).unsigned=!1:typeof t.rejectedSpans=="string"?r.rejectedSpans=parseInt(t.rejectedSpans,10):typeof t.rejectedSpans=="number"?r.rejectedSpans=t.rejectedSpans:typeof t.rejectedSpans=="object"&&(r.rejectedSpans=new p.LongBits(t.rejectedSpans.low>>>0,t.rejectedSpans.high>>>0).toNumber())),t.errorMessage!=null&&(r.errorMessage=String(t.errorMessage)),r},i.toObject=function(t,r){r||(r={});var a={};if(r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.rejectedSpans=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.rejectedSpans=r.longs===String?"0":0;a.errorMessage=""}return t.rejectedSpans!=null&&t.hasOwnProperty("rejectedSpans")&&(typeof t.rejectedSpans=="number"?a.rejectedSpans=r.longs===String?String(t.rejectedSpans):t.rejectedSpans:a.rejectedSpans=r.longs===String?p.Long.prototype.toString.call(t.rejectedSpans):r.longs===Number?new p.LongBits(t.rejectedSpans.low>>>0,t.rejectedSpans.high>>>0).toNumber():t.rejectedSpans),t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&(a.errorMessage=t.errorMessage),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},i}(),l}(),c}(),o.metrics=function(){var c={};return c.v1=function(){var l={};return l.MetricsService=function(){function i(e,t,r){E.rpc.Service.call(this,e,t,r)}return(i.prototype=Object.create(E.rpc.Service.prototype)).constructor=i,i.create=function(t,r,a){return new this(t,r,a)},Object.defineProperty(i.prototype.export=function e(t,r){return this.rpcCall(e,f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,t,r)},"name",{value:"Export"}),i}(),l.ExportMetricsServiceRequest=function(){function i(e){if(this.resourceMetrics=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.resourceMetrics=p.emptyArray,i.create=function(t){return new i(t)},i.encode=function(t,r){if(r||(r=T.create()),t.resourceMetrics!=null&&t.resourceMetrics.length)for(var a=0;a<t.resourceMetrics.length;++a)f.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(t.resourceMetrics[a],r.uint32(10).fork()).ldelim();return r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.resourceMetrics&&s.resourceMetrics.length||(s.resourceMetrics=[]),s.resourceMetrics.push(f.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(t,t.uint32()));break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(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 r=0;r<t.resourceMetrics.length;++r){var a=f.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(t.resourceMetrics[r]);if(a)return"resourceMetrics."+a}}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest)return t;var r=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;if(t.resourceMetrics){if(!Array.isArray(t.resourceMetrics))throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected");r.resourceMetrics=[];for(var a=0;a<t.resourceMetrics.length;++a){if(typeof t.resourceMetrics[a]!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected");r.resourceMetrics[a]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(t.resourceMetrics[a])}}return r},i.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.resourceMetrics=[]),t.resourceMetrics&&t.resourceMetrics.length){a.resourceMetrics=[];for(var s=0;s<t.resourceMetrics.length;++s)a.resourceMetrics[s]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(t.resourceMetrics[s],r)}return a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"},i}(),l.ExportMetricsServiceResponse=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.partialSuccess=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.partialSuccess!=null&&Object.hasOwnProperty.call(t,"partialSuccess")&&f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(t.partialSuccess,r.uint32(10).fork()).ldelim(),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.partialSuccess=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(t,t.uint32());break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")){var r=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(t.partialSuccess);if(r)return"partialSuccess."+r}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return t;var r=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(t.partialSuccess!=null){if(typeof t.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");r.partialSuccess=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(t.partialSuccess)}return r},i.toObject=function(t,r){r||(r={});var a={};return r.defaults&&(a.partialSuccess=null),t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")&&(a.partialSuccess=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(t.partialSuccess,r)),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},i}(),l.ExportMetricsPartialSuccess=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.rejectedDataPoints=null,i.prototype.errorMessage=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.rejectedDataPoints!=null&&Object.hasOwnProperty.call(t,"rejectedDataPoints")&&r.uint32(8).int64(t.rejectedDataPoints),t.errorMessage!=null&&Object.hasOwnProperty.call(t,"errorMessage")&&r.uint32(18).string(t.errorMessage),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.rejectedDataPoints=t.int64();break}case 2:{s.errorMessage=t.string();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){return typeof t!="object"||t===null?"object expected":t.rejectedDataPoints!=null&&t.hasOwnProperty("rejectedDataPoints")&&!p.isInteger(t.rejectedDataPoints)&&!(t.rejectedDataPoints&&p.isInteger(t.rejectedDataPoints.low)&&p.isInteger(t.rejectedDataPoints.high))?"rejectedDataPoints: integer|Long expected":t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&!p.isString(t.errorMessage)?"errorMessage: string expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return t;var r=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;return t.rejectedDataPoints!=null&&(p.Long?(r.rejectedDataPoints=p.Long.fromValue(t.rejectedDataPoints)).unsigned=!1:typeof t.rejectedDataPoints=="string"?r.rejectedDataPoints=parseInt(t.rejectedDataPoints,10):typeof t.rejectedDataPoints=="number"?r.rejectedDataPoints=t.rejectedDataPoints:typeof t.rejectedDataPoints=="object"&&(r.rejectedDataPoints=new p.LongBits(t.rejectedDataPoints.low>>>0,t.rejectedDataPoints.high>>>0).toNumber())),t.errorMessage!=null&&(r.errorMessage=String(t.errorMessage)),r},i.toObject=function(t,r){r||(r={});var a={};if(r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.rejectedDataPoints=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.rejectedDataPoints=r.longs===String?"0":0;a.errorMessage=""}return t.rejectedDataPoints!=null&&t.hasOwnProperty("rejectedDataPoints")&&(typeof t.rejectedDataPoints=="number"?a.rejectedDataPoints=r.longs===String?String(t.rejectedDataPoints):t.rejectedDataPoints:a.rejectedDataPoints=r.longs===String?p.Long.prototype.toString.call(t.rejectedDataPoints):r.longs===Number?new p.LongBits(t.rejectedDataPoints.low>>>0,t.rejectedDataPoints.high>>>0).toNumber():t.rejectedDataPoints),t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&(a.errorMessage=t.errorMessage),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},i}(),l}(),c}(),o.logs=function(){var c={};return c.v1=function(){var l={};return l.LogsService=function(){function i(e,t,r){E.rpc.Service.call(this,e,t,r)}return(i.prototype=Object.create(E.rpc.Service.prototype)).constructor=i,i.create=function(t,r,a){return new this(t,r,a)},Object.defineProperty(i.prototype.export=function e(t,r){return this.rpcCall(e,f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,t,r)},"name",{value:"Export"}),i}(),l.ExportLogsServiceRequest=function(){function i(e){if(this.resourceLogs=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.resourceLogs=p.emptyArray,i.create=function(t){return new i(t)},i.encode=function(t,r){if(r||(r=T.create()),t.resourceLogs!=null&&t.resourceLogs.length)for(var a=0;a<t.resourceLogs.length;++a)f.opentelemetry.proto.logs.v1.ResourceLogs.encode(t.resourceLogs[a],r.uint32(10).fork()).ldelim();return r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.resourceLogs&&s.resourceLogs.length||(s.resourceLogs=[]),s.resourceLogs.push(f.opentelemetry.proto.logs.v1.ResourceLogs.decode(t,t.uint32()));break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(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 r=0;r<t.resourceLogs.length;++r){var a=f.opentelemetry.proto.logs.v1.ResourceLogs.verify(t.resourceLogs[r]);if(a)return"resourceLogs."+a}}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest)return t;var r=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;if(t.resourceLogs){if(!Array.isArray(t.resourceLogs))throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected");r.resourceLogs=[];for(var a=0;a<t.resourceLogs.length;++a){if(typeof t.resourceLogs[a]!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected");r.resourceLogs[a]=f.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(t.resourceLogs[a])}}return r},i.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.resourceLogs=[]),t.resourceLogs&&t.resourceLogs.length){a.resourceLogs=[];for(var s=0;s<t.resourceLogs.length;++s)a.resourceLogs[s]=f.opentelemetry.proto.logs.v1.ResourceLogs.toObject(t.resourceLogs[s],r)}return a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"},i}(),l.ExportLogsServiceResponse=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.partialSuccess=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.partialSuccess!=null&&Object.hasOwnProperty.call(t,"partialSuccess")&&f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(t.partialSuccess,r.uint32(10).fork()).ldelim(),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.partialSuccess=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(t,t.uint32());break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")){var r=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(t.partialSuccess);if(r)return"partialSuccess."+r}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return t;var r=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(t.partialSuccess!=null){if(typeof t.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");r.partialSuccess=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(t.partialSuccess)}return r},i.toObject=function(t,r){r||(r={});var a={};return r.defaults&&(a.partialSuccess=null),t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")&&(a.partialSuccess=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(t.partialSuccess,r)),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},i}(),l.ExportLogsPartialSuccess=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.rejectedLogRecords=null,i.prototype.errorMessage=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.rejectedLogRecords!=null&&Object.hasOwnProperty.call(t,"rejectedLogRecords")&&r.uint32(8).int64(t.rejectedLogRecords),t.errorMessage!=null&&Object.hasOwnProperty.call(t,"errorMessage")&&r.uint32(18).string(t.errorMessage),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.rejectedLogRecords=t.int64();break}case 2:{s.errorMessage=t.string();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){return typeof t!="object"||t===null?"object expected":t.rejectedLogRecords!=null&&t.hasOwnProperty("rejectedLogRecords")&&!p.isInteger(t.rejectedLogRecords)&&!(t.rejectedLogRecords&&p.isInteger(t.rejectedLogRecords.low)&&p.isInteger(t.rejectedLogRecords.high))?"rejectedLogRecords: integer|Long expected":t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&!p.isString(t.errorMessage)?"errorMessage: string expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return t;var r=new f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;return t.rejectedLogRecords!=null&&(p.Long?(r.rejectedLogRecords=p.Long.fromValue(t.rejectedLogRecords)).unsigned=!1:typeof t.rejectedLogRecords=="string"?r.rejectedLogRecords=parseInt(t.rejectedLogRecords,10):typeof t.rejectedLogRecords=="number"?r.rejectedLogRecords=t.rejectedLogRecords:typeof t.rejectedLogRecords=="object"&&(r.rejectedLogRecords=new p.LongBits(t.rejectedLogRecords.low>>>0,t.rejectedLogRecords.high>>>0).toNumber())),t.errorMessage!=null&&(r.errorMessage=String(t.errorMessage)),r},i.toObject=function(t,r){r||(r={});var a={};if(r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.rejectedLogRecords=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.rejectedLogRecords=r.longs===String?"0":0;a.errorMessage=""}return t.rejectedLogRecords!=null&&t.hasOwnProperty("rejectedLogRecords")&&(typeof t.rejectedLogRecords=="number"?a.rejectedLogRecords=r.longs===String?String(t.rejectedLogRecords):t.rejectedLogRecords:a.rejectedLogRecords=r.longs===String?p.Long.prototype.toString.call(t.rejectedLogRecords):r.longs===Number?new p.LongBits(t.rejectedLogRecords.low>>>0,t.rejectedLogRecords.high>>>0).toNumber():t.rejectedLogRecords),t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&(a.errorMessage=t.errorMessage),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},i}(),l}(),c}(),o}(),n.metrics=function(){var o={};return o.v1=function(){var c={};return c.MetricsData=function(){function l(i){if(this.resourceMetrics=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resourceMetrics=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resourceMetrics!=null&&e.resourceMetrics.length)for(var r=0;r<e.resourceMetrics.length;++r)f.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(e.resourceMetrics[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.MetricsData;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resourceMetrics&&a.resourceMetrics.length||(a.resourceMetrics=[]),a.resourceMetrics.push(f.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.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 t=0;t<e.resourceMetrics.length;++t){var r=f.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(e.resourceMetrics[t]);if(r)return"resourceMetrics."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.MetricsData)return e;var t=new f.opentelemetry.proto.metrics.v1.MetricsData;if(e.resourceMetrics){if(!Array.isArray(e.resourceMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: array expected");t.resourceMetrics=[];for(var r=0;r<e.resourceMetrics.length;++r){if(typeof e.resourceMetrics[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: object expected");t.resourceMetrics[r]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(e.resourceMetrics[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.resourceMetrics=[]),e.resourceMetrics&&e.resourceMetrics.length){r.resourceMetrics=[];for(var a=0;a<e.resourceMetrics.length;++a)r.resourceMetrics[a]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(e.resourceMetrics[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.MetricsData"},l}(),c.ResourceMetrics=function(){function l(i){if(this.scopeMetrics=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resource=null,l.prototype.scopeMetrics=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resource!=null&&Object.hasOwnProperty.call(e,"resource")&&f.opentelemetry.proto.resource.v1.Resource.encode(e.resource,t.uint32(10).fork()).ldelim(),e.scopeMetrics!=null&&e.scopeMetrics.length)for(var r=0;r<e.scopeMetrics.length;++r)f.opentelemetry.proto.metrics.v1.ScopeMetrics.encode(e.scopeMetrics[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.ResourceMetrics;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resource=f.opentelemetry.proto.resource.v1.Resource.decode(e,e.uint32());break}case 2:{a.scopeMetrics&&a.scopeMetrics.length||(a.scopeMetrics=[]),a.scopeMetrics.push(f.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resource!=null&&e.hasOwnProperty("resource")){var t=f.opentelemetry.proto.resource.v1.Resource.verify(e.resource);if(t)return"resource."+t}if(e.scopeMetrics!=null&&e.hasOwnProperty("scopeMetrics")){if(!Array.isArray(e.scopeMetrics))return"scopeMetrics: array expected";for(var r=0;r<e.scopeMetrics.length;++r){var t=f.opentelemetry.proto.metrics.v1.ScopeMetrics.verify(e.scopeMetrics[r]);if(t)return"scopeMetrics."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.ResourceMetrics)return e;var t=new f.opentelemetry.proto.metrics.v1.ResourceMetrics;if(e.resource!=null){if(typeof e.resource!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.resource: object expected");t.resource=f.opentelemetry.proto.resource.v1.Resource.fromObject(e.resource)}if(e.scopeMetrics){if(!Array.isArray(e.scopeMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: array expected");t.scopeMetrics=[];for(var r=0;r<e.scopeMetrics.length;++r){if(typeof e.scopeMetrics[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: object expected");t.scopeMetrics[r]=f.opentelemetry.proto.metrics.v1.ScopeMetrics.fromObject(e.scopeMetrics[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.scopeMetrics=[]),t.defaults&&(r.resource=null,r.schemaUrl=""),e.resource!=null&&e.hasOwnProperty("resource")&&(r.resource=f.opentelemetry.proto.resource.v1.Resource.toObject(e.resource,t)),e.scopeMetrics&&e.scopeMetrics.length){r.scopeMetrics=[];for(var a=0;a<e.scopeMetrics.length;++a)r.scopeMetrics[a]=f.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(e.scopeMetrics[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ResourceMetrics"},l}(),c.ScopeMetrics=function(){function l(i){if(this.metrics=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.scope=null,l.prototype.metrics=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.scope!=null&&Object.hasOwnProperty.call(e,"scope")&&f.opentelemetry.proto.common.v1.InstrumentationScope.encode(e.scope,t.uint32(10).fork()).ldelim(),e.metrics!=null&&e.metrics.length)for(var r=0;r<e.metrics.length;++r)f.opentelemetry.proto.metrics.v1.Metric.encode(e.metrics[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.ScopeMetrics;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.decode(e,e.uint32());break}case 2:{a.metrics&&a.metrics.length||(a.metrics=[]),a.metrics.push(f.opentelemetry.proto.metrics.v1.Metric.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.scope!=null&&e.hasOwnProperty("scope")){var t=f.opentelemetry.proto.common.v1.InstrumentationScope.verify(e.scope);if(t)return"scope."+t}if(e.metrics!=null&&e.hasOwnProperty("metrics")){if(!Array.isArray(e.metrics))return"metrics: array expected";for(var r=0;r<e.metrics.length;++r){var t=f.opentelemetry.proto.metrics.v1.Metric.verify(e.metrics[r]);if(t)return"metrics."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.ScopeMetrics)return e;var t=new f.opentelemetry.proto.metrics.v1.ScopeMetrics;if(e.scope!=null){if(typeof e.scope!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.scope: object expected");t.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(e.scope)}if(e.metrics){if(!Array.isArray(e.metrics))throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: array expected");t.metrics=[];for(var r=0;r<e.metrics.length;++r){if(typeof e.metrics[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: object expected");t.metrics[r]=f.opentelemetry.proto.metrics.v1.Metric.fromObject(e.metrics[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.metrics=[]),t.defaults&&(r.scope=null,r.schemaUrl=""),e.scope!=null&&e.hasOwnProperty("scope")&&(r.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.toObject(e.scope,t)),e.metrics&&e.metrics.length){r.metrics=[];for(var a=0;a<e.metrics.length;++a)r.metrics[a]=f.opentelemetry.proto.metrics.v1.Metric.toObject(e.metrics[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ScopeMetrics"},l}(),c.Metric=function(){function l(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.name=null,l.prototype.description=null,l.prototype.unit=null,l.prototype.gauge=null,l.prototype.sum=null,l.prototype.histogram=null,l.prototype.exponentialHistogram=null,l.prototype.summary=null;var i;return Object.defineProperty(l.prototype,"data",{get:p.oneOfGetter(i=["gauge","sum","histogram","exponentialHistogram","summary"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){return r||(r=T.create()),t.name!=null&&Object.hasOwnProperty.call(t,"name")&&r.uint32(10).string(t.name),t.description!=null&&Object.hasOwnProperty.call(t,"description")&&r.uint32(18).string(t.description),t.unit!=null&&Object.hasOwnProperty.call(t,"unit")&&r.uint32(26).string(t.unit),t.gauge!=null&&Object.hasOwnProperty.call(t,"gauge")&&f.opentelemetry.proto.metrics.v1.Gauge.encode(t.gauge,r.uint32(42).fork()).ldelim(),t.sum!=null&&Object.hasOwnProperty.call(t,"sum")&&f.opentelemetry.proto.metrics.v1.Sum.encode(t.sum,r.uint32(58).fork()).ldelim(),t.histogram!=null&&Object.hasOwnProperty.call(t,"histogram")&&f.opentelemetry.proto.metrics.v1.Histogram.encode(t.histogram,r.uint32(74).fork()).ldelim(),t.exponentialHistogram!=null&&Object.hasOwnProperty.call(t,"exponentialHistogram")&&f.opentelemetry.proto.metrics.v1.ExponentialHistogram.encode(t.exponentialHistogram,r.uint32(82).fork()).ldelim(),t.summary!=null&&Object.hasOwnProperty.call(t,"summary")&&f.opentelemetry.proto.metrics.v1.Summary.encode(t.summary,r.uint32(90).fork()).ldelim(),r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.Metric;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.name=t.string();break}case 2:{s.description=t.string();break}case 3:{s.unit=t.string();break}case 5:{s.gauge=f.opentelemetry.proto.metrics.v1.Gauge.decode(t,t.uint32());break}case 7:{s.sum=f.opentelemetry.proto.metrics.v1.Sum.decode(t,t.uint32());break}case 9:{s.histogram=f.opentelemetry.proto.metrics.v1.Histogram.decode(t,t.uint32());break}case 10:{s.exponentialHistogram=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(t,t.uint32());break}case 11:{s.summary=f.opentelemetry.proto.metrics.v1.Summary.decode(t,t.uint32());break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.name!=null&&t.hasOwnProperty("name")&&!p.isString(t.name))return"name: string expected";if(t.description!=null&&t.hasOwnProperty("description")&&!p.isString(t.description))return"description: string expected";if(t.unit!=null&&t.hasOwnProperty("unit")&&!p.isString(t.unit))return"unit: string expected";if(t.gauge!=null&&t.hasOwnProperty("gauge")){r.data=1;{var a=f.opentelemetry.proto.metrics.v1.Gauge.verify(t.gauge);if(a)return"gauge."+a}}if(t.sum!=null&&t.hasOwnProperty("sum")){if(r.data===1)return"data: multiple values";r.data=1;{var a=f.opentelemetry.proto.metrics.v1.Sum.verify(t.sum);if(a)return"sum."+a}}if(t.histogram!=null&&t.hasOwnProperty("histogram")){if(r.data===1)return"data: multiple values";r.data=1;{var a=f.opentelemetry.proto.metrics.v1.Histogram.verify(t.histogram);if(a)return"histogram."+a}}if(t.exponentialHistogram!=null&&t.hasOwnProperty("exponentialHistogram")){if(r.data===1)return"data: multiple values";r.data=1;{var a=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(t.exponentialHistogram);if(a)return"exponentialHistogram."+a}}if(t.summary!=null&&t.hasOwnProperty("summary")){if(r.data===1)return"data: multiple values";r.data=1;{var a=f.opentelemetry.proto.metrics.v1.Summary.verify(t.summary);if(a)return"summary."+a}}return null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.Metric)return t;var r=new f.opentelemetry.proto.metrics.v1.Metric;if(t.name!=null&&(r.name=String(t.name)),t.description!=null&&(r.description=String(t.description)),t.unit!=null&&(r.unit=String(t.unit)),t.gauge!=null){if(typeof t.gauge!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected");r.gauge=f.opentelemetry.proto.metrics.v1.Gauge.fromObject(t.gauge)}if(t.sum!=null){if(typeof t.sum!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.sum: object expected");r.sum=f.opentelemetry.proto.metrics.v1.Sum.fromObject(t.sum)}if(t.histogram!=null){if(typeof t.histogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.histogram: object expected");r.histogram=f.opentelemetry.proto.metrics.v1.Histogram.fromObject(t.histogram)}if(t.exponentialHistogram!=null){if(typeof t.exponentialHistogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected");r.exponentialHistogram=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(t.exponentialHistogram)}if(t.summary!=null){if(typeof t.summary!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.summary: object expected");r.summary=f.opentelemetry.proto.metrics.v1.Summary.fromObject(t.summary)}return r},l.toObject=function(t,r){r||(r={});var a={};return r.defaults&&(a.name="",a.description="",a.unit=""),t.name!=null&&t.hasOwnProperty("name")&&(a.name=t.name),t.description!=null&&t.hasOwnProperty("description")&&(a.description=t.description),t.unit!=null&&t.hasOwnProperty("unit")&&(a.unit=t.unit),t.gauge!=null&&t.hasOwnProperty("gauge")&&(a.gauge=f.opentelemetry.proto.metrics.v1.Gauge.toObject(t.gauge,r),r.oneofs&&(a.data="gauge")),t.sum!=null&&t.hasOwnProperty("sum")&&(a.sum=f.opentelemetry.proto.metrics.v1.Sum.toObject(t.sum,r),r.oneofs&&(a.data="sum")),t.histogram!=null&&t.hasOwnProperty("histogram")&&(a.histogram=f.opentelemetry.proto.metrics.v1.Histogram.toObject(t.histogram,r),r.oneofs&&(a.data="histogram")),t.exponentialHistogram!=null&&t.hasOwnProperty("exponentialHistogram")&&(a.exponentialHistogram=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(t.exponentialHistogram,r),r.oneofs&&(a.data="exponentialHistogram")),t.summary!=null&&t.hasOwnProperty("summary")&&(a.summary=f.opentelemetry.proto.metrics.v1.Summary.toObject(t.summary,r),r.oneofs&&(a.data="summary")),a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Metric"},l}(),c.Gauge=function(){function l(i){if(this.dataPoints=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.dataPoints=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)f.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.Gauge;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.dataPoints&&a.dataPoints.length||(a.dataPoints=[]),a.dataPoints.push(f.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=f.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.Gauge)return e;var t=new f.opentelemetry.proto.metrics.v1.Gauge;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: object expected");t.dataPoints[r]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(e.dataPoints[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var a=0;a<e.dataPoints.length;++a)r.dataPoints[a]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(e.dataPoints[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Gauge"},l}(),c.Sum=function(){function l(i){if(this.dataPoints=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.dataPoints=p.emptyArray,l.prototype.aggregationTemporality=null,l.prototype.isMonotonic=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)f.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return e.aggregationTemporality!=null&&Object.hasOwnProperty.call(e,"aggregationTemporality")&&t.uint32(16).int32(e.aggregationTemporality),e.isMonotonic!=null&&Object.hasOwnProperty.call(e,"isMonotonic")&&t.uint32(24).bool(e.isMonotonic),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.Sum;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.dataPoints&&a.dataPoints.length||(a.dataPoints=[]),a.dataPoints.push(f.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(e,e.uint32()));break}case 2:{a.aggregationTemporality=e.int32();break}case 3:{a.isMonotonic=e.bool();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=f.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}if(e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality"))switch(e.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return e.isMonotonic!=null&&e.hasOwnProperty("isMonotonic")&&typeof e.isMonotonic!="boolean"?"isMonotonic: boolean expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.Sum)return e;var t=new f.opentelemetry.proto.metrics.v1.Sum;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: object expected");t.dataPoints[r]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(e.dataPoints[r])}}switch(e.aggregationTemporality){default:if(typeof e.aggregationTemporality=="number"){t.aggregationTemporality=e.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:t.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:t.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:t.aggregationTemporality=2;break}return e.isMonotonic!=null&&(t.isMonotonic=!!e.isMonotonic),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),t.defaults&&(r.aggregationTemporality=t.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0,r.isMonotonic=!1),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var a=0;a<e.dataPoints.length;++a)r.dataPoints[a]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(e.dataPoints[a],t)}return e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality")&&(r.aggregationTemporality=t.enums===String?f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]===void 0?e.aggregationTemporality:f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]:e.aggregationTemporality),e.isMonotonic!=null&&e.hasOwnProperty("isMonotonic")&&(r.isMonotonic=e.isMonotonic),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Sum"},l}(),c.Histogram=function(){function l(i){if(this.dataPoints=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.dataPoints=p.emptyArray,l.prototype.aggregationTemporality=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)f.opentelemetry.proto.metrics.v1.HistogramDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return e.aggregationTemporality!=null&&Object.hasOwnProperty.call(e,"aggregationTemporality")&&t.uint32(16).int32(e.aggregationTemporality),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.Histogram;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.dataPoints&&a.dataPoints.length||(a.dataPoints=[]),a.dataPoints.push(f.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(e,e.uint32()));break}case 2:{a.aggregationTemporality=e.int32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=f.opentelemetry.proto.metrics.v1.HistogramDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}if(e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality"))switch(e.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.Histogram)return e;var t=new f.opentelemetry.proto.metrics.v1.Histogram;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: object expected");t.dataPoints[r]=f.opentelemetry.proto.metrics.v1.HistogramDataPoint.fromObject(e.dataPoints[r])}}switch(e.aggregationTemporality){default:if(typeof e.aggregationTemporality=="number"){t.aggregationTemporality=e.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:t.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:t.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:t.aggregationTemporality=2;break}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),t.defaults&&(r.aggregationTemporality=t.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var a=0;a<e.dataPoints.length;++a)r.dataPoints[a]=f.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(e.dataPoints[a],t)}return e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality")&&(r.aggregationTemporality=t.enums===String?f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]===void 0?e.aggregationTemporality:f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]:e.aggregationTemporality),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Histogram"},l}(),c.ExponentialHistogram=function(){function l(i){if(this.dataPoints=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.dataPoints=p.emptyArray,l.prototype.aggregationTemporality=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return e.aggregationTemporality!=null&&Object.hasOwnProperty.call(e,"aggregationTemporality")&&t.uint32(16).int32(e.aggregationTemporality),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.ExponentialHistogram;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.dataPoints&&a.dataPoints.length||(a.dataPoints=[]),a.dataPoints.push(f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(e,e.uint32()));break}case 2:{a.aggregationTemporality=e.int32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}if(e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality"))switch(e.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.ExponentialHistogram)return e;var t=new f.opentelemetry.proto.metrics.v1.ExponentialHistogram;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: object expected");t.dataPoints[r]=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.fromObject(e.dataPoints[r])}}switch(e.aggregationTemporality){default:if(typeof e.aggregationTemporality=="number"){t.aggregationTemporality=e.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:t.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:t.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:t.aggregationTemporality=2;break}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),t.defaults&&(r.aggregationTemporality=t.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var a=0;a<e.dataPoints.length;++a)r.dataPoints[a]=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(e.dataPoints[a],t)}return e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality")&&(r.aggregationTemporality=t.enums===String?f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]===void 0?e.aggregationTemporality:f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]:e.aggregationTemporality),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ExponentialHistogram"},l}(),c.Summary=function(){function l(i){if(this.dataPoints=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.dataPoints=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)f.opentelemetry.proto.metrics.v1.SummaryDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.Summary;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.dataPoints&&a.dataPoints.length||(a.dataPoints=[]),a.dataPoints.push(f.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.Summary)return e;var t=new f.opentelemetry.proto.metrics.v1.Summary;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: object expected");t.dataPoints[r]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.fromObject(e.dataPoints[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var a=0;a<e.dataPoints.length;++a)r.dataPoints[a]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(e.dataPoints[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Summary"},l}(),c.AggregationTemporality=function(){var l={},i=Object.create(l);return i[l[0]="AGGREGATION_TEMPORALITY_UNSPECIFIED"]=0,i[l[1]="AGGREGATION_TEMPORALITY_DELTA"]=1,i[l[2]="AGGREGATION_TEMPORALITY_CUMULATIVE"]=2,i}(),c.DataPointFlags=function(){var l={},i=Object.create(l);return i[l[0]="DATA_POINT_FLAGS_DO_NOT_USE"]=0,i[l[1]="DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"]=1,i}(),c.NumberDataPoint=function(){function l(e){if(this.attributes=[],this.exemplars=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.attributes=p.emptyArray,l.prototype.startTimeUnixNano=null,l.prototype.timeUnixNano=null,l.prototype.asDouble=null,l.prototype.asInt=null,l.prototype.exemplars=p.emptyArray,l.prototype.flags=null;var i;return Object.defineProperty(l.prototype,"value",{get:p.oneOfGetter(i=["asDouble","asInt"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){if(r||(r=T.create()),t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&r.uint32(17).fixed64(t.startTimeUnixNano),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(25).fixed64(t.timeUnixNano),t.asDouble!=null&&Object.hasOwnProperty.call(t,"asDouble")&&r.uint32(33).double(t.asDouble),t.exemplars!=null&&t.exemplars.length)for(var a=0;a<t.exemplars.length;++a)f.opentelemetry.proto.metrics.v1.Exemplar.encode(t.exemplars[a],r.uint32(42).fork()).ldelim();if(t.asInt!=null&&Object.hasOwnProperty.call(t,"asInt")&&r.uint32(49).sfixed64(t.asInt),t.attributes!=null&&t.attributes.length)for(var a=0;a<t.attributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[a],r.uint32(58).fork()).ldelim();return t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&r.uint32(64).uint32(t.flags),r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.NumberDataPoint;t.pos<a;){var d=t.uint32();switch(d>>>3){case 7:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(f.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.asDouble=t.double();break}case 6:{s.asInt=t.sfixed64();break}case 5:{s.exemplars&&s.exemplars.length||(s.exemplars=[]),s.exemplars.push(f.opentelemetry.proto.metrics.v1.Exemplar.decode(t,t.uint32()));break}case 8:{s.flags=t.uint32();break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var a=0;a<t.attributes.length;++a){var s=f.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[a]);if(s)return"attributes."+s}}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!p.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&p.isInteger(t.startTimeUnixNano.low)&&p.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!p.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&p.isInteger(t.timeUnixNano.low)&&p.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.asDouble!=null&&t.hasOwnProperty("asDouble")&&(r.value=1,typeof t.asDouble!="number"))return"asDouble: number expected";if(t.asInt!=null&&t.hasOwnProperty("asInt")){if(r.value===1)return"value: multiple values";if(r.value=1,!p.isInteger(t.asInt)&&!(t.asInt&&p.isInteger(t.asInt.low)&&p.isInteger(t.asInt.high)))return"asInt: integer|Long expected"}if(t.exemplars!=null&&t.hasOwnProperty("exemplars")){if(!Array.isArray(t.exemplars))return"exemplars: array expected";for(var a=0;a<t.exemplars.length;++a){var s=f.opentelemetry.proto.metrics.v1.Exemplar.verify(t.exemplars[a]);if(s)return"exemplars."+s}}return t.flags!=null&&t.hasOwnProperty("flags")&&!p.isInteger(t.flags)?"flags: integer expected":null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.NumberDataPoint)return t;var r=new f.opentelemetry.proto.metrics.v1.NumberDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: array expected");r.attributes=[];for(var a=0;a<t.attributes.length;++a){if(typeof t.attributes[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected");r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[a])}}if(t.startTimeUnixNano!=null&&(p.Long?(r.startTimeUnixNano=p.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?r.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?r.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(r.startTimeUnixNano=new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.timeUnixNano!=null&&(p.Long?(r.timeUnixNano=p.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.asDouble!=null&&(r.asDouble=Number(t.asDouble)),t.asInt!=null&&(p.Long?(r.asInt=p.Long.fromValue(t.asInt)).unsigned=!1:typeof t.asInt=="string"?r.asInt=parseInt(t.asInt,10):typeof t.asInt=="number"?r.asInt=t.asInt:typeof t.asInt=="object"&&(r.asInt=new p.LongBits(t.asInt.low>>>0,t.asInt.high>>>0).toNumber())),t.exemplars){if(!Array.isArray(t.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected");r.exemplars=[];for(var a=0;a<t.exemplars.length;++a){if(typeof t.exemplars[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected");r.exemplars[a]=f.opentelemetry.proto.metrics.v1.Exemplar.fromObject(t.exemplars[a])}}return t.flags!=null&&(r.flags=t.flags>>>0),r},l.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.exemplars=[],a.attributes=[]),r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.startTimeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.startTimeUnixNano=r.longs===String?"0":0;if(p.Long){var s=new p.Long(0,0,!1);a.timeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.timeUnixNano=r.longs===String?"0":0;a.flags=0}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?a.startTimeUnixNano=r.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:a.startTimeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.startTimeUnixNano):r.longs===Number?new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?a.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:a.timeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.asDouble!=null&&t.hasOwnProperty("asDouble")&&(a.asDouble=r.json&&!isFinite(t.asDouble)?String(t.asDouble):t.asDouble,r.oneofs&&(a.value="asDouble")),t.exemplars&&t.exemplars.length){a.exemplars=[];for(var d=0;d<t.exemplars.length;++d)a.exemplars[d]=f.opentelemetry.proto.metrics.v1.Exemplar.toObject(t.exemplars[d],r)}if(t.asInt!=null&&t.hasOwnProperty("asInt")&&(typeof t.asInt=="number"?a.asInt=r.longs===String?String(t.asInt):t.asInt:a.asInt=r.longs===String?p.Long.prototype.toString.call(t.asInt):r.longs===Number?new p.LongBits(t.asInt.low>>>0,t.asInt.high>>>0).toNumber():t.asInt,r.oneofs&&(a.value="asInt")),t.attributes&&t.attributes.length){a.attributes=[];for(var d=0;d<t.attributes.length;++d)a.attributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[d],r)}return t.flags!=null&&t.hasOwnProperty("flags")&&(a.flags=t.flags),a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.NumberDataPoint"},l}(),c.HistogramDataPoint=function(){function l(e){if(this.attributes=[],this.bucketCounts=[],this.explicitBounds=[],this.exemplars=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.attributes=p.emptyArray,l.prototype.startTimeUnixNano=null,l.prototype.timeUnixNano=null,l.prototype.count=null,l.prototype.sum=null,l.prototype.bucketCounts=p.emptyArray,l.prototype.explicitBounds=p.emptyArray,l.prototype.exemplars=p.emptyArray,l.prototype.flags=null,l.prototype.min=null,l.prototype.max=null;var i;return Object.defineProperty(l.prototype,"_sum",{get:p.oneOfGetter(i=["sum"]),set:p.oneOfSetter(i)}),Object.defineProperty(l.prototype,"_min",{get:p.oneOfGetter(i=["min"]),set:p.oneOfSetter(i)}),Object.defineProperty(l.prototype,"_max",{get:p.oneOfGetter(i=["max"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){if(r||(r=T.create()),t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&r.uint32(17).fixed64(t.startTimeUnixNano),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(25).fixed64(t.timeUnixNano),t.count!=null&&Object.hasOwnProperty.call(t,"count")&&r.uint32(33).fixed64(t.count),t.sum!=null&&Object.hasOwnProperty.call(t,"sum")&&r.uint32(41).double(t.sum),t.bucketCounts!=null&&t.bucketCounts.length){r.uint32(50).fork();for(var a=0;a<t.bucketCounts.length;++a)r.fixed64(t.bucketCounts[a]);r.ldelim()}if(t.explicitBounds!=null&&t.explicitBounds.length){r.uint32(58).fork();for(var a=0;a<t.explicitBounds.length;++a)r.double(t.explicitBounds[a]);r.ldelim()}if(t.exemplars!=null&&t.exemplars.length)for(var a=0;a<t.exemplars.length;++a)f.opentelemetry.proto.metrics.v1.Exemplar.encode(t.exemplars[a],r.uint32(66).fork()).ldelim();if(t.attributes!=null&&t.attributes.length)for(var a=0;a<t.attributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[a],r.uint32(74).fork()).ldelim();return t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&r.uint32(80).uint32(t.flags),t.min!=null&&Object.hasOwnProperty.call(t,"min")&&r.uint32(89).double(t.min),t.max!=null&&Object.hasOwnProperty.call(t,"max")&&r.uint32(97).double(t.max),r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.HistogramDataPoint;t.pos<a;){var d=t.uint32();switch(d>>>3){case 9:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(f.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:{if(s.bucketCounts&&s.bucketCounts.length||(s.bucketCounts=[]),(d&7)===2)for(var v=t.uint32()+t.pos;t.pos<v;)s.bucketCounts.push(t.fixed64());else s.bucketCounts.push(t.fixed64());break}case 7:{if(s.explicitBounds&&s.explicitBounds.length||(s.explicitBounds=[]),(d&7)===2)for(var v=t.uint32()+t.pos;t.pos<v;)s.explicitBounds.push(t.double());else s.explicitBounds.push(t.double());break}case 8:{s.exemplars&&s.exemplars.length||(s.exemplars=[]),s.exemplars.push(f.opentelemetry.proto.metrics.v1.Exemplar.decode(t,t.uint32()));break}case 10:{s.flags=t.uint32();break}case 11:{s.min=t.double();break}case 12:{s.max=t.double();break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var a=0;a<t.attributes.length;++a){var s=f.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[a]);if(s)return"attributes."+s}}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!p.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&p.isInteger(t.startTimeUnixNano.low)&&p.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!p.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&p.isInteger(t.timeUnixNano.low)&&p.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.count!=null&&t.hasOwnProperty("count")&&!p.isInteger(t.count)&&!(t.count&&p.isInteger(t.count.low)&&p.isInteger(t.count.high)))return"count: integer|Long expected";if(t.sum!=null&&t.hasOwnProperty("sum")&&(r._sum=1,typeof t.sum!="number"))return"sum: number expected";if(t.bucketCounts!=null&&t.hasOwnProperty("bucketCounts")){if(!Array.isArray(t.bucketCounts))return"bucketCounts: array expected";for(var a=0;a<t.bucketCounts.length;++a)if(!p.isInteger(t.bucketCounts[a])&&!(t.bucketCounts[a]&&p.isInteger(t.bucketCounts[a].low)&&p.isInteger(t.bucketCounts[a].high)))return"bucketCounts: integer|Long[] expected"}if(t.explicitBounds!=null&&t.hasOwnProperty("explicitBounds")){if(!Array.isArray(t.explicitBounds))return"explicitBounds: array expected";for(var a=0;a<t.explicitBounds.length;++a)if(typeof t.explicitBounds[a]!="number")return"explicitBounds: number[] expected"}if(t.exemplars!=null&&t.hasOwnProperty("exemplars")){if(!Array.isArray(t.exemplars))return"exemplars: array expected";for(var a=0;a<t.exemplars.length;++a){var s=f.opentelemetry.proto.metrics.v1.Exemplar.verify(t.exemplars[a]);if(s)return"exemplars."+s}}return t.flags!=null&&t.hasOwnProperty("flags")&&!p.isInteger(t.flags)?"flags: integer expected":t.min!=null&&t.hasOwnProperty("min")&&(r._min=1,typeof t.min!="number")?"min: number expected":t.max!=null&&t.hasOwnProperty("max")&&(r._max=1,typeof t.max!="number")?"max: number expected":null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.HistogramDataPoint)return t;var r=new f.opentelemetry.proto.metrics.v1.HistogramDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: array expected");r.attributes=[];for(var a=0;a<t.attributes.length;++a){if(typeof t.attributes[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected");r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[a])}}if(t.startTimeUnixNano!=null&&(p.Long?(r.startTimeUnixNano=p.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?r.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?r.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(r.startTimeUnixNano=new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.timeUnixNano!=null&&(p.Long?(r.timeUnixNano=p.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.count!=null&&(p.Long?(r.count=p.Long.fromValue(t.count)).unsigned=!1:typeof t.count=="string"?r.count=parseInt(t.count,10):typeof t.count=="number"?r.count=t.count:typeof t.count=="object"&&(r.count=new p.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber())),t.sum!=null&&(r.sum=Number(t.sum)),t.bucketCounts){if(!Array.isArray(t.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected");r.bucketCounts=[];for(var a=0;a<t.bucketCounts.length;++a)p.Long?(r.bucketCounts[a]=p.Long.fromValue(t.bucketCounts[a])).unsigned=!1:typeof t.bucketCounts[a]=="string"?r.bucketCounts[a]=parseInt(t.bucketCounts[a],10):typeof t.bucketCounts[a]=="number"?r.bucketCounts[a]=t.bucketCounts[a]:typeof t.bucketCounts[a]=="object"&&(r.bucketCounts[a]=new p.LongBits(t.bucketCounts[a].low>>>0,t.bucketCounts[a].high>>>0).toNumber())}if(t.explicitBounds){if(!Array.isArray(t.explicitBounds))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected");r.explicitBounds=[];for(var a=0;a<t.explicitBounds.length;++a)r.explicitBounds[a]=Number(t.explicitBounds[a])}if(t.exemplars){if(!Array.isArray(t.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected");r.exemplars=[];for(var a=0;a<t.exemplars.length;++a){if(typeof t.exemplars[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected");r.exemplars[a]=f.opentelemetry.proto.metrics.v1.Exemplar.fromObject(t.exemplars[a])}}return t.flags!=null&&(r.flags=t.flags>>>0),t.min!=null&&(r.min=Number(t.min)),t.max!=null&&(r.max=Number(t.max)),r},l.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.bucketCounts=[],a.explicitBounds=[],a.exemplars=[],a.attributes=[]),r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.startTimeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.startTimeUnixNano=r.longs===String?"0":0;if(p.Long){var s=new p.Long(0,0,!1);a.timeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.timeUnixNano=r.longs===String?"0":0;if(p.Long){var s=new p.Long(0,0,!1);a.count=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.count=r.longs===String?"0":0;a.flags=0}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?a.startTimeUnixNano=r.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:a.startTimeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.startTimeUnixNano):r.longs===Number?new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?a.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:a.timeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.count!=null&&t.hasOwnProperty("count")&&(typeof t.count=="number"?a.count=r.longs===String?String(t.count):t.count:a.count=r.longs===String?p.Long.prototype.toString.call(t.count):r.longs===Number?new p.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber():t.count),t.sum!=null&&t.hasOwnProperty("sum")&&(a.sum=r.json&&!isFinite(t.sum)?String(t.sum):t.sum,r.oneofs&&(a._sum="sum")),t.bucketCounts&&t.bucketCounts.length){a.bucketCounts=[];for(var d=0;d<t.bucketCounts.length;++d)typeof t.bucketCounts[d]=="number"?a.bucketCounts[d]=r.longs===String?String(t.bucketCounts[d]):t.bucketCounts[d]:a.bucketCounts[d]=r.longs===String?p.Long.prototype.toString.call(t.bucketCounts[d]):r.longs===Number?new p.LongBits(t.bucketCounts[d].low>>>0,t.bucketCounts[d].high>>>0).toNumber():t.bucketCounts[d]}if(t.explicitBounds&&t.explicitBounds.length){a.explicitBounds=[];for(var d=0;d<t.explicitBounds.length;++d)a.explicitBounds[d]=r.json&&!isFinite(t.explicitBounds[d])?String(t.explicitBounds[d]):t.explicitBounds[d]}if(t.exemplars&&t.exemplars.length){a.exemplars=[];for(var d=0;d<t.exemplars.length;++d)a.exemplars[d]=f.opentelemetry.proto.metrics.v1.Exemplar.toObject(t.exemplars[d],r)}if(t.attributes&&t.attributes.length){a.attributes=[];for(var d=0;d<t.attributes.length;++d)a.attributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[d],r)}return t.flags!=null&&t.hasOwnProperty("flags")&&(a.flags=t.flags),t.min!=null&&t.hasOwnProperty("min")&&(a.min=r.json&&!isFinite(t.min)?String(t.min):t.min,r.oneofs&&(a._min="min")),t.max!=null&&t.hasOwnProperty("max")&&(a.max=r.json&&!isFinite(t.max)?String(t.max):t.max,r.oneofs&&(a._max="max")),a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.HistogramDataPoint"},l}(),c.ExponentialHistogramDataPoint=function(){function l(e){if(this.attributes=[],this.exemplars=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.attributes=p.emptyArray,l.prototype.startTimeUnixNano=null,l.prototype.timeUnixNano=null,l.prototype.count=null,l.prototype.sum=null,l.prototype.scale=null,l.prototype.zeroCount=null,l.prototype.positive=null,l.prototype.negative=null,l.prototype.flags=null,l.prototype.exemplars=p.emptyArray,l.prototype.min=null,l.prototype.max=null,l.prototype.zeroThreshold=null;var i;return Object.defineProperty(l.prototype,"_sum",{get:p.oneOfGetter(i=["sum"]),set:p.oneOfSetter(i)}),Object.defineProperty(l.prototype,"_min",{get:p.oneOfGetter(i=["min"]),set:p.oneOfSetter(i)}),Object.defineProperty(l.prototype,"_max",{get:p.oneOfGetter(i=["max"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){if(r||(r=T.create()),t.attributes!=null&&t.attributes.length)for(var a=0;a<t.attributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[a],r.uint32(10).fork()).ldelim();if(t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&r.uint32(17).fixed64(t.startTimeUnixNano),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(25).fixed64(t.timeUnixNano),t.count!=null&&Object.hasOwnProperty.call(t,"count")&&r.uint32(33).fixed64(t.count),t.sum!=null&&Object.hasOwnProperty.call(t,"sum")&&r.uint32(41).double(t.sum),t.scale!=null&&Object.hasOwnProperty.call(t,"scale")&&r.uint32(48).sint32(t.scale),t.zeroCount!=null&&Object.hasOwnProperty.call(t,"zeroCount")&&r.uint32(57).fixed64(t.zeroCount),t.positive!=null&&Object.hasOwnProperty.call(t,"positive")&&f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(t.positive,r.uint32(66).fork()).ldelim(),t.negative!=null&&Object.hasOwnProperty.call(t,"negative")&&f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(t.negative,r.uint32(74).fork()).ldelim(),t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&r.uint32(80).uint32(t.flags),t.exemplars!=null&&t.exemplars.length)for(var a=0;a<t.exemplars.length;++a)f.opentelemetry.proto.metrics.v1.Exemplar.encode(t.exemplars[a],r.uint32(90).fork()).ldelim();return t.min!=null&&Object.hasOwnProperty.call(t,"min")&&r.uint32(97).double(t.min),t.max!=null&&Object.hasOwnProperty.call(t,"max")&&r.uint32(105).double(t.max),t.zeroThreshold!=null&&Object.hasOwnProperty.call(t,"zeroThreshold")&&r.uint32(113).double(t.zeroThreshold),r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(f.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.scale=t.sint32();break}case 7:{s.zeroCount=t.fixed64();break}case 8:{s.positive=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(t,t.uint32());break}case 9:{s.negative=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(t,t.uint32());break}case 10:{s.flags=t.uint32();break}case 11:{s.exemplars&&s.exemplars.length||(s.exemplars=[]),s.exemplars.push(f.opentelemetry.proto.metrics.v1.Exemplar.decode(t,t.uint32()));break}case 12:{s.min=t.double();break}case 13:{s.max=t.double();break}case 14:{s.zeroThreshold=t.double();break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var a=0;a<t.attributes.length;++a){var s=f.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[a]);if(s)return"attributes."+s}}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!p.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&p.isInteger(t.startTimeUnixNano.low)&&p.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!p.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&p.isInteger(t.timeUnixNano.low)&&p.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.count!=null&&t.hasOwnProperty("count")&&!p.isInteger(t.count)&&!(t.count&&p.isInteger(t.count.low)&&p.isInteger(t.count.high)))return"count: integer|Long expected";if(t.sum!=null&&t.hasOwnProperty("sum")&&(r._sum=1,typeof t.sum!="number"))return"sum: number expected";if(t.scale!=null&&t.hasOwnProperty("scale")&&!p.isInteger(t.scale))return"scale: integer expected";if(t.zeroCount!=null&&t.hasOwnProperty("zeroCount")&&!p.isInteger(t.zeroCount)&&!(t.zeroCount&&p.isInteger(t.zeroCount.low)&&p.isInteger(t.zeroCount.high)))return"zeroCount: integer|Long expected";if(t.positive!=null&&t.hasOwnProperty("positive")){var s=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(t.positive);if(s)return"positive."+s}if(t.negative!=null&&t.hasOwnProperty("negative")){var s=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(t.negative);if(s)return"negative."+s}if(t.flags!=null&&t.hasOwnProperty("flags")&&!p.isInteger(t.flags))return"flags: integer expected";if(t.exemplars!=null&&t.hasOwnProperty("exemplars")){if(!Array.isArray(t.exemplars))return"exemplars: array expected";for(var a=0;a<t.exemplars.length;++a){var s=f.opentelemetry.proto.metrics.v1.Exemplar.verify(t.exemplars[a]);if(s)return"exemplars."+s}}return t.min!=null&&t.hasOwnProperty("min")&&(r._min=1,typeof t.min!="number")?"min: number expected":t.max!=null&&t.hasOwnProperty("max")&&(r._max=1,typeof t.max!="number")?"max: number expected":t.zeroThreshold!=null&&t.hasOwnProperty("zeroThreshold")&&typeof t.zeroThreshold!="number"?"zeroThreshold: number expected":null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint)return t;var r=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: array expected");r.attributes=[];for(var a=0;a<t.attributes.length;++a){if(typeof t.attributes[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected");r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[a])}}if(t.startTimeUnixNano!=null&&(p.Long?(r.startTimeUnixNano=p.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?r.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?r.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(r.startTimeUnixNano=new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.timeUnixNano!=null&&(p.Long?(r.timeUnixNano=p.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.count!=null&&(p.Long?(r.count=p.Long.fromValue(t.count)).unsigned=!1:typeof t.count=="string"?r.count=parseInt(t.count,10):typeof t.count=="number"?r.count=t.count:typeof t.count=="object"&&(r.count=new p.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber())),t.sum!=null&&(r.sum=Number(t.sum)),t.scale!=null&&(r.scale=t.scale|0),t.zeroCount!=null&&(p.Long?(r.zeroCount=p.Long.fromValue(t.zeroCount)).unsigned=!1:typeof t.zeroCount=="string"?r.zeroCount=parseInt(t.zeroCount,10):typeof t.zeroCount=="number"?r.zeroCount=t.zeroCount:typeof t.zeroCount=="object"&&(r.zeroCount=new p.LongBits(t.zeroCount.low>>>0,t.zeroCount.high>>>0).toNumber())),t.positive!=null){if(typeof t.positive!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected");r.positive=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(t.positive)}if(t.negative!=null){if(typeof t.negative!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected");r.negative=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(t.negative)}if(t.flags!=null&&(r.flags=t.flags>>>0),t.exemplars){if(!Array.isArray(t.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected");r.exemplars=[];for(var a=0;a<t.exemplars.length;++a){if(typeof t.exemplars[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected");r.exemplars[a]=f.opentelemetry.proto.metrics.v1.Exemplar.fromObject(t.exemplars[a])}}return t.min!=null&&(r.min=Number(t.min)),t.max!=null&&(r.max=Number(t.max)),t.zeroThreshold!=null&&(r.zeroThreshold=Number(t.zeroThreshold)),r},l.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.attributes=[],a.exemplars=[]),r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.startTimeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.startTimeUnixNano=r.longs===String?"0":0;if(p.Long){var s=new p.Long(0,0,!1);a.timeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.timeUnixNano=r.longs===String?"0":0;if(p.Long){var s=new p.Long(0,0,!1);a.count=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.count=r.longs===String?"0":0;if(a.scale=0,p.Long){var s=new p.Long(0,0,!1);a.zeroCount=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.zeroCount=r.longs===String?"0":0;a.positive=null,a.negative=null,a.flags=0,a.zeroThreshold=0}if(t.attributes&&t.attributes.length){a.attributes=[];for(var d=0;d<t.attributes.length;++d)a.attributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[d],r)}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?a.startTimeUnixNano=r.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:a.startTimeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.startTimeUnixNano):r.longs===Number?new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?a.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:a.timeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.count!=null&&t.hasOwnProperty("count")&&(typeof t.count=="number"?a.count=r.longs===String?String(t.count):t.count:a.count=r.longs===String?p.Long.prototype.toString.call(t.count):r.longs===Number?new p.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber():t.count),t.sum!=null&&t.hasOwnProperty("sum")&&(a.sum=r.json&&!isFinite(t.sum)?String(t.sum):t.sum,r.oneofs&&(a._sum="sum")),t.scale!=null&&t.hasOwnProperty("scale")&&(a.scale=t.scale),t.zeroCount!=null&&t.hasOwnProperty("zeroCount")&&(typeof t.zeroCount=="number"?a.zeroCount=r.longs===String?String(t.zeroCount):t.zeroCount:a.zeroCount=r.longs===String?p.Long.prototype.toString.call(t.zeroCount):r.longs===Number?new p.LongBits(t.zeroCount.low>>>0,t.zeroCount.high>>>0).toNumber():t.zeroCount),t.positive!=null&&t.hasOwnProperty("positive")&&(a.positive=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(t.positive,r)),t.negative!=null&&t.hasOwnProperty("negative")&&(a.negative=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(t.negative,r)),t.flags!=null&&t.hasOwnProperty("flags")&&(a.flags=t.flags),t.exemplars&&t.exemplars.length){a.exemplars=[];for(var d=0;d<t.exemplars.length;++d)a.exemplars[d]=f.opentelemetry.proto.metrics.v1.Exemplar.toObject(t.exemplars[d],r)}return t.min!=null&&t.hasOwnProperty("min")&&(a.min=r.json&&!isFinite(t.min)?String(t.min):t.min,r.oneofs&&(a._min="min")),t.max!=null&&t.hasOwnProperty("max")&&(a.max=r.json&&!isFinite(t.max)?String(t.max):t.max,r.oneofs&&(a._max="max")),t.zeroThreshold!=null&&t.hasOwnProperty("zeroThreshold")&&(a.zeroThreshold=r.json&&!isFinite(t.zeroThreshold)?String(t.zeroThreshold):t.zeroThreshold),a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"},l.Buckets=function(){function e(t){if(this.bucketCounts=[],t)for(var r=Object.keys(t),a=0;a<r.length;++a)t[r[a]]!=null&&(this[r[a]]=t[r[a]])}return e.prototype.offset=null,e.prototype.bucketCounts=p.emptyArray,e.create=function(r){return new e(r)},e.encode=function(r,a){if(a||(a=T.create()),r.offset!=null&&Object.hasOwnProperty.call(r,"offset")&&a.uint32(8).sint32(r.offset),r.bucketCounts!=null&&r.bucketCounts.length){a.uint32(18).fork();for(var s=0;s<r.bucketCounts.length;++s)a.uint64(r.bucketCounts[s]);a.ldelim()}return a},e.encodeDelimited=function(r,a){return this.encode(r,a).ldelim()},e.decode=function(r,a){r instanceof h||(r=h.create(r));for(var s=a===void 0?r.len:r.pos+a,d=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;r.pos<s;){var v=r.uint32();switch(v>>>3){case 1:{d.offset=r.sint32();break}case 2:{if(d.bucketCounts&&d.bucketCounts.length||(d.bucketCounts=[]),(v&7)===2)for(var b=r.uint32()+r.pos;r.pos<b;)d.bucketCounts.push(r.uint64());else d.bucketCounts.push(r.uint64());break}default:r.skipType(v&7);break}}return d},e.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},e.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.offset!=null&&r.hasOwnProperty("offset")&&!p.isInteger(r.offset))return"offset: integer expected";if(r.bucketCounts!=null&&r.hasOwnProperty("bucketCounts")){if(!Array.isArray(r.bucketCounts))return"bucketCounts: array expected";for(var a=0;a<r.bucketCounts.length;++a)if(!p.isInteger(r.bucketCounts[a])&&!(r.bucketCounts[a]&&p.isInteger(r.bucketCounts[a].low)&&p.isInteger(r.bucketCounts[a].high)))return"bucketCounts: integer|Long[] expected"}return null},e.fromObject=function(r){if(r instanceof f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets)return r;var a=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;if(r.offset!=null&&(a.offset=r.offset|0),r.bucketCounts){if(!Array.isArray(r.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected");a.bucketCounts=[];for(var s=0;s<r.bucketCounts.length;++s)p.Long?(a.bucketCounts[s]=p.Long.fromValue(r.bucketCounts[s])).unsigned=!0:typeof r.bucketCounts[s]=="string"?a.bucketCounts[s]=parseInt(r.bucketCounts[s],10):typeof r.bucketCounts[s]=="number"?a.bucketCounts[s]=r.bucketCounts[s]:typeof r.bucketCounts[s]=="object"&&(a.bucketCounts[s]=new p.LongBits(r.bucketCounts[s].low>>>0,r.bucketCounts[s].high>>>0).toNumber(!0))}return a},e.toObject=function(r,a){a||(a={});var s={};if((a.arrays||a.defaults)&&(s.bucketCounts=[]),a.defaults&&(s.offset=0),r.offset!=null&&r.hasOwnProperty("offset")&&(s.offset=r.offset),r.bucketCounts&&r.bucketCounts.length){s.bucketCounts=[];for(var d=0;d<r.bucketCounts.length;++d)typeof r.bucketCounts[d]=="number"?s.bucketCounts[d]=a.longs===String?String(r.bucketCounts[d]):r.bucketCounts[d]:s.bucketCounts[d]=a.longs===String?p.Long.prototype.toString.call(r.bucketCounts[d]):a.longs===Number?new p.LongBits(r.bucketCounts[d].low>>>0,r.bucketCounts[d].high>>>0).toNumber(!0):r.bucketCounts[d]}return s},e.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},e.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},e}(),l}(),c.SummaryDataPoint=function(){function l(i){if(this.attributes=[],this.quantileValues=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.attributes=p.emptyArray,l.prototype.startTimeUnixNano=null,l.prototype.timeUnixNano=null,l.prototype.count=null,l.prototype.sum=null,l.prototype.quantileValues=p.emptyArray,l.prototype.flags=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&t.uint32(17).fixed64(e.startTimeUnixNano),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&t.uint32(25).fixed64(e.timeUnixNano),e.count!=null&&Object.hasOwnProperty.call(e,"count")&&t.uint32(33).fixed64(e.count),e.sum!=null&&Object.hasOwnProperty.call(e,"sum")&&t.uint32(41).double(e.sum),e.quantileValues!=null&&e.quantileValues.length)for(var r=0;r<e.quantileValues.length;++r)f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.encode(e.quantileValues[r],t.uint32(50).fork()).ldelim();if(e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(58).fork()).ldelim();return e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&t.uint32(64).uint32(e.flags),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint;e.pos<r;){var s=e.uint32();switch(s>>>3){case 7:{a.attributes&&a.attributes.length||(a.attributes=[]),a.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{a.startTimeUnixNano=e.fixed64();break}case 3:{a.timeUnixNano=e.fixed64();break}case 4:{a.count=e.fixed64();break}case 5:{a.sum=e.double();break}case 6:{a.quantileValues&&a.quantileValues.length||(a.quantileValues=[]),a.quantileValues.push(f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(e,e.uint32()));break}case 8:{a.flags=e.uint32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var r=f.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(r)return"attributes."+r}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!p.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&p.isInteger(e.startTimeUnixNano.low)&&p.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!p.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&p.isInteger(e.timeUnixNano.low)&&p.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.count!=null&&e.hasOwnProperty("count")&&!p.isInteger(e.count)&&!(e.count&&p.isInteger(e.count.low)&&p.isInteger(e.count.high)))return"count: integer|Long expected";if(e.sum!=null&&e.hasOwnProperty("sum")&&typeof e.sum!="number")return"sum: number expected";if(e.quantileValues!=null&&e.hasOwnProperty("quantileValues")){if(!Array.isArray(e.quantileValues))return"quantileValues: array expected";for(var t=0;t<e.quantileValues.length;++t){var r=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify(e.quantileValues[t]);if(r)return"quantileValues."+r}}return e.flags!=null&&e.hasOwnProperty("flags")&&!p.isInteger(e.flags)?"flags: integer expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.SummaryDataPoint)return e;var t=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: object expected");t.attributes[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}if(e.startTimeUnixNano!=null&&(p.Long?(t.startTimeUnixNano=p.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?t.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?t.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(t.startTimeUnixNano=new p.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.timeUnixNano!=null&&(p.Long?(t.timeUnixNano=p.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?t.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?t.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(t.timeUnixNano=new p.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.count!=null&&(p.Long?(t.count=p.Long.fromValue(e.count)).unsigned=!1:typeof e.count=="string"?t.count=parseInt(e.count,10):typeof e.count=="number"?t.count=e.count:typeof e.count=="object"&&(t.count=new p.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber())),e.sum!=null&&(t.sum=Number(e.sum)),e.quantileValues){if(!Array.isArray(e.quantileValues))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected");t.quantileValues=[];for(var r=0;r<e.quantileValues.length;++r){if(typeof e.quantileValues[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: object expected");t.quantileValues[r]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.fromObject(e.quantileValues[r])}}return e.flags!=null&&(t.flags=e.flags>>>0),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.quantileValues=[],r.attributes=[]),t.defaults){if(p.Long){var a=new p.Long(0,0,!1);r.startTimeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.startTimeUnixNano=t.longs===String?"0":0;if(p.Long){var a=new p.Long(0,0,!1);r.timeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.timeUnixNano=t.longs===String?"0":0;if(p.Long){var a=new p.Long(0,0,!1);r.count=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.count=t.longs===String?"0":0;r.sum=0,r.flags=0}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?r.startTimeUnixNano=t.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:r.startTimeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.startTimeUnixNano):t.longs===Number?new p.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?r.timeUnixNano=t.longs===String?String(e.timeUnixNano):e.timeUnixNano:r.timeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.timeUnixNano):t.longs===Number?new p.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.count!=null&&e.hasOwnProperty("count")&&(typeof e.count=="number"?r.count=t.longs===String?String(e.count):e.count:r.count=t.longs===String?p.Long.prototype.toString.call(e.count):t.longs===Number?new p.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count),e.sum!=null&&e.hasOwnProperty("sum")&&(r.sum=t.json&&!isFinite(e.sum)?String(e.sum):e.sum),e.quantileValues&&e.quantileValues.length){r.quantileValues=[];for(var s=0;s<e.quantileValues.length;++s)r.quantileValues[s]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(e.quantileValues[s],t)}if(e.attributes&&e.attributes.length){r.attributes=[];for(var s=0;s<e.attributes.length;++s)r.attributes[s]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[s],t)}return e.flags!=null&&e.hasOwnProperty("flags")&&(r.flags=e.flags),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.SummaryDataPoint"},l.ValueAtQuantile=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.quantile=null,i.prototype.value=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.quantile!=null&&Object.hasOwnProperty.call(t,"quantile")&&r.uint32(9).double(t.quantile),t.value!=null&&Object.hasOwnProperty.call(t,"value")&&r.uint32(17).double(t.value),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.quantile=t.double();break}case 2:{s.value=t.double();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){return typeof t!="object"||t===null?"object expected":t.quantile!=null&&t.hasOwnProperty("quantile")&&typeof t.quantile!="number"?"quantile: number expected":t.value!=null&&t.hasOwnProperty("value")&&typeof t.value!="number"?"value: number expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return t;var r=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;return t.quantile!=null&&(r.quantile=Number(t.quantile)),t.value!=null&&(r.value=Number(t.value)),r},i.toObject=function(t,r){r||(r={});var a={};return r.defaults&&(a.quantile=0,a.value=0),t.quantile!=null&&t.hasOwnProperty("quantile")&&(a.quantile=r.json&&!isFinite(t.quantile)?String(t.quantile):t.quantile),t.value!=null&&t.hasOwnProperty("value")&&(a.value=r.json&&!isFinite(t.value)?String(t.value):t.value),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},i}(),l}(),c.Exemplar=function(){function l(e){if(this.filteredAttributes=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.filteredAttributes=p.emptyArray,l.prototype.timeUnixNano=null,l.prototype.asDouble=null,l.prototype.asInt=null,l.prototype.spanId=null,l.prototype.traceId=null;var i;return Object.defineProperty(l.prototype,"value",{get:p.oneOfGetter(i=["asDouble","asInt"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){if(r||(r=T.create()),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(17).fixed64(t.timeUnixNano),t.asDouble!=null&&Object.hasOwnProperty.call(t,"asDouble")&&r.uint32(25).double(t.asDouble),t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId")&&r.uint32(34).bytes(t.spanId),t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId")&&r.uint32(42).bytes(t.traceId),t.asInt!=null&&Object.hasOwnProperty.call(t,"asInt")&&r.uint32(49).sfixed64(t.asInt),t.filteredAttributes!=null&&t.filteredAttributes.length)for(var a=0;a<t.filteredAttributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.filteredAttributes[a],r.uint32(58).fork()).ldelim();return r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.Exemplar;t.pos<a;){var d=t.uint32();switch(d>>>3){case 7:{s.filteredAttributes&&s.filteredAttributes.length||(s.filteredAttributes=[]),s.filteredAttributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{s.timeUnixNano=t.fixed64();break}case 3:{s.asDouble=t.double();break}case 6:{s.asInt=t.sfixed64();break}case 4:{s.spanId=t.bytes();break}case 5:{s.traceId=t.bytes();break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.filteredAttributes!=null&&t.hasOwnProperty("filteredAttributes")){if(!Array.isArray(t.filteredAttributes))return"filteredAttributes: array expected";for(var a=0;a<t.filteredAttributes.length;++a){var s=f.opentelemetry.proto.common.v1.KeyValue.verify(t.filteredAttributes[a]);if(s)return"filteredAttributes."+s}}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!p.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&p.isInteger(t.timeUnixNano.low)&&p.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.asDouble!=null&&t.hasOwnProperty("asDouble")&&(r.value=1,typeof t.asDouble!="number"))return"asDouble: number expected";if(t.asInt!=null&&t.hasOwnProperty("asInt")){if(r.value===1)return"value: multiple values";if(r.value=1,!p.isInteger(t.asInt)&&!(t.asInt&&p.isInteger(t.asInt.low)&&p.isInteger(t.asInt.high)))return"asInt: integer|Long expected"}return t.spanId!=null&&t.hasOwnProperty("spanId")&&!(t.spanId&&typeof t.spanId.length=="number"||p.isString(t.spanId))?"spanId: buffer expected":t.traceId!=null&&t.hasOwnProperty("traceId")&&!(t.traceId&&typeof t.traceId.length=="number"||p.isString(t.traceId))?"traceId: buffer expected":null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.Exemplar)return t;var r=new f.opentelemetry.proto.metrics.v1.Exemplar;if(t.filteredAttributes){if(!Array.isArray(t.filteredAttributes))throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: array expected");r.filteredAttributes=[];for(var a=0;a<t.filteredAttributes.length;++a){if(typeof t.filteredAttributes[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected");r.filteredAttributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.filteredAttributes[a])}}return t.timeUnixNano!=null&&(p.Long?(r.timeUnixNano=p.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.asDouble!=null&&(r.asDouble=Number(t.asDouble)),t.asInt!=null&&(p.Long?(r.asInt=p.Long.fromValue(t.asInt)).unsigned=!1:typeof t.asInt=="string"?r.asInt=parseInt(t.asInt,10):typeof t.asInt=="number"?r.asInt=t.asInt:typeof t.asInt=="object"&&(r.asInt=new p.LongBits(t.asInt.low>>>0,t.asInt.high>>>0).toNumber())),t.spanId!=null&&(typeof t.spanId=="string"?p.base64.decode(t.spanId,r.spanId=p.newBuffer(p.base64.length(t.spanId)),0):t.spanId.length>=0&&(r.spanId=t.spanId)),t.traceId!=null&&(typeof t.traceId=="string"?p.base64.decode(t.traceId,r.traceId=p.newBuffer(p.base64.length(t.traceId)),0):t.traceId.length>=0&&(r.traceId=t.traceId)),r},l.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.filteredAttributes=[]),r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.timeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.timeUnixNano=r.longs===String?"0":0;r.bytes===String?a.spanId="":(a.spanId=[],r.bytes!==Array&&(a.spanId=p.newBuffer(a.spanId))),r.bytes===String?a.traceId="":(a.traceId=[],r.bytes!==Array&&(a.traceId=p.newBuffer(a.traceId)))}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?a.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:a.timeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.asDouble!=null&&t.hasOwnProperty("asDouble")&&(a.asDouble=r.json&&!isFinite(t.asDouble)?String(t.asDouble):t.asDouble,r.oneofs&&(a.value="asDouble")),t.spanId!=null&&t.hasOwnProperty("spanId")&&(a.spanId=r.bytes===String?p.base64.encode(t.spanId,0,t.spanId.length):r.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId),t.traceId!=null&&t.hasOwnProperty("traceId")&&(a.traceId=r.bytes===String?p.base64.encode(t.traceId,0,t.traceId.length):r.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId),t.asInt!=null&&t.hasOwnProperty("asInt")&&(typeof t.asInt=="number"?a.asInt=r.longs===String?String(t.asInt):t.asInt:a.asInt=r.longs===String?p.Long.prototype.toString.call(t.asInt):r.longs===Number?new p.LongBits(t.asInt.low>>>0,t.asInt.high>>>0).toNumber():t.asInt,r.oneofs&&(a.value="asInt")),t.filteredAttributes&&t.filteredAttributes.length){a.filteredAttributes=[];for(var d=0;d<t.filteredAttributes.length;++d)a.filteredAttributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.filteredAttributes[d],r)}return a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Exemplar"},l}(),c}(),o}(),n.logs=function(){var o={};return o.v1=function(){var c={};return c.LogsData=function(){function l(i){if(this.resourceLogs=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resourceLogs=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resourceLogs!=null&&e.resourceLogs.length)for(var r=0;r<e.resourceLogs.length;++r)f.opentelemetry.proto.logs.v1.ResourceLogs.encode(e.resourceLogs[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.logs.v1.LogsData;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resourceLogs&&a.resourceLogs.length||(a.resourceLogs=[]),a.resourceLogs.push(f.opentelemetry.proto.logs.v1.ResourceLogs.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.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 t=0;t<e.resourceLogs.length;++t){var r=f.opentelemetry.proto.logs.v1.ResourceLogs.verify(e.resourceLogs[t]);if(r)return"resourceLogs."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.logs.v1.LogsData)return e;var t=new f.opentelemetry.proto.logs.v1.LogsData;if(e.resourceLogs){if(!Array.isArray(e.resourceLogs))throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: array expected");t.resourceLogs=[];for(var r=0;r<e.resourceLogs.length;++r){if(typeof e.resourceLogs[r]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: object expected");t.resourceLogs[r]=f.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(e.resourceLogs[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.resourceLogs=[]),e.resourceLogs&&e.resourceLogs.length){r.resourceLogs=[];for(var a=0;a<e.resourceLogs.length;++a)r.resourceLogs[a]=f.opentelemetry.proto.logs.v1.ResourceLogs.toObject(e.resourceLogs[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.LogsData"},l}(),c.ResourceLogs=function(){function l(i){if(this.scopeLogs=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resource=null,l.prototype.scopeLogs=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resource!=null&&Object.hasOwnProperty.call(e,"resource")&&f.opentelemetry.proto.resource.v1.Resource.encode(e.resource,t.uint32(10).fork()).ldelim(),e.scopeLogs!=null&&e.scopeLogs.length)for(var r=0;r<e.scopeLogs.length;++r)f.opentelemetry.proto.logs.v1.ScopeLogs.encode(e.scopeLogs[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.logs.v1.ResourceLogs;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resource=f.opentelemetry.proto.resource.v1.Resource.decode(e,e.uint32());break}case 2:{a.scopeLogs&&a.scopeLogs.length||(a.scopeLogs=[]),a.scopeLogs.push(f.opentelemetry.proto.logs.v1.ScopeLogs.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resource!=null&&e.hasOwnProperty("resource")){var t=f.opentelemetry.proto.resource.v1.Resource.verify(e.resource);if(t)return"resource."+t}if(e.scopeLogs!=null&&e.hasOwnProperty("scopeLogs")){if(!Array.isArray(e.scopeLogs))return"scopeLogs: array expected";for(var r=0;r<e.scopeLogs.length;++r){var t=f.opentelemetry.proto.logs.v1.ScopeLogs.verify(e.scopeLogs[r]);if(t)return"scopeLogs."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.logs.v1.ResourceLogs)return e;var t=new f.opentelemetry.proto.logs.v1.ResourceLogs;if(e.resource!=null){if(typeof e.resource!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.resource: object expected");t.resource=f.opentelemetry.proto.resource.v1.Resource.fromObject(e.resource)}if(e.scopeLogs){if(!Array.isArray(e.scopeLogs))throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: array expected");t.scopeLogs=[];for(var r=0;r<e.scopeLogs.length;++r){if(typeof e.scopeLogs[r]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: object expected");t.scopeLogs[r]=f.opentelemetry.proto.logs.v1.ScopeLogs.fromObject(e.scopeLogs[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.scopeLogs=[]),t.defaults&&(r.resource=null,r.schemaUrl=""),e.resource!=null&&e.hasOwnProperty("resource")&&(r.resource=f.opentelemetry.proto.resource.v1.Resource.toObject(e.resource,t)),e.scopeLogs&&e.scopeLogs.length){r.scopeLogs=[];for(var a=0;a<e.scopeLogs.length;++a)r.scopeLogs[a]=f.opentelemetry.proto.logs.v1.ScopeLogs.toObject(e.scopeLogs[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.ResourceLogs"},l}(),c.ScopeLogs=function(){function l(i){if(this.logRecords=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.scope=null,l.prototype.logRecords=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.scope!=null&&Object.hasOwnProperty.call(e,"scope")&&f.opentelemetry.proto.common.v1.InstrumentationScope.encode(e.scope,t.uint32(10).fork()).ldelim(),e.logRecords!=null&&e.logRecords.length)for(var r=0;r<e.logRecords.length;++r)f.opentelemetry.proto.logs.v1.LogRecord.encode(e.logRecords[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.logs.v1.ScopeLogs;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.decode(e,e.uint32());break}case 2:{a.logRecords&&a.logRecords.length||(a.logRecords=[]),a.logRecords.push(f.opentelemetry.proto.logs.v1.LogRecord.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.scope!=null&&e.hasOwnProperty("scope")){var t=f.opentelemetry.proto.common.v1.InstrumentationScope.verify(e.scope);if(t)return"scope."+t}if(e.logRecords!=null&&e.hasOwnProperty("logRecords")){if(!Array.isArray(e.logRecords))return"logRecords: array expected";for(var r=0;r<e.logRecords.length;++r){var t=f.opentelemetry.proto.logs.v1.LogRecord.verify(e.logRecords[r]);if(t)return"logRecords."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.logs.v1.ScopeLogs)return e;var t=new f.opentelemetry.proto.logs.v1.ScopeLogs;if(e.scope!=null){if(typeof e.scope!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.scope: object expected");t.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(e.scope)}if(e.logRecords){if(!Array.isArray(e.logRecords))throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: array expected");t.logRecords=[];for(var r=0;r<e.logRecords.length;++r){if(typeof e.logRecords[r]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: object expected");t.logRecords[r]=f.opentelemetry.proto.logs.v1.LogRecord.fromObject(e.logRecords[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.logRecords=[]),t.defaults&&(r.scope=null,r.schemaUrl=""),e.scope!=null&&e.hasOwnProperty("scope")&&(r.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.toObject(e.scope,t)),e.logRecords&&e.logRecords.length){r.logRecords=[];for(var a=0;a<e.logRecords.length;++a)r.logRecords[a]=f.opentelemetry.proto.logs.v1.LogRecord.toObject(e.logRecords[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.ScopeLogs"},l}(),c.SeverityNumber=function(){var l={},i=Object.create(l);return i[l[0]="SEVERITY_NUMBER_UNSPECIFIED"]=0,i[l[1]="SEVERITY_NUMBER_TRACE"]=1,i[l[2]="SEVERITY_NUMBER_TRACE2"]=2,i[l[3]="SEVERITY_NUMBER_TRACE3"]=3,i[l[4]="SEVERITY_NUMBER_TRACE4"]=4,i[l[5]="SEVERITY_NUMBER_DEBUG"]=5,i[l[6]="SEVERITY_NUMBER_DEBUG2"]=6,i[l[7]="SEVERITY_NUMBER_DEBUG3"]=7,i[l[8]="SEVERITY_NUMBER_DEBUG4"]=8,i[l[9]="SEVERITY_NUMBER_INFO"]=9,i[l[10]="SEVERITY_NUMBER_INFO2"]=10,i[l[11]="SEVERITY_NUMBER_INFO3"]=11,i[l[12]="SEVERITY_NUMBER_INFO4"]=12,i[l[13]="SEVERITY_NUMBER_WARN"]=13,i[l[14]="SEVERITY_NUMBER_WARN2"]=14,i[l[15]="SEVERITY_NUMBER_WARN3"]=15,i[l[16]="SEVERITY_NUMBER_WARN4"]=16,i[l[17]="SEVERITY_NUMBER_ERROR"]=17,i[l[18]="SEVERITY_NUMBER_ERROR2"]=18,i[l[19]="SEVERITY_NUMBER_ERROR3"]=19,i[l[20]="SEVERITY_NUMBER_ERROR4"]=20,i[l[21]="SEVERITY_NUMBER_FATAL"]=21,i[l[22]="SEVERITY_NUMBER_FATAL2"]=22,i[l[23]="SEVERITY_NUMBER_FATAL3"]=23,i[l[24]="SEVERITY_NUMBER_FATAL4"]=24,i}(),c.LogRecordFlags=function(){var l={},i=Object.create(l);return i[l[0]="LOG_RECORD_FLAGS_DO_NOT_USE"]=0,i[l[255]="LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"]=255,i}(),c.LogRecord=function(){function l(i){if(this.attributes=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.timeUnixNano=null,l.prototype.observedTimeUnixNano=null,l.prototype.severityNumber=null,l.prototype.severityText=null,l.prototype.body=null,l.prototype.attributes=p.emptyArray,l.prototype.droppedAttributesCount=null,l.prototype.flags=null,l.prototype.traceId=null,l.prototype.spanId=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&t.uint32(9).fixed64(e.timeUnixNano),e.severityNumber!=null&&Object.hasOwnProperty.call(e,"severityNumber")&&t.uint32(16).int32(e.severityNumber),e.severityText!=null&&Object.hasOwnProperty.call(e,"severityText")&&t.uint32(26).string(e.severityText),e.body!=null&&Object.hasOwnProperty.call(e,"body")&&f.opentelemetry.proto.common.v1.AnyValue.encode(e.body,t.uint32(42).fork()).ldelim(),e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(50).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(56).uint32(e.droppedAttributesCount),e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&t.uint32(69).fixed32(e.flags),e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId")&&t.uint32(74).bytes(e.traceId),e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId")&&t.uint32(82).bytes(e.spanId),e.observedTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"observedTimeUnixNano")&&t.uint32(89).fixed64(e.observedTimeUnixNano),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.logs.v1.LogRecord;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.timeUnixNano=e.fixed64();break}case 11:{a.observedTimeUnixNano=e.fixed64();break}case 2:{a.severityNumber=e.int32();break}case 3:{a.severityText=e.string();break}case 5:{a.body=f.opentelemetry.proto.common.v1.AnyValue.decode(e,e.uint32());break}case 6:{a.attributes&&a.attributes.length||(a.attributes=[]),a.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 7:{a.droppedAttributesCount=e.uint32();break}case 8:{a.flags=e.fixed32();break}case 9:{a.traceId=e.bytes();break}case 10:{a.spanId=e.bytes();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!p.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&p.isInteger(e.timeUnixNano.low)&&p.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.observedTimeUnixNano!=null&&e.hasOwnProperty("observedTimeUnixNano")&&!p.isInteger(e.observedTimeUnixNano)&&!(e.observedTimeUnixNano&&p.isInteger(e.observedTimeUnixNano.low)&&p.isInteger(e.observedTimeUnixNano.high)))return"observedTimeUnixNano: integer|Long expected";if(e.severityNumber!=null&&e.hasOwnProperty("severityNumber"))switch(e.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(e.severityText!=null&&e.hasOwnProperty("severityText")&&!p.isString(e.severityText))return"severityText: string expected";if(e.body!=null&&e.hasOwnProperty("body")){var t=f.opentelemetry.proto.common.v1.AnyValue.verify(e.body);if(t)return"body."+t}if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var r=0;r<e.attributes.length;++r){var t=f.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[r]);if(t)return"attributes."+t}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":e.flags!=null&&e.hasOwnProperty("flags")&&!p.isInteger(e.flags)?"flags: integer expected":e.traceId!=null&&e.hasOwnProperty("traceId")&&!(e.traceId&&typeof e.traceId.length=="number"||p.isString(e.traceId))?"traceId: buffer expected":e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||p.isString(e.spanId))?"spanId: buffer expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.logs.v1.LogRecord)return e;var t=new f.opentelemetry.proto.logs.v1.LogRecord;switch(e.timeUnixNano!=null&&(p.Long?(t.timeUnixNano=p.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?t.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?t.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(t.timeUnixNano=new p.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.observedTimeUnixNano!=null&&(p.Long?(t.observedTimeUnixNano=p.Long.fromValue(e.observedTimeUnixNano)).unsigned=!1:typeof e.observedTimeUnixNano=="string"?t.observedTimeUnixNano=parseInt(e.observedTimeUnixNano,10):typeof e.observedTimeUnixNano=="number"?t.observedTimeUnixNano=e.observedTimeUnixNano:typeof e.observedTimeUnixNano=="object"&&(t.observedTimeUnixNano=new p.LongBits(e.observedTimeUnixNano.low>>>0,e.observedTimeUnixNano.high>>>0).toNumber())),e.severityNumber){default:if(typeof e.severityNumber=="number"){t.severityNumber=e.severityNumber;break}break;case"SEVERITY_NUMBER_UNSPECIFIED":case 0:t.severityNumber=0;break;case"SEVERITY_NUMBER_TRACE":case 1:t.severityNumber=1;break;case"SEVERITY_NUMBER_TRACE2":case 2:t.severityNumber=2;break;case"SEVERITY_NUMBER_TRACE3":case 3:t.severityNumber=3;break;case"SEVERITY_NUMBER_TRACE4":case 4:t.severityNumber=4;break;case"SEVERITY_NUMBER_DEBUG":case 5:t.severityNumber=5;break;case"SEVERITY_NUMBER_DEBUG2":case 6:t.severityNumber=6;break;case"SEVERITY_NUMBER_DEBUG3":case 7:t.severityNumber=7;break;case"SEVERITY_NUMBER_DEBUG4":case 8:t.severityNumber=8;break;case"SEVERITY_NUMBER_INFO":case 9:t.severityNumber=9;break;case"SEVERITY_NUMBER_INFO2":case 10:t.severityNumber=10;break;case"SEVERITY_NUMBER_INFO3":case 11:t.severityNumber=11;break;case"SEVERITY_NUMBER_INFO4":case 12:t.severityNumber=12;break;case"SEVERITY_NUMBER_WARN":case 13:t.severityNumber=13;break;case"SEVERITY_NUMBER_WARN2":case 14:t.severityNumber=14;break;case"SEVERITY_NUMBER_WARN3":case 15:t.severityNumber=15;break;case"SEVERITY_NUMBER_WARN4":case 16:t.severityNumber=16;break;case"SEVERITY_NUMBER_ERROR":case 17:t.severityNumber=17;break;case"SEVERITY_NUMBER_ERROR2":case 18:t.severityNumber=18;break;case"SEVERITY_NUMBER_ERROR3":case 19:t.severityNumber=19;break;case"SEVERITY_NUMBER_ERROR4":case 20:t.severityNumber=20;break;case"SEVERITY_NUMBER_FATAL":case 21:t.severityNumber=21;break;case"SEVERITY_NUMBER_FATAL2":case 22:t.severityNumber=22;break;case"SEVERITY_NUMBER_FATAL3":case 23:t.severityNumber=23;break;case"SEVERITY_NUMBER_FATAL4":case 24:t.severityNumber=24;break}if(e.severityText!=null&&(t.severityText=String(e.severityText)),e.body!=null){if(typeof e.body!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected");t.body=f.opentelemetry.proto.common.v1.AnyValue.fromObject(e.body)}if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: object expected");t.attributes[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}return e.droppedAttributesCount!=null&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),e.flags!=null&&(t.flags=e.flags>>>0),e.traceId!=null&&(typeof e.traceId=="string"?p.base64.decode(e.traceId,t.traceId=p.newBuffer(p.base64.length(e.traceId)),0):e.traceId.length>=0&&(t.traceId=e.traceId)),e.spanId!=null&&(typeof e.spanId=="string"?p.base64.decode(e.spanId,t.spanId=p.newBuffer(p.base64.length(e.spanId)),0):e.spanId.length>=0&&(t.spanId=e.spanId)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.attributes=[]),t.defaults){if(p.Long){var a=new p.Long(0,0,!1);r.timeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.timeUnixNano=t.longs===String?"0":0;if(r.severityNumber=t.enums===String?"SEVERITY_NUMBER_UNSPECIFIED":0,r.severityText="",r.body=null,r.droppedAttributesCount=0,r.flags=0,t.bytes===String?r.traceId="":(r.traceId=[],t.bytes!==Array&&(r.traceId=p.newBuffer(r.traceId))),t.bytes===String?r.spanId="":(r.spanId=[],t.bytes!==Array&&(r.spanId=p.newBuffer(r.spanId))),p.Long){var a=new p.Long(0,0,!1);r.observedTimeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.observedTimeUnixNano=t.longs===String?"0":0}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?r.timeUnixNano=t.longs===String?String(e.timeUnixNano):e.timeUnixNano:r.timeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.timeUnixNano):t.longs===Number?new p.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.severityNumber!=null&&e.hasOwnProperty("severityNumber")&&(r.severityNumber=t.enums===String?f.opentelemetry.proto.logs.v1.SeverityNumber[e.severityNumber]===void 0?e.severityNumber:f.opentelemetry.proto.logs.v1.SeverityNumber[e.severityNumber]:e.severityNumber),e.severityText!=null&&e.hasOwnProperty("severityText")&&(r.severityText=e.severityText),e.body!=null&&e.hasOwnProperty("body")&&(r.body=f.opentelemetry.proto.common.v1.AnyValue.toObject(e.body,t)),e.attributes&&e.attributes.length){r.attributes=[];for(var s=0;s<e.attributes.length;++s)r.attributes[s]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[s],t)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(r.droppedAttributesCount=e.droppedAttributesCount),e.flags!=null&&e.hasOwnProperty("flags")&&(r.flags=e.flags),e.traceId!=null&&e.hasOwnProperty("traceId")&&(r.traceId=t.bytes===String?p.base64.encode(e.traceId,0,e.traceId.length):t.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),e.spanId!=null&&e.hasOwnProperty("spanId")&&(r.spanId=t.bytes===String?p.base64.encode(e.spanId,0,e.spanId.length):t.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),e.observedTimeUnixNano!=null&&e.hasOwnProperty("observedTimeUnixNano")&&(typeof e.observedTimeUnixNano=="number"?r.observedTimeUnixNano=t.longs===String?String(e.observedTimeUnixNano):e.observedTimeUnixNano:r.observedTimeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.observedTimeUnixNano):t.longs===Number?new p.LongBits(e.observedTimeUnixNano.low>>>0,e.observedTimeUnixNano.high>>>0).toNumber():e.observedTimeUnixNano),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.LogRecord"},l}(),c}(),o}(),n}(),u}();fl.exports=f});var fo=m(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.ServiceClientType=void 0;var vp;(function(u){u[u.SPANS=0]="SPANS",u[u.METRICS=1]="METRICS",u[u.LOGS=2]="LOGS"})(vp=ge.ServiceClientType||(ge.ServiceClientType={}))});var yo=m(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.getExportRequestProto=void 0;var po=pl(),dl=fo();function _p(u){return u===dl.ServiceClientType.SPANS?po.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest:u===dl.ServiceClientType.LOGS?po.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest:po.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest}Dr.getExportRequestProto=_p});var yl=m(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.OTLPProtoExporterBrowserBase=void 0;var Ep=(S(),C(y)),ho=du(),bp=yo(),mo=class extends ho.OTLPExporterBrowserBase{constructor(n={}){super(n)}send(n,o,c){if(this._shutdownOnce.isCalled){Ep.diag.debug("Shutdown already started. Cannot send objects");return}let l=this.convert(n),i=(0,bp.getExportRequestProto)(this.getServiceClientType()),e=i.create(l);if(e){let t=i.encode(e).finish();t&&(0,ho.sendWithXhr)(new Blob([t],{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 ho.OTLPExporterError("No proto"))}};Br.OTLPProtoExporterBrowserBase=mo});var hl=m(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.ServiceClientType=ne.OTLPProtoExporterBrowserBase=void 0;var Sp=yl();Object.defineProperty(ne,"OTLPProtoExporterBrowserBase",{enumerable:!0,get:function(){return Sp.OTLPProtoExporterBrowserBase}});var Tp=fo();Object.defineProperty(ne,"ServiceClientType",{enumerable:!0,get:function(){return Tp.ServiceClientType}})});S();var Jt=N(U());S();var L=N(U()),bt=N(Et());var Pi="exception";var xs=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Rs=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},xi=function(){function u(n,o,c,l,i,e,t,r,a,s){t===void 0&&(t=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:y.SpanStatusCode.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=c,this._spanContext=l,this.parentSpanId=e,this.kind=i,this.links=t;var d=Date.now();this._performanceStartTime=L.otperformance.now(),this._performanceOffset=d-(this._performanceStartTime+(0,L.getTimeOrigin)()),this._startTimeProvided=r!=null,this.startTime=this._getTime(r??d),this.resource=n.resource,this.instrumentationLibrary=n.instrumentationLibrary,this._spanLimits=n.getSpanLimits(),s!=null&&this.setAttributes(s),this._spanProcessor=n.getActiveSpanProcessor(),this._spanProcessor.onStart(this,o),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0}return u.prototype.spanContext=function(){return this._spanContext},u.prototype.setAttribute=function(n,o){return o==null||this._isSpanEnded()?this:n.length===0?(y.diag.warn("Invalid attribute key: "+n),this):(0,L.isAttributeValue)(o)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,n)?(this._droppedAttributesCount++,this):(this.attributes[n]=this._truncateToSize(o),this):(y.diag.warn("Invalid attribute value set for key: "+n),this)},u.prototype.setAttributes=function(n){var o,c;try{for(var l=xs(Object.entries(n)),i=l.next();!i.done;i=l.next()){var e=Rs(i.value,2),t=e[0],r=e[1];this.setAttribute(t,r)}}catch(a){o={error:a}}finally{try{i&&!i.done&&(c=l.return)&&c.call(l)}finally{if(o)throw o.error}}return this},u.prototype.addEvent=function(n,o,c){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return y.diag.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(y.diag.warn("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),(0,L.isTimeInput)(o)&&((0,L.isTimeInput)(c)||(c=o),o=void 0);var l=(0,L.sanitizeAttributes)(o);return this.events.push({name:n,attributes:l,time:this._getTime(c),droppedAttributesCount:0}),this},u.prototype.setStatus=function(n){return this._isSpanEnded()?this:(this.status=n,this)},u.prototype.updateName=function(n){return this._isSpanEnded()?this:(this.name=n,this)},u.prototype.end=function(n){if(this._isSpanEnded()){y.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(n),this._duration=(0,L.hrTimeDuration)(this.startTime,this.endTime),this._duration[0]<0&&(y.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)},u.prototype._getTime=function(n){if(typeof n=="number"&&n<L.otperformance.now())return(0,L.hrTime)(n+this._performanceOffset);if(typeof n=="number")return(0,L.millisToHrTime)(n);if(n instanceof Date)return(0,L.millisToHrTime)(n.getTime());if((0,L.isTimeInputHrTime)(n))return n;if(this._startTimeProvided)return(0,L.millisToHrTime)(Date.now());var o=L.otperformance.now()-this._performanceStartTime;return(0,L.addHrTimes)(this.startTime,(0,L.millisToHrTime)(o))},u.prototype.isRecording=function(){return this._ended===!1},u.prototype.recordException=function(n,o){var c={};typeof n=="string"?c[bt.SemanticAttributes.EXCEPTION_MESSAGE]=n:n&&(n.code?c[bt.SemanticAttributes.EXCEPTION_TYPE]=n.code.toString():n.name&&(c[bt.SemanticAttributes.EXCEPTION_TYPE]=n.name),n.message&&(c[bt.SemanticAttributes.EXCEPTION_MESSAGE]=n.message),n.stack&&(c[bt.SemanticAttributes.EXCEPTION_STACKTRACE]=n.stack)),c[bt.SemanticAttributes.EXCEPTION_TYPE]||c[bt.SemanticAttributes.EXCEPTION_MESSAGE]?this.addEvent(Pi,c,o):y.diag.warn("Failed to record an exception "+n)},Object.defineProperty(u.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),u.prototype._isSpanEnded=function(){return this._ended&&y.diag.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},u.prototype._truncateToLimitUtil=function(n,o){return n.length<=o?n:n.substr(0,o)},u.prototype._truncateToSize=function(n){var o=this,c=this._attributeValueLengthLimit;return c<=0?(y.diag.warn("Attribute value limit must be positive, got "+c),n):typeof n=="string"?this._truncateToLimitUtil(n,c):Array.isArray(n)?n.map(function(l){return typeof l=="string"?o._truncateToLimitUtil(l,c):l}):n},u}();S();var k=N(U());var lt;(function(u){u[u.NOT_RECORD=0]="NOT_RECORD",u[u.RECORD=1]="RECORD",u[u.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(lt||(lt={}));var ct=function(){function u(){}return u.prototype.shouldSample=function(){return{decision:lt.NOT_RECORD}},u.prototype.toString=function(){return"AlwaysOffSampler"},u}();var J=function(){function u(){}return u.prototype.shouldSample=function(){return{decision:lt.RECORD_AND_SAMPLED}},u.prototype.toString=function(){return"AlwaysOnSampler"},u}();S();var Ri=N(U());var St=function(){function u(n){var o,c,l,i;this._root=n.root,this._root||((0,Ri.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new J),this._remoteParentSampled=(o=n.remoteParentSampled)!==null&&o!==void 0?o:new J,this._remoteParentNotSampled=(c=n.remoteParentNotSampled)!==null&&c!==void 0?c:new ct,this._localParentSampled=(l=n.localParentSampled)!==null&&l!==void 0?l:new J,this._localParentNotSampled=(i=n.localParentNotSampled)!==null&&i!==void 0?i:new ct}return u.prototype.shouldSample=function(n,o,c,l,i,e){var t=y.trace.getSpanContext(n);return!t||!(0,y.isSpanContextValid)(t)?this._root.shouldSample(n,o,c,l,i,e):t.isRemote?t.traceFlags&y.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(n,o,c,l,i,e):this._remoteParentNotSampled.shouldSample(n,o,c,l,i,e):t.traceFlags&y.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(n,o,c,l,i,e):this._localParentNotSampled.shouldSample(n,o,c,l,i,e)},u.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},u}();S();var Kt=function(){function u(n){n===void 0&&(n=0),this._ratio=n,this._ratio=this._normalize(n),this._upperBound=Math.floor(this._ratio*4294967295)}return u.prototype.shouldSample=function(n,o){return{decision:(0,y.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?lt.RECORD_AND_SAMPLED:lt.NOT_RECORD}},u.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},u.prototype._normalize=function(n){return typeof n!="number"||isNaN(n)?0:n>=1?1:n<=0?0:n},u.prototype._accumulate=function(n){for(var o=0,c=0;c<n.length/8;c++){var l=c*8,i=parseInt(n.slice(l,l+8),16);o=(o^i)>>>0}return o},u}();var Ls=(0,k.getEnv)(),Is=k.TracesSamplerValues.AlwaysOn,Xt=1;function or(){return{sampler:Tn(Ls),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,k.getEnv)().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,k.getEnv)().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:(0,k.getEnv)().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,k.getEnv)().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:(0,k.getEnv)().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:(0,k.getEnv)().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:(0,k.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:(0,k.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function Tn(u){switch(u===void 0&&(u=(0,k.getEnv)()),u.OTEL_TRACES_SAMPLER){case k.TracesSamplerValues.AlwaysOn:return new J;case k.TracesSamplerValues.AlwaysOff:return new ct;case k.TracesSamplerValues.ParentBasedAlwaysOn:return new St({root:new J});case k.TracesSamplerValues.ParentBasedAlwaysOff:return new St({root:new ct});case k.TracesSamplerValues.TraceIdRatio:return new Kt(Li(u));case k.TracesSamplerValues.ParentBasedTraceIdRatio:return new St({root:new Kt(Li(u))});default:return y.diag.error('OTEL_TRACES_SAMPLER value "'+u.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Is+'".'),new J}}function Li(u){if(u.OTEL_TRACES_SAMPLER_ARG===void 0||u.OTEL_TRACES_SAMPLER_ARG==="")return y.diag.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+Xt+"."),Xt;var n=Number(u.OTEL_TRACES_SAMPLER_ARG);return isNaN(n)?(y.diag.error("OTEL_TRACES_SAMPLER_ARG="+u.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+Xt+"."),Xt):n<0||n>1?(y.diag.error("OTEL_TRACES_SAMPLER_ARG="+u.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+Xt+"."),Xt):n}var Yt=N(U());function Ii(u){var n={sampler:Tn()},o=or(),c=Object.assign({},o,n,u);return c.generalLimits=Object.assign({},o.generalLimits,u.generalLimits||{}),c.spanLimits=Object.assign({},o.spanLimits,u.spanLimits||{}),c}function wi(u){var n,o,c,l,i,e,t,r,a,s,d,v,b=Object.assign({},u.spanLimits),g=(0,Yt.getEnvWithoutDefaults)();return b.attributeCountLimit=(e=(i=(l=(o=(n=u.spanLimits)===null||n===void 0?void 0:n.attributeCountLimit)!==null&&o!==void 0?o:(c=u.generalLimits)===null||c===void 0?void 0:c.attributeCountLimit)!==null&&l!==void 0?l:g.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&i!==void 0?i:g.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&e!==void 0?e:Yt.DEFAULT_ATTRIBUTE_COUNT_LIMIT,b.attributeValueLengthLimit=(v=(d=(s=(r=(t=u.spanLimits)===null||t===void 0?void 0:t.attributeValueLengthLimit)!==null&&r!==void 0?r:(a=u.generalLimits)===null||a===void 0?void 0:a.attributeValueLengthLimit)!==null&&s!==void 0?s:g.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&d!==void 0?d:g.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&v!==void 0?v:Yt.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},u,{spanLimits:b})}S();var Y=N(U()),Ci=function(){function u(n,o){this._exporter=n,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var c=(0,Y.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 Y.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(y.diag.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return u.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},u.prototype.onStart=function(n,o){},u.prototype.onEnd=function(n){this._shutdownOnce.isCalled||n.spanContext().traceFlags&y.TraceFlags.SAMPLED&&this._addToBuffer(n)},u.prototype.shutdown=function(){return this._shutdownOnce.call()},u.prototype._shutdown=function(){var n=this;return Promise.resolve().then(function(){return n.onShutdown()}).then(function(){return n._flushAll()}).then(function(){return n._exporter.shutdown()})},u.prototype._addToBuffer=function(n){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&y.diag.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(y.diag.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(n),this._maybeStartTimer()},u.prototype._flushAll=function(){var n=this;return new Promise(function(o,c){for(var l=[],i=Math.ceil(n._finishedSpans.length/n._maxExportBatchSize),e=0,t=i;e<t;e++)l.push(n._flushOneBatch());Promise.all(l).then(function(){o()}).catch(c)})},u.prototype._flushOneBatch=function(){var n=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(o,c){var l=setTimeout(function(){c(new Error("Timeout"))},n._exportTimeoutMillis);y.context.with((0,Y.suppressTracing)(y.context.active()),function(){var i=n._finishedSpans.splice(0,n._maxExportBatchSize),e=function(){return n._exporter.export(i,function(r){var a;clearTimeout(l),r.code===Y.ExportResultCode.SUCCESS?o():c((a=r.error)!==null&&a!==void 0?a:new Error("BatchSpanProcessor: span export failed"))})},t=i.map(function(r){return r.resource}).filter(function(r){return r.asyncAttributesPending});t.length===0?e():Promise.all(t.map(function(r){var a;return(a=r.waitForAsyncAttributes)===null||a===void 0?void 0:a.call(r)})).then(e,function(r){(0,Y.globalErrorHandler)(r),c(r)})})})},u.prototype._maybeStartTimer=function(){var n=this;if(!this._isExporting){var o=function(){n._isExporting=!0,n._flushOneBatch().then(function(){n._isExporting=!1,n._finishedSpans.length>0&&(n._clearTimer(),n._maybeStartTimer())}).catch(function(c){n._isExporting=!1,(0,Y.globalErrorHandler)(c)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return o();this._timer===void 0&&(this._timer=setTimeout(function(){return o()},this._scheduledDelayMillis),(0,Y.unrefTimer)(this._timer))}},u.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},u}();var ws=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),de=function(u){ws(n,u);function n(o,c){var l=u.call(this,o,c)||this;return l.onInit(c),l}return n.prototype.onInit=function(o){var c=this;o?.disableAutoFlushOnDocumentHide!==!0&&typeof document<"u"&&(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&c.forceFlush()},this._pageHideListener=function(){c.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},n.prototype.onShutdown=function(){typeof document<"u"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},n}(Ci);var Cs=8,Us=16,ar=function(){function u(){this.generateTraceId=Ui(Us),this.generateSpanId=Ui(Cs)}return u}();var ir=Array(32);function Ui(u){return function(){for(var o=0;o<u*2;o++)ir[o]=Math.floor(Math.random()*16)+48,ir[o]>=58&&(ir[o]+=39);return String.fromCharCode.apply(null,ir.slice(0,u*2))}}var Mi=function(){function u(n,o,c){this._tracerProvider=c;var l=Ii(o);this._sampler=l.sampler,this._generalLimits=l.generalLimits,this._spanLimits=l.spanLimits,this._idGenerator=o.idGenerator||new ar,this.resource=c.resource,this.instrumentationLibrary=n}return u.prototype.startSpan=function(n,o,c){var l,i,e;o===void 0&&(o={}),c===void 0&&(c=y.context.active()),o.root&&(c=y.trace.deleteSpan(c));var t=y.trace.getSpan(c);if((0,Jt.isTracingSuppressed)(c)){y.diag.debug("Instrumentation suppressed, returning Noop Span");var r=y.trace.wrapSpanContext(y.INVALID_SPAN_CONTEXT);return r}var a=t?.spanContext(),s=this._idGenerator.generateSpanId(),d,v,b;!a||!y.trace.isSpanContextValid(a)?d=this._idGenerator.generateTraceId():(d=a.traceId,v=a.traceState,b=a.spanId);var g=(l=o.kind)!==null&&l!==void 0?l:y.SpanKind.INTERNAL,G=((i=o.links)!==null&&i!==void 0?i:[]).map(function(_o){return{context:_o.context,attributes:(0,Jt.sanitizeAttributes)(_o.attributes)}}),B=(0,Jt.sanitizeAttributes)(o.attributes),yt=this._sampler.shouldSample(c,d,n,g,B,G);v=(e=yt.traceState)!==null&&e!==void 0?e:v;var $=yt.decision===y.SamplingDecision.RECORD_AND_SAMPLED?y.TraceFlags.SAMPLED:y.TraceFlags.NONE,vo={traceId:d,spanId:s,traceFlags:$,traceState:v};if(yt.decision===y.SamplingDecision.NOT_RECORD){y.diag.debug("Recording is off, propagating context in a non-recording span");var r=y.trace.wrapSpanContext(vo);return r}var Al=(0,Jt.sanitizeAttributes)(Object.assign(B,yt.attributes)),Nl=new xi(this,c,n,vo,g,b,G,o.startTime,void 0,Al);return Nl},u.prototype.startActiveSpan=function(n,o,c,l){var i,e,t;if(!(arguments.length<2)){arguments.length===2?t=o:arguments.length===3?(i=o,t=c):(i=o,e=c,t=l);var r=e??y.context.active(),a=this.startSpan(n,i,r),s=y.trace.setSpan(r,a);return y.context.with(s,t,void 0,a)}},u.prototype.getGeneralLimits=function(){return this._generalLimits},u.prototype.getSpanLimits=function(){return this._spanLimits},u.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},u}();S();var tt=N(U());S();var Tt=N(Et()),ur=N(U());function Di(){return"unknown_service"}var Ot=function(){return Ot=Object.assign||function(u){for(var n,o=1,c=arguments.length;o<c;o++){n=arguments[o];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(u[l]=n[l])}return u},Ot.apply(this,arguments)},Ms=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},Ds=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Bs=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},q=function(){function u(n,o){var c=this,l;this._attributes=n,this.asyncAttributesPending=o!=null,this._syncAttributes=(l=this._attributes)!==null&&l!==void 0?l:{},this._asyncAttributesPromise=o?.then(function(i){return c._attributes=Object.assign({},c._attributes,i),c.asyncAttributesPending=!1,i},function(i){return y.diag.debug("a resource's async attributes promise rejected: %s",i),c.asyncAttributesPending=!1,{}})}return u.empty=function(){return u.EMPTY},u.default=function(){var n;return new u((n={},n[Tt.SemanticResourceAttributes.SERVICE_NAME]=Di(),n[Tt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]=ur.SDK_INFO[Tt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE],n[Tt.SemanticResourceAttributes.TELEMETRY_SDK_NAME]=ur.SDK_INFO[Tt.SemanticResourceAttributes.TELEMETRY_SDK_NAME],n[Tt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]=ur.SDK_INFO[Tt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION],n))},Object.defineProperty(u.prototype,"attributes",{get:function(){var n;return this.asyncAttributesPending&&y.diag.error("Accessing resource attributes before async attributes settled"),(n=this._attributes)!==null&&n!==void 0?n:{}},enumerable:!1,configurable:!0}),u.prototype.waitForAsyncAttributes=function(){return Ms(this,void 0,void 0,function(){return Ds(this,function(n){switch(n.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},u.prototype.merge=function(n){var o=this,c;if(!n)return this;var l=Ot(Ot({},this._syncAttributes),(c=n._syncAttributes)!==null&&c!==void 0?c:n.attributes);if(!this._asyncAttributesPromise&&!n._asyncAttributesPromise)return new u(l);var i=Promise.all([this._asyncAttributesPromise,n._asyncAttributesPromise]).then(function(e){var t,r=Bs(e,2),a=r[0],s=r[1];return Ot(Ot(Ot(Ot({},o._syncAttributes),a),(t=n._syncAttributes)!==null&&t!==void 0?t:n.attributes),s)});return new u(l,i)},u.EMPTY=new u({}),u}();S();var Bi=N(U()),ki=N(Et());var ks=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Vs=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},Gs=function(){function u(){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."}return u.prototype.detect=function(n){var o={},c=(0,Bi.getEnv)(),l=c.OTEL_RESOURCE_ATTRIBUTES,i=c.OTEL_SERVICE_NAME;if(l)try{var e=this._parseResourceAttributes(l);Object.assign(o,e)}catch(t){y.diag.debug("EnvDetector failed: "+t.message)}return i&&(o[ki.SemanticResourceAttributes.SERVICE_NAME]=i),new q(o)},u.prototype._parseResourceAttributes=function(n){var o,c;if(!n)return{};var l={},i=n.split(this._COMMA_SEPARATOR,-1);try{for(var e=ks(i),t=e.next();!t.done;t=e.next()){var r=t.value,a=r.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(a.length===2){var s=Vs(a,2),d=s[0],v=s[1];if(d=d.trim(),v=v.trim().split(/^"|"$/).join(""),!this._isValidAndNotEmpty(d))throw new Error("Attribute key "+this._ERROR_MESSAGE_INVALID_CHARS);if(!this._isValid(v))throw new Error("Attribute value "+this._ERROR_MESSAGE_INVALID_VALUE);l[d]=decodeURIComponent(v)}}}catch(b){o={error:b}}finally{try{t&&!t.done&&(c=e.return)&&c.call(e)}finally{if(o)throw o.error}}return l},u.prototype._isValid=function(n){return n.length<=this._MAX_LENGTH&&this._isBaggageOctetString(n)},u.prototype._isBaggageOctetString=function(n){for(var o=0;o<n.length;o++){var c=n.charCodeAt(o);if(c<33||c===44||c===59||c===92||c>126)return!1}return!0},u.prototype._isValidAndNotEmpty=function(n){return n.length>0&&this._isValid(n)},u}(),Vi=new Gs;S();var Gi=function(u){return u!==null&&typeof u=="object"&&typeof u.then=="function"};var Hs=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},js=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};var Hi=function(u){var n;u===void 0&&(u={});var o=((n=u.detectors)!==null&&n!==void 0?n:[]).map(function(l){try{var i=l.detect(u),e;if(Gi(i)){var t=function(){return Hs(void 0,void 0,void 0,function(){var r;return js(this,function(a){switch(a.label){case 0:return[4,i];case 1:return r=a.sent(),[2,r.attributes]}})})};e=new q({},t())}else e=i;return e.waitForAsyncAttributes?e.waitForAsyncAttributes().then(function(){return y.diag.debug(l.constructor.name+" found resource.",e)}):y.diag.debug(l.constructor.name+" found resource.",e),e}catch(r){return y.diag.error(l.constructor.name+" failed: "+r.message),q.empty()}}),c=o.reduce(function(l,i){return l.merge(i)},q.empty());return c.waitForAsyncAttributes&&c.waitForAsyncAttributes().then(function(){Fs(o)}),c},Fs=function(u){u.forEach(function(n){if(Object.keys(n.attributes).length>0){var o=JSON.stringify(n.attributes,null,4);y.diag.verbose(o)}})};var ji=N(U()),lr=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Fi=function(){function u(n){this._spanProcessors=n}return u.prototype.forceFlush=function(){var n,o,c=[];try{for(var l=lr(this._spanProcessors),i=l.next();!i.done;i=l.next()){var e=i.value;c.push(e.forceFlush())}}catch(t){n={error:t}}finally{try{i&&!i.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}return new Promise(function(t){Promise.all(c).then(function(){t()}).catch(function(r){(0,ji.globalErrorHandler)(r||new Error("MultiSpanProcessor: forceFlush failed")),t()})})},u.prototype.onStart=function(n,o){var c,l;try{for(var i=lr(this._spanProcessors),e=i.next();!e.done;e=i.next()){var t=e.value;t.onStart(n,o)}}catch(r){c={error:r}}finally{try{e&&!e.done&&(l=i.return)&&l.call(i)}finally{if(c)throw c.error}}},u.prototype.onEnd=function(n){var o,c;try{for(var l=lr(this._spanProcessors),i=l.next();!i.done;i=l.next()){var e=i.value;e.onEnd(n)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(c=l.return)&&c.call(l)}finally{if(o)throw o.error}}},u.prototype.shutdown=function(){var n,o,c=[];try{for(var l=lr(this._spanProcessors),i=l.next();!i.done;i=l.next()){var e=i.value;c.push(e.shutdown())}}catch(t){n={error:t}}finally{try{i&&!i.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}return new Promise(function(t,r){Promise.all(c).then(function(){t()},r)})},u}();var qi=function(){function u(){}return u.prototype.onStart=function(n,o){},u.prototype.onEnd=function(n){},u.prototype.shutdown=function(){return Promise.resolve()},u.prototype.forceFlush=function(){return Promise.resolve()},u}();var Bt;(function(u){u[u.resolved=0]="resolved",u[u.timeout=1]="timeout",u[u.error=2]="error",u[u.unresolved=3]="unresolved"})(Bt||(Bt={}));var Ki=function(){function u(n){n===void 0&&(n={});var o;this._registeredSpanProcessors=[],this._tracers=new Map;var c=(0,tt.merge)({},or(),wi(n));this.resource=(o=c.resource)!==null&&o!==void 0?o:q.empty(),this.resource=q.default().merge(this.resource),this._config=Object.assign({},c,{resource:this.resource});var l=this._buildExporterFromEnv();if(l!==void 0){var i=new de(l);this.activeSpanProcessor=i}else this.activeSpanProcessor=new qi}return u.prototype.getTracer=function(n,o,c){var l=n+"@"+(o||"")+":"+(c?.schemaUrl||"");return this._tracers.has(l)||this._tracers.set(l,new Mi({name:n,version:o,schemaUrl:c?.schemaUrl},this._config,this)),this._tracers.get(l)},u.prototype.addSpanProcessor=function(n){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(o){return y.diag.error("Error while trying to shutdown current span processor",o)}),this._registeredSpanProcessors.push(n),this.activeSpanProcessor=new Fi(this._registeredSpanProcessors)},u.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},u.prototype.register=function(n){n===void 0&&(n={}),y.trace.setGlobalTracerProvider(this),n.propagator===void 0&&(n.propagator=this._buildPropagatorFromEnv()),n.contextManager&&y.context.setGlobalContextManager(n.contextManager),n.propagator&&y.propagation.setGlobalPropagator(n.propagator)},u.prototype.forceFlush=function(){var n=this._config.forceFlushTimeoutMillis,o=this._registeredSpanProcessors.map(function(c){return new Promise(function(l){var i,e=setTimeout(function(){l(new Error("Span processor did not completed within timeout period of "+n+" ms")),i=Bt.timeout},n);c.forceFlush().then(function(){clearTimeout(e),i!==Bt.timeout&&(i=Bt.resolved,l(i))}).catch(function(t){clearTimeout(e),i=Bt.error,l(t)})})});return new Promise(function(c,l){Promise.all(o).then(function(i){var e=i.filter(function(t){return t!==Bt.resolved});e.length>0?l(e):c()}).catch(function(i){return l([i])})})},u.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},u.prototype._getPropagator=function(n){var o;return(o=this.constructor._registeredPropagators.get(n))===null||o===void 0?void 0:o()},u.prototype._getSpanExporter=function(n){var o;return(o=this.constructor._registeredExporters.get(n))===null||o===void 0?void 0:o()},u.prototype._buildPropagatorFromEnv=function(){var n=this,o=Array.from(new Set((0,tt.getEnv)().OTEL_PROPAGATORS)),c=o.map(function(i){var e=n._getPropagator(i);return e||y.diag.warn('Propagator "'+i+'" requested through environment variable is unavailable.'),e}),l=c.reduce(function(i,e){return e&&i.push(e),i},[]);if(l.length!==0)return o.length===1?l[0]:new tt.CompositePropagator({propagators:l})},u.prototype._buildExporterFromEnv=function(){var n=(0,tt.getEnv)().OTEL_TRACES_EXPORTER;if(!(n==="none"||n==="")){var o=this._getSpanExporter(n);return o||y.diag.error('Exporter "'+n+'" requested through environment variable is unavailable.'),o}},u._registeredPropagators=new Map([["tracecontext",function(){return new tt.W3CTraceContextPropagator}],["baggage",function(){return new tt.W3CBaggagePropagator}]]),u._registeredExporters=new Map,u}();S();var st={};Q(st,Ry);import*as Ry from"@opentelemetry/api-logs";var Sl=N(zi(),1);S();var sr=N(U());S();S();S();var zt=N(U()),Ys=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Js=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},Wi=function(){function u(n,o,c){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;var l=c.timestamp,i=c.observedTimestamp,e=c.severityNumber,t=c.severityText,r=c.body,a=c.attributes,s=a===void 0?{}:a,d=c.context,v=Date.now();if(this.hrTime=(0,zt.timeInputToHrTime)(l??v),this.hrTimeObserved=(0,zt.timeInputToHrTime)(i??v),d){var b=y.trace.getSpanContext(d);b&&y.isSpanContextValid(b)&&(this.spanContext=b)}this.severityNumber=e,this.severityText=t,this.body=r,this.resource=n.resource,this.instrumentationScope=o,this._logRecordLimits=n.logRecordLimits,this.setAttributes(s)}return Object.defineProperty(u.prototype,"severityText",{get:function(){return this._severityText},set:function(n){this._isLogRecordReadonly()||(this._severityText=n)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"severityNumber",{get:function(){return this._severityNumber},set:function(n){this._isLogRecordReadonly()||(this._severityNumber=n)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"body",{get:function(){return this._body},set:function(n){this._isLogRecordReadonly()||(this._body=n)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"droppedAttributesCount",{get:function(){return this.totalAttributesCount-Object.keys(this.attributes).length},enumerable:!1,configurable:!0}),u.prototype.setAttribute=function(n,o){return this._isLogRecordReadonly()?this:o===null?this:n.length===0?(y.diag.warn("Invalid attribute key: "+n),this):!(0,zt.isAttributeValue)(o)&&!(typeof o=="object"&&!Array.isArray(o)&&Object.keys(o).length>0)?(y.diag.warn("Invalid attribute value set for key: "+n),this):(this.totalAttributesCount+=1,Object.keys(this.attributes).length>=this._logRecordLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,n)?this:((0,zt.isAttributeValue)(o)?this.attributes[n]=this._truncateToSize(o):this.attributes[n]=o,this))},u.prototype.setAttributes=function(n){var o,c;try{for(var l=Ys(Object.entries(n)),i=l.next();!i.done;i=l.next()){var e=Js(i.value,2),t=e[0],r=e[1];this.setAttribute(t,r)}}catch(a){o={error:a}}finally{try{i&&!i.done&&(c=l.return)&&c.call(l)}finally{if(o)throw o.error}}return this},u.prototype.setBody=function(n){return this.body=n,this},u.prototype.setSeverityNumber=function(n){return this.severityNumber=n,this},u.prototype.setSeverityText=function(n){return this.severityText=n,this},u.prototype._makeReadonly=function(){this._isReadonly=!0},u.prototype._truncateToSize=function(n){var o=this,c=this._logRecordLimits.attributeValueLengthLimit;return c<=0?(y.diag.warn("Attribute value limit must be positive, got "+c),n):typeof n=="string"?this._truncateToLimitUtil(n,c):Array.isArray(n)?n.map(function(l){return typeof l=="string"?o._truncateToLimitUtil(l,c):l}):n},u.prototype._truncateToLimitUtil=function(n,o){return n.length<=o?n:n.substring(0,o)},u.prototype._isLogRecordReadonly=function(){return this._isReadonly&&y.diag.warn("Can not execute the operation on emitted log record"),this._isReadonly},u}();var gn=function(){return gn=Object.assign||function(u){for(var n,o=1,c=arguments.length;o<c;o++){n=arguments[o];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(u[l]=n[l])}return u},gn.apply(this,arguments)},$i=function(){function u(n,o){this.instrumentationScope=n,this._sharedState=o}return u.prototype.emit=function(n){var o=n.context||y.context.active(),c=new Wi(this._sharedState,this.instrumentationScope,gn({context:o},n));this._sharedState.activeProcessor.onEmit(c,o),c._makeReadonly()},u}();var ft=N(U());function Qi(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:(0,ft.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,ft.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT},includeTraceContext:!0}}function Zi(u){var n,o,c,l,i,e,t=(0,ft.getEnvWithoutDefaults)();return{attributeCountLimit:(c=(o=(n=u.attributeCountLimit)!==null&&n!==void 0?n:t.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:t.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&c!==void 0?c:ft.DEFAULT_ATTRIBUTE_COUNT_LIMIT,attributeValueLengthLimit:(e=(i=(l=u.attributeValueLengthLimit)!==null&&l!==void 0?l:t.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&i!==void 0?i:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&e!==void 0?e:ft.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT}}var ra=N(U()),ta=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},ea=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},na=function(){function u(n,o){this.processors=n,this.forceFlushTimeoutMillis=o}return u.prototype.forceFlush=function(){return ta(this,void 0,void 0,function(){var n;return ea(this,function(o){switch(o.label){case 0:return n=this.forceFlushTimeoutMillis,[4,Promise.all(this.processors.map(function(c){return(0,ra.callWithTimeout)(c.forceFlush(),n)}))];case 1:return o.sent(),[2]}})})},u.prototype.onEmit=function(n,o){this.processors.forEach(function(c){return c.onEmit(n,o)})},u.prototype.shutdown=function(){return ta(this,void 0,void 0,function(){return ea(this,function(n){switch(n.label){case 0:return[4,Promise.all(this.processors.map(function(o){return o.shutdown()}))];case 1:return n.sent(),[2]}})})},u}();var oa=function(){function u(){}return u.prototype.forceFlush=function(){return Promise.resolve()},u.prototype.onEmit=function(n,o){},u.prototype.shutdown=function(){return Promise.resolve()},u}();var ia=function(){function u(n,o,c){this.resource=n,this.forceFlushTimeoutMillis=o,this.logRecordLimits=c,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new oa}return u}();var zs="unknown",An=function(){function u(n){n===void 0&&(n={});var o=(0,sr.merge)({},Qi(),n),c=o.resource,l=c===void 0?q.default():c,i=o.logRecordLimits,e=o.forceFlushTimeoutMillis;this._sharedState=new ia(l,e,Zi(i)),this._shutdownOnce=new sr.BindOnceFuture(this._shutdown,this)}return u.prototype.getLogger=function(n,o,c){if(this._shutdownOnce.isCalled)return y.diag.warn("A shutdown LoggerProvider cannot provide a Logger"),st.NOOP_LOGGER;n||y.diag.warn("Logger requested without instrumentation scope name.");var l=n||zs,i=l+"@"+(o||"")+":"+(c?.schemaUrl||"");return this._sharedState.loggers.has(i)||this._sharedState.loggers.set(i,new $i({name:l,version:o,schemaUrl:c?.schemaUrl},this._sharedState)),this._sharedState.loggers.get(i)},u.prototype.addLogRecordProcessor=function(n){this._sharedState.registeredLogRecordProcessors.length===0&&this._sharedState.activeProcessor.shutdown().catch(function(o){return y.diag.error("Error while trying to shutdown current log record processor",o)}),this._sharedState.registeredLogRecordProcessors.push(n),this._sharedState.activeProcessor=new na(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)},u.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?(y.diag.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()},u.prototype.shutdown=function(){return this._shutdownOnce.isCalled?(y.diag.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()},u.prototype._shutdown=function(){return this._sharedState.activeProcessor.shutdown()},u}();var fr;(function(u){u[u.DELTA=0]="DELTA",u[u.CUMULATIVE=1]="CUMULATIVE"})(fr||(fr={}));var Ws=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),aa=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},ua=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};var $s=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")};function la(u){return u!=null}function ca(u){var n=Object.keys(u);return n.length===0?"":(n=n.sort(),JSON.stringify(n.map(function(o){return[o,u[o]]})))}function sa(u){var n,o;return u.name+":"+((n=u.version)!==null&&n!==void 0?n:"")+":"+((o=u.schemaUrl)!==null&&o!==void 0?o:"")}var Qs=function(u){Ws(n,u);function n(o){var c=u.call(this,o)||this;return Object.setPrototypeOf(c,n.prototype),c}return n}(Error);function Nn(u,n){var o,c=new Promise(function(i,e){o=setTimeout(function(){e(new Qs("Operation timed out."))},n)});return Promise.race([u,c]).then(function(l){return clearTimeout(o),l},function(l){throw clearTimeout(o),l})}function fa(u){return aa(this,void 0,void 0,function(){var n=this;return ua(this,function(o){return[2,Promise.all(u.map(function(c){return aa(n,void 0,void 0,function(){var l,i;return ua(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,c];case 1:return l=e.sent(),[2,{status:"fulfilled",value:l}];case 2:return i=e.sent(),[2,{status:"rejected",reason:i}];case 3:return[2]}})})}))]})})}function pa(u){return u.status==="rejected"}function da(u,n){var o,c;if(u.size!==n.size)return!1;try{for(var l=$s(u),i=l.next();!i.done;i=l.next()){var e=i.value;if(!n.has(e))return!1}}catch(t){o={error:t}}finally{try{i&&!i.done&&(c=l.return)&&c.call(l)}finally{if(o)throw o.error}}return!0}function ya(u,n){return u.toLowerCase()===n.toLowerCase()}S();var pt;(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"})(pt||(pt={}));function dt(u,n,o){var c,l,i,e;return tf(u)||y.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:n,description:(c=o?.description)!==null&&c!==void 0?c:"",unit:(l=o?.unit)!==null&&l!==void 0?l:"",valueType:(i=o?.valueType)!==null&&i!==void 0?i:y.ValueType.DOUBLE,advice:(e=o?.advice)!==null&&e!==void 0?e:{}}}function ha(u,n){var o,c;return{name:(o=u.name)!==null&&o!==void 0?o:n.name,description:(c=u.description)!==null&&c!==void 0?c:n.description,type:n.type,unit:n.unit,valueType:n.valueType,advice:n.advice}}function ma(u,n){return ya(u.name,n.name)&&u.unit===n.unit&&u.type===n.type&&u.valueType===n.valueType}var Zs=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function tf(u){return u.match(Zs)!=null}S();var va=function(){function u(){this._registeredViews=[]}return u.prototype.addView=function(n){this._registeredViews.push(n)},u.prototype.findViews=function(n,o){var c=this,l=this._registeredViews.filter(function(i){return c._matchInstrument(i.instrumentSelector,n)&&c._matchMeter(i.meterSelector,o)});return l},u.prototype._matchInstrument=function(n,o){return(n.getType()===void 0||o.type===n.getType())&&n.getNameFilter().match(o.name)&&n.getUnitFilter().match(o.unit)},u.prototype._matchMeter=function(n,o){return n.getNameFilter().match(o.name)&&(o.version===void 0||n.getVersionFilter().match(o.version))&&(o.schemaUrl===void 0||n.getSchemaUrlFilter().match(o.schemaUrl))},u}();S();var _a=N(U()),Wt=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),Pn=function(){function u(n,o){this._writableMetricStorage=n,this._descriptor=o}return u.prototype._record=function(n,o,c){if(o===void 0&&(o={}),c===void 0&&(c=y.context.active()),typeof n!="number"){y.diag.warn("non-number value provided to metric "+this._descriptor.name+": "+n);return}this._descriptor.valueType===y.ValueType.INT&&!Number.isInteger(n)&&(y.diag.warn("INT value type cannot accept a floating-point value for "+this._descriptor.name+", ignoring the fractional digits."),n=Math.trunc(n),!Number.isInteger(n))||this._writableMetricStorage.record(n,o,c,(0,_a.millisToHrTime)(Date.now()))},u}();var Ea=function(u){Wt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n.prototype.add=function(o,c,l){this._record(o,c,l)},n}(Pn);var ba=function(u){Wt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n.prototype.add=function(o,c,l){if(o<0){y.diag.warn("negative value provided to counter "+this._descriptor.name+": "+o);return}this._record(o,c,l)},n}(Pn);var Sa=function(u){Wt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n.prototype.record=function(o,c,l){if(o<0){y.diag.warn("negative value provided to histogram "+this._descriptor.name+": "+o);return}this._record(o,c,l)},n}(Pn);var pr=function(){function u(n,o,c){this._observableRegistry=c,this._descriptor=n,this._metricStorages=o}return u.prototype.addCallback=function(n){this._observableRegistry.addCallback(n,this)},u.prototype.removeCallback=function(n){this._observableRegistry.removeCallback(n,this)},u}();var Ta=function(u){Wt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n}(pr);var Oa=function(u){Wt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n}(pr);var ga=function(u){Wt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n}(pr);function ye(u){return u instanceof pr}var Aa=function(){function u(n){this._meterSharedState=n}return u.prototype.createHistogram=function(n,o){var c=dt(n,pt.HISTOGRAM,o),l=this._meterSharedState.registerMetricStorage(c);return new Sa(l,c)},u.prototype.createCounter=function(n,o){var c=dt(n,pt.COUNTER,o),l=this._meterSharedState.registerMetricStorage(c);return new ba(l,c)},u.prototype.createUpDownCounter=function(n,o){var c=dt(n,pt.UP_DOWN_COUNTER,o),l=this._meterSharedState.registerMetricStorage(c);return new Ea(l,c)},u.prototype.createObservableGauge=function(n,o){var c=dt(n,pt.OBSERVABLE_GAUGE,o),l=this._meterSharedState.registerAsyncMetricStorage(c);return new Oa(c,l,this._meterSharedState.observableRegistry)},u.prototype.createObservableCounter=function(n,o){var c=dt(n,pt.OBSERVABLE_COUNTER,o),l=this._meterSharedState.registerAsyncMetricStorage(c);return new Ta(c,l,this._meterSharedState.observableRegistry)},u.prototype.createObservableUpDownCounter=function(n,o){var c=dt(n,pt.OBSERVABLE_UP_DOWN_COUNTER,o),l=this._meterSharedState.registerAsyncMetricStorage(c);return new ga(c,l,this._meterSharedState.observableRegistry)},u.prototype.addBatchObservableCallback=function(n,o){this._meterSharedState.observableRegistry.addBatchCallback(n,o)},u.prototype.removeBatchObservableCallback=function(n,o){this._meterSharedState.observableRegistry.removeBatchCallback(n,o)},u}();var dr=function(){function u(n){this._instrumentDescriptor=n}return u.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},u.prototype.updateDescription=function(n){this._instrumentDescriptor=dt(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:n,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})},u}();var ef=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),Na=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},rf=function(){function u(n){this._hash=n,this._valueMap=new Map,this._keyMap=new Map}return u.prototype.get=function(n,o){return o??(o=this._hash(n)),this._valueMap.get(o)},u.prototype.getOrDefault=function(n,o){var c=this._hash(n);if(this._valueMap.has(c))return this._valueMap.get(c);var l=o();return this._keyMap.has(c)||this._keyMap.set(c,n),this._valueMap.set(c,l),l},u.prototype.set=function(n,o,c){c??(c=this._hash(n)),this._keyMap.has(c)||this._keyMap.set(c,n),this._valueMap.set(c,o)},u.prototype.has=function(n,o){return o??(o=this._hash(n)),this._valueMap.has(o)},u.prototype.keys=function(){var n,o;return Na(this,function(c){switch(c.label){case 0:n=this._keyMap.entries(),o=n.next(),c.label=1;case 1:return o.done===!0?[3,3]:[4,[o.value[1],o.value[0]]];case 2:return c.sent(),o=n.next(),[3,1];case 3:return[2]}})},u.prototype.entries=function(){var n,o;return Na(this,function(c){switch(c.label){case 0:n=this._valueMap.entries(),o=n.next(),c.label=1;case 1:return o.done===!0?[3,3]:[4,[this._keyMap.get(o.value[0]),o.value[1],o.value[0]]];case 2:return c.sent(),o=n.next(),[3,1];case 3:return[2]}})},Object.defineProperty(u.prototype,"size",{get:function(){return this._valueMap.size},enumerable:!1,configurable:!0}),u}();var et=function(u){ef(n,u);function n(){return u.call(this,ca)||this}return n}(rf);var nf=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},yr=function(){function u(n){this._aggregator=n,this._activeCollectionStorage=new et,this._cumulativeMemoStorage=new et}return u.prototype.record=function(n,o,c,l){var i=this,e=this._activeCollectionStorage.getOrDefault(o,function(){return i._aggregator.createAccumulation(l)});e?.record(n)},u.prototype.batchCumulate=function(n,o){var c=this;Array.from(n.entries()).forEach(function(l){var i=nf(l,3),e=i[0],t=i[1],r=i[2],a=c._aggregator.createAccumulation(o);a?.record(t);var s=a;if(c._cumulativeMemoStorage.has(e,r)){var d=c._cumulativeMemoStorage.get(e,r);s=c._aggregator.diff(d,a)}if(c._activeCollectionStorage.has(e,r)){var v=c._activeCollectionStorage.get(e,r);s=c._aggregator.merge(v,s)}c._cumulativeMemoStorage.set(e,a,r),c._activeCollectionStorage.set(e,s,r)})},u.prototype.collect=function(){var n=this._activeCollectionStorage;return this._activeCollectionStorage=new et,n},u}();var xn=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Pa=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},hr=function(){function u(n,o){var c=this;this._aggregator=n,this._unreportedAccumulations=new Map,this._reportHistory=new Map,o.forEach(function(l){c._unreportedAccumulations.set(l,[])})}return u.prototype.buildMetrics=function(n,o,c,l){this._stashAccumulations(c);var i=this._getMergedUnreportedAccumulations(n),e=i,t;if(this._reportHistory.has(n)){var r=this._reportHistory.get(n),a=r.collectionTime;t=r.aggregationTemporality,t===fr.CUMULATIVE?e=u.merge(r.accumulations,i,this._aggregator):e=u.calibrateStartTime(r.accumulations,i,a)}else t=n.selectAggregationTemporality(o.type);this._reportHistory.set(n,{accumulations:e,collectionTime:l,aggregationTemporality:t});var s=of(e);if(s.length!==0)return this._aggregator.toMetricData(o,t,s,l)},u.prototype._stashAccumulations=function(n){var o,c,l=this._unreportedAccumulations.keys();try{for(var i=xn(l),e=i.next();!e.done;e=i.next()){var t=e.value,r=this._unreportedAccumulations.get(t);r===void 0&&(r=[],this._unreportedAccumulations.set(t,r)),r.push(n)}}catch(a){o={error:a}}finally{try{e&&!e.done&&(c=i.return)&&c.call(i)}finally{if(o)throw o.error}}},u.prototype._getMergedUnreportedAccumulations=function(n){var o,c,l=new et,i=this._unreportedAccumulations.get(n);if(this._unreportedAccumulations.set(n,[]),i===void 0)return l;try{for(var e=xn(i),t=e.next();!t.done;t=e.next()){var r=t.value;l=u.merge(l,r,this._aggregator)}}catch(a){o={error:a}}finally{try{t&&!t.done&&(c=e.return)&&c.call(e)}finally{if(o)throw o.error}}return l},u.merge=function(n,o,c){for(var l=n,i=o.entries(),e=i.next();e.done!==!0;){var t=Pa(e.value,3),r=t[0],a=t[1],s=t[2];if(n.has(r,s)){var d=n.get(r,s),v=c.merge(d,a);l.set(r,v,s)}else l.set(r,a,s);e=i.next()}return l},u.calibrateStartTime=function(n,o,c){var l,i;try{for(var e=xn(n.keys()),t=e.next();!t.done;t=e.next()){var r=Pa(t.value,2),a=r[0],s=r[1],d=o.get(a,s);d?.setStartTime(c)}}catch(v){l={error:v}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(l)throw l.error}}return o},u}();function of(u){return Array.from(u.entries())}var af=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),uf=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},xa=function(u){af(n,u);function n(o,c,l,i){var e=u.call(this,o)||this;return e._attributesProcessor=l,e._deltaMetricStorage=new yr(c),e._temporalMetricStorage=new hr(c,i),e}return n.prototype.record=function(o,c){var l=this,i=new et;Array.from(o.entries()).forEach(function(e){var t=uf(e,2),r=t[0],a=t[1];i.set(l._attributesProcessor.process(r),a)}),this._deltaMetricStorage.batchCumulate(i,c)},n.prototype.collect=function(o,c){var l=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(o,this._instrumentDescriptor,l,c)},n}(dr);S();function Rn(u,n){var o="";return u.unit!==n.unit&&(o+=" - Unit '"+u.unit+"' does not match '"+n.unit+`'
|
|
5
|
+
var Rl=Object.create;var Vr=Object.defineProperty;var Ll=Object.getOwnPropertyDescriptor;var Il=Object.getOwnPropertyNames;var wl=Object.getPrototypeOf,Cl=Object.prototype.hasOwnProperty;var Gr=(u,n)=>()=>(u&&(n=u(u=0)),n);var m=(u,n)=>()=>(n||u((n={exports:{}}).exports,n),n.exports);var Ae=(u,n,o,c)=>{if(n&&typeof n=="object"||typeof n=="function")for(let l of Il(n))!Cl.call(u,l)&&l!==o&&Vr(u,l,{get:()=>n[l],enumerable:!(c=Ll(n,l))||c.enumerable});return u},Q=(u,n,o)=>(Ae(u,n,"default"),o&&Ae(o,n,"default")),N=(u,n,o)=>(o=u!=null?Rl(wl(u)):{},Ae(n||!u||!u.__esModule?Vr(o,"default",{value:u,enumerable:!0}):o,u)),C=u=>Ae(Vr({},"__esModule",{value:!0}),u);var y={};import*as Bp from"@opentelemetry/api";var S=Gr(()=>{Q(y,Bp)});var ue=m(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.isTracingSuppressed=ht.unsuppressTracing=ht.suppressTracing=void 0;var Ul=(S(),C(y)),Hr=(0,Ul.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Ml(u){return u.setValue(Hr,!0)}ht.suppressTracing=Ml;function Dl(u){return u.deleteValue(Hr)}ht.unsuppressTracing=Dl;function Bl(u){return u.getValue(Hr)===!0}ht.isTracingSuppressed=Bl});var jr=m(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.BAGGAGE_MAX_TOTAL_LENGTH=H.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=H.BAGGAGE_MAX_NAME_VALUE_PAIRS=H.BAGGAGE_HEADER=H.BAGGAGE_ITEMS_SEPARATOR=H.BAGGAGE_PROPERTIES_SEPARATOR=H.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;H.BAGGAGE_KEY_PAIR_SEPARATOR="=";H.BAGGAGE_PROPERTIES_SEPARATOR=";";H.BAGGAGE_ITEMS_SEPARATOR=",";H.BAGGAGE_HEADER="baggage";H.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;H.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;H.BAGGAGE_MAX_TOTAL_LENGTH=8192});var Fr=m(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.parseKeyPairsIntoRecord=at.parsePairKeyValue=at.getKeyPairs=at.serializeKeyPairs=void 0;var kl=(S(),C(y)),It=jr();function Vl(u){return u.reduce((n,o)=>{let c=`${n}${n!==""?It.BAGGAGE_ITEMS_SEPARATOR:""}${o}`;return c.length>It.BAGGAGE_MAX_TOTAL_LENGTH?n:c},"")}at.serializeKeyPairs=Vl;function Gl(u){return u.getAllEntries().map(([n,o])=>{let c=`${encodeURIComponent(n)}=${encodeURIComponent(o.value)}`;return o.metadata!==void 0&&(c+=It.BAGGAGE_PROPERTIES_SEPARATOR+o.metadata.toString()),c})}at.getKeyPairs=Gl;function bo(u){let n=u.split(It.BAGGAGE_PROPERTIES_SEPARATOR);if(n.length<=0)return;let o=n.shift();if(!o)return;let c=o.indexOf(It.BAGGAGE_KEY_PAIR_SEPARATOR);if(c<=0)return;let l=decodeURIComponent(o.substring(0,c).trim()),i=decodeURIComponent(o.substring(c+1).trim()),e;return n.length>0&&(e=(0,kl.baggageEntryMetadataFromString)(n.join(It.BAGGAGE_PROPERTIES_SEPARATOR))),{key:l,value:i,metadata:e}}at.parsePairKeyValue=bo;function Hl(u){return typeof u!="string"||u.length===0?{}:u.split(It.BAGGAGE_ITEMS_SEPARATOR).map(n=>bo(n)).filter(n=>n!==void 0&&n.value.length>0).reduce((n,o)=>(n[o.key]=o.value,n),{})}at.parseKeyPairsIntoRecord=Hl});var So=m(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.W3CBaggagePropagator=void 0;var qr=(S(),C(y)),jl=ue(),wt=jr(),Kr=Fr(),Xr=class{inject(n,o,c){let l=qr.propagation.getBaggage(n);if(!l||(0,jl.isTracingSuppressed)(n))return;let i=(0,Kr.getKeyPairs)(l).filter(t=>t.length<=wt.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,wt.BAGGAGE_MAX_NAME_VALUE_PAIRS),e=(0,Kr.serializeKeyPairs)(i);e.length>0&&c.set(o,wt.BAGGAGE_HEADER,e)}extract(n,o,c){let l=c.get(o,wt.BAGGAGE_HEADER),i=Array.isArray(l)?l.join(wt.BAGGAGE_ITEMS_SEPARATOR):l;if(!i)return n;let e={};return i.length===0||(i.split(wt.BAGGAGE_ITEMS_SEPARATOR).forEach(r=>{let a=(0,Kr.parsePairKeyValue)(r);if(a){let s={value:a.value};a.metadata&&(s.metadata=a.metadata),e[a.key]=s}}),Object.entries(e).length===0)?n:qr.propagation.setBaggage(n,qr.propagation.createBaggage(e))}fields(){return[wt.BAGGAGE_HEADER]}};Ne.W3CBaggagePropagator=Xr});var To=m(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.AnchoredClock=void 0;var Yr=class{constructor(n,o){this._monotonicClock=o,this._epochMillis=n.now(),this._performanceMillis=o.now()}now(){let n=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+n}};Pe.AnchoredClock=Yr});var Po=m(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.isAttributeValue=mt.isAttributeKey=mt.sanitizeAttributes=void 0;var Oo=(S(),C(y));function Fl(u){let n={};if(typeof u!="object"||u==null)return n;for(let[o,c]of Object.entries(u)){if(!go(o)){Oo.diag.warn(`Invalid attribute key: ${o}`);continue}if(!Ao(c)){Oo.diag.warn(`Invalid attribute value set for key: ${o}`);continue}Array.isArray(c)?n[o]=c.slice():n[o]=c}return n}mt.sanitizeAttributes=Fl;function go(u){return typeof u=="string"&&u.length>0}mt.isAttributeKey=go;function Ao(u){return u==null?!0:Array.isArray(u)?ql(u):No(u)}mt.isAttributeValue=Ao;function ql(u){let n;for(let o of u)if(o!=null){if(!n){if(No(o)){n=typeof o;continue}return!1}if(typeof o!==n)return!1}return!0}function No(u){switch(typeof u){case"number":case"boolean":case"string":return!0}return!1}});var Jr=m(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.loggingErrorHandler=void 0;var Kl=(S(),C(y));function Xl(){return u=>{Kl.diag.error(Yl(u))}}xe.loggingErrorHandler=Xl;function Yl(u){return typeof u=="string"?u:JSON.stringify(Jl(u))}function Jl(u){let n={},o=u;for(;o!==null;)Object.getOwnPropertyNames(o).forEach(c=>{if(n[c])return;let l=o[c];l&&(n[c]=String(l))}),o=Object.getPrototypeOf(o);return n}});var zr=m(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.globalErrorHandler=Ht.setGlobalErrorHandler=void 0;var zl=Jr(),xo=(0,zl.loggingErrorHandler)();function Wl(u){xo=u}Ht.setGlobalErrorHandler=Wl;function $l(u){try{xo(u)}catch{}}Ht.globalErrorHandler=$l});var Wr=m(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.TracesSamplerValues=void 0;var Ql;(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"})(Ql=le.TracesSamplerValues||(le.TracesSamplerValues={}))});var Le=m(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re._globalThis=void 0;Re._globalThis=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});var Ie=m(I=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0});I.getEnvWithoutDefaults=I.parseEnvironment=I.DEFAULT_ENVIRONMENT=I.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=I.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=I.DEFAULT_ATTRIBUTE_COUNT_LIMIT=I.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=void 0;var vt=(S(),C(y)),Zl=Wr(),tc=Le(),ec=",",rc=["OTEL_SDK_DISABLED"];function nc(u){return rc.indexOf(u)>-1}var oc=["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 ic(u){return oc.indexOf(u)>-1}var ac=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function uc(u){return ac.indexOf(u)>-1}I.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=1/0;I.DEFAULT_ATTRIBUTE_COUNT_LIMIT=128;I.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=128;I.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=128;I.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:vt.DiagLogLevel.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:I.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_ATTRIBUTE_COUNT_LIMIT:I.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:I.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:I.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:I.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:I.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:I.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:I.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:Zl.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 lc(u,n,o){if(typeof o[u]>"u")return;let c=String(o[u]);n[u]=c.toLowerCase()==="true"}function cc(u,n,o,c=-1/0,l=1/0){if(typeof o[u]<"u"){let i=Number(o[u]);isNaN(i)||(i<c?n[u]=c:i>l?n[u]=l:n[u]=i)}}function sc(u,n,o,c=ec){let l=o[u];typeof l=="string"&&(n[u]=l.split(c).map(i=>i.trim()))}var fc={ALL:vt.DiagLogLevel.ALL,VERBOSE:vt.DiagLogLevel.VERBOSE,DEBUG:vt.DiagLogLevel.DEBUG,INFO:vt.DiagLogLevel.INFO,WARN:vt.DiagLogLevel.WARN,ERROR:vt.DiagLogLevel.ERROR,NONE:vt.DiagLogLevel.NONE};function pc(u,n,o){let c=o[u];if(typeof c=="string"){let l=fc[c.toUpperCase()];l!=null&&(n[u]=l)}}function $r(u){let n={};for(let o in I.DEFAULT_ENVIRONMENT){let c=o;switch(c){case"OTEL_LOG_LEVEL":pc(c,n,u);break;default:if(nc(c))lc(c,n,u);else if(ic(c))cc(c,n,u);else if(uc(c))sc(c,n,u);else{let l=u[c];typeof l<"u"&&l!==null&&(n[c]=String(l))}}}return n}I.parseEnvironment=$r;function dc(){return typeof process<"u"&&process&&process.env?$r(process.env):$r(tc._globalThis)}I.getEnvWithoutDefaults=dc});var Lo=m(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.getEnv=void 0;var Ro=Ie(),yc=Le();function hc(){let u=(0,Ro.parseEnvironment)(yc._globalThis);return Object.assign({},Ro.DEFAULT_ENVIRONMENT,u)}we.getEnv=hc});var Io=m(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.hexToBase64=void 0;function mc(u){let n=u.length,o="";for(let c=0;c<n;c+=2){let l=u.substring(c,c+2),i=parseInt(l,16);o+=String.fromCharCode(i)}return btoa(o)}Ce.hexToBase64=mc});var Co=m(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.RandomIdGenerator=void 0;var vc=8,_c=16,Qr=class{constructor(){this.generateTraceId=wo(_c),this.generateSpanId=wo(vc)}};Me.RandomIdGenerator=Qr;var Ue=Array(32);function wo(u){return function(){for(let o=0;o<u*2;o++)Ue[o]=Math.floor(Math.random()*16)+48,Ue[o]>=58&&(Ue[o]+=39);return String.fromCharCode.apply(null,Ue.slice(0,u*2))}}});var Uo=m(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.otperformance=void 0;De.otperformance=performance});var Zr=m(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.VERSION=void 0;Be.VERSION="1.19.0"});var Mo=m(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.MessageTypeValues=P.RpcGrpcStatusCodeValues=P.MessagingOperationValues=P.MessagingDestinationKindValues=P.HttpFlavorValues=P.NetHostConnectionSubtypeValues=P.NetHostConnectionTypeValues=P.NetTransportValues=P.FaasInvokedProviderValues=P.FaasDocumentOperationValues=P.FaasTriggerValues=P.DbCassandraConsistencyLevelValues=P.DbSystemValues=P.SemanticAttributes=void 0;P.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"};P.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"};P.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"};P.FaasTriggerValues={DATASOURCE:"datasource",HTTP:"http",PUBSUB:"pubsub",TIMER:"timer",OTHER:"other"};P.FaasDocumentOperationValues={INSERT:"insert",EDIT:"edit",DELETE:"delete"};P.FaasInvokedProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};P.NetTransportValues={IP_TCP:"ip_tcp",IP_UDP:"ip_udp",IP:"ip",UNIX:"unix",PIPE:"pipe",INPROC:"inproc",OTHER:"other"};P.NetHostConnectionTypeValues={WIFI:"wifi",WIRED:"wired",CELL:"cell",UNAVAILABLE:"unavailable",UNKNOWN:"unknown"};P.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"};P.HttpFlavorValues={HTTP_1_0:"1.0",HTTP_1_1:"1.1",HTTP_2_0:"2.0",SPDY:"SPDY",QUIC:"QUIC"};P.MessagingDestinationKindValues={QUEUE:"queue",TOPIC:"topic"};P.MessagingOperationValues={RECEIVE:"receive",PROCESS:"process"};P.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};P.MessageTypeValues={SENT:"SENT",RECEIVED:"RECEIVED"}});var Do=m(Ct=>{"use strict";var Ec=Ct&&Ct.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),bc=Ct&&Ct.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&Ec(n,u,o)};Object.defineProperty(Ct,"__esModule",{value:!0});bc(Mo(),Ct)});var Bo=m(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.TelemetrySdkLanguageValues=j.OsTypeValues=j.HostArchValues=j.AwsEcsLaunchtypeValues=j.CloudPlatformValues=j.CloudProviderValues=j.SemanticResourceAttributes=void 0;j.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"};j.CloudProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};j.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"};j.AwsEcsLaunchtypeValues={EC2:"ec2",FARGATE:"fargate"};j.HostArchValues={AMD64:"amd64",ARM32:"arm32",ARM64:"arm64",IA64:"ia64",PPC32:"ppc32",PPC64:"ppc64",X86:"x86"};j.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"};j.TelemetrySdkLanguageValues={CPP:"cpp",DOTNET:"dotnet",ERLANG:"erlang",GO:"go",JAVA:"java",NODEJS:"nodejs",PHP:"php",PYTHON:"python",RUBY:"ruby",WEBJS:"webjs"}});var ko=m(Ut=>{"use strict";var Sc=Ut&&Ut.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),Tc=Ut&&Ut.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&Sc(n,u,o)};Object.defineProperty(Ut,"__esModule",{value:!0});Tc(Bo(),Ut)});var Et=m(_t=>{"use strict";var Oc=_t&&_t.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),Vo=_t&&_t.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&Oc(n,u,o)};Object.defineProperty(_t,"__esModule",{value:!0});Vo(Do(),_t);Vo(ko(),_t)});var Go=m(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.SDK_INFO=void 0;var gc=Zr(),ce=Et();ke.SDK_INFO={[ce.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:"opentelemetry",[ce.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"browser",[ce.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:ce.TelemetrySdkLanguageValues.WEBJS,[ce.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:gc.VERSION}});var Ho=m(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.unrefTimer=void 0;function Ac(u){}Ve.unrefTimer=Ac});var tn=m(X=>{"use strict";var Nc=X&&X.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),Mt=X&&X.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&Nc(n,u,o)};Object.defineProperty(X,"__esModule",{value:!0});Mt(Lo(),X);Mt(Le(),X);Mt(Io(),X);Mt(Co(),X);Mt(Uo(),X);Mt(Go(),X);Mt(Ho(),X)});var Ko=m(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.addHrTimes=R.isTimeInput=R.isTimeInputHrTime=R.hrTimeToMicroseconds=R.hrTimeToMilliseconds=R.hrTimeToNanoseconds=R.hrTimeToTimeStamp=R.hrTimeDuration=R.timeInputToHrTime=R.hrTime=R.getTimeOrigin=R.millisToHrTime=void 0;var en=tn(),jo=9,Pc=6,xc=Math.pow(10,Pc),Ge=Math.pow(10,jo);function se(u){let n=u/1e3,o=Math.trunc(n),c=Math.round(u%1e3*xc);return[o,c]}R.millisToHrTime=se;function rn(){let u=en.otperformance.timeOrigin;if(typeof u!="number"){let n=en.otperformance;u=n.timing&&n.timing.fetchStart}return u}R.getTimeOrigin=rn;function Fo(u){let n=se(rn()),o=se(typeof u=="number"?u:en.otperformance.now());return qo(n,o)}R.hrTime=Fo;function Rc(u){if(nn(u))return u;if(typeof u=="number")return u<rn()?Fo(u):se(u);if(u instanceof Date)return se(u.getTime());throw TypeError("Invalid input type")}R.timeInputToHrTime=Rc;function Lc(u,n){let o=n[0]-u[0],c=n[1]-u[1];return c<0&&(o-=1,c+=Ge),[o,c]}R.hrTimeDuration=Lc;function Ic(u){let n=jo,o=`${"0".repeat(n)}${u[1]}Z`,c=o.substr(o.length-n-1);return new Date(u[0]*1e3).toISOString().replace("000Z",c)}R.hrTimeToTimeStamp=Ic;function wc(u){return u[0]*Ge+u[1]}R.hrTimeToNanoseconds=wc;function Cc(u){return u[0]*1e3+u[1]/1e6}R.hrTimeToMilliseconds=Cc;function Uc(u){return u[0]*1e6+u[1]/1e3}R.hrTimeToMicroseconds=Uc;function nn(u){return Array.isArray(u)&&u.length===2&&typeof u[0]=="number"&&typeof u[1]=="number"}R.isTimeInputHrTime=nn;function Mc(u){return nn(u)||typeof u=="number"||u instanceof Date}R.isTimeInput=Mc;function qo(u,n){let o=[u[0]+n[0],u[1]+n[1]];return o[1]>=Ge&&(o[1]-=Ge,o[0]+=1),o}R.addHrTimes=qo});var Yo=m(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0})});var Jo=m(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.ExportResultCode=void 0;var Dc;(function(u){u[u.SUCCESS=0]="SUCCESS",u[u.FAILED=1]="FAILED"})(Dc=fe.ExportResultCode||(fe.ExportResultCode={}))});var Wo=m(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.CompositePropagator=void 0;var zo=(S(),C(y)),on=class{constructor(n={}){var o;this._propagators=(o=n.propagators)!==null&&o!==void 0?o:[],this._fields=Array.from(new Set(this._propagators.map(c=>typeof c.fields=="function"?c.fields():[]).reduce((c,l)=>c.concat(l),[])))}inject(n,o,c){for(let l of this._propagators)try{l.inject(n,o,c)}catch(i){zo.diag.warn(`Failed to inject with ${l.constructor.name}. Err: ${i.message}`)}}extract(n,o,c){return this._propagators.reduce((l,i)=>{try{return i.extract(l,o,c)}catch(e){zo.diag.warn(`Failed to inject with ${i.constructor.name}. Err: ${e.message}`)}return l},n)}fields(){return this._fields.slice()}};He.CompositePropagator=on});var $o=m(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.validateValue=jt.validateKey=void 0;var an="[_0-9a-z-*/]",Bc=`[a-z]${an}{0,255}`,kc=`[a-z0-9]${an}{0,240}@[a-z]${an}{0,13}`,Vc=new RegExp(`^(?:${Bc}|${kc})$`),Gc=/^[ -~]{0,255}[!-~]$/,Hc=/,|=/;function jc(u){return Vc.test(u)}jt.validateKey=jc;function Fc(u){return Gc.test(u)&&!Hc.test(u)}jt.validateValue=Fc});var ln=m(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.TraceState=void 0;var Qo=$o(),Zo=32,qc=512,ti=",",ei="=",un=class u{constructor(n){this._internalState=new Map,n&&this._parse(n)}set(n,o){let c=this._clone();return c._internalState.has(n)&&c._internalState.delete(n),c._internalState.set(n,o),c}unset(n){let o=this._clone();return o._internalState.delete(n),o}get(n){return this._internalState.get(n)}serialize(){return this._keys().reduce((n,o)=>(n.push(o+ei+this.get(o)),n),[]).join(ti)}_parse(n){n.length>qc||(this._internalState=n.split(ti).reverse().reduce((o,c)=>{let l=c.trim(),i=l.indexOf(ei);if(i!==-1){let e=l.slice(0,i),t=l.slice(i+1,c.length);(0,Qo.validateKey)(e)&&(0,Qo.validateValue)(t)&&o.set(e,t)}return o},new Map),this._internalState.size>Zo&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Zo))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let n=new u;return n._internalState=new Map(this._internalState),n}};je.TraceState=un});var ni=m(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.W3CTraceContextPropagator=F.parseTraceParent=F.TRACE_STATE_HEADER=F.TRACE_PARENT_HEADER=void 0;var Fe=(S(),C(y)),Kc=ue(),Xc=ln();F.TRACE_PARENT_HEADER="traceparent";F.TRACE_STATE_HEADER="tracestate";var Yc="00",Jc="(?!ff)[\\da-f]{2}",zc="(?![0]{32})[\\da-f]{32}",Wc="(?![0]{16})[\\da-f]{16}",$c="[\\da-f]{2}",Qc=new RegExp(`^\\s?(${Jc})-(${zc})-(${Wc})-(${$c})(-.*)?\\s?$`);function ri(u){let n=Qc.exec(u);return!n||n[1]==="00"&&n[5]?null:{traceId:n[2],spanId:n[3],traceFlags:parseInt(n[4],16)}}F.parseTraceParent=ri;var cn=class{inject(n,o,c){let l=Fe.trace.getSpanContext(n);if(!l||(0,Kc.isTracingSuppressed)(n)||!(0,Fe.isSpanContextValid)(l))return;let i=`${Yc}-${l.traceId}-${l.spanId}-0${Number(l.traceFlags||Fe.TraceFlags.NONE).toString(16)}`;c.set(o,F.TRACE_PARENT_HEADER,i),l.traceState&&c.set(o,F.TRACE_STATE_HEADER,l.traceState.serialize())}extract(n,o,c){let l=c.get(o,F.TRACE_PARENT_HEADER);if(!l)return n;let i=Array.isArray(l)?l[0]:l;if(typeof i!="string")return n;let e=ri(i);if(!e)return n;e.isRemote=!0;let t=c.get(o,F.TRACE_STATE_HEADER);if(t){let r=Array.isArray(t)?t.join(","):t;e.traceState=new Xc.TraceState(typeof r=="string"?r:void 0)}return Fe.trace.setSpanContext(n,e)}fields(){return[F.TRACE_PARENT_HEADER,F.TRACE_STATE_HEADER]}};F.W3CTraceContextPropagator=cn});var ii=m(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0})});var ai=m(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.getRPCMetadata=Z.deleteRPCMetadata=Z.setRPCMetadata=Z.RPCType=void 0;var Zc=(S(),C(y)),sn=(0,Zc.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),ts;(function(u){u.HTTP="http"})(ts=Z.RPCType||(Z.RPCType={}));function es(u,n){return u.setValue(sn,n)}Z.setRPCMetadata=es;function rs(u){return u.deleteValue(sn)}Z.deleteRPCMetadata=rs;function ns(u){return u.getValue(sn)}Z.getRPCMetadata=ns});var pn=m(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.AlwaysOffSampler=void 0;var os=(S(),C(y)),fn=class{shouldSample(){return{decision:os.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};qe.AlwaysOffSampler=fn});var yn=m(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.AlwaysOnSampler=void 0;var is=(S(),C(y)),dn=class{shouldSample(){return{decision:is.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};Ke.AlwaysOnSampler=dn});var li=m(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.ParentBasedSampler=void 0;var Xe=(S(),C(y)),as=zr(),ui=pn(),hn=yn(),mn=class{constructor(n){var o,c,l,i;this._root=n.root,this._root||((0,as.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new hn.AlwaysOnSampler),this._remoteParentSampled=(o=n.remoteParentSampled)!==null&&o!==void 0?o:new hn.AlwaysOnSampler,this._remoteParentNotSampled=(c=n.remoteParentNotSampled)!==null&&c!==void 0?c:new ui.AlwaysOffSampler,this._localParentSampled=(l=n.localParentSampled)!==null&&l!==void 0?l:new hn.AlwaysOnSampler,this._localParentNotSampled=(i=n.localParentNotSampled)!==null&&i!==void 0?i:new ui.AlwaysOffSampler}shouldSample(n,o,c,l,i,e){let t=Xe.trace.getSpanContext(n);return!t||!(0,Xe.isSpanContextValid)(t)?this._root.shouldSample(n,o,c,l,i,e):t.isRemote?t.traceFlags&Xe.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(n,o,c,l,i,e):this._remoteParentNotSampled.shouldSample(n,o,c,l,i,e):t.traceFlags&Xe.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(n,o,c,l,i,e):this._localParentNotSampled.shouldSample(n,o,c,l,i,e)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};Ye.ParentBasedSampler=mn});var ci=m(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.TraceIdRatioBasedSampler=void 0;var vn=(S(),C(y)),_n=class{constructor(n=0){this._ratio=n,this._ratio=this._normalize(n),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(n,o){return{decision:(0,vn.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?vn.SamplingDecision.RECORD_AND_SAMPLED:vn.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(n){return typeof n!="number"||isNaN(n)?0:n>=1?1:n<=0?0:n}_accumulate(n){let o=0;for(let c=0;c<n.length/8;c++){let l=c*8,i=parseInt(n.slice(l,l+8),16);o=(o^i)>>>0}return o}};Je.TraceIdRatioBasedSampler=_n});var yi=m(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.isPlainObject=void 0;var us="[object Object]",ls="[object Null]",cs="[object Undefined]",ss=Function.prototype,si=ss.toString,fs=si.call(Object),ps=ds(Object.getPrototypeOf,Object),fi=Object.prototype,pi=fi.hasOwnProperty,Dt=Symbol?Symbol.toStringTag:void 0,di=fi.toString;function ds(u,n){return function(o){return u(n(o))}}function ys(u){if(!hs(u)||ms(u)!==us)return!1;let n=ps(u);if(n===null)return!0;let o=pi.call(n,"constructor")&&n.constructor;return typeof o=="function"&&o instanceof o&&si.call(o)===fs}ze.isPlainObject=ys;function hs(u){return u!=null&&typeof u=="object"}function ms(u){return u==null?u===void 0?cs:ls:Dt&&Dt in Object(u)?vs(u):_s(u)}function vs(u){let n=pi.call(u,Dt),o=u[Dt],c=!1;try{u[Dt]=void 0,c=!0}catch{}let l=di.call(u);return c&&(n?u[Dt]=o:delete u[Dt]),l}function _s(u){return di.call(u)}});var Ei=m(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.merge=void 0;var hi=yi(),Es=20;function bs(...u){let n=u.shift(),o=new WeakMap;for(;u.length>0;)n=vi(n,u.shift(),0,o);return n}Qe.merge=bs;function En(u){return $e(u)?u.slice():u}function vi(u,n,o=0,c){let l;if(!(o>Es)){if(o++,We(u)||We(n)||_i(n))l=En(n);else if($e(u)){if(l=u.slice(),$e(n))for(let i=0,e=n.length;i<e;i++)l.push(En(n[i]));else if(pe(n)){let i=Object.keys(n);for(let e=0,t=i.length;e<t;e++){let r=i[e];l[r]=En(n[r])}}}else if(pe(u))if(pe(n)){if(!Ss(u,n))return n;l=Object.assign({},u);let i=Object.keys(n);for(let e=0,t=i.length;e<t;e++){let r=i[e],a=n[r];if(We(a))typeof a>"u"?delete l[r]:l[r]=a;else{let s=l[r],d=a;if(mi(u,r,c)||mi(n,r,c))delete l[r];else{if(pe(s)&&pe(d)){let v=c.get(s)||[],b=c.get(d)||[];v.push({obj:u,key:r}),b.push({obj:n,key:r}),c.set(s,v),c.set(d,b)}l[r]=vi(l[r],a,o,c)}}}}else l=n;return l}}function mi(u,n,o){let c=o.get(u[n])||[];for(let l=0,i=c.length;l<i;l++){let e=c[l];if(e.key===n&&e.obj===u)return!0}return!1}function $e(u){return Array.isArray(u)}function _i(u){return typeof u=="function"}function pe(u){return!We(u)&&!$e(u)&&!_i(u)&&typeof u=="object"}function We(u){return typeof u=="string"||typeof u=="number"||typeof u=="boolean"||typeof u>"u"||u instanceof Date||u instanceof RegExp||u===null}function Ss(u,n){return!(!(0,hi.isPlainObject)(u)||!(0,hi.isPlainObject)(n))}});var bi=m(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.callWithTimeout=Ft.TimeoutError=void 0;var Ze=class u extends Error{constructor(n){super(n),Object.setPrototypeOf(this,u.prototype)}};Ft.TimeoutError=Ze;function Ts(u,n){let o,c=new Promise(function(i,e){o=setTimeout(function(){e(new Ze("Operation timed out."))},n)});return Promise.race([u,c]).then(l=>(clearTimeout(o),l),l=>{throw clearTimeout(o),l})}Ft.callWithTimeout=Ts});var Ti=m(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.isUrlIgnored=qt.urlMatches=void 0;function Si(u,n){return typeof n=="string"?u===n:!!u.match(n)}qt.urlMatches=Si;function Os(u,n){if(!n)return!1;for(let o of n)if(Si(u,o))return!0;return!1}qt.isUrlIgnored=Os});var Oi=m(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.isWrapped=void 0;function gs(u){return typeof u=="function"&&typeof u.__original=="function"&&typeof u.__unwrap=="function"&&u.__wrapped===!0}tr.isWrapped=gs});var gi=m(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.Deferred=void 0;var bn=class{constructor(){this._promise=new Promise((n,o)=>{this._resolve=n,this._reject=o})}get promise(){return this._promise}resolve(n){this._resolve(n)}reject(n){this._reject(n)}};er.Deferred=bn});var Ai=m(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.BindOnceFuture=void 0;var As=gi(),Sn=class{constructor(n,o){this._callback=n,this._that=o,this._isCalled=!1,this._deferred=new As.Deferred}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...n){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...n)).then(o=>this._deferred.resolve(o),o=>this._deferred.reject(o))}catch(o){this._deferred.reject(o)}}return this._deferred.promise}};rr.BindOnceFuture=Sn});var Pi=m(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr._export=void 0;var Ni=(S(),C(y)),Ns=ue();function Ps(u,n){return new Promise(o=>{Ni.context.with((0,Ns.suppressTracing)(Ni.context.active()),()=>{u.export(n,c=>{o(c)})})})}nr._export=Ps});var U=m(O=>{"use strict";var xs=O&&O.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),x=O&&O.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&xs(n,u,o)};Object.defineProperty(O,"__esModule",{value:!0});O.internal=O.baggageUtils=void 0;x(So(),O);x(To(),O);x(Po(),O);x(zr(),O);x(Jr(),O);x(Ko(),O);x(Yo(),O);x(Jo(),O);O.baggageUtils=Fr();x(tn(),O);x(Wo(),O);x(ni(),O);x(ii(),O);x(ai(),O);x(pn(),O);x(yn(),O);x(li(),O);x(ci(),O);x(ue(),O);x(ln(),O);x(Ie(),O);x(Ei(),O);x(Wr(),O);x(bi(),O);x(Ti(),O);x(Oi(),O);x(Ai(),O);x(Zr(),O);var Rs=Pi();O.internal={_export:Rs._export}});var Ji=m(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.disableInstrumentations=gt.enableInstrumentations=gt.parseInstrumentationOptions=void 0;function Yi(u=[]){let n=[];for(let o=0,c=u.length;o<c;o++){let l=u[o];if(Array.isArray(l)){let i=Yi(l);n=n.concat(i.instrumentations)}else typeof l=="function"?n.push(new l):l.instrumentationName&&n.push(l)}return{instrumentations:n}}gt.parseInstrumentationOptions=Yi;function Xs(u,n,o){for(let c=0,l=u.length;c<l;c++){let i=u[c];n&&i.setTracerProvider(n),o&&i.setMeterProvider(o),i.getConfig().enabled||i.enable()}}gt.enableInstrumentations=Xs;function Ys(u){u.forEach(n=>n.disable())}gt.disableInstrumentations=Ys});var Wi=m(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.registerInstrumentations=void 0;var zi=(S(),C(y)),On=Ji();function Js(u){let{instrumentations:n}=(0,On.parseInstrumentationOptions)(u.instrumentations),o=u.tracerProvider||zi.trace.getTracerProvider(),c=u.meterProvider||zi.metrics.getMeterProvider();return(0,On.enableInstrumentations)(n,o,c),()=>{(0,On.disableInstrumentations)(n)}}cr.registerInstrumentations=Js});var he={};import*as ym from"async_hooks";var Ka=Gr(()=>{Q(he,ym)});var me={};import*as hm from"events";var Xa=Gr(()=>{Q(me,hm)});var Ya=m(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.AbstractAsyncHooksContextManager=void 0;var gf=(Xa(),C(me)),Af=["addListener","on","once","prependListener","prependOnceListener"],Mn=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(n,o){return o instanceof gf.EventEmitter?this._bindEventEmitter(n,o):typeof o=="function"?this._bindFunction(n,o):o}_bindFunction(n,o){let c=this,l=function(...i){return c.with(n,()=>o.apply(this,i))};return Object.defineProperty(l,"length",{enumerable:!1,configurable:!0,writable:!1,value:o.length}),l}_bindEventEmitter(n,o){return this._getPatchMap(o)!==void 0||(this._createPatchMap(o),Af.forEach(l=>{o[l]!==void 0&&(o[l]=this._patchAddListener(o,o[l],n))}),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(n,o){let c=this;return function(l,i){var e;let t=(e=c._getPatchMap(n))===null||e===void 0?void 0:e[l];if(t===void 0)return o.call(this,l,i);let r=t.get(i);return o.call(this,l,r||i)}}_patchRemoveAllListeners(n,o){let c=this;return function(l){let i=c._getPatchMap(n);return i!==void 0&&(arguments.length===0?c._createPatchMap(n):i[l]!==void 0&&delete i[l]),o.apply(this,arguments)}}_patchAddListener(n,o,c){let l=this;return function(i,e){if(l._wrapped)return o.call(this,i,e);let t=l._getPatchMap(n);t===void 0&&(t=l._createPatchMap(n));let r=t[i];r===void 0&&(r=new WeakMap,t[i]=r);let a=l.bind(c,e);r.set(e,a),l._wrapped=!0;try{return o.call(this,i,a)}finally{l._wrapped=!1}}}_createPatchMap(n){let o=Object.create(null);return n[this._kOtListeners]=o,o}_getPatchMap(n){return n[this._kOtListeners]}};Er.AbstractAsyncHooksContextManager=Mn});var Ja=m(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.AsyncLocalStorageContextManager=void 0;var Nf=(S(),C(y)),Pf=(Ka(),C(he)),xf=Ya(),Dn=class extends xf.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new Pf.AsyncLocalStorage}active(){var n;return(n=this._asyncLocalStorage.getStore())!==null&&n!==void 0?n:Nf.ROOT_CONTEXT}with(n,o,c,...l){let i=c==null?o:o.bind(c);return this._asyncLocalStorage.run(n,i,...l)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};br.AsyncLocalStorageContextManager=Dn});var Hn=m(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.toAnyValue=At.toKeyValue=At.toAttributes=void 0;function wf(u){return Object.keys(u).map(n=>Vn(n,u[n]))}At.toAttributes=wf;function Vn(u,n){return{key:u,value:Gn(n)}}At.toKeyValue=Vn;function Gn(u){let n=typeof u;return n==="string"?{stringValue:u}:n==="number"?Number.isInteger(u)?{intValue:u}:{doubleValue:u}:n==="boolean"?{boolValue:u}:u instanceof Uint8Array?{bytesValue:u}:Array.isArray(u)?{arrayValue:{values:u.map(Gn)}}:n==="object"&&u!=null?{kvlistValue:{values:Object.entries(u).map(([o,c])=>Vn(o,c))}}:{}}At.toAnyValue=Gn});var tu=m(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.toOtlpSpanEvent=Nt.toOtlpLink=Nt.sdkSpanToOtlpSpan=void 0;var jn=Hn();function Cf(u,n){var o;let c=u.spanContext(),l=u.status;return{traceId:n.encodeSpanContext(c.traceId),spanId:n.encodeSpanContext(c.spanId),parentSpanId:n.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:n.encodeHrTime(u.startTime),endTimeUnixNano:n.encodeHrTime(u.endTime),attributes:(0,jn.toAttributes)(u.attributes),droppedAttributesCount:u.droppedAttributesCount,events:u.events.map(i=>Za(i,n)),droppedEventsCount:u.droppedEventsCount,status:{code:l.code,message:l.message},links:u.links.map(i=>Qa(i,n)),droppedLinksCount:u.droppedLinksCount}}Nt.sdkSpanToOtlpSpan=Cf;function Qa(u,n){var o;return{attributes:u.attributes?(0,jn.toAttributes)(u.attributes):[],spanId:n.encodeSpanContext(u.context.spanId),traceId:n.encodeSpanContext(u.context.traceId),traceState:(o=u.context.traceState)===null||o===void 0?void 0:o.serialize(),droppedAttributesCount:u.droppedAttributesCount||0}}Nt.toOtlpLink=Qa;function Za(u,n){return{attributes:u.attributes?(0,jn.toAttributes)(u.attributes):[],name:u.name,timeUnixNano:n.encodeHrTime(u.time),droppedAttributesCount:u.droppedAttributesCount||0}}Nt.toOtlpSpanEvent=Za});var iu=m(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.getOtlpEncoder=z.encodeAsString=z.encodeAsLongBits=z.toLongBits=z.hrTimeToNanos=void 0;var gr=U(),Uf=BigInt(1e9);function Fn(u){return BigInt(u[0])*Uf+BigInt(u[1])}z.hrTimeToNanos=Fn;function ru(u){let n=Number(BigInt.asUintN(32,u)),o=Number(BigInt.asUintN(32,u>>BigInt(32)));return{low:n,high:o}}z.toLongBits=ru;function qn(u){let n=Fn(u);return ru(n)}z.encodeAsLongBits=qn;function nu(u){return Fn(u).toString()}z.encodeAsString=nu;var Mf=typeof BigInt<"u"?nu:gr.hrTimeToNanoseconds;function eu(u){return u}function ou(u){if(u!==void 0)return(0,gr.hexToBase64)(u)}var Df={encodeHrTime:qn,encodeSpanContext:gr.hexToBase64,encodeOptionalSpanContext:ou};function Bf(u){var n,o;if(u===void 0)return Df;let c=(n=u.useLongBits)!==null&&n!==void 0?n:!0,l=(o=u.useHex)!==null&&o!==void 0?o:!1;return{encodeHrTime:c?qn:Mf,encodeSpanContext:l?eu:gr.hexToBase64,encodeOptionalSpanContext:l?eu:ou}}z.getOtlpEncoder=Bf});var Kn=m(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.createExportTraceServiceRequest=void 0;var kf=Hn(),Vf=tu(),Gf=iu();function Hf(u,n){let o=(0,Gf.getOtlpEncoder)(n);return{resourceSpans:Ff(u,o)}}Ar.createExportTraceServiceRequest=Hf;function jf(u){let n=new Map;for(let o of u){let c=n.get(o.resource);c||(c=new Map,n.set(o.resource,c));let l=`${o.instrumentationLibrary.name}@${o.instrumentationLibrary.version||""}:${o.instrumentationLibrary.schemaUrl||""}`,i=c.get(l);i||(i=[],c.set(l,i)),i.push(o)}return n}function Ff(u,n){let o=jf(u),c=[],l=o.entries(),i=l.next();for(;!i.done;){let[e,t]=i.value,r=[],a=t.values(),s=a.next();for(;!s.done;){let v=s.value;if(v.length>0){let{name:b,version:g,schemaUrl:G}=v[0].instrumentationLibrary,B=v.map(yt=>(0,Vf.sdkSpanToOtlpSpan)(yt,n));r.push({scope:{name:b,version:g},spans:B,schemaUrl:G})}s=a.next()}let d={resource:{attributes:(0,kf.toAttributes)(e.attributes),droppedAttributesCount:0},scopeSpans:r,schemaUrl:void 0};c.push(d),i=l.next()}return c}});var ve=m(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.parseRetryAfterToMills=w.isExportRetryable=w.invalidTimeout=w.configureExporterTimeout=w.appendRootPathToUrlIfNeeded=w.appendResourcePathToUrl=w.parseHeaders=w.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=w.DEFAULT_EXPORT_MAX_BACKOFF=w.DEFAULT_EXPORT_INITIAL_BACKOFF=w.DEFAULT_EXPORT_MAX_ATTEMPTS=void 0;var Xn=(S(),C(y)),au=U(),uu=1e4;w.DEFAULT_EXPORT_MAX_ATTEMPTS=5;w.DEFAULT_EXPORT_INITIAL_BACKOFF=1e3;w.DEFAULT_EXPORT_MAX_BACKOFF=5e3;w.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=1.5;function qf(u={}){let n={};return Object.entries(u).forEach(([o,c])=>{typeof c<"u"?n[o]=String(c):Xn.diag.warn(`Header "${o}" has wrong value and will be ignored`)}),n}w.parseHeaders=qf;function Kf(u,n){return u.endsWith("/")||(u=u+"/"),u+n}w.appendResourcePathToUrl=Kf;function Xf(u){try{let n=new URL(u);return n.pathname===""&&(n.pathname=n.pathname+"/"),n.toString()}catch{return Xn.diag.warn(`Could not parse export URL: '${u}'`),u}}w.appendRootPathToUrlIfNeeded=Xf;function Yf(u){return typeof u=="number"?u<=0?Yn(u,uu):u:Jf()}w.configureExporterTimeout=Yf;function Jf(){var u;let n=Number((u=(0,au.getEnv)().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)!==null&&u!==void 0?u:(0,au.getEnv)().OTEL_EXPORTER_OTLP_TIMEOUT);return n<=0?Yn(n,uu):n}function Yn(u,n){return Xn.diag.warn("Timeout must be greater than 0",u),n}w.invalidTimeout=Yn;function zf(u){return[429,502,503,504].includes(u)}w.isExportRetryable=zf;function Wf(u){if(u==null)return-1;let n=Number.parseInt(u,10);if(Number.isInteger(n))return n>0?n*1e3:-1;let o=new Date(u).getTime()-Date.now();return o>=0?o:0}w.parseRetryAfterToMills=Wf});var Pr=m(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.OTLPExporterBase=void 0;var lu=(S(),C(y)),_e=U(),$f=ve(),Jn=class{constructor(n={}){this._sendingPromises=[],this.url=this.getDefaultUrl(n),typeof n.hostname=="string"&&(this.hostname=n.hostname),this.shutdown=this.shutdown.bind(this),this._shutdownOnce=new _e.BindOnceFuture(this._shutdown,this),this._concurrencyLimit=typeof n.concurrencyLimit=="number"?n.concurrencyLimit:30,this.timeoutMillis=(0,$f.configureExporterTimeout)(n.timeoutMillis),this.onInit(n)}export(n,o){if(this._shutdownOnce.isCalled){o({code:_e.ExportResultCode.FAILED,error:new Error("Exporter has been shutdown")});return}if(this._sendingPromises.length>=this._concurrencyLimit){o({code:_e.ExportResultCode.FAILED,error:new Error("Concurrent export limit reached")});return}this._export(n).then(()=>{o({code:_e.ExportResultCode.SUCCESS})}).catch(c=>{o({code:_e.ExportResultCode.FAILED,error:c})})}_export(n){return new Promise((o,c)=>{try{lu.diag.debug("items to be sent",n),this.send(n,o,c)}catch(l){c(l)}})}shutdown(){return this._shutdownOnce.call()}forceFlush(){return Promise.all(this._sendingPromises).then(()=>{})}_shutdown(){return lu.diag.debug("shutdown started"),this.onShutdown(),this.forceFlush()}};Nr.OTLPExporterBase=Jn});var Wn=m(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.OTLPExporterError=void 0;var zn=class extends Error{constructor(n,o,c){super(n),this.name="OTLPExporterError",this.data=c,this.code=o}};Rr.OTLPExporterError=zn});var $n=m(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.sendWithXhr=te.sendWithBeacon=void 0;var fu=(S(),C(y)),Ee=Wn(),Zt=ve();function tp(u,n,o,c,l){if(navigator.sendBeacon(n,new Blob([u],o)))fu.diag.debug("sendBeacon - can send",u),c();else{let i=new Ee.OTLPExporterError(`sendBeacon - cannot send ${u}`);l(i)}}te.sendWithBeacon=tp;function ep(u,n,o,c,l,i){let e,t,r=!1,a=setTimeout(()=>{if(clearTimeout(e),r=!0,t.readyState===XMLHttpRequest.DONE){let d=new Ee.OTLPExporterError("Request Timeout");i(d)}else t.abort()},c),s=(d=Zt.DEFAULT_EXPORT_MAX_ATTEMPTS,v=Zt.DEFAULT_EXPORT_INITIAL_BACKOFF)=>{t=new XMLHttpRequest,t.open("POST",n),Object.entries(Object.assign(Object.assign({},{Accept:"application/json","Content-Type":"application/json"}),o)).forEach(([g,G])=>{t.setRequestHeader(g,G)}),t.send(u),t.onreadystatechange=()=>{if(t.readyState===XMLHttpRequest.DONE&&r===!1)if(t.status>=200&&t.status<=299)fu.diag.debug("xhr success",u),l(),clearTimeout(a),clearTimeout(e);else if(t.status&&(0,Zt.isExportRetryable)(t.status)&&d>0){let g;v=Zt.DEFAULT_EXPORT_BACKOFF_MULTIPLIER*v,t.getResponseHeader("Retry-After")?g=(0,Zt.parseRetryAfterToMills)(t.getResponseHeader("Retry-After")):g=Math.round(Math.random()*(Zt.DEFAULT_EXPORT_MAX_BACKOFF-v)+v),e=setTimeout(()=>{s(d-1,v)},g)}else{let g=new Ee.OTLPExporterError(`Failed to export with XHR (status: ${t.status})`,t.status);i(g),clearTimeout(a),clearTimeout(e)}},t.onabort=()=>{if(r){let g=new Ee.OTLPExporterError("Request Timeout");i(g)}clearTimeout(a),clearTimeout(e)},t.onerror=()=>{if(r){let g=new Ee.OTLPExporterError("Request Timeout");i(g)}clearTimeout(a),clearTimeout(e)}};s()}te.sendWithXhr=ep});var du=m(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.OTLPExporterBrowserBase=void 0;var rp=Pr(),np=ve(),pu=$n(),op=(S(),C(y)),Lr=U(),Qn=class extends rp.OTLPExporterBase{constructor(n={}){super(n),this._useXHR=!1,this._useXHR=!!n.headers||typeof navigator.sendBeacon!="function",this._useXHR?this._headers=Object.assign({},(0,np.parseHeaders)(n.headers),Lr.baggageUtils.parseKeyPairsIntoRecord((0,Lr.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)):this._headers={}}onInit(){Lr._globalThis.addEventListener("unload",this.shutdown)}onShutdown(){Lr._globalThis.removeEventListener("unload",this.shutdown)}send(n,o,c){if(this._shutdownOnce.isCalled){op.diag.debug("Shutdown already started. Cannot send objects");return}let l=this.convert(n),i=JSON.stringify(l),e=new Promise((r,a)=>{this._useXHR?(0,pu.sendWithXhr)(i,this.url,this._headers,this.timeoutMillis,r,a):(0,pu.sendWithBeacon)(i,this.url,{type:"application/json"},r,a)}).then(o,c);this._sendingPromises.push(e);let t=()=>{let r=this._sendingPromises.indexOf(e);this._sendingPromises.splice(r,1)};e.then(t,t)}};Ir.OTLPExporterBrowserBase=Qn});var yu=m(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.sendWithXhr=ee.OTLPExporterBrowserBase=void 0;var ip=du();Object.defineProperty(ee,"OTLPExporterBrowserBase",{enumerable:!0,get:function(){return ip.OTLPExporterBrowserBase}});var ap=$n();Object.defineProperty(ee,"sendWithXhr",{enumerable:!0,get:function(){return ap.sendWithXhr}})});var hu=m(M=>{"use strict";var up=M&&M.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),lp=M&&M.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&up(n,u,o)};Object.defineProperty(M,"__esModule",{value:!0});M.invalidTimeout=M.configureExporterTimeout=M.appendRootPathToUrlIfNeeded=M.appendResourcePathToUrl=M.parseHeaders=M.OTLPExporterError=M.OTLPExporterBase=void 0;lp(yu(),M);var cp=Pr();Object.defineProperty(M,"OTLPExporterBase",{enumerable:!0,get:function(){return cp.OTLPExporterBase}});var sp=Wn();Object.defineProperty(M,"OTLPExporterError",{enumerable:!0,get:function(){return sp.OTLPExporterError}});var be=ve();Object.defineProperty(M,"parseHeaders",{enumerable:!0,get:function(){return be.parseHeaders}});Object.defineProperty(M,"appendResourcePathToUrl",{enumerable:!0,get:function(){return be.appendResourcePathToUrl}});Object.defineProperty(M,"appendRootPathToUrlIfNeeded",{enumerable:!0,get:function(){return be.appendRootPathToUrlIfNeeded}});Object.defineProperty(M,"configureExporterTimeout",{enumerable:!0,get:function(){return be.configureExporterTimeout}});Object.defineProperty(M,"invalidTimeout",{enumerable:!0,get:function(){return be.invalidTimeout}})});var vu=m((Xm,mu)=>{"use strict";mu.exports=fp;function fp(u,n){for(var o=new Array(arguments.length-1),c=0,l=2,i=!0;l<arguments.length;)o[c++]=arguments[l++];return new Promise(function(t,r){o[c]=function(s){if(i)if(i=!1,s)r(s);else{for(var d=new Array(arguments.length-1),v=0;v<d.length;)d[v++]=arguments[v];t.apply(null,d)}};try{u.apply(n||null,o)}catch(a){i&&(i=!1,r(a))}})}});var Su=m(bu=>{"use strict";var wr=bu;wr.length=function(n){var o=n.length;if(!o)return 0;for(var c=0;--o%4>1&&n.charAt(o)==="=";)++c;return Math.ceil(n.length*3)/4-c};var re=new Array(64),Eu=new Array(123);for(rt=0;rt<64;)Eu[re[rt]=rt<26?rt+65:rt<52?rt+71:rt<62?rt-4:rt-59|43]=rt++;var rt;wr.encode=function(n,o,c){for(var l=null,i=[],e=0,t=0,r;o<c;){var a=n[o++];switch(t){case 0:i[e++]=re[a>>2],r=(a&3)<<4,t=1;break;case 1:i[e++]=re[r|a>>4],r=(a&15)<<2,t=2;break;case 2:i[e++]=re[r|a>>6],i[e++]=re[a&63],t=0;break}e>8191&&((l||(l=[])).push(String.fromCharCode.apply(String,i)),e=0)}return t&&(i[e++]=re[r],i[e++]=61,t===1&&(i[e++]=61)),l?(e&&l.push(String.fromCharCode.apply(String,i.slice(0,e))),l.join("")):String.fromCharCode.apply(String,i.slice(0,e))};var _u="invalid encoding";wr.decode=function(n,o,c){for(var l=c,i=0,e,t=0;t<n.length;){var r=n.charCodeAt(t++);if(r===61&&i>1)break;if((r=Eu[r])===void 0)throw Error(_u);switch(i){case 0:e=r,i=1;break;case 1:o[c++]=e<<2|(r&48)>>4,e=r,i=2;break;case 2:o[c++]=(e&15)<<4|(r&60)>>2,e=r,i=3;break;case 3:o[c++]=(e&3)<<6|r,i=0;break}}if(i===1)throw Error(_u);return c-l};wr.test=function(n){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(n)}});var Ou=m((Jm,Tu)=>{"use strict";Tu.exports=Cr;function Cr(){this._listeners={}}Cr.prototype.on=function(n,o,c){return(this._listeners[n]||(this._listeners[n]=[])).push({fn:o,ctx:c||this}),this};Cr.prototype.off=function(n,o){if(n===void 0)this._listeners={};else if(o===void 0)this._listeners[n]=[];else for(var c=this._listeners[n],l=0;l<c.length;)c[l].fn===o?c.splice(l,1):++l;return this};Cr.prototype.emit=function(n){var o=this._listeners[n];if(o){for(var c=[],l=1;l<arguments.length;)c.push(arguments[l++]);for(l=0;l<o.length;)o[l].fn.apply(o[l++].ctx,c)}return this}});var Lu=m((zm,Ru)=>{"use strict";Ru.exports=gu(gu);function gu(u){return typeof Float32Array<"u"?function(){var n=new Float32Array([-0]),o=new Uint8Array(n.buffer),c=o[3]===128;function l(r,a,s){n[0]=r,a[s]=o[0],a[s+1]=o[1],a[s+2]=o[2],a[s+3]=o[3]}function i(r,a,s){n[0]=r,a[s]=o[3],a[s+1]=o[2],a[s+2]=o[1],a[s+3]=o[0]}u.writeFloatLE=c?l:i,u.writeFloatBE=c?i:l;function e(r,a){return o[0]=r[a],o[1]=r[a+1],o[2]=r[a+2],o[3]=r[a+3],n[0]}function t(r,a){return o[3]=r[a],o[2]=r[a+1],o[1]=r[a+2],o[0]=r[a+3],n[0]}u.readFloatLE=c?e:t,u.readFloatBE=c?t:e}():function(){function n(c,l,i,e){var t=l<0?1:0;if(t&&(l=-l),l===0)c(1/l>0?0:2147483648,i,e);else if(isNaN(l))c(2143289344,i,e);else if(l>34028234663852886e22)c((t<<31|2139095040)>>>0,i,e);else if(l<11754943508222875e-54)c((t<<31|Math.round(l/1401298464324817e-60))>>>0,i,e);else{var r=Math.floor(Math.log(l)/Math.LN2),a=Math.round(l*Math.pow(2,-r)*8388608)&8388607;c((t<<31|r+127<<23|a)>>>0,i,e)}}u.writeFloatLE=n.bind(null,Au),u.writeFloatBE=n.bind(null,Nu);function o(c,l,i){var e=c(l,i),t=(e>>31)*2+1,r=e>>>23&255,a=e&8388607;return r===255?a?NaN:t*(1/0):r===0?t*1401298464324817e-60*a:t*Math.pow(2,r-150)*(a+8388608)}u.readFloatLE=o.bind(null,Pu),u.readFloatBE=o.bind(null,xu)}(),typeof Float64Array<"u"?function(){var n=new Float64Array([-0]),o=new Uint8Array(n.buffer),c=o[7]===128;function l(r,a,s){n[0]=r,a[s]=o[0],a[s+1]=o[1],a[s+2]=o[2],a[s+3]=o[3],a[s+4]=o[4],a[s+5]=o[5],a[s+6]=o[6],a[s+7]=o[7]}function i(r,a,s){n[0]=r,a[s]=o[7],a[s+1]=o[6],a[s+2]=o[5],a[s+3]=o[4],a[s+4]=o[3],a[s+5]=o[2],a[s+6]=o[1],a[s+7]=o[0]}u.writeDoubleLE=c?l:i,u.writeDoubleBE=c?i:l;function e(r,a){return o[0]=r[a],o[1]=r[a+1],o[2]=r[a+2],o[3]=r[a+3],o[4]=r[a+4],o[5]=r[a+5],o[6]=r[a+6],o[7]=r[a+7],n[0]}function t(r,a){return o[7]=r[a],o[6]=r[a+1],o[5]=r[a+2],o[4]=r[a+3],o[3]=r[a+4],o[2]=r[a+5],o[1]=r[a+6],o[0]=r[a+7],n[0]}u.readDoubleLE=c?e:t,u.readDoubleBE=c?t:e}():function(){function n(c,l,i,e,t,r){var a=e<0?1:0;if(a&&(e=-e),e===0)c(0,t,r+l),c(1/e>0?0:2147483648,t,r+i);else if(isNaN(e))c(0,t,r+l),c(2146959360,t,r+i);else if(e>17976931348623157e292)c(0,t,r+l),c((a<<31|2146435072)>>>0,t,r+i);else{var s;if(e<22250738585072014e-324)s=e/5e-324,c(s>>>0,t,r+l),c((a<<31|s/4294967296)>>>0,t,r+i);else{var d=Math.floor(Math.log(e)/Math.LN2);d===1024&&(d=1023),s=e*Math.pow(2,-d),c(s*4503599627370496>>>0,t,r+l),c((a<<31|d+1023<<20|s*1048576&1048575)>>>0,t,r+i)}}}u.writeDoubleLE=n.bind(null,Au,0,4),u.writeDoubleBE=n.bind(null,Nu,4,0);function o(c,l,i,e,t){var r=c(e,t+l),a=c(e,t+i),s=(a>>31)*2+1,d=a>>>20&2047,v=4294967296*(a&1048575)+r;return d===2047?v?NaN:s*(1/0):d===0?s*5e-324*v:s*Math.pow(2,d-1075)*(v+4503599627370496)}u.readDoubleLE=o.bind(null,Pu,0,4),u.readDoubleBE=o.bind(null,xu,4,0)}(),u}function Au(u,n,o){n[o]=u&255,n[o+1]=u>>>8&255,n[o+2]=u>>>16&255,n[o+3]=u>>>24}function Nu(u,n,o){n[o]=u>>>24,n[o+1]=u>>>16&255,n[o+2]=u>>>8&255,n[o+3]=u&255}function Pu(u,n){return(u[n]|u[n+1]<<8|u[n+2]<<16|u[n+3]<<24)>>>0}function xu(u,n){return(u[n]<<24|u[n+1]<<16|u[n+2]<<8|u[n+3])>>>0}});var Iu=m((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 Cu=m(wu=>{"use strict";var Zn=wu;Zn.length=function(n){for(var o=0,c=0,l=0;l<n.length;++l)c=n.charCodeAt(l),c<128?o+=1:c<2048?o+=2:(c&64512)===55296&&(n.charCodeAt(l+1)&64512)===56320?(++l,o+=4):o+=3;return o};Zn.read=function(n,o,c){var l=c-o;if(l<1)return"";for(var i=null,e=[],t=0,r;o<c;)r=n[o++],r<128?e[t++]=r:r>191&&r<224?e[t++]=(r&31)<<6|n[o++]&63:r>239&&r<365?(r=((r&7)<<18|(n[o++]&63)<<12|(n[o++]&63)<<6|n[o++]&63)-65536,e[t++]=55296+(r>>10),e[t++]=56320+(r&1023)):e[t++]=(r&15)<<12|(n[o++]&63)<<6|n[o++]&63,t>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,e)),t=0);return i?(t&&i.push(String.fromCharCode.apply(String,e.slice(0,t))),i.join("")):String.fromCharCode.apply(String,e.slice(0,t))};Zn.write=function(n,o,c){for(var l=c,i,e,t=0;t<n.length;++t)i=n.charCodeAt(t),i<128?o[c++]=i:i<2048?(o[c++]=i>>6|192,o[c++]=i&63|128):(i&64512)===55296&&((e=n.charCodeAt(t+1))&64512)===56320?(i=65536+((i&1023)<<10)+(e&1023),++t,o[c++]=i>>18|240,o[c++]=i>>12&63|128,o[c++]=i>>6&63|128,o[c++]=i&63|128):(o[c++]=i>>12|224,o[c++]=i>>6&63|128,o[c++]=i&63|128);return c-l}});var Mu=m(($m,Uu)=>{"use strict";Uu.exports=pp;function pp(u,n,o){var c=o||8192,l=c>>>1,i=null,e=c;return function(r){if(r<1||r>l)return u(r);e+r>c&&(i=u(c),e=0);var a=n.call(i,e,e+=r);return e&7&&(e=(e|7)+1),a}}});var Bu=m((Qm,Du)=>{"use strict";Du.exports=V;var Se=xt();function V(u,n){this.lo=u>>>0,this.hi=n>>>0}var kt=V.zero=new V(0,0);kt.toNumber=function(){return 0};kt.zzEncode=kt.zzDecode=function(){return this};kt.length=function(){return 1};var dp=V.zeroHash="\0\0\0\0\0\0\0\0";V.fromNumber=function(n){if(n===0)return kt;var o=n<0;o&&(n=-n);var c=n>>>0,l=(n-c)/4294967296>>>0;return o&&(l=~l>>>0,c=~c>>>0,++c>4294967295&&(c=0,++l>4294967295&&(l=0))),new V(c,l)};V.from=function(n){if(typeof n=="number")return V.fromNumber(n);if(Se.isString(n))if(Se.Long)n=Se.Long.fromString(n);else return V.fromNumber(parseInt(n,10));return n.low||n.high?new V(n.low>>>0,n.high>>>0):kt};V.prototype.toNumber=function(n){if(!n&&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};V.prototype.toLong=function(n){return Se.Long?new Se.Long(this.lo|0,this.hi|0,!!n):{low:this.lo|0,high:this.hi|0,unsigned:!!n}};var Pt=String.prototype.charCodeAt;V.fromHash=function(n){return n===dp?kt:new V((Pt.call(n,0)|Pt.call(n,1)<<8|Pt.call(n,2)<<16|Pt.call(n,3)<<24)>>>0,(Pt.call(n,4)|Pt.call(n,5)<<8|Pt.call(n,6)<<16|Pt.call(n,7)<<24)>>>0)};V.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)};V.prototype.zzEncode=function(){var n=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^n)>>>0,this.lo=(this.lo<<1^n)>>>0,this};V.prototype.zzDecode=function(){var n=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^n)>>>0,this.hi=(this.hi>>>1^n)>>>0,this};V.prototype.length=function(){var n=this.lo,o=(this.lo>>>28|this.hi<<4)>>>0,c=this.hi>>>24;return c===0?o===0?n<16384?n<128?1:2:n<2097152?3:4:o<16384?o<128?5:6:o<2097152?7:8:c<128?9:10}});var xt=m(to=>{"use strict";var _=to;_.asPromise=vu();_.base64=Su();_.EventEmitter=Ou();_.float=Lu();_.inquire=Iu();_.utf8=Cu();_.pool=Mu();_.LongBits=Bu();_.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);_.global=_.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||to;_.emptyArray=Object.freeze?Object.freeze([]):[];_.emptyObject=Object.freeze?Object.freeze({}):{};_.isInteger=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n};_.isString=function(n){return typeof n=="string"||n instanceof String};_.isObject=function(n){return n&&typeof n=="object"};_.isset=_.isSet=function(n,o){var c=n[o];return c!=null&&n.hasOwnProperty(o)?typeof c!="object"||(Array.isArray(c)?c.length:Object.keys(c).length)>0:!1};_.Buffer=function(){try{var u=_.inquire("buffer").Buffer;return u.prototype.utf8Write?u:null}catch{return null}}();_._Buffer_from=null;_._Buffer_allocUnsafe=null;_.newBuffer=function(n){return typeof n=="number"?_.Buffer?_._Buffer_allocUnsafe(n):new _.Array(n):_.Buffer?_._Buffer_from(n):typeof Uint8Array>"u"?n:new Uint8Array(n)};_.Array=typeof Uint8Array<"u"?Uint8Array:Array;_.Long=_.global.dcodeIO&&_.global.dcodeIO.Long||_.global.Long||_.inquire("long");_.key2Re=/^true|false|0|1$/;_.key32Re=/^-?(?:0|[1-9][0-9]*)$/;_.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;_.longToHash=function(n){return n?_.LongBits.from(n).toHash():_.LongBits.zeroHash};_.longFromHash=function(n,o){var c=_.LongBits.fromHash(n);return _.Long?_.Long.fromBits(c.lo,c.hi,o):c.toNumber(!!o)};function ku(u,n,o){for(var c=Object.keys(n),l=0;l<c.length;++l)(u[c[l]]===void 0||!o)&&(u[c[l]]=n[c[l]]);return u}_.merge=ku;_.lcFirst=function(n){return n.charAt(0).toLowerCase()+n.substring(1)};function Vu(u){function n(o,c){if(!(this instanceof n))return new n(o,c);Object.defineProperty(this,"message",{get:function(){return o}}),Error.captureStackTrace?Error.captureStackTrace(this,n):Object.defineProperty(this,"stack",{value:new Error().stack||""}),c&&ku(this,c)}return n.prototype=Object.create(Error.prototype,{constructor:{value:n,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}}),n}_.newError=Vu;_.ProtocolError=Vu("ProtocolError");_.oneOfGetter=function(n){for(var o={},c=0;c<n.length;++c)o[n[c]]=1;return function(){for(var l=Object.keys(this),i=l.length-1;i>-1;--i)if(o[l[i]]===1&&this[l[i]]!==void 0&&this[l[i]]!==null)return l[i]}};_.oneOfSetter=function(n){return function(o){for(var c=0;c<n.length;++c)n[c]!==o&&delete this[n[c]]}};_.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};_._configure=function(){var u=_.Buffer;if(!u){_._Buffer_from=_._Buffer_allocUnsafe=null;return}_._Buffer_from=u.from!==Uint8Array.from&&u.from||function(o,c){return new u(o,c)},_._Buffer_allocUnsafe=u.allocUnsafe||function(o){return new u(o)}}});var uo=m((tv,Fu)=>{"use strict";Fu.exports=A;var W=xt(),eo,Ur=W.LongBits,Gu=W.base64,Hu=W.utf8;function Te(u,n,o){this.fn=u,this.len=n,this.next=void 0,this.val=o}function no(){}function yp(u){this.head=u.head,this.tail=u.tail,this.len=u.len,this.next=u.states}function A(){this.len=0,this.head=new Te(no,0,0),this.tail=this.head,this.states=null}var ju=function(){return W.Buffer?function(){return(A.create=function(){return new eo})()}:function(){return new A}};A.create=ju();A.alloc=function(n){return new W.Array(n)};W.Array!==Array&&(A.alloc=W.pool(A.alloc,W.Array.prototype.subarray));A.prototype._push=function(n,o,c){return this.tail=this.tail.next=new Te(n,o,c),this.len+=o,this};function oo(u,n,o){n[o]=u&255}function hp(u,n,o){for(;u>127;)n[o++]=u&127|128,u>>>=7;n[o]=u}function io(u,n){this.len=u,this.next=void 0,this.val=n}io.prototype=Object.create(Te.prototype);io.prototype.fn=hp;A.prototype.uint32=function(n){return this.len+=(this.tail=this.tail.next=new io((n=n>>>0)<128?1:n<16384?2:n<2097152?3:n<268435456?4:5,n)).len,this};A.prototype.int32=function(n){return n<0?this._push(ao,10,Ur.fromNumber(n)):this.uint32(n)};A.prototype.sint32=function(n){return this.uint32((n<<1^n>>31)>>>0)};function ao(u,n,o){for(;u.hi;)n[o++]=u.lo&127|128,u.lo=(u.lo>>>7|u.hi<<25)>>>0,u.hi>>>=7;for(;u.lo>127;)n[o++]=u.lo&127|128,u.lo=u.lo>>>7;n[o++]=u.lo}A.prototype.uint64=function(n){var o=Ur.from(n);return this._push(ao,o.length(),o)};A.prototype.int64=A.prototype.uint64;A.prototype.sint64=function(n){var o=Ur.from(n).zzEncode();return this._push(ao,o.length(),o)};A.prototype.bool=function(n){return this._push(oo,1,n?1:0)};function ro(u,n,o){n[o]=u&255,n[o+1]=u>>>8&255,n[o+2]=u>>>16&255,n[o+3]=u>>>24}A.prototype.fixed32=function(n){return this._push(ro,4,n>>>0)};A.prototype.sfixed32=A.prototype.fixed32;A.prototype.fixed64=function(n){var o=Ur.from(n);return this._push(ro,4,o.lo)._push(ro,4,o.hi)};A.prototype.sfixed64=A.prototype.fixed64;A.prototype.float=function(n){return this._push(W.float.writeFloatLE,4,n)};A.prototype.double=function(n){return this._push(W.float.writeDoubleLE,8,n)};var mp=W.Array.prototype.set?function(n,o,c){o.set(n,c)}:function(n,o,c){for(var l=0;l<n.length;++l)o[c+l]=n[l]};A.prototype.bytes=function(n){var o=n.length>>>0;if(!o)return this._push(oo,1,0);if(W.isString(n)){var c=A.alloc(o=Gu.length(n));Gu.decode(n,c,0),n=c}return this.uint32(o)._push(mp,o,n)};A.prototype.string=function(n){var o=Hu.length(n);return o?this.uint32(o)._push(Hu.write,o,n):this._push(oo,1,0)};A.prototype.fork=function(){return this.states=new yp(this),this.head=this.tail=new Te(no,0,0),this.len=0,this};A.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 Te(no,0,0),this.len=0),this};A.prototype.ldelim=function(){var n=this.head,o=this.tail,c=this.len;return this.reset().uint32(c),c&&(this.tail.next=n.next,this.tail=o,this.len+=c),this};A.prototype.finish=function(){for(var n=this.head.next,o=this.constructor.alloc(this.len),c=0;n;)n.fn(n.val,o,c),c+=n.len,n=n.next;return o};A._configure=function(u){eo=u,A.create=ju(),eo._configure()}});var Xu=m((ev,Ku)=>{"use strict";Ku.exports=ut;var qu=uo();(ut.prototype=Object.create(qu.prototype)).constructor=ut;var Rt=xt();function ut(){qu.call(this)}ut._configure=function(){ut.alloc=Rt._Buffer_allocUnsafe,ut.writeBytesBuffer=Rt.Buffer&&Rt.Buffer.prototype instanceof Uint8Array&&Rt.Buffer.prototype.set.name==="set"?function(n,o,c){o.set(n,c)}:function(n,o,c){if(n.copy)n.copy(o,c,0,n.length);else for(var l=0;l<n.length;)o[c++]=n[l++]}};ut.prototype.bytes=function(n){Rt.isString(n)&&(n=Rt._Buffer_from(n,"base64"));var o=n.length>>>0;return this.uint32(o),o&&this._push(ut.writeBytesBuffer,o,n),this};function vp(u,n,o){u.length<40?Rt.utf8.write(u,n,o):n.utf8Write?n.utf8Write(u,o):n.write(u,o)}ut.prototype.string=function(n){var o=Rt.Buffer.byteLength(n);return this.uint32(o),o&&this._push(vp,o,n),this};ut._configure()});var so=m((rv,$u)=>{"use strict";$u.exports=D;var nt=xt(),co,zu=nt.LongBits,_p=nt.utf8;function ot(u,n){return RangeError("index out of range: "+u.pos+" + "+(n||1)+" > "+u.len)}function D(u){this.buf=u,this.pos=0,this.len=u.length}var Yu=typeof Uint8Array<"u"?function(n){if(n instanceof Uint8Array||Array.isArray(n))return new D(n);throw Error("illegal buffer")}:function(n){if(Array.isArray(n))return new D(n);throw Error("illegal buffer")},Wu=function(){return nt.Buffer?function(o){return(D.create=function(l){return nt.Buffer.isBuffer(l)?new co(l):Yu(l)})(o)}:Yu};D.create=Wu();D.prototype._slice=nt.Array.prototype.subarray||nt.Array.prototype.slice;D.prototype.uint32=function(){var n=4294967295;return function(){if(n=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(n=(n|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return n;if((this.pos+=5)>this.len)throw this.pos=this.len,ot(this,10);return n}}();D.prototype.int32=function(){return this.uint32()|0};D.prototype.sint32=function(){var n=this.uint32();return n>>>1^-(n&1)|0};function lo(){var u=new zu(0,0),n=0;if(this.len-this.pos>4){for(;n<4;++n)if(u.lo=(u.lo|(this.buf[this.pos]&127)<<n*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;n=0}else{for(;n<3;++n){if(this.pos>=this.len)throw ot(this);if(u.lo=(u.lo|(this.buf[this.pos]&127)<<n*7)>>>0,this.buf[this.pos++]<128)return u}return u.lo=(u.lo|(this.buf[this.pos++]&127)<<n*7)>>>0,u}if(this.len-this.pos>4){for(;n<5;++n)if(u.hi=(u.hi|(this.buf[this.pos]&127)<<n*7+3)>>>0,this.buf[this.pos++]<128)return u}else for(;n<5;++n){if(this.pos>=this.len)throw ot(this);if(u.hi=(u.hi|(this.buf[this.pos]&127)<<n*7+3)>>>0,this.buf[this.pos++]<128)return u}throw Error("invalid varint encoding")}D.prototype.bool=function(){return this.uint32()!==0};function Mr(u,n){return(u[n-4]|u[n-3]<<8|u[n-2]<<16|u[n-1]<<24)>>>0}D.prototype.fixed32=function(){if(this.pos+4>this.len)throw ot(this,4);return Mr(this.buf,this.pos+=4)};D.prototype.sfixed32=function(){if(this.pos+4>this.len)throw ot(this,4);return Mr(this.buf,this.pos+=4)|0};function Ju(){if(this.pos+8>this.len)throw ot(this,8);return new zu(Mr(this.buf,this.pos+=4),Mr(this.buf,this.pos+=4))}D.prototype.float=function(){if(this.pos+4>this.len)throw ot(this,4);var n=nt.float.readFloatLE(this.buf,this.pos);return this.pos+=4,n};D.prototype.double=function(){if(this.pos+8>this.len)throw ot(this,4);var n=nt.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,n};D.prototype.bytes=function(){var n=this.uint32(),o=this.pos,c=this.pos+n;if(c>this.len)throw ot(this,n);if(this.pos+=n,Array.isArray(this.buf))return this.buf.slice(o,c);if(o===c){var l=nt.Buffer;return l?l.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,o,c)};D.prototype.string=function(){var n=this.bytes();return _p.read(n,0,n.length)};D.prototype.skip=function(n){if(typeof n=="number"){if(this.pos+n>this.len)throw ot(this,n);this.pos+=n}else do if(this.pos>=this.len)throw ot(this);while(this.buf[this.pos++]&128);return this};D.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};D._configure=function(u){co=u,D.create=Wu(),co._configure();var n=nt.Long?"toLong":"toNumber";nt.merge(D.prototype,{int64:function(){return lo.call(this)[n](!1)},uint64:function(){return lo.call(this)[n](!0)},sint64:function(){return lo.call(this).zzDecode()[n](!1)},fixed64:function(){return Ju.call(this)[n](!0)},sfixed64:function(){return Ju.call(this)[n](!1)}})}});var el=m((nv,tl)=>{"use strict";tl.exports=Vt;var Zu=so();(Vt.prototype=Object.create(Zu.prototype)).constructor=Vt;var Qu=xt();function Vt(u){Zu.call(this,u)}Vt._configure=function(){Qu.Buffer&&(Vt.prototype._slice=Qu.Buffer.prototype.slice)};Vt.prototype.string=function(){var n=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+n,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+n,this.len))};Vt._configure()});var nl=m((ov,rl)=>{"use strict";rl.exports=Oe;var fo=xt();(Oe.prototype=Object.create(fo.EventEmitter.prototype)).constructor=Oe;function Oe(u,n,o){if(typeof u!="function")throw TypeError("rpcImpl must be a function");fo.EventEmitter.call(this),this.rpcImpl=u,this.requestDelimited=!!n,this.responseDelimited=!!o}Oe.prototype.rpcCall=function u(n,o,c,l,i){if(!l)throw TypeError("request must be specified");var e=this;if(!i)return fo.asPromise(u,e,n,o,c,l);if(!e.rpcImpl){setTimeout(function(){i(Error("already ended"))},0);return}try{return e.rpcImpl(n,o[e.requestDelimited?"encodeDelimited":"encode"](l).finish(),function(r,a){if(r)return e.emit("error",r,n),i(r);if(a===null){e.end(!0);return}if(!(a instanceof c))try{a=c[e.responseDelimited?"decodeDelimited":"decode"](a)}catch(s){return e.emit("error",s,n),i(s)}return e.emit("data",a,n),i(null,a)})}catch(t){e.emit("error",t,n),setTimeout(function(){i(t)},0);return}};Oe.prototype.end=function(n){return this.rpcImpl&&(n||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var il=m(ol=>{"use strict";var Ep=ol;Ep.Service=nl()});var ul=m((av,al)=>{"use strict";al.exports={}});var sl=m(cl=>{"use strict";var K=cl;K.build="minimal";K.Writer=uo();K.BufferWriter=Xu();K.Reader=so();K.BufferReader=el();K.util=xt();K.rpc=il();K.roots=ul();K.configure=ll;function ll(){K.util._configure(),K.Writer._configure(K.BufferWriter),K.Reader._configure(K.BufferReader)}ll()});var pl=m((lv,fl)=>{"use strict";fl.exports=sl()});var yl=m((cv,dl)=>{"use strict";var E=pl(),h=E.Reader,T=E.Writer,p=E.util,f=E.roots.default||(E.roots.default={});f.opentelemetry=function(){var u={};return u.proto=function(){var n={};return n.common=function(){var o={};return o.v1=function(){var c={};return c.AnyValue=function(){function l(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.stringValue=null,l.prototype.boolValue=null,l.prototype.intValue=null,l.prototype.doubleValue=null,l.prototype.arrayValue=null,l.prototype.kvlistValue=null,l.prototype.bytesValue=null;var i;return Object.defineProperty(l.prototype,"value",{get:p.oneOfGetter(i=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){return r||(r=T.create()),t.stringValue!=null&&Object.hasOwnProperty.call(t,"stringValue")&&r.uint32(10).string(t.stringValue),t.boolValue!=null&&Object.hasOwnProperty.call(t,"boolValue")&&r.uint32(16).bool(t.boolValue),t.intValue!=null&&Object.hasOwnProperty.call(t,"intValue")&&r.uint32(24).int64(t.intValue),t.doubleValue!=null&&Object.hasOwnProperty.call(t,"doubleValue")&&r.uint32(33).double(t.doubleValue),t.arrayValue!=null&&Object.hasOwnProperty.call(t,"arrayValue")&&f.opentelemetry.proto.common.v1.ArrayValue.encode(t.arrayValue,r.uint32(42).fork()).ldelim(),t.kvlistValue!=null&&Object.hasOwnProperty.call(t,"kvlistValue")&&f.opentelemetry.proto.common.v1.KeyValueList.encode(t.kvlistValue,r.uint32(50).fork()).ldelim(),t.bytesValue!=null&&Object.hasOwnProperty.call(t,"bytesValue")&&r.uint32(58).bytes(t.bytesValue),r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.common.v1.AnyValue;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.stringValue=t.string();break}case 2:{s.boolValue=t.bool();break}case 3:{s.intValue=t.int64();break}case 4:{s.doubleValue=t.double();break}case 5:{s.arrayValue=f.opentelemetry.proto.common.v1.ArrayValue.decode(t,t.uint32());break}case 6:{s.kvlistValue=f.opentelemetry.proto.common.v1.KeyValueList.decode(t,t.uint32());break}case 7:{s.bytesValue=t.bytes();break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.stringValue!=null&&t.hasOwnProperty("stringValue")&&(r.value=1,!p.isString(t.stringValue)))return"stringValue: string expected";if(t.boolValue!=null&&t.hasOwnProperty("boolValue")){if(r.value===1)return"value: multiple values";if(r.value=1,typeof t.boolValue!="boolean")return"boolValue: boolean expected"}if(t.intValue!=null&&t.hasOwnProperty("intValue")){if(r.value===1)return"value: multiple values";if(r.value=1,!p.isInteger(t.intValue)&&!(t.intValue&&p.isInteger(t.intValue.low)&&p.isInteger(t.intValue.high)))return"intValue: integer|Long expected"}if(t.doubleValue!=null&&t.hasOwnProperty("doubleValue")){if(r.value===1)return"value: multiple values";if(r.value=1,typeof t.doubleValue!="number")return"doubleValue: number expected"}if(t.arrayValue!=null&&t.hasOwnProperty("arrayValue")){if(r.value===1)return"value: multiple values";r.value=1;{var a=f.opentelemetry.proto.common.v1.ArrayValue.verify(t.arrayValue);if(a)return"arrayValue."+a}}if(t.kvlistValue!=null&&t.hasOwnProperty("kvlistValue")){if(r.value===1)return"value: multiple values";r.value=1;{var a=f.opentelemetry.proto.common.v1.KeyValueList.verify(t.kvlistValue);if(a)return"kvlistValue."+a}}if(t.bytesValue!=null&&t.hasOwnProperty("bytesValue")){if(r.value===1)return"value: multiple values";if(r.value=1,!(t.bytesValue&&typeof t.bytesValue.length=="number"||p.isString(t.bytesValue)))return"bytesValue: buffer expected"}return null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.common.v1.AnyValue)return t;var r=new f.opentelemetry.proto.common.v1.AnyValue;if(t.stringValue!=null&&(r.stringValue=String(t.stringValue)),t.boolValue!=null&&(r.boolValue=!!t.boolValue),t.intValue!=null&&(p.Long?(r.intValue=p.Long.fromValue(t.intValue)).unsigned=!1:typeof t.intValue=="string"?r.intValue=parseInt(t.intValue,10):typeof t.intValue=="number"?r.intValue=t.intValue:typeof t.intValue=="object"&&(r.intValue=new p.LongBits(t.intValue.low>>>0,t.intValue.high>>>0).toNumber())),t.doubleValue!=null&&(r.doubleValue=Number(t.doubleValue)),t.arrayValue!=null){if(typeof t.arrayValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected");r.arrayValue=f.opentelemetry.proto.common.v1.ArrayValue.fromObject(t.arrayValue)}if(t.kvlistValue!=null){if(typeof t.kvlistValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected");r.kvlistValue=f.opentelemetry.proto.common.v1.KeyValueList.fromObject(t.kvlistValue)}return t.bytesValue!=null&&(typeof t.bytesValue=="string"?p.base64.decode(t.bytesValue,r.bytesValue=p.newBuffer(p.base64.length(t.bytesValue)),0):t.bytesValue.length>=0&&(r.bytesValue=t.bytesValue)),r},l.toObject=function(t,r){r||(r={});var a={};return t.stringValue!=null&&t.hasOwnProperty("stringValue")&&(a.stringValue=t.stringValue,r.oneofs&&(a.value="stringValue")),t.boolValue!=null&&t.hasOwnProperty("boolValue")&&(a.boolValue=t.boolValue,r.oneofs&&(a.value="boolValue")),t.intValue!=null&&t.hasOwnProperty("intValue")&&(typeof t.intValue=="number"?a.intValue=r.longs===String?String(t.intValue):t.intValue:a.intValue=r.longs===String?p.Long.prototype.toString.call(t.intValue):r.longs===Number?new p.LongBits(t.intValue.low>>>0,t.intValue.high>>>0).toNumber():t.intValue,r.oneofs&&(a.value="intValue")),t.doubleValue!=null&&t.hasOwnProperty("doubleValue")&&(a.doubleValue=r.json&&!isFinite(t.doubleValue)?String(t.doubleValue):t.doubleValue,r.oneofs&&(a.value="doubleValue")),t.arrayValue!=null&&t.hasOwnProperty("arrayValue")&&(a.arrayValue=f.opentelemetry.proto.common.v1.ArrayValue.toObject(t.arrayValue,r),r.oneofs&&(a.value="arrayValue")),t.kvlistValue!=null&&t.hasOwnProperty("kvlistValue")&&(a.kvlistValue=f.opentelemetry.proto.common.v1.KeyValueList.toObject(t.kvlistValue,r),r.oneofs&&(a.value="kvlistValue")),t.bytesValue!=null&&t.hasOwnProperty("bytesValue")&&(a.bytesValue=r.bytes===String?p.base64.encode(t.bytesValue,0,t.bytesValue.length):r.bytes===Array?Array.prototype.slice.call(t.bytesValue):t.bytesValue,r.oneofs&&(a.value="bytesValue")),a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.AnyValue"},l}(),c.ArrayValue=function(){function l(i){if(this.values=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.values=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.values!=null&&e.values.length)for(var r=0;r<e.values.length;++r)f.opentelemetry.proto.common.v1.AnyValue.encode(e.values[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.common.v1.ArrayValue;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.values&&a.values.length||(a.values=[]),a.values.push(f.opentelemetry.proto.common.v1.AnyValue.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.values!=null&&e.hasOwnProperty("values")){if(!Array.isArray(e.values))return"values: array expected";for(var t=0;t<e.values.length;++t){var r=f.opentelemetry.proto.common.v1.AnyValue.verify(e.values[t]);if(r)return"values."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.common.v1.ArrayValue)return e;var t=new f.opentelemetry.proto.common.v1.ArrayValue;if(e.values){if(!Array.isArray(e.values))throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: array expected");t.values=[];for(var r=0;r<e.values.length;++r){if(typeof e.values[r]!="object")throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: object expected");t.values[r]=f.opentelemetry.proto.common.v1.AnyValue.fromObject(e.values[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.values=[]),e.values&&e.values.length){r.values=[];for(var a=0;a<e.values.length;++a)r.values[a]=f.opentelemetry.proto.common.v1.AnyValue.toObject(e.values[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.ArrayValue"},l}(),c.KeyValueList=function(){function l(i){if(this.values=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.values=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.values!=null&&e.values.length)for(var r=0;r<e.values.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.values[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.common.v1.KeyValueList;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.values&&a.values.length||(a.values=[]),a.values.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.values!=null&&e.hasOwnProperty("values")){if(!Array.isArray(e.values))return"values: array expected";for(var t=0;t<e.values.length;++t){var r=f.opentelemetry.proto.common.v1.KeyValue.verify(e.values[t]);if(r)return"values."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.common.v1.KeyValueList)return e;var t=new f.opentelemetry.proto.common.v1.KeyValueList;if(e.values){if(!Array.isArray(e.values))throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: array expected");t.values=[];for(var r=0;r<e.values.length;++r){if(typeof e.values[r]!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: object expected");t.values[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.values[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.values=[]),e.values&&e.values.length){r.values=[];for(var a=0;a<e.values.length;++a)r.values[a]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.values[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.KeyValueList"},l}(),c.KeyValue=function(){function l(i){if(i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.key=null,l.prototype.value=null,l.create=function(e){return new l(e)},l.encode=function(e,t){return t||(t=T.create()),e.key!=null&&Object.hasOwnProperty.call(e,"key")&&t.uint32(10).string(e.key),e.value!=null&&Object.hasOwnProperty.call(e,"value")&&f.opentelemetry.proto.common.v1.AnyValue.encode(e.value,t.uint32(18).fork()).ldelim(),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.common.v1.KeyValue;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.key=e.string();break}case 2:{a.value=f.opentelemetry.proto.common.v1.AnyValue.decode(e,e.uint32());break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.key!=null&&e.hasOwnProperty("key")&&!p.isString(e.key))return"key: string expected";if(e.value!=null&&e.hasOwnProperty("value")){var t=f.opentelemetry.proto.common.v1.AnyValue.verify(e.value);if(t)return"value."+t}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.common.v1.KeyValue)return e;var t=new f.opentelemetry.proto.common.v1.KeyValue;if(e.key!=null&&(t.key=String(e.key)),e.value!=null){if(typeof e.value!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected");t.value=f.opentelemetry.proto.common.v1.AnyValue.fromObject(e.value)}return t},l.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.key="",r.value=null),e.key!=null&&e.hasOwnProperty("key")&&(r.key=e.key),e.value!=null&&e.hasOwnProperty("value")&&(r.value=f.opentelemetry.proto.common.v1.AnyValue.toObject(e.value,t)),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.KeyValue"},l}(),c.InstrumentationScope=function(){function l(i){if(this.attributes=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.name=null,l.prototype.version=null,l.prototype.attributes=p.emptyArray,l.prototype.droppedAttributesCount=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),e.version!=null&&Object.hasOwnProperty.call(e,"version")&&t.uint32(18).string(e.version),e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(26).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(32).uint32(e.droppedAttributesCount),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.common.v1.InstrumentationScope;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.name=e.string();break}case 2:{a.version=e.string();break}case 3:{a.attributes&&a.attributes.length||(a.attributes=[]),a.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 4:{a.droppedAttributesCount=e.uint32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.name!=null&&e.hasOwnProperty("name")&&!p.isString(e.name))return"name: string expected";if(e.version!=null&&e.hasOwnProperty("version")&&!p.isString(e.version))return"version: string expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var r=f.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(r)return"attributes."+r}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.common.v1.InstrumentationScope)return e;var t=new f.opentelemetry.proto.common.v1.InstrumentationScope;if(e.name!=null&&(t.name=String(e.name)),e.version!=null&&(t.version=String(e.version)),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: object expected");t.attributes[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}return e.droppedAttributesCount!=null&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.attributes=[]),t.defaults&&(r.name="",r.version="",r.droppedAttributesCount=0),e.name!=null&&e.hasOwnProperty("name")&&(r.name=e.name),e.version!=null&&e.hasOwnProperty("version")&&(r.version=e.version),e.attributes&&e.attributes.length){r.attributes=[];for(var a=0;a<e.attributes.length;++a)r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[a],t)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(r.droppedAttributesCount=e.droppedAttributesCount),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.InstrumentationScope"},l}(),c}(),o}(),n.resource=function(){var o={};return o.v1=function(){var c={};return c.Resource=function(){function l(i){if(this.attributes=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.attributes=p.emptyArray,l.prototype.droppedAttributesCount=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(10).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(16).uint32(e.droppedAttributesCount),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.resource.v1.Resource;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.attributes&&a.attributes.length||(a.attributes=[]),a.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{a.droppedAttributesCount=e.uint32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var r=f.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(r)return"attributes."+r}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.resource.v1.Resource)return e;var t=new f.opentelemetry.proto.resource.v1.Resource;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: object expected");t.attributes[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}return e.droppedAttributesCount!=null&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.attributes=[]),t.defaults&&(r.droppedAttributesCount=0),e.attributes&&e.attributes.length){r.attributes=[];for(var a=0;a<e.attributes.length;++a)r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[a],t)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(r.droppedAttributesCount=e.droppedAttributesCount),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.resource.v1.Resource"},l}(),c}(),o}(),n.trace=function(){var o={};return o.v1=function(){var c={};return c.TracesData=function(){function l(i){if(this.resourceSpans=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resourceSpans=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resourceSpans!=null&&e.resourceSpans.length)for(var r=0;r<e.resourceSpans.length;++r)f.opentelemetry.proto.trace.v1.ResourceSpans.encode(e.resourceSpans[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.trace.v1.TracesData;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resourceSpans&&a.resourceSpans.length||(a.resourceSpans=[]),a.resourceSpans.push(f.opentelemetry.proto.trace.v1.ResourceSpans.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.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 t=0;t<e.resourceSpans.length;++t){var r=f.opentelemetry.proto.trace.v1.ResourceSpans.verify(e.resourceSpans[t]);if(r)return"resourceSpans."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.trace.v1.TracesData)return e;var t=new f.opentelemetry.proto.trace.v1.TracesData;if(e.resourceSpans){if(!Array.isArray(e.resourceSpans))throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: array expected");t.resourceSpans=[];for(var r=0;r<e.resourceSpans.length;++r){if(typeof e.resourceSpans[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: object expected");t.resourceSpans[r]=f.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(e.resourceSpans[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.resourceSpans=[]),e.resourceSpans&&e.resourceSpans.length){r.resourceSpans=[];for(var a=0;a<e.resourceSpans.length;++a)r.resourceSpans[a]=f.opentelemetry.proto.trace.v1.ResourceSpans.toObject(e.resourceSpans[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.TracesData"},l}(),c.ResourceSpans=function(){function l(i){if(this.scopeSpans=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resource=null,l.prototype.scopeSpans=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resource!=null&&Object.hasOwnProperty.call(e,"resource")&&f.opentelemetry.proto.resource.v1.Resource.encode(e.resource,t.uint32(10).fork()).ldelim(),e.scopeSpans!=null&&e.scopeSpans.length)for(var r=0;r<e.scopeSpans.length;++r)f.opentelemetry.proto.trace.v1.ScopeSpans.encode(e.scopeSpans[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.trace.v1.ResourceSpans;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resource=f.opentelemetry.proto.resource.v1.Resource.decode(e,e.uint32());break}case 2:{a.scopeSpans&&a.scopeSpans.length||(a.scopeSpans=[]),a.scopeSpans.push(f.opentelemetry.proto.trace.v1.ScopeSpans.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resource!=null&&e.hasOwnProperty("resource")){var t=f.opentelemetry.proto.resource.v1.Resource.verify(e.resource);if(t)return"resource."+t}if(e.scopeSpans!=null&&e.hasOwnProperty("scopeSpans")){if(!Array.isArray(e.scopeSpans))return"scopeSpans: array expected";for(var r=0;r<e.scopeSpans.length;++r){var t=f.opentelemetry.proto.trace.v1.ScopeSpans.verify(e.scopeSpans[r]);if(t)return"scopeSpans."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.trace.v1.ResourceSpans)return e;var t=new f.opentelemetry.proto.trace.v1.ResourceSpans;if(e.resource!=null){if(typeof e.resource!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.resource: object expected");t.resource=f.opentelemetry.proto.resource.v1.Resource.fromObject(e.resource)}if(e.scopeSpans){if(!Array.isArray(e.scopeSpans))throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: array expected");t.scopeSpans=[];for(var r=0;r<e.scopeSpans.length;++r){if(typeof e.scopeSpans[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: object expected");t.scopeSpans[r]=f.opentelemetry.proto.trace.v1.ScopeSpans.fromObject(e.scopeSpans[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.scopeSpans=[]),t.defaults&&(r.resource=null,r.schemaUrl=""),e.resource!=null&&e.hasOwnProperty("resource")&&(r.resource=f.opentelemetry.proto.resource.v1.Resource.toObject(e.resource,t)),e.scopeSpans&&e.scopeSpans.length){r.scopeSpans=[];for(var a=0;a<e.scopeSpans.length;++a)r.scopeSpans[a]=f.opentelemetry.proto.trace.v1.ScopeSpans.toObject(e.scopeSpans[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.ResourceSpans"},l}(),c.ScopeSpans=function(){function l(i){if(this.spans=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.scope=null,l.prototype.spans=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.scope!=null&&Object.hasOwnProperty.call(e,"scope")&&f.opentelemetry.proto.common.v1.InstrumentationScope.encode(e.scope,t.uint32(10).fork()).ldelim(),e.spans!=null&&e.spans.length)for(var r=0;r<e.spans.length;++r)f.opentelemetry.proto.trace.v1.Span.encode(e.spans[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.trace.v1.ScopeSpans;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.decode(e,e.uint32());break}case 2:{a.spans&&a.spans.length||(a.spans=[]),a.spans.push(f.opentelemetry.proto.trace.v1.Span.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.scope!=null&&e.hasOwnProperty("scope")){var t=f.opentelemetry.proto.common.v1.InstrumentationScope.verify(e.scope);if(t)return"scope."+t}if(e.spans!=null&&e.hasOwnProperty("spans")){if(!Array.isArray(e.spans))return"spans: array expected";for(var r=0;r<e.spans.length;++r){var t=f.opentelemetry.proto.trace.v1.Span.verify(e.spans[r]);if(t)return"spans."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.trace.v1.ScopeSpans)return e;var t=new f.opentelemetry.proto.trace.v1.ScopeSpans;if(e.scope!=null){if(typeof e.scope!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.scope: object expected");t.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(e.scope)}if(e.spans){if(!Array.isArray(e.spans))throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: array expected");t.spans=[];for(var r=0;r<e.spans.length;++r){if(typeof e.spans[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: object expected");t.spans[r]=f.opentelemetry.proto.trace.v1.Span.fromObject(e.spans[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.spans=[]),t.defaults&&(r.scope=null,r.schemaUrl=""),e.scope!=null&&e.hasOwnProperty("scope")&&(r.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.toObject(e.scope,t)),e.spans&&e.spans.length){r.spans=[];for(var a=0;a<e.spans.length;++a)r.spans[a]=f.opentelemetry.proto.trace.v1.Span.toObject(e.spans[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.ScopeSpans"},l}(),c.Span=function(){function l(i){if(this.attributes=[],this.events=[],this.links=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.traceId=null,l.prototype.spanId=null,l.prototype.traceState=null,l.prototype.parentSpanId=null,l.prototype.name=null,l.prototype.kind=null,l.prototype.startTimeUnixNano=null,l.prototype.endTimeUnixNano=null,l.prototype.attributes=p.emptyArray,l.prototype.droppedAttributesCount=null,l.prototype.events=p.emptyArray,l.prototype.droppedEventsCount=null,l.prototype.links=p.emptyArray,l.prototype.droppedLinksCount=null,l.prototype.status=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId")&&t.uint32(10).bytes(e.traceId),e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId")&&t.uint32(18).bytes(e.spanId),e.traceState!=null&&Object.hasOwnProperty.call(e,"traceState")&&t.uint32(26).string(e.traceState),e.parentSpanId!=null&&Object.hasOwnProperty.call(e,"parentSpanId")&&t.uint32(34).bytes(e.parentSpanId),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&t.uint32(42).string(e.name),e.kind!=null&&Object.hasOwnProperty.call(e,"kind")&&t.uint32(48).int32(e.kind),e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&t.uint32(57).fixed64(e.startTimeUnixNano),e.endTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"endTimeUnixNano")&&t.uint32(65).fixed64(e.endTimeUnixNano),e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(74).fork()).ldelim();if(e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(80).uint32(e.droppedAttributesCount),e.events!=null&&e.events.length)for(var r=0;r<e.events.length;++r)f.opentelemetry.proto.trace.v1.Span.Event.encode(e.events[r],t.uint32(90).fork()).ldelim();if(e.droppedEventsCount!=null&&Object.hasOwnProperty.call(e,"droppedEventsCount")&&t.uint32(96).uint32(e.droppedEventsCount),e.links!=null&&e.links.length)for(var r=0;r<e.links.length;++r)f.opentelemetry.proto.trace.v1.Span.Link.encode(e.links[r],t.uint32(106).fork()).ldelim();return e.droppedLinksCount!=null&&Object.hasOwnProperty.call(e,"droppedLinksCount")&&t.uint32(112).uint32(e.droppedLinksCount),e.status!=null&&Object.hasOwnProperty.call(e,"status")&&f.opentelemetry.proto.trace.v1.Status.encode(e.status,t.uint32(122).fork()).ldelim(),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.trace.v1.Span;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.traceId=e.bytes();break}case 2:{a.spanId=e.bytes();break}case 3:{a.traceState=e.string();break}case 4:{a.parentSpanId=e.bytes();break}case 5:{a.name=e.string();break}case 6:{a.kind=e.int32();break}case 7:{a.startTimeUnixNano=e.fixed64();break}case 8:{a.endTimeUnixNano=e.fixed64();break}case 9:{a.attributes&&a.attributes.length||(a.attributes=[]),a.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 10:{a.droppedAttributesCount=e.uint32();break}case 11:{a.events&&a.events.length||(a.events=[]),a.events.push(f.opentelemetry.proto.trace.v1.Span.Event.decode(e,e.uint32()));break}case 12:{a.droppedEventsCount=e.uint32();break}case 13:{a.links&&a.links.length||(a.links=[]),a.links.push(f.opentelemetry.proto.trace.v1.Span.Link.decode(e,e.uint32()));break}case 14:{a.droppedLinksCount=e.uint32();break}case 15:{a.status=f.opentelemetry.proto.trace.v1.Status.decode(e,e.uint32());break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.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"||p.isString(e.traceId)))return"traceId: buffer expected";if(e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||p.isString(e.spanId)))return"spanId: buffer expected";if(e.traceState!=null&&e.hasOwnProperty("traceState")&&!p.isString(e.traceState))return"traceState: string expected";if(e.parentSpanId!=null&&e.hasOwnProperty("parentSpanId")&&!(e.parentSpanId&&typeof e.parentSpanId.length=="number"||p.isString(e.parentSpanId)))return"parentSpanId: buffer expected";if(e.name!=null&&e.hasOwnProperty("name")&&!p.isString(e.name))return"name: string expected";if(e.kind!=null&&e.hasOwnProperty("kind"))switch(e.kind){default:return"kind: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!p.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&p.isInteger(e.startTimeUnixNano.low)&&p.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.endTimeUnixNano!=null&&e.hasOwnProperty("endTimeUnixNano")&&!p.isInteger(e.endTimeUnixNano)&&!(e.endTimeUnixNano&&p.isInteger(e.endTimeUnixNano.low)&&p.isInteger(e.endTimeUnixNano.high)))return"endTimeUnixNano: integer|Long expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var r=f.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(r)return"attributes."+r}}if(e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(e.droppedAttributesCount))return"droppedAttributesCount: integer expected";if(e.events!=null&&e.hasOwnProperty("events")){if(!Array.isArray(e.events))return"events: array expected";for(var t=0;t<e.events.length;++t){var r=f.opentelemetry.proto.trace.v1.Span.Event.verify(e.events[t]);if(r)return"events."+r}}if(e.droppedEventsCount!=null&&e.hasOwnProperty("droppedEventsCount")&&!p.isInteger(e.droppedEventsCount))return"droppedEventsCount: integer expected";if(e.links!=null&&e.hasOwnProperty("links")){if(!Array.isArray(e.links))return"links: array expected";for(var t=0;t<e.links.length;++t){var r=f.opentelemetry.proto.trace.v1.Span.Link.verify(e.links[t]);if(r)return"links."+r}}if(e.droppedLinksCount!=null&&e.hasOwnProperty("droppedLinksCount")&&!p.isInteger(e.droppedLinksCount))return"droppedLinksCount: integer expected";if(e.status!=null&&e.hasOwnProperty("status")){var r=f.opentelemetry.proto.trace.v1.Status.verify(e.status);if(r)return"status."+r}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.trace.v1.Span)return e;var t=new f.opentelemetry.proto.trace.v1.Span;switch(e.traceId!=null&&(typeof e.traceId=="string"?p.base64.decode(e.traceId,t.traceId=p.newBuffer(p.base64.length(e.traceId)),0):e.traceId.length>=0&&(t.traceId=e.traceId)),e.spanId!=null&&(typeof e.spanId=="string"?p.base64.decode(e.spanId,t.spanId=p.newBuffer(p.base64.length(e.spanId)),0):e.spanId.length>=0&&(t.spanId=e.spanId)),e.traceState!=null&&(t.traceState=String(e.traceState)),e.parentSpanId!=null&&(typeof e.parentSpanId=="string"?p.base64.decode(e.parentSpanId,t.parentSpanId=p.newBuffer(p.base64.length(e.parentSpanId)),0):e.parentSpanId.length>=0&&(t.parentSpanId=e.parentSpanId)),e.name!=null&&(t.name=String(e.name)),e.kind){default:if(typeof e.kind=="number"){t.kind=e.kind;break}break;case"SPAN_KIND_UNSPECIFIED":case 0:t.kind=0;break;case"SPAN_KIND_INTERNAL":case 1:t.kind=1;break;case"SPAN_KIND_SERVER":case 2:t.kind=2;break;case"SPAN_KIND_CLIENT":case 3:t.kind=3;break;case"SPAN_KIND_PRODUCER":case 4:t.kind=4;break;case"SPAN_KIND_CONSUMER":case 5:t.kind=5;break}if(e.startTimeUnixNano!=null&&(p.Long?(t.startTimeUnixNano=p.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?t.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?t.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(t.startTimeUnixNano=new p.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.endTimeUnixNano!=null&&(p.Long?(t.endTimeUnixNano=p.Long.fromValue(e.endTimeUnixNano)).unsigned=!1:typeof e.endTimeUnixNano=="string"?t.endTimeUnixNano=parseInt(e.endTimeUnixNano,10):typeof e.endTimeUnixNano=="number"?t.endTimeUnixNano=e.endTimeUnixNano:typeof e.endTimeUnixNano=="object"&&(t.endTimeUnixNano=new p.LongBits(e.endTimeUnixNano.low>>>0,e.endTimeUnixNano.high>>>0).toNumber())),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: object expected");t.attributes[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}if(e.droppedAttributesCount!=null&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),e.events){if(!Array.isArray(e.events))throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected");t.events=[];for(var r=0;r<e.events.length;++r){if(typeof e.events[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.events: object expected");t.events[r]=f.opentelemetry.proto.trace.v1.Span.Event.fromObject(e.events[r])}}if(e.droppedEventsCount!=null&&(t.droppedEventsCount=e.droppedEventsCount>>>0),e.links){if(!Array.isArray(e.links))throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected");t.links=[];for(var r=0;r<e.links.length;++r){if(typeof e.links[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.links: object expected");t.links[r]=f.opentelemetry.proto.trace.v1.Span.Link.fromObject(e.links[r])}}if(e.droppedLinksCount!=null&&(t.droppedLinksCount=e.droppedLinksCount>>>0),e.status!=null){if(typeof e.status!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected");t.status=f.opentelemetry.proto.trace.v1.Status.fromObject(e.status)}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.attributes=[],r.events=[],r.links=[]),t.defaults){if(t.bytes===String?r.traceId="":(r.traceId=[],t.bytes!==Array&&(r.traceId=p.newBuffer(r.traceId))),t.bytes===String?r.spanId="":(r.spanId=[],t.bytes!==Array&&(r.spanId=p.newBuffer(r.spanId))),r.traceState="",t.bytes===String?r.parentSpanId="":(r.parentSpanId=[],t.bytes!==Array&&(r.parentSpanId=p.newBuffer(r.parentSpanId))),r.name="",r.kind=t.enums===String?"SPAN_KIND_UNSPECIFIED":0,p.Long){var a=new p.Long(0,0,!1);r.startTimeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.startTimeUnixNano=t.longs===String?"0":0;if(p.Long){var a=new p.Long(0,0,!1);r.endTimeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.endTimeUnixNano=t.longs===String?"0":0;r.droppedAttributesCount=0,r.droppedEventsCount=0,r.droppedLinksCount=0,r.status=null}if(e.traceId!=null&&e.hasOwnProperty("traceId")&&(r.traceId=t.bytes===String?p.base64.encode(e.traceId,0,e.traceId.length):t.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),e.spanId!=null&&e.hasOwnProperty("spanId")&&(r.spanId=t.bytes===String?p.base64.encode(e.spanId,0,e.spanId.length):t.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),e.traceState!=null&&e.hasOwnProperty("traceState")&&(r.traceState=e.traceState),e.parentSpanId!=null&&e.hasOwnProperty("parentSpanId")&&(r.parentSpanId=t.bytes===String?p.base64.encode(e.parentSpanId,0,e.parentSpanId.length):t.bytes===Array?Array.prototype.slice.call(e.parentSpanId):e.parentSpanId),e.name!=null&&e.hasOwnProperty("name")&&(r.name=e.name),e.kind!=null&&e.hasOwnProperty("kind")&&(r.kind=t.enums===String?f.opentelemetry.proto.trace.v1.Span.SpanKind[e.kind]===void 0?e.kind:f.opentelemetry.proto.trace.v1.Span.SpanKind[e.kind]:e.kind),e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?r.startTimeUnixNano=t.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:r.startTimeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.startTimeUnixNano):t.longs===Number?new p.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.endTimeUnixNano!=null&&e.hasOwnProperty("endTimeUnixNano")&&(typeof e.endTimeUnixNano=="number"?r.endTimeUnixNano=t.longs===String?String(e.endTimeUnixNano):e.endTimeUnixNano:r.endTimeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.endTimeUnixNano):t.longs===Number?new p.LongBits(e.endTimeUnixNano.low>>>0,e.endTimeUnixNano.high>>>0).toNumber():e.endTimeUnixNano),e.attributes&&e.attributes.length){r.attributes=[];for(var s=0;s<e.attributes.length;++s)r.attributes[s]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[s],t)}if(e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(r.droppedAttributesCount=e.droppedAttributesCount),e.events&&e.events.length){r.events=[];for(var s=0;s<e.events.length;++s)r.events[s]=f.opentelemetry.proto.trace.v1.Span.Event.toObject(e.events[s],t)}if(e.droppedEventsCount!=null&&e.hasOwnProperty("droppedEventsCount")&&(r.droppedEventsCount=e.droppedEventsCount),e.links&&e.links.length){r.links=[];for(var s=0;s<e.links.length;++s)r.links[s]=f.opentelemetry.proto.trace.v1.Span.Link.toObject(e.links[s],t)}return e.droppedLinksCount!=null&&e.hasOwnProperty("droppedLinksCount")&&(r.droppedLinksCount=e.droppedLinksCount),e.status!=null&&e.hasOwnProperty("status")&&(r.status=f.opentelemetry.proto.trace.v1.Status.toObject(e.status,t)),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span"},l.SpanKind=function(){var i={},e=Object.create(i);return e[i[0]="SPAN_KIND_UNSPECIFIED"]=0,e[i[1]="SPAN_KIND_INTERNAL"]=1,e[i[2]="SPAN_KIND_SERVER"]=2,e[i[3]="SPAN_KIND_CLIENT"]=3,e[i[4]="SPAN_KIND_PRODUCER"]=4,e[i[5]="SPAN_KIND_CONSUMER"]=5,e}(),l.Event=function(){function i(e){if(this.attributes=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.timeUnixNano=null,i.prototype.name=null,i.prototype.attributes=p.emptyArray,i.prototype.droppedAttributesCount=null,i.create=function(t){return new i(t)},i.encode=function(t,r){if(r||(r=T.create()),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(9).fixed64(t.timeUnixNano),t.name!=null&&Object.hasOwnProperty.call(t,"name")&&r.uint32(18).string(t.name),t.attributes!=null&&t.attributes.length)for(var a=0;a<t.attributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[a],r.uint32(26).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&r.uint32(32).uint32(t.droppedAttributesCount),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.trace.v1.Span.Event;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.timeUnixNano=t.fixed64();break}case 2:{s.name=t.string();break}case 3:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 4:{s.droppedAttributesCount=t.uint32();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(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")&&!p.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&p.isInteger(t.timeUnixNano.low)&&p.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.name!=null&&t.hasOwnProperty("name")&&!p.isString(t.name))return"name: string expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var r=0;r<t.attributes.length;++r){var a=f.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[r]);if(a)return"attributes."+a}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.trace.v1.Span.Event)return t;var r=new f.opentelemetry.proto.trace.v1.Span.Event;if(t.timeUnixNano!=null&&(p.Long?(r.timeUnixNano=p.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.name!=null&&(r.name=String(t.name)),t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");r.attributes=[];for(var a=0;a<t.attributes.length;++a){if(typeof t.attributes[a]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected");r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[a])}}return t.droppedAttributesCount!=null&&(r.droppedAttributesCount=t.droppedAttributesCount>>>0),r},i.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.attributes=[]),r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.timeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.timeUnixNano=r.longs===String?"0":0;a.name="",a.droppedAttributesCount=0}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?a.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:a.timeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.name!=null&&t.hasOwnProperty("name")&&(a.name=t.name),t.attributes&&t.attributes.length){a.attributes=[];for(var d=0;d<t.attributes.length;++d)a.attributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[d],r)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(a.droppedAttributesCount=t.droppedAttributesCount),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Span.Event"},i}(),l.Link=function(){function i(e){if(this.attributes=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.traceId=null,i.prototype.spanId=null,i.prototype.traceState=null,i.prototype.attributes=p.emptyArray,i.prototype.droppedAttributesCount=null,i.create=function(t){return new i(t)},i.encode=function(t,r){if(r||(r=T.create()),t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId")&&r.uint32(10).bytes(t.traceId),t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId")&&r.uint32(18).bytes(t.spanId),t.traceState!=null&&Object.hasOwnProperty.call(t,"traceState")&&r.uint32(26).string(t.traceState),t.attributes!=null&&t.attributes.length)for(var a=0;a<t.attributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[a],r.uint32(34).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&r.uint32(40).uint32(t.droppedAttributesCount),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.trace.v1.Span.Link;t.pos<a;){var d=t.uint32();switch(d>>>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.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 5:{s.droppedAttributesCount=t.uint32();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(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"||p.isString(t.traceId)))return"traceId: buffer expected";if(t.spanId!=null&&t.hasOwnProperty("spanId")&&!(t.spanId&&typeof t.spanId.length=="number"||p.isString(t.spanId)))return"spanId: buffer expected";if(t.traceState!=null&&t.hasOwnProperty("traceState")&&!p.isString(t.traceState))return"traceState: string expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var r=0;r<t.attributes.length;++r){var a=f.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[r]);if(a)return"attributes."+a}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.trace.v1.Span.Link)return t;var r=new f.opentelemetry.proto.trace.v1.Span.Link;if(t.traceId!=null&&(typeof t.traceId=="string"?p.base64.decode(t.traceId,r.traceId=p.newBuffer(p.base64.length(t.traceId)),0):t.traceId.length>=0&&(r.traceId=t.traceId)),t.spanId!=null&&(typeof t.spanId=="string"?p.base64.decode(t.spanId,r.spanId=p.newBuffer(p.base64.length(t.spanId)),0):t.spanId.length>=0&&(r.spanId=t.spanId)),t.traceState!=null&&(r.traceState=String(t.traceState)),t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");r.attributes=[];for(var a=0;a<t.attributes.length;++a){if(typeof t.attributes[a]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected");r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[a])}}return t.droppedAttributesCount!=null&&(r.droppedAttributesCount=t.droppedAttributesCount>>>0),r},i.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.attributes=[]),r.defaults&&(r.bytes===String?a.traceId="":(a.traceId=[],r.bytes!==Array&&(a.traceId=p.newBuffer(a.traceId))),r.bytes===String?a.spanId="":(a.spanId=[],r.bytes!==Array&&(a.spanId=p.newBuffer(a.spanId))),a.traceState="",a.droppedAttributesCount=0),t.traceId!=null&&t.hasOwnProperty("traceId")&&(a.traceId=r.bytes===String?p.base64.encode(t.traceId,0,t.traceId.length):r.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId),t.spanId!=null&&t.hasOwnProperty("spanId")&&(a.spanId=r.bytes===String?p.base64.encode(t.spanId,0,t.spanId.length):r.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId),t.traceState!=null&&t.hasOwnProperty("traceState")&&(a.traceState=t.traceState),t.attributes&&t.attributes.length){a.attributes=[];for(var s=0;s<t.attributes.length;++s)a.attributes[s]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[s],r)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(a.droppedAttributesCount=t.droppedAttributesCount),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Span.Link"},i}(),l}(),c.Status=function(){function l(i){if(i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.message=null,l.prototype.code=null,l.create=function(e){return new l(e)},l.encode=function(e,t){return t||(t=T.create()),e.message!=null&&Object.hasOwnProperty.call(e,"message")&&t.uint32(18).string(e.message),e.code!=null&&Object.hasOwnProperty.call(e,"code")&&t.uint32(24).int32(e.code),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.trace.v1.Status;e.pos<r;){var s=e.uint32();switch(s>>>3){case 2:{a.message=e.string();break}case 3:{a.code=e.int32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.message!=null&&e.hasOwnProperty("message")&&!p.isString(e.message))return"message: string expected";if(e.code!=null&&e.hasOwnProperty("code"))switch(e.code){default:return"code: enum value expected";case 0:case 1:case 2:break}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.trace.v1.Status)return e;var t=new f.opentelemetry.proto.trace.v1.Status;switch(e.message!=null&&(t.message=String(e.message)),e.code){default:if(typeof e.code=="number"){t.code=e.code;break}break;case"STATUS_CODE_UNSET":case 0:t.code=0;break;case"STATUS_CODE_OK":case 1:t.code=1;break;case"STATUS_CODE_ERROR":case 2:t.code=2;break}return t},l.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.message="",r.code=t.enums===String?"STATUS_CODE_UNSET":0),e.message!=null&&e.hasOwnProperty("message")&&(r.message=e.message),e.code!=null&&e.hasOwnProperty("code")&&(r.code=t.enums===String?f.opentelemetry.proto.trace.v1.Status.StatusCode[e.code]===void 0?e.code:f.opentelemetry.proto.trace.v1.Status.StatusCode[e.code]:e.code),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Status"},l.StatusCode=function(){var i={},e=Object.create(i);return e[i[0]="STATUS_CODE_UNSET"]=0,e[i[1]="STATUS_CODE_OK"]=1,e[i[2]="STATUS_CODE_ERROR"]=2,e}(),l}(),c}(),o}(),n.collector=function(){var o={};return o.trace=function(){var c={};return c.v1=function(){var l={};return l.TraceService=function(){function i(e,t,r){E.rpc.Service.call(this,e,t,r)}return(i.prototype=Object.create(E.rpc.Service.prototype)).constructor=i,i.create=function(t,r,a){return new this(t,r,a)},Object.defineProperty(i.prototype.export=function e(t,r){return this.rpcCall(e,f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,t,r)},"name",{value:"Export"}),i}(),l.ExportTraceServiceRequest=function(){function i(e){if(this.resourceSpans=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.resourceSpans=p.emptyArray,i.create=function(t){return new i(t)},i.encode=function(t,r){if(r||(r=T.create()),t.resourceSpans!=null&&t.resourceSpans.length)for(var a=0;a<t.resourceSpans.length;++a)f.opentelemetry.proto.trace.v1.ResourceSpans.encode(t.resourceSpans[a],r.uint32(10).fork()).ldelim();return r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.resourceSpans&&s.resourceSpans.length||(s.resourceSpans=[]),s.resourceSpans.push(f.opentelemetry.proto.trace.v1.ResourceSpans.decode(t,t.uint32()));break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(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 r=0;r<t.resourceSpans.length;++r){var a=f.opentelemetry.proto.trace.v1.ResourceSpans.verify(t.resourceSpans[r]);if(a)return"resourceSpans."+a}}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest)return t;var r=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;if(t.resourceSpans){if(!Array.isArray(t.resourceSpans))throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected");r.resourceSpans=[];for(var a=0;a<t.resourceSpans.length;++a){if(typeof t.resourceSpans[a]!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected");r.resourceSpans[a]=f.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(t.resourceSpans[a])}}return r},i.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.resourceSpans=[]),t.resourceSpans&&t.resourceSpans.length){a.resourceSpans=[];for(var s=0;s<t.resourceSpans.length;++s)a.resourceSpans[s]=f.opentelemetry.proto.trace.v1.ResourceSpans.toObject(t.resourceSpans[s],r)}return a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"},i}(),l.ExportTraceServiceResponse=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.partialSuccess=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.partialSuccess!=null&&Object.hasOwnProperty.call(t,"partialSuccess")&&f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(t.partialSuccess,r.uint32(10).fork()).ldelim(),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.partialSuccess=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(t,t.uint32());break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")){var r=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(t.partialSuccess);if(r)return"partialSuccess."+r}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return t;var r=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(t.partialSuccess!=null){if(typeof t.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");r.partialSuccess=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(t.partialSuccess)}return r},i.toObject=function(t,r){r||(r={});var a={};return r.defaults&&(a.partialSuccess=null),t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")&&(a.partialSuccess=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(t.partialSuccess,r)),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},i}(),l.ExportTracePartialSuccess=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.rejectedSpans=null,i.prototype.errorMessage=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.rejectedSpans!=null&&Object.hasOwnProperty.call(t,"rejectedSpans")&&r.uint32(8).int64(t.rejectedSpans),t.errorMessage!=null&&Object.hasOwnProperty.call(t,"errorMessage")&&r.uint32(18).string(t.errorMessage),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.rejectedSpans=t.int64();break}case 2:{s.errorMessage=t.string();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){return typeof t!="object"||t===null?"object expected":t.rejectedSpans!=null&&t.hasOwnProperty("rejectedSpans")&&!p.isInteger(t.rejectedSpans)&&!(t.rejectedSpans&&p.isInteger(t.rejectedSpans.low)&&p.isInteger(t.rejectedSpans.high))?"rejectedSpans: integer|Long expected":t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&!p.isString(t.errorMessage)?"errorMessage: string expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return t;var r=new f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;return t.rejectedSpans!=null&&(p.Long?(r.rejectedSpans=p.Long.fromValue(t.rejectedSpans)).unsigned=!1:typeof t.rejectedSpans=="string"?r.rejectedSpans=parseInt(t.rejectedSpans,10):typeof t.rejectedSpans=="number"?r.rejectedSpans=t.rejectedSpans:typeof t.rejectedSpans=="object"&&(r.rejectedSpans=new p.LongBits(t.rejectedSpans.low>>>0,t.rejectedSpans.high>>>0).toNumber())),t.errorMessage!=null&&(r.errorMessage=String(t.errorMessage)),r},i.toObject=function(t,r){r||(r={});var a={};if(r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.rejectedSpans=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.rejectedSpans=r.longs===String?"0":0;a.errorMessage=""}return t.rejectedSpans!=null&&t.hasOwnProperty("rejectedSpans")&&(typeof t.rejectedSpans=="number"?a.rejectedSpans=r.longs===String?String(t.rejectedSpans):t.rejectedSpans:a.rejectedSpans=r.longs===String?p.Long.prototype.toString.call(t.rejectedSpans):r.longs===Number?new p.LongBits(t.rejectedSpans.low>>>0,t.rejectedSpans.high>>>0).toNumber():t.rejectedSpans),t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&(a.errorMessage=t.errorMessage),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},i}(),l}(),c}(),o.metrics=function(){var c={};return c.v1=function(){var l={};return l.MetricsService=function(){function i(e,t,r){E.rpc.Service.call(this,e,t,r)}return(i.prototype=Object.create(E.rpc.Service.prototype)).constructor=i,i.create=function(t,r,a){return new this(t,r,a)},Object.defineProperty(i.prototype.export=function e(t,r){return this.rpcCall(e,f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,t,r)},"name",{value:"Export"}),i}(),l.ExportMetricsServiceRequest=function(){function i(e){if(this.resourceMetrics=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.resourceMetrics=p.emptyArray,i.create=function(t){return new i(t)},i.encode=function(t,r){if(r||(r=T.create()),t.resourceMetrics!=null&&t.resourceMetrics.length)for(var a=0;a<t.resourceMetrics.length;++a)f.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(t.resourceMetrics[a],r.uint32(10).fork()).ldelim();return r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.resourceMetrics&&s.resourceMetrics.length||(s.resourceMetrics=[]),s.resourceMetrics.push(f.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(t,t.uint32()));break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(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 r=0;r<t.resourceMetrics.length;++r){var a=f.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(t.resourceMetrics[r]);if(a)return"resourceMetrics."+a}}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest)return t;var r=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;if(t.resourceMetrics){if(!Array.isArray(t.resourceMetrics))throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected");r.resourceMetrics=[];for(var a=0;a<t.resourceMetrics.length;++a){if(typeof t.resourceMetrics[a]!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected");r.resourceMetrics[a]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(t.resourceMetrics[a])}}return r},i.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.resourceMetrics=[]),t.resourceMetrics&&t.resourceMetrics.length){a.resourceMetrics=[];for(var s=0;s<t.resourceMetrics.length;++s)a.resourceMetrics[s]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(t.resourceMetrics[s],r)}return a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"},i}(),l.ExportMetricsServiceResponse=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.partialSuccess=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.partialSuccess!=null&&Object.hasOwnProperty.call(t,"partialSuccess")&&f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(t.partialSuccess,r.uint32(10).fork()).ldelim(),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.partialSuccess=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(t,t.uint32());break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")){var r=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(t.partialSuccess);if(r)return"partialSuccess."+r}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return t;var r=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(t.partialSuccess!=null){if(typeof t.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");r.partialSuccess=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(t.partialSuccess)}return r},i.toObject=function(t,r){r||(r={});var a={};return r.defaults&&(a.partialSuccess=null),t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")&&(a.partialSuccess=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(t.partialSuccess,r)),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},i}(),l.ExportMetricsPartialSuccess=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.rejectedDataPoints=null,i.prototype.errorMessage=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.rejectedDataPoints!=null&&Object.hasOwnProperty.call(t,"rejectedDataPoints")&&r.uint32(8).int64(t.rejectedDataPoints),t.errorMessage!=null&&Object.hasOwnProperty.call(t,"errorMessage")&&r.uint32(18).string(t.errorMessage),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.rejectedDataPoints=t.int64();break}case 2:{s.errorMessage=t.string();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){return typeof t!="object"||t===null?"object expected":t.rejectedDataPoints!=null&&t.hasOwnProperty("rejectedDataPoints")&&!p.isInteger(t.rejectedDataPoints)&&!(t.rejectedDataPoints&&p.isInteger(t.rejectedDataPoints.low)&&p.isInteger(t.rejectedDataPoints.high))?"rejectedDataPoints: integer|Long expected":t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&!p.isString(t.errorMessage)?"errorMessage: string expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return t;var r=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;return t.rejectedDataPoints!=null&&(p.Long?(r.rejectedDataPoints=p.Long.fromValue(t.rejectedDataPoints)).unsigned=!1:typeof t.rejectedDataPoints=="string"?r.rejectedDataPoints=parseInt(t.rejectedDataPoints,10):typeof t.rejectedDataPoints=="number"?r.rejectedDataPoints=t.rejectedDataPoints:typeof t.rejectedDataPoints=="object"&&(r.rejectedDataPoints=new p.LongBits(t.rejectedDataPoints.low>>>0,t.rejectedDataPoints.high>>>0).toNumber())),t.errorMessage!=null&&(r.errorMessage=String(t.errorMessage)),r},i.toObject=function(t,r){r||(r={});var a={};if(r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.rejectedDataPoints=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.rejectedDataPoints=r.longs===String?"0":0;a.errorMessage=""}return t.rejectedDataPoints!=null&&t.hasOwnProperty("rejectedDataPoints")&&(typeof t.rejectedDataPoints=="number"?a.rejectedDataPoints=r.longs===String?String(t.rejectedDataPoints):t.rejectedDataPoints:a.rejectedDataPoints=r.longs===String?p.Long.prototype.toString.call(t.rejectedDataPoints):r.longs===Number?new p.LongBits(t.rejectedDataPoints.low>>>0,t.rejectedDataPoints.high>>>0).toNumber():t.rejectedDataPoints),t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&(a.errorMessage=t.errorMessage),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},i}(),l}(),c}(),o.logs=function(){var c={};return c.v1=function(){var l={};return l.LogsService=function(){function i(e,t,r){E.rpc.Service.call(this,e,t,r)}return(i.prototype=Object.create(E.rpc.Service.prototype)).constructor=i,i.create=function(t,r,a){return new this(t,r,a)},Object.defineProperty(i.prototype.export=function e(t,r){return this.rpcCall(e,f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,t,r)},"name",{value:"Export"}),i}(),l.ExportLogsServiceRequest=function(){function i(e){if(this.resourceLogs=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.resourceLogs=p.emptyArray,i.create=function(t){return new i(t)},i.encode=function(t,r){if(r||(r=T.create()),t.resourceLogs!=null&&t.resourceLogs.length)for(var a=0;a<t.resourceLogs.length;++a)f.opentelemetry.proto.logs.v1.ResourceLogs.encode(t.resourceLogs[a],r.uint32(10).fork()).ldelim();return r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.resourceLogs&&s.resourceLogs.length||(s.resourceLogs=[]),s.resourceLogs.push(f.opentelemetry.proto.logs.v1.ResourceLogs.decode(t,t.uint32()));break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(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 r=0;r<t.resourceLogs.length;++r){var a=f.opentelemetry.proto.logs.v1.ResourceLogs.verify(t.resourceLogs[r]);if(a)return"resourceLogs."+a}}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest)return t;var r=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;if(t.resourceLogs){if(!Array.isArray(t.resourceLogs))throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected");r.resourceLogs=[];for(var a=0;a<t.resourceLogs.length;++a){if(typeof t.resourceLogs[a]!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected");r.resourceLogs[a]=f.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(t.resourceLogs[a])}}return r},i.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.resourceLogs=[]),t.resourceLogs&&t.resourceLogs.length){a.resourceLogs=[];for(var s=0;s<t.resourceLogs.length;++s)a.resourceLogs[s]=f.opentelemetry.proto.logs.v1.ResourceLogs.toObject(t.resourceLogs[s],r)}return a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"},i}(),l.ExportLogsServiceResponse=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.partialSuccess=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.partialSuccess!=null&&Object.hasOwnProperty.call(t,"partialSuccess")&&f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(t.partialSuccess,r.uint32(10).fork()).ldelim(),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.partialSuccess=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(t,t.uint32());break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")){var r=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(t.partialSuccess);if(r)return"partialSuccess."+r}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return t;var r=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(t.partialSuccess!=null){if(typeof t.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");r.partialSuccess=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(t.partialSuccess)}return r},i.toObject=function(t,r){r||(r={});var a={};return r.defaults&&(a.partialSuccess=null),t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")&&(a.partialSuccess=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(t.partialSuccess,r)),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},i}(),l.ExportLogsPartialSuccess=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.rejectedLogRecords=null,i.prototype.errorMessage=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.rejectedLogRecords!=null&&Object.hasOwnProperty.call(t,"rejectedLogRecords")&&r.uint32(8).int64(t.rejectedLogRecords),t.errorMessage!=null&&Object.hasOwnProperty.call(t,"errorMessage")&&r.uint32(18).string(t.errorMessage),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.rejectedLogRecords=t.int64();break}case 2:{s.errorMessage=t.string();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){return typeof t!="object"||t===null?"object expected":t.rejectedLogRecords!=null&&t.hasOwnProperty("rejectedLogRecords")&&!p.isInteger(t.rejectedLogRecords)&&!(t.rejectedLogRecords&&p.isInteger(t.rejectedLogRecords.low)&&p.isInteger(t.rejectedLogRecords.high))?"rejectedLogRecords: integer|Long expected":t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&!p.isString(t.errorMessage)?"errorMessage: string expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return t;var r=new f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;return t.rejectedLogRecords!=null&&(p.Long?(r.rejectedLogRecords=p.Long.fromValue(t.rejectedLogRecords)).unsigned=!1:typeof t.rejectedLogRecords=="string"?r.rejectedLogRecords=parseInt(t.rejectedLogRecords,10):typeof t.rejectedLogRecords=="number"?r.rejectedLogRecords=t.rejectedLogRecords:typeof t.rejectedLogRecords=="object"&&(r.rejectedLogRecords=new p.LongBits(t.rejectedLogRecords.low>>>0,t.rejectedLogRecords.high>>>0).toNumber())),t.errorMessage!=null&&(r.errorMessage=String(t.errorMessage)),r},i.toObject=function(t,r){r||(r={});var a={};if(r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.rejectedLogRecords=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.rejectedLogRecords=r.longs===String?"0":0;a.errorMessage=""}return t.rejectedLogRecords!=null&&t.hasOwnProperty("rejectedLogRecords")&&(typeof t.rejectedLogRecords=="number"?a.rejectedLogRecords=r.longs===String?String(t.rejectedLogRecords):t.rejectedLogRecords:a.rejectedLogRecords=r.longs===String?p.Long.prototype.toString.call(t.rejectedLogRecords):r.longs===Number?new p.LongBits(t.rejectedLogRecords.low>>>0,t.rejectedLogRecords.high>>>0).toNumber():t.rejectedLogRecords),t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&(a.errorMessage=t.errorMessage),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},i}(),l}(),c}(),o}(),n.metrics=function(){var o={};return o.v1=function(){var c={};return c.MetricsData=function(){function l(i){if(this.resourceMetrics=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resourceMetrics=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resourceMetrics!=null&&e.resourceMetrics.length)for(var r=0;r<e.resourceMetrics.length;++r)f.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(e.resourceMetrics[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.MetricsData;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resourceMetrics&&a.resourceMetrics.length||(a.resourceMetrics=[]),a.resourceMetrics.push(f.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.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 t=0;t<e.resourceMetrics.length;++t){var r=f.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(e.resourceMetrics[t]);if(r)return"resourceMetrics."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.MetricsData)return e;var t=new f.opentelemetry.proto.metrics.v1.MetricsData;if(e.resourceMetrics){if(!Array.isArray(e.resourceMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: array expected");t.resourceMetrics=[];for(var r=0;r<e.resourceMetrics.length;++r){if(typeof e.resourceMetrics[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: object expected");t.resourceMetrics[r]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(e.resourceMetrics[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.resourceMetrics=[]),e.resourceMetrics&&e.resourceMetrics.length){r.resourceMetrics=[];for(var a=0;a<e.resourceMetrics.length;++a)r.resourceMetrics[a]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(e.resourceMetrics[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.MetricsData"},l}(),c.ResourceMetrics=function(){function l(i){if(this.scopeMetrics=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resource=null,l.prototype.scopeMetrics=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resource!=null&&Object.hasOwnProperty.call(e,"resource")&&f.opentelemetry.proto.resource.v1.Resource.encode(e.resource,t.uint32(10).fork()).ldelim(),e.scopeMetrics!=null&&e.scopeMetrics.length)for(var r=0;r<e.scopeMetrics.length;++r)f.opentelemetry.proto.metrics.v1.ScopeMetrics.encode(e.scopeMetrics[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.ResourceMetrics;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resource=f.opentelemetry.proto.resource.v1.Resource.decode(e,e.uint32());break}case 2:{a.scopeMetrics&&a.scopeMetrics.length||(a.scopeMetrics=[]),a.scopeMetrics.push(f.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resource!=null&&e.hasOwnProperty("resource")){var t=f.opentelemetry.proto.resource.v1.Resource.verify(e.resource);if(t)return"resource."+t}if(e.scopeMetrics!=null&&e.hasOwnProperty("scopeMetrics")){if(!Array.isArray(e.scopeMetrics))return"scopeMetrics: array expected";for(var r=0;r<e.scopeMetrics.length;++r){var t=f.opentelemetry.proto.metrics.v1.ScopeMetrics.verify(e.scopeMetrics[r]);if(t)return"scopeMetrics."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.ResourceMetrics)return e;var t=new f.opentelemetry.proto.metrics.v1.ResourceMetrics;if(e.resource!=null){if(typeof e.resource!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.resource: object expected");t.resource=f.opentelemetry.proto.resource.v1.Resource.fromObject(e.resource)}if(e.scopeMetrics){if(!Array.isArray(e.scopeMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: array expected");t.scopeMetrics=[];for(var r=0;r<e.scopeMetrics.length;++r){if(typeof e.scopeMetrics[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: object expected");t.scopeMetrics[r]=f.opentelemetry.proto.metrics.v1.ScopeMetrics.fromObject(e.scopeMetrics[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.scopeMetrics=[]),t.defaults&&(r.resource=null,r.schemaUrl=""),e.resource!=null&&e.hasOwnProperty("resource")&&(r.resource=f.opentelemetry.proto.resource.v1.Resource.toObject(e.resource,t)),e.scopeMetrics&&e.scopeMetrics.length){r.scopeMetrics=[];for(var a=0;a<e.scopeMetrics.length;++a)r.scopeMetrics[a]=f.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(e.scopeMetrics[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ResourceMetrics"},l}(),c.ScopeMetrics=function(){function l(i){if(this.metrics=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.scope=null,l.prototype.metrics=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.scope!=null&&Object.hasOwnProperty.call(e,"scope")&&f.opentelemetry.proto.common.v1.InstrumentationScope.encode(e.scope,t.uint32(10).fork()).ldelim(),e.metrics!=null&&e.metrics.length)for(var r=0;r<e.metrics.length;++r)f.opentelemetry.proto.metrics.v1.Metric.encode(e.metrics[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.ScopeMetrics;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.decode(e,e.uint32());break}case 2:{a.metrics&&a.metrics.length||(a.metrics=[]),a.metrics.push(f.opentelemetry.proto.metrics.v1.Metric.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.scope!=null&&e.hasOwnProperty("scope")){var t=f.opentelemetry.proto.common.v1.InstrumentationScope.verify(e.scope);if(t)return"scope."+t}if(e.metrics!=null&&e.hasOwnProperty("metrics")){if(!Array.isArray(e.metrics))return"metrics: array expected";for(var r=0;r<e.metrics.length;++r){var t=f.opentelemetry.proto.metrics.v1.Metric.verify(e.metrics[r]);if(t)return"metrics."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.ScopeMetrics)return e;var t=new f.opentelemetry.proto.metrics.v1.ScopeMetrics;if(e.scope!=null){if(typeof e.scope!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.scope: object expected");t.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(e.scope)}if(e.metrics){if(!Array.isArray(e.metrics))throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: array expected");t.metrics=[];for(var r=0;r<e.metrics.length;++r){if(typeof e.metrics[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: object expected");t.metrics[r]=f.opentelemetry.proto.metrics.v1.Metric.fromObject(e.metrics[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.metrics=[]),t.defaults&&(r.scope=null,r.schemaUrl=""),e.scope!=null&&e.hasOwnProperty("scope")&&(r.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.toObject(e.scope,t)),e.metrics&&e.metrics.length){r.metrics=[];for(var a=0;a<e.metrics.length;++a)r.metrics[a]=f.opentelemetry.proto.metrics.v1.Metric.toObject(e.metrics[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ScopeMetrics"},l}(),c.Metric=function(){function l(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.name=null,l.prototype.description=null,l.prototype.unit=null,l.prototype.gauge=null,l.prototype.sum=null,l.prototype.histogram=null,l.prototype.exponentialHistogram=null,l.prototype.summary=null;var i;return Object.defineProperty(l.prototype,"data",{get:p.oneOfGetter(i=["gauge","sum","histogram","exponentialHistogram","summary"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){return r||(r=T.create()),t.name!=null&&Object.hasOwnProperty.call(t,"name")&&r.uint32(10).string(t.name),t.description!=null&&Object.hasOwnProperty.call(t,"description")&&r.uint32(18).string(t.description),t.unit!=null&&Object.hasOwnProperty.call(t,"unit")&&r.uint32(26).string(t.unit),t.gauge!=null&&Object.hasOwnProperty.call(t,"gauge")&&f.opentelemetry.proto.metrics.v1.Gauge.encode(t.gauge,r.uint32(42).fork()).ldelim(),t.sum!=null&&Object.hasOwnProperty.call(t,"sum")&&f.opentelemetry.proto.metrics.v1.Sum.encode(t.sum,r.uint32(58).fork()).ldelim(),t.histogram!=null&&Object.hasOwnProperty.call(t,"histogram")&&f.opentelemetry.proto.metrics.v1.Histogram.encode(t.histogram,r.uint32(74).fork()).ldelim(),t.exponentialHistogram!=null&&Object.hasOwnProperty.call(t,"exponentialHistogram")&&f.opentelemetry.proto.metrics.v1.ExponentialHistogram.encode(t.exponentialHistogram,r.uint32(82).fork()).ldelim(),t.summary!=null&&Object.hasOwnProperty.call(t,"summary")&&f.opentelemetry.proto.metrics.v1.Summary.encode(t.summary,r.uint32(90).fork()).ldelim(),r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.Metric;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.name=t.string();break}case 2:{s.description=t.string();break}case 3:{s.unit=t.string();break}case 5:{s.gauge=f.opentelemetry.proto.metrics.v1.Gauge.decode(t,t.uint32());break}case 7:{s.sum=f.opentelemetry.proto.metrics.v1.Sum.decode(t,t.uint32());break}case 9:{s.histogram=f.opentelemetry.proto.metrics.v1.Histogram.decode(t,t.uint32());break}case 10:{s.exponentialHistogram=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(t,t.uint32());break}case 11:{s.summary=f.opentelemetry.proto.metrics.v1.Summary.decode(t,t.uint32());break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.name!=null&&t.hasOwnProperty("name")&&!p.isString(t.name))return"name: string expected";if(t.description!=null&&t.hasOwnProperty("description")&&!p.isString(t.description))return"description: string expected";if(t.unit!=null&&t.hasOwnProperty("unit")&&!p.isString(t.unit))return"unit: string expected";if(t.gauge!=null&&t.hasOwnProperty("gauge")){r.data=1;{var a=f.opentelemetry.proto.metrics.v1.Gauge.verify(t.gauge);if(a)return"gauge."+a}}if(t.sum!=null&&t.hasOwnProperty("sum")){if(r.data===1)return"data: multiple values";r.data=1;{var a=f.opentelemetry.proto.metrics.v1.Sum.verify(t.sum);if(a)return"sum."+a}}if(t.histogram!=null&&t.hasOwnProperty("histogram")){if(r.data===1)return"data: multiple values";r.data=1;{var a=f.opentelemetry.proto.metrics.v1.Histogram.verify(t.histogram);if(a)return"histogram."+a}}if(t.exponentialHistogram!=null&&t.hasOwnProperty("exponentialHistogram")){if(r.data===1)return"data: multiple values";r.data=1;{var a=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(t.exponentialHistogram);if(a)return"exponentialHistogram."+a}}if(t.summary!=null&&t.hasOwnProperty("summary")){if(r.data===1)return"data: multiple values";r.data=1;{var a=f.opentelemetry.proto.metrics.v1.Summary.verify(t.summary);if(a)return"summary."+a}}return null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.Metric)return t;var r=new f.opentelemetry.proto.metrics.v1.Metric;if(t.name!=null&&(r.name=String(t.name)),t.description!=null&&(r.description=String(t.description)),t.unit!=null&&(r.unit=String(t.unit)),t.gauge!=null){if(typeof t.gauge!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected");r.gauge=f.opentelemetry.proto.metrics.v1.Gauge.fromObject(t.gauge)}if(t.sum!=null){if(typeof t.sum!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.sum: object expected");r.sum=f.opentelemetry.proto.metrics.v1.Sum.fromObject(t.sum)}if(t.histogram!=null){if(typeof t.histogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.histogram: object expected");r.histogram=f.opentelemetry.proto.metrics.v1.Histogram.fromObject(t.histogram)}if(t.exponentialHistogram!=null){if(typeof t.exponentialHistogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected");r.exponentialHistogram=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(t.exponentialHistogram)}if(t.summary!=null){if(typeof t.summary!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.summary: object expected");r.summary=f.opentelemetry.proto.metrics.v1.Summary.fromObject(t.summary)}return r},l.toObject=function(t,r){r||(r={});var a={};return r.defaults&&(a.name="",a.description="",a.unit=""),t.name!=null&&t.hasOwnProperty("name")&&(a.name=t.name),t.description!=null&&t.hasOwnProperty("description")&&(a.description=t.description),t.unit!=null&&t.hasOwnProperty("unit")&&(a.unit=t.unit),t.gauge!=null&&t.hasOwnProperty("gauge")&&(a.gauge=f.opentelemetry.proto.metrics.v1.Gauge.toObject(t.gauge,r),r.oneofs&&(a.data="gauge")),t.sum!=null&&t.hasOwnProperty("sum")&&(a.sum=f.opentelemetry.proto.metrics.v1.Sum.toObject(t.sum,r),r.oneofs&&(a.data="sum")),t.histogram!=null&&t.hasOwnProperty("histogram")&&(a.histogram=f.opentelemetry.proto.metrics.v1.Histogram.toObject(t.histogram,r),r.oneofs&&(a.data="histogram")),t.exponentialHistogram!=null&&t.hasOwnProperty("exponentialHistogram")&&(a.exponentialHistogram=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(t.exponentialHistogram,r),r.oneofs&&(a.data="exponentialHistogram")),t.summary!=null&&t.hasOwnProperty("summary")&&(a.summary=f.opentelemetry.proto.metrics.v1.Summary.toObject(t.summary,r),r.oneofs&&(a.data="summary")),a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Metric"},l}(),c.Gauge=function(){function l(i){if(this.dataPoints=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.dataPoints=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)f.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.Gauge;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.dataPoints&&a.dataPoints.length||(a.dataPoints=[]),a.dataPoints.push(f.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=f.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.Gauge)return e;var t=new f.opentelemetry.proto.metrics.v1.Gauge;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: object expected");t.dataPoints[r]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(e.dataPoints[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var a=0;a<e.dataPoints.length;++a)r.dataPoints[a]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(e.dataPoints[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Gauge"},l}(),c.Sum=function(){function l(i){if(this.dataPoints=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.dataPoints=p.emptyArray,l.prototype.aggregationTemporality=null,l.prototype.isMonotonic=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)f.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return e.aggregationTemporality!=null&&Object.hasOwnProperty.call(e,"aggregationTemporality")&&t.uint32(16).int32(e.aggregationTemporality),e.isMonotonic!=null&&Object.hasOwnProperty.call(e,"isMonotonic")&&t.uint32(24).bool(e.isMonotonic),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.Sum;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.dataPoints&&a.dataPoints.length||(a.dataPoints=[]),a.dataPoints.push(f.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(e,e.uint32()));break}case 2:{a.aggregationTemporality=e.int32();break}case 3:{a.isMonotonic=e.bool();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=f.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}if(e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality"))switch(e.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return e.isMonotonic!=null&&e.hasOwnProperty("isMonotonic")&&typeof e.isMonotonic!="boolean"?"isMonotonic: boolean expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.Sum)return e;var t=new f.opentelemetry.proto.metrics.v1.Sum;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: object expected");t.dataPoints[r]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(e.dataPoints[r])}}switch(e.aggregationTemporality){default:if(typeof e.aggregationTemporality=="number"){t.aggregationTemporality=e.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:t.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:t.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:t.aggregationTemporality=2;break}return e.isMonotonic!=null&&(t.isMonotonic=!!e.isMonotonic),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),t.defaults&&(r.aggregationTemporality=t.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0,r.isMonotonic=!1),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var a=0;a<e.dataPoints.length;++a)r.dataPoints[a]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(e.dataPoints[a],t)}return e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality")&&(r.aggregationTemporality=t.enums===String?f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]===void 0?e.aggregationTemporality:f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]:e.aggregationTemporality),e.isMonotonic!=null&&e.hasOwnProperty("isMonotonic")&&(r.isMonotonic=e.isMonotonic),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Sum"},l}(),c.Histogram=function(){function l(i){if(this.dataPoints=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.dataPoints=p.emptyArray,l.prototype.aggregationTemporality=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)f.opentelemetry.proto.metrics.v1.HistogramDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return e.aggregationTemporality!=null&&Object.hasOwnProperty.call(e,"aggregationTemporality")&&t.uint32(16).int32(e.aggregationTemporality),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.Histogram;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.dataPoints&&a.dataPoints.length||(a.dataPoints=[]),a.dataPoints.push(f.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(e,e.uint32()));break}case 2:{a.aggregationTemporality=e.int32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=f.opentelemetry.proto.metrics.v1.HistogramDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}if(e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality"))switch(e.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.Histogram)return e;var t=new f.opentelemetry.proto.metrics.v1.Histogram;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: object expected");t.dataPoints[r]=f.opentelemetry.proto.metrics.v1.HistogramDataPoint.fromObject(e.dataPoints[r])}}switch(e.aggregationTemporality){default:if(typeof e.aggregationTemporality=="number"){t.aggregationTemporality=e.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:t.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:t.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:t.aggregationTemporality=2;break}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),t.defaults&&(r.aggregationTemporality=t.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var a=0;a<e.dataPoints.length;++a)r.dataPoints[a]=f.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(e.dataPoints[a],t)}return e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality")&&(r.aggregationTemporality=t.enums===String?f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]===void 0?e.aggregationTemporality:f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]:e.aggregationTemporality),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Histogram"},l}(),c.ExponentialHistogram=function(){function l(i){if(this.dataPoints=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.dataPoints=p.emptyArray,l.prototype.aggregationTemporality=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return e.aggregationTemporality!=null&&Object.hasOwnProperty.call(e,"aggregationTemporality")&&t.uint32(16).int32(e.aggregationTemporality),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.ExponentialHistogram;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.dataPoints&&a.dataPoints.length||(a.dataPoints=[]),a.dataPoints.push(f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(e,e.uint32()));break}case 2:{a.aggregationTemporality=e.int32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}if(e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality"))switch(e.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.ExponentialHistogram)return e;var t=new f.opentelemetry.proto.metrics.v1.ExponentialHistogram;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: object expected");t.dataPoints[r]=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.fromObject(e.dataPoints[r])}}switch(e.aggregationTemporality){default:if(typeof e.aggregationTemporality=="number"){t.aggregationTemporality=e.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:t.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:t.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:t.aggregationTemporality=2;break}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),t.defaults&&(r.aggregationTemporality=t.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var a=0;a<e.dataPoints.length;++a)r.dataPoints[a]=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(e.dataPoints[a],t)}return e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality")&&(r.aggregationTemporality=t.enums===String?f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]===void 0?e.aggregationTemporality:f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]:e.aggregationTemporality),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ExponentialHistogram"},l}(),c.Summary=function(){function l(i){if(this.dataPoints=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.dataPoints=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)f.opentelemetry.proto.metrics.v1.SummaryDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.Summary;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.dataPoints&&a.dataPoints.length||(a.dataPoints=[]),a.dataPoints.push(f.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.Summary)return e;var t=new f.opentelemetry.proto.metrics.v1.Summary;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: object expected");t.dataPoints[r]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.fromObject(e.dataPoints[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var a=0;a<e.dataPoints.length;++a)r.dataPoints[a]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(e.dataPoints[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Summary"},l}(),c.AggregationTemporality=function(){var l={},i=Object.create(l);return i[l[0]="AGGREGATION_TEMPORALITY_UNSPECIFIED"]=0,i[l[1]="AGGREGATION_TEMPORALITY_DELTA"]=1,i[l[2]="AGGREGATION_TEMPORALITY_CUMULATIVE"]=2,i}(),c.DataPointFlags=function(){var l={},i=Object.create(l);return i[l[0]="DATA_POINT_FLAGS_DO_NOT_USE"]=0,i[l[1]="DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"]=1,i}(),c.NumberDataPoint=function(){function l(e){if(this.attributes=[],this.exemplars=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.attributes=p.emptyArray,l.prototype.startTimeUnixNano=null,l.prototype.timeUnixNano=null,l.prototype.asDouble=null,l.prototype.asInt=null,l.prototype.exemplars=p.emptyArray,l.prototype.flags=null;var i;return Object.defineProperty(l.prototype,"value",{get:p.oneOfGetter(i=["asDouble","asInt"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){if(r||(r=T.create()),t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&r.uint32(17).fixed64(t.startTimeUnixNano),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(25).fixed64(t.timeUnixNano),t.asDouble!=null&&Object.hasOwnProperty.call(t,"asDouble")&&r.uint32(33).double(t.asDouble),t.exemplars!=null&&t.exemplars.length)for(var a=0;a<t.exemplars.length;++a)f.opentelemetry.proto.metrics.v1.Exemplar.encode(t.exemplars[a],r.uint32(42).fork()).ldelim();if(t.asInt!=null&&Object.hasOwnProperty.call(t,"asInt")&&r.uint32(49).sfixed64(t.asInt),t.attributes!=null&&t.attributes.length)for(var a=0;a<t.attributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[a],r.uint32(58).fork()).ldelim();return t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&r.uint32(64).uint32(t.flags),r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.NumberDataPoint;t.pos<a;){var d=t.uint32();switch(d>>>3){case 7:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(f.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.asDouble=t.double();break}case 6:{s.asInt=t.sfixed64();break}case 5:{s.exemplars&&s.exemplars.length||(s.exemplars=[]),s.exemplars.push(f.opentelemetry.proto.metrics.v1.Exemplar.decode(t,t.uint32()));break}case 8:{s.flags=t.uint32();break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var a=0;a<t.attributes.length;++a){var s=f.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[a]);if(s)return"attributes."+s}}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!p.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&p.isInteger(t.startTimeUnixNano.low)&&p.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!p.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&p.isInteger(t.timeUnixNano.low)&&p.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.asDouble!=null&&t.hasOwnProperty("asDouble")&&(r.value=1,typeof t.asDouble!="number"))return"asDouble: number expected";if(t.asInt!=null&&t.hasOwnProperty("asInt")){if(r.value===1)return"value: multiple values";if(r.value=1,!p.isInteger(t.asInt)&&!(t.asInt&&p.isInteger(t.asInt.low)&&p.isInteger(t.asInt.high)))return"asInt: integer|Long expected"}if(t.exemplars!=null&&t.hasOwnProperty("exemplars")){if(!Array.isArray(t.exemplars))return"exemplars: array expected";for(var a=0;a<t.exemplars.length;++a){var s=f.opentelemetry.proto.metrics.v1.Exemplar.verify(t.exemplars[a]);if(s)return"exemplars."+s}}return t.flags!=null&&t.hasOwnProperty("flags")&&!p.isInteger(t.flags)?"flags: integer expected":null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.NumberDataPoint)return t;var r=new f.opentelemetry.proto.metrics.v1.NumberDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: array expected");r.attributes=[];for(var a=0;a<t.attributes.length;++a){if(typeof t.attributes[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected");r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[a])}}if(t.startTimeUnixNano!=null&&(p.Long?(r.startTimeUnixNano=p.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?r.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?r.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(r.startTimeUnixNano=new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.timeUnixNano!=null&&(p.Long?(r.timeUnixNano=p.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.asDouble!=null&&(r.asDouble=Number(t.asDouble)),t.asInt!=null&&(p.Long?(r.asInt=p.Long.fromValue(t.asInt)).unsigned=!1:typeof t.asInt=="string"?r.asInt=parseInt(t.asInt,10):typeof t.asInt=="number"?r.asInt=t.asInt:typeof t.asInt=="object"&&(r.asInt=new p.LongBits(t.asInt.low>>>0,t.asInt.high>>>0).toNumber())),t.exemplars){if(!Array.isArray(t.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected");r.exemplars=[];for(var a=0;a<t.exemplars.length;++a){if(typeof t.exemplars[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected");r.exemplars[a]=f.opentelemetry.proto.metrics.v1.Exemplar.fromObject(t.exemplars[a])}}return t.flags!=null&&(r.flags=t.flags>>>0),r},l.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.exemplars=[],a.attributes=[]),r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.startTimeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.startTimeUnixNano=r.longs===String?"0":0;if(p.Long){var s=new p.Long(0,0,!1);a.timeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.timeUnixNano=r.longs===String?"0":0;a.flags=0}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?a.startTimeUnixNano=r.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:a.startTimeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.startTimeUnixNano):r.longs===Number?new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?a.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:a.timeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.asDouble!=null&&t.hasOwnProperty("asDouble")&&(a.asDouble=r.json&&!isFinite(t.asDouble)?String(t.asDouble):t.asDouble,r.oneofs&&(a.value="asDouble")),t.exemplars&&t.exemplars.length){a.exemplars=[];for(var d=0;d<t.exemplars.length;++d)a.exemplars[d]=f.opentelemetry.proto.metrics.v1.Exemplar.toObject(t.exemplars[d],r)}if(t.asInt!=null&&t.hasOwnProperty("asInt")&&(typeof t.asInt=="number"?a.asInt=r.longs===String?String(t.asInt):t.asInt:a.asInt=r.longs===String?p.Long.prototype.toString.call(t.asInt):r.longs===Number?new p.LongBits(t.asInt.low>>>0,t.asInt.high>>>0).toNumber():t.asInt,r.oneofs&&(a.value="asInt")),t.attributes&&t.attributes.length){a.attributes=[];for(var d=0;d<t.attributes.length;++d)a.attributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[d],r)}return t.flags!=null&&t.hasOwnProperty("flags")&&(a.flags=t.flags),a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.NumberDataPoint"},l}(),c.HistogramDataPoint=function(){function l(e){if(this.attributes=[],this.bucketCounts=[],this.explicitBounds=[],this.exemplars=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.attributes=p.emptyArray,l.prototype.startTimeUnixNano=null,l.prototype.timeUnixNano=null,l.prototype.count=null,l.prototype.sum=null,l.prototype.bucketCounts=p.emptyArray,l.prototype.explicitBounds=p.emptyArray,l.prototype.exemplars=p.emptyArray,l.prototype.flags=null,l.prototype.min=null,l.prototype.max=null;var i;return Object.defineProperty(l.prototype,"_sum",{get:p.oneOfGetter(i=["sum"]),set:p.oneOfSetter(i)}),Object.defineProperty(l.prototype,"_min",{get:p.oneOfGetter(i=["min"]),set:p.oneOfSetter(i)}),Object.defineProperty(l.prototype,"_max",{get:p.oneOfGetter(i=["max"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){if(r||(r=T.create()),t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&r.uint32(17).fixed64(t.startTimeUnixNano),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(25).fixed64(t.timeUnixNano),t.count!=null&&Object.hasOwnProperty.call(t,"count")&&r.uint32(33).fixed64(t.count),t.sum!=null&&Object.hasOwnProperty.call(t,"sum")&&r.uint32(41).double(t.sum),t.bucketCounts!=null&&t.bucketCounts.length){r.uint32(50).fork();for(var a=0;a<t.bucketCounts.length;++a)r.fixed64(t.bucketCounts[a]);r.ldelim()}if(t.explicitBounds!=null&&t.explicitBounds.length){r.uint32(58).fork();for(var a=0;a<t.explicitBounds.length;++a)r.double(t.explicitBounds[a]);r.ldelim()}if(t.exemplars!=null&&t.exemplars.length)for(var a=0;a<t.exemplars.length;++a)f.opentelemetry.proto.metrics.v1.Exemplar.encode(t.exemplars[a],r.uint32(66).fork()).ldelim();if(t.attributes!=null&&t.attributes.length)for(var a=0;a<t.attributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[a],r.uint32(74).fork()).ldelim();return t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&r.uint32(80).uint32(t.flags),t.min!=null&&Object.hasOwnProperty.call(t,"min")&&r.uint32(89).double(t.min),t.max!=null&&Object.hasOwnProperty.call(t,"max")&&r.uint32(97).double(t.max),r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.HistogramDataPoint;t.pos<a;){var d=t.uint32();switch(d>>>3){case 9:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(f.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:{if(s.bucketCounts&&s.bucketCounts.length||(s.bucketCounts=[]),(d&7)===2)for(var v=t.uint32()+t.pos;t.pos<v;)s.bucketCounts.push(t.fixed64());else s.bucketCounts.push(t.fixed64());break}case 7:{if(s.explicitBounds&&s.explicitBounds.length||(s.explicitBounds=[]),(d&7)===2)for(var v=t.uint32()+t.pos;t.pos<v;)s.explicitBounds.push(t.double());else s.explicitBounds.push(t.double());break}case 8:{s.exemplars&&s.exemplars.length||(s.exemplars=[]),s.exemplars.push(f.opentelemetry.proto.metrics.v1.Exemplar.decode(t,t.uint32()));break}case 10:{s.flags=t.uint32();break}case 11:{s.min=t.double();break}case 12:{s.max=t.double();break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var a=0;a<t.attributes.length;++a){var s=f.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[a]);if(s)return"attributes."+s}}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!p.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&p.isInteger(t.startTimeUnixNano.low)&&p.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!p.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&p.isInteger(t.timeUnixNano.low)&&p.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.count!=null&&t.hasOwnProperty("count")&&!p.isInteger(t.count)&&!(t.count&&p.isInteger(t.count.low)&&p.isInteger(t.count.high)))return"count: integer|Long expected";if(t.sum!=null&&t.hasOwnProperty("sum")&&(r._sum=1,typeof t.sum!="number"))return"sum: number expected";if(t.bucketCounts!=null&&t.hasOwnProperty("bucketCounts")){if(!Array.isArray(t.bucketCounts))return"bucketCounts: array expected";for(var a=0;a<t.bucketCounts.length;++a)if(!p.isInteger(t.bucketCounts[a])&&!(t.bucketCounts[a]&&p.isInteger(t.bucketCounts[a].low)&&p.isInteger(t.bucketCounts[a].high)))return"bucketCounts: integer|Long[] expected"}if(t.explicitBounds!=null&&t.hasOwnProperty("explicitBounds")){if(!Array.isArray(t.explicitBounds))return"explicitBounds: array expected";for(var a=0;a<t.explicitBounds.length;++a)if(typeof t.explicitBounds[a]!="number")return"explicitBounds: number[] expected"}if(t.exemplars!=null&&t.hasOwnProperty("exemplars")){if(!Array.isArray(t.exemplars))return"exemplars: array expected";for(var a=0;a<t.exemplars.length;++a){var s=f.opentelemetry.proto.metrics.v1.Exemplar.verify(t.exemplars[a]);if(s)return"exemplars."+s}}return t.flags!=null&&t.hasOwnProperty("flags")&&!p.isInteger(t.flags)?"flags: integer expected":t.min!=null&&t.hasOwnProperty("min")&&(r._min=1,typeof t.min!="number")?"min: number expected":t.max!=null&&t.hasOwnProperty("max")&&(r._max=1,typeof t.max!="number")?"max: number expected":null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.HistogramDataPoint)return t;var r=new f.opentelemetry.proto.metrics.v1.HistogramDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: array expected");r.attributes=[];for(var a=0;a<t.attributes.length;++a){if(typeof t.attributes[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected");r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[a])}}if(t.startTimeUnixNano!=null&&(p.Long?(r.startTimeUnixNano=p.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?r.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?r.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(r.startTimeUnixNano=new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.timeUnixNano!=null&&(p.Long?(r.timeUnixNano=p.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.count!=null&&(p.Long?(r.count=p.Long.fromValue(t.count)).unsigned=!1:typeof t.count=="string"?r.count=parseInt(t.count,10):typeof t.count=="number"?r.count=t.count:typeof t.count=="object"&&(r.count=new p.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber())),t.sum!=null&&(r.sum=Number(t.sum)),t.bucketCounts){if(!Array.isArray(t.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected");r.bucketCounts=[];for(var a=0;a<t.bucketCounts.length;++a)p.Long?(r.bucketCounts[a]=p.Long.fromValue(t.bucketCounts[a])).unsigned=!1:typeof t.bucketCounts[a]=="string"?r.bucketCounts[a]=parseInt(t.bucketCounts[a],10):typeof t.bucketCounts[a]=="number"?r.bucketCounts[a]=t.bucketCounts[a]:typeof t.bucketCounts[a]=="object"&&(r.bucketCounts[a]=new p.LongBits(t.bucketCounts[a].low>>>0,t.bucketCounts[a].high>>>0).toNumber())}if(t.explicitBounds){if(!Array.isArray(t.explicitBounds))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected");r.explicitBounds=[];for(var a=0;a<t.explicitBounds.length;++a)r.explicitBounds[a]=Number(t.explicitBounds[a])}if(t.exemplars){if(!Array.isArray(t.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected");r.exemplars=[];for(var a=0;a<t.exemplars.length;++a){if(typeof t.exemplars[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected");r.exemplars[a]=f.opentelemetry.proto.metrics.v1.Exemplar.fromObject(t.exemplars[a])}}return t.flags!=null&&(r.flags=t.flags>>>0),t.min!=null&&(r.min=Number(t.min)),t.max!=null&&(r.max=Number(t.max)),r},l.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.bucketCounts=[],a.explicitBounds=[],a.exemplars=[],a.attributes=[]),r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.startTimeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.startTimeUnixNano=r.longs===String?"0":0;if(p.Long){var s=new p.Long(0,0,!1);a.timeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.timeUnixNano=r.longs===String?"0":0;if(p.Long){var s=new p.Long(0,0,!1);a.count=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.count=r.longs===String?"0":0;a.flags=0}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?a.startTimeUnixNano=r.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:a.startTimeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.startTimeUnixNano):r.longs===Number?new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?a.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:a.timeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.count!=null&&t.hasOwnProperty("count")&&(typeof t.count=="number"?a.count=r.longs===String?String(t.count):t.count:a.count=r.longs===String?p.Long.prototype.toString.call(t.count):r.longs===Number?new p.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber():t.count),t.sum!=null&&t.hasOwnProperty("sum")&&(a.sum=r.json&&!isFinite(t.sum)?String(t.sum):t.sum,r.oneofs&&(a._sum="sum")),t.bucketCounts&&t.bucketCounts.length){a.bucketCounts=[];for(var d=0;d<t.bucketCounts.length;++d)typeof t.bucketCounts[d]=="number"?a.bucketCounts[d]=r.longs===String?String(t.bucketCounts[d]):t.bucketCounts[d]:a.bucketCounts[d]=r.longs===String?p.Long.prototype.toString.call(t.bucketCounts[d]):r.longs===Number?new p.LongBits(t.bucketCounts[d].low>>>0,t.bucketCounts[d].high>>>0).toNumber():t.bucketCounts[d]}if(t.explicitBounds&&t.explicitBounds.length){a.explicitBounds=[];for(var d=0;d<t.explicitBounds.length;++d)a.explicitBounds[d]=r.json&&!isFinite(t.explicitBounds[d])?String(t.explicitBounds[d]):t.explicitBounds[d]}if(t.exemplars&&t.exemplars.length){a.exemplars=[];for(var d=0;d<t.exemplars.length;++d)a.exemplars[d]=f.opentelemetry.proto.metrics.v1.Exemplar.toObject(t.exemplars[d],r)}if(t.attributes&&t.attributes.length){a.attributes=[];for(var d=0;d<t.attributes.length;++d)a.attributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[d],r)}return t.flags!=null&&t.hasOwnProperty("flags")&&(a.flags=t.flags),t.min!=null&&t.hasOwnProperty("min")&&(a.min=r.json&&!isFinite(t.min)?String(t.min):t.min,r.oneofs&&(a._min="min")),t.max!=null&&t.hasOwnProperty("max")&&(a.max=r.json&&!isFinite(t.max)?String(t.max):t.max,r.oneofs&&(a._max="max")),a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.HistogramDataPoint"},l}(),c.ExponentialHistogramDataPoint=function(){function l(e){if(this.attributes=[],this.exemplars=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.attributes=p.emptyArray,l.prototype.startTimeUnixNano=null,l.prototype.timeUnixNano=null,l.prototype.count=null,l.prototype.sum=null,l.prototype.scale=null,l.prototype.zeroCount=null,l.prototype.positive=null,l.prototype.negative=null,l.prototype.flags=null,l.prototype.exemplars=p.emptyArray,l.prototype.min=null,l.prototype.max=null,l.prototype.zeroThreshold=null;var i;return Object.defineProperty(l.prototype,"_sum",{get:p.oneOfGetter(i=["sum"]),set:p.oneOfSetter(i)}),Object.defineProperty(l.prototype,"_min",{get:p.oneOfGetter(i=["min"]),set:p.oneOfSetter(i)}),Object.defineProperty(l.prototype,"_max",{get:p.oneOfGetter(i=["max"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){if(r||(r=T.create()),t.attributes!=null&&t.attributes.length)for(var a=0;a<t.attributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[a],r.uint32(10).fork()).ldelim();if(t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&r.uint32(17).fixed64(t.startTimeUnixNano),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(25).fixed64(t.timeUnixNano),t.count!=null&&Object.hasOwnProperty.call(t,"count")&&r.uint32(33).fixed64(t.count),t.sum!=null&&Object.hasOwnProperty.call(t,"sum")&&r.uint32(41).double(t.sum),t.scale!=null&&Object.hasOwnProperty.call(t,"scale")&&r.uint32(48).sint32(t.scale),t.zeroCount!=null&&Object.hasOwnProperty.call(t,"zeroCount")&&r.uint32(57).fixed64(t.zeroCount),t.positive!=null&&Object.hasOwnProperty.call(t,"positive")&&f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(t.positive,r.uint32(66).fork()).ldelim(),t.negative!=null&&Object.hasOwnProperty.call(t,"negative")&&f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(t.negative,r.uint32(74).fork()).ldelim(),t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&r.uint32(80).uint32(t.flags),t.exemplars!=null&&t.exemplars.length)for(var a=0;a<t.exemplars.length;++a)f.opentelemetry.proto.metrics.v1.Exemplar.encode(t.exemplars[a],r.uint32(90).fork()).ldelim();return t.min!=null&&Object.hasOwnProperty.call(t,"min")&&r.uint32(97).double(t.min),t.max!=null&&Object.hasOwnProperty.call(t,"max")&&r.uint32(105).double(t.max),t.zeroThreshold!=null&&Object.hasOwnProperty.call(t,"zeroThreshold")&&r.uint32(113).double(t.zeroThreshold),r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(f.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.scale=t.sint32();break}case 7:{s.zeroCount=t.fixed64();break}case 8:{s.positive=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(t,t.uint32());break}case 9:{s.negative=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(t,t.uint32());break}case 10:{s.flags=t.uint32();break}case 11:{s.exemplars&&s.exemplars.length||(s.exemplars=[]),s.exemplars.push(f.opentelemetry.proto.metrics.v1.Exemplar.decode(t,t.uint32()));break}case 12:{s.min=t.double();break}case 13:{s.max=t.double();break}case 14:{s.zeroThreshold=t.double();break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var a=0;a<t.attributes.length;++a){var s=f.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[a]);if(s)return"attributes."+s}}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!p.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&p.isInteger(t.startTimeUnixNano.low)&&p.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!p.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&p.isInteger(t.timeUnixNano.low)&&p.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.count!=null&&t.hasOwnProperty("count")&&!p.isInteger(t.count)&&!(t.count&&p.isInteger(t.count.low)&&p.isInteger(t.count.high)))return"count: integer|Long expected";if(t.sum!=null&&t.hasOwnProperty("sum")&&(r._sum=1,typeof t.sum!="number"))return"sum: number expected";if(t.scale!=null&&t.hasOwnProperty("scale")&&!p.isInteger(t.scale))return"scale: integer expected";if(t.zeroCount!=null&&t.hasOwnProperty("zeroCount")&&!p.isInteger(t.zeroCount)&&!(t.zeroCount&&p.isInteger(t.zeroCount.low)&&p.isInteger(t.zeroCount.high)))return"zeroCount: integer|Long expected";if(t.positive!=null&&t.hasOwnProperty("positive")){var s=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(t.positive);if(s)return"positive."+s}if(t.negative!=null&&t.hasOwnProperty("negative")){var s=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(t.negative);if(s)return"negative."+s}if(t.flags!=null&&t.hasOwnProperty("flags")&&!p.isInteger(t.flags))return"flags: integer expected";if(t.exemplars!=null&&t.hasOwnProperty("exemplars")){if(!Array.isArray(t.exemplars))return"exemplars: array expected";for(var a=0;a<t.exemplars.length;++a){var s=f.opentelemetry.proto.metrics.v1.Exemplar.verify(t.exemplars[a]);if(s)return"exemplars."+s}}return t.min!=null&&t.hasOwnProperty("min")&&(r._min=1,typeof t.min!="number")?"min: number expected":t.max!=null&&t.hasOwnProperty("max")&&(r._max=1,typeof t.max!="number")?"max: number expected":t.zeroThreshold!=null&&t.hasOwnProperty("zeroThreshold")&&typeof t.zeroThreshold!="number"?"zeroThreshold: number expected":null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint)return t;var r=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: array expected");r.attributes=[];for(var a=0;a<t.attributes.length;++a){if(typeof t.attributes[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected");r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[a])}}if(t.startTimeUnixNano!=null&&(p.Long?(r.startTimeUnixNano=p.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?r.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?r.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(r.startTimeUnixNano=new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.timeUnixNano!=null&&(p.Long?(r.timeUnixNano=p.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.count!=null&&(p.Long?(r.count=p.Long.fromValue(t.count)).unsigned=!1:typeof t.count=="string"?r.count=parseInt(t.count,10):typeof t.count=="number"?r.count=t.count:typeof t.count=="object"&&(r.count=new p.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber())),t.sum!=null&&(r.sum=Number(t.sum)),t.scale!=null&&(r.scale=t.scale|0),t.zeroCount!=null&&(p.Long?(r.zeroCount=p.Long.fromValue(t.zeroCount)).unsigned=!1:typeof t.zeroCount=="string"?r.zeroCount=parseInt(t.zeroCount,10):typeof t.zeroCount=="number"?r.zeroCount=t.zeroCount:typeof t.zeroCount=="object"&&(r.zeroCount=new p.LongBits(t.zeroCount.low>>>0,t.zeroCount.high>>>0).toNumber())),t.positive!=null){if(typeof t.positive!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected");r.positive=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(t.positive)}if(t.negative!=null){if(typeof t.negative!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected");r.negative=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(t.negative)}if(t.flags!=null&&(r.flags=t.flags>>>0),t.exemplars){if(!Array.isArray(t.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected");r.exemplars=[];for(var a=0;a<t.exemplars.length;++a){if(typeof t.exemplars[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected");r.exemplars[a]=f.opentelemetry.proto.metrics.v1.Exemplar.fromObject(t.exemplars[a])}}return t.min!=null&&(r.min=Number(t.min)),t.max!=null&&(r.max=Number(t.max)),t.zeroThreshold!=null&&(r.zeroThreshold=Number(t.zeroThreshold)),r},l.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.attributes=[],a.exemplars=[]),r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.startTimeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.startTimeUnixNano=r.longs===String?"0":0;if(p.Long){var s=new p.Long(0,0,!1);a.timeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.timeUnixNano=r.longs===String?"0":0;if(p.Long){var s=new p.Long(0,0,!1);a.count=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.count=r.longs===String?"0":0;if(a.scale=0,p.Long){var s=new p.Long(0,0,!1);a.zeroCount=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.zeroCount=r.longs===String?"0":0;a.positive=null,a.negative=null,a.flags=0,a.zeroThreshold=0}if(t.attributes&&t.attributes.length){a.attributes=[];for(var d=0;d<t.attributes.length;++d)a.attributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[d],r)}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?a.startTimeUnixNano=r.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:a.startTimeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.startTimeUnixNano):r.longs===Number?new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?a.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:a.timeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.count!=null&&t.hasOwnProperty("count")&&(typeof t.count=="number"?a.count=r.longs===String?String(t.count):t.count:a.count=r.longs===String?p.Long.prototype.toString.call(t.count):r.longs===Number?new p.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber():t.count),t.sum!=null&&t.hasOwnProperty("sum")&&(a.sum=r.json&&!isFinite(t.sum)?String(t.sum):t.sum,r.oneofs&&(a._sum="sum")),t.scale!=null&&t.hasOwnProperty("scale")&&(a.scale=t.scale),t.zeroCount!=null&&t.hasOwnProperty("zeroCount")&&(typeof t.zeroCount=="number"?a.zeroCount=r.longs===String?String(t.zeroCount):t.zeroCount:a.zeroCount=r.longs===String?p.Long.prototype.toString.call(t.zeroCount):r.longs===Number?new p.LongBits(t.zeroCount.low>>>0,t.zeroCount.high>>>0).toNumber():t.zeroCount),t.positive!=null&&t.hasOwnProperty("positive")&&(a.positive=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(t.positive,r)),t.negative!=null&&t.hasOwnProperty("negative")&&(a.negative=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(t.negative,r)),t.flags!=null&&t.hasOwnProperty("flags")&&(a.flags=t.flags),t.exemplars&&t.exemplars.length){a.exemplars=[];for(var d=0;d<t.exemplars.length;++d)a.exemplars[d]=f.opentelemetry.proto.metrics.v1.Exemplar.toObject(t.exemplars[d],r)}return t.min!=null&&t.hasOwnProperty("min")&&(a.min=r.json&&!isFinite(t.min)?String(t.min):t.min,r.oneofs&&(a._min="min")),t.max!=null&&t.hasOwnProperty("max")&&(a.max=r.json&&!isFinite(t.max)?String(t.max):t.max,r.oneofs&&(a._max="max")),t.zeroThreshold!=null&&t.hasOwnProperty("zeroThreshold")&&(a.zeroThreshold=r.json&&!isFinite(t.zeroThreshold)?String(t.zeroThreshold):t.zeroThreshold),a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"},l.Buckets=function(){function e(t){if(this.bucketCounts=[],t)for(var r=Object.keys(t),a=0;a<r.length;++a)t[r[a]]!=null&&(this[r[a]]=t[r[a]])}return e.prototype.offset=null,e.prototype.bucketCounts=p.emptyArray,e.create=function(r){return new e(r)},e.encode=function(r,a){if(a||(a=T.create()),r.offset!=null&&Object.hasOwnProperty.call(r,"offset")&&a.uint32(8).sint32(r.offset),r.bucketCounts!=null&&r.bucketCounts.length){a.uint32(18).fork();for(var s=0;s<r.bucketCounts.length;++s)a.uint64(r.bucketCounts[s]);a.ldelim()}return a},e.encodeDelimited=function(r,a){return this.encode(r,a).ldelim()},e.decode=function(r,a){r instanceof h||(r=h.create(r));for(var s=a===void 0?r.len:r.pos+a,d=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;r.pos<s;){var v=r.uint32();switch(v>>>3){case 1:{d.offset=r.sint32();break}case 2:{if(d.bucketCounts&&d.bucketCounts.length||(d.bucketCounts=[]),(v&7)===2)for(var b=r.uint32()+r.pos;r.pos<b;)d.bucketCounts.push(r.uint64());else d.bucketCounts.push(r.uint64());break}default:r.skipType(v&7);break}}return d},e.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},e.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.offset!=null&&r.hasOwnProperty("offset")&&!p.isInteger(r.offset))return"offset: integer expected";if(r.bucketCounts!=null&&r.hasOwnProperty("bucketCounts")){if(!Array.isArray(r.bucketCounts))return"bucketCounts: array expected";for(var a=0;a<r.bucketCounts.length;++a)if(!p.isInteger(r.bucketCounts[a])&&!(r.bucketCounts[a]&&p.isInteger(r.bucketCounts[a].low)&&p.isInteger(r.bucketCounts[a].high)))return"bucketCounts: integer|Long[] expected"}return null},e.fromObject=function(r){if(r instanceof f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets)return r;var a=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;if(r.offset!=null&&(a.offset=r.offset|0),r.bucketCounts){if(!Array.isArray(r.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected");a.bucketCounts=[];for(var s=0;s<r.bucketCounts.length;++s)p.Long?(a.bucketCounts[s]=p.Long.fromValue(r.bucketCounts[s])).unsigned=!0:typeof r.bucketCounts[s]=="string"?a.bucketCounts[s]=parseInt(r.bucketCounts[s],10):typeof r.bucketCounts[s]=="number"?a.bucketCounts[s]=r.bucketCounts[s]:typeof r.bucketCounts[s]=="object"&&(a.bucketCounts[s]=new p.LongBits(r.bucketCounts[s].low>>>0,r.bucketCounts[s].high>>>0).toNumber(!0))}return a},e.toObject=function(r,a){a||(a={});var s={};if((a.arrays||a.defaults)&&(s.bucketCounts=[]),a.defaults&&(s.offset=0),r.offset!=null&&r.hasOwnProperty("offset")&&(s.offset=r.offset),r.bucketCounts&&r.bucketCounts.length){s.bucketCounts=[];for(var d=0;d<r.bucketCounts.length;++d)typeof r.bucketCounts[d]=="number"?s.bucketCounts[d]=a.longs===String?String(r.bucketCounts[d]):r.bucketCounts[d]:s.bucketCounts[d]=a.longs===String?p.Long.prototype.toString.call(r.bucketCounts[d]):a.longs===Number?new p.LongBits(r.bucketCounts[d].low>>>0,r.bucketCounts[d].high>>>0).toNumber(!0):r.bucketCounts[d]}return s},e.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},e.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},e}(),l}(),c.SummaryDataPoint=function(){function l(i){if(this.attributes=[],this.quantileValues=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.attributes=p.emptyArray,l.prototype.startTimeUnixNano=null,l.prototype.timeUnixNano=null,l.prototype.count=null,l.prototype.sum=null,l.prototype.quantileValues=p.emptyArray,l.prototype.flags=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&t.uint32(17).fixed64(e.startTimeUnixNano),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&t.uint32(25).fixed64(e.timeUnixNano),e.count!=null&&Object.hasOwnProperty.call(e,"count")&&t.uint32(33).fixed64(e.count),e.sum!=null&&Object.hasOwnProperty.call(e,"sum")&&t.uint32(41).double(e.sum),e.quantileValues!=null&&e.quantileValues.length)for(var r=0;r<e.quantileValues.length;++r)f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.encode(e.quantileValues[r],t.uint32(50).fork()).ldelim();if(e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(58).fork()).ldelim();return e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&t.uint32(64).uint32(e.flags),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint;e.pos<r;){var s=e.uint32();switch(s>>>3){case 7:{a.attributes&&a.attributes.length||(a.attributes=[]),a.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{a.startTimeUnixNano=e.fixed64();break}case 3:{a.timeUnixNano=e.fixed64();break}case 4:{a.count=e.fixed64();break}case 5:{a.sum=e.double();break}case 6:{a.quantileValues&&a.quantileValues.length||(a.quantileValues=[]),a.quantileValues.push(f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(e,e.uint32()));break}case 8:{a.flags=e.uint32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var r=f.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(r)return"attributes."+r}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!p.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&p.isInteger(e.startTimeUnixNano.low)&&p.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!p.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&p.isInteger(e.timeUnixNano.low)&&p.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.count!=null&&e.hasOwnProperty("count")&&!p.isInteger(e.count)&&!(e.count&&p.isInteger(e.count.low)&&p.isInteger(e.count.high)))return"count: integer|Long expected";if(e.sum!=null&&e.hasOwnProperty("sum")&&typeof e.sum!="number")return"sum: number expected";if(e.quantileValues!=null&&e.hasOwnProperty("quantileValues")){if(!Array.isArray(e.quantileValues))return"quantileValues: array expected";for(var t=0;t<e.quantileValues.length;++t){var r=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify(e.quantileValues[t]);if(r)return"quantileValues."+r}}return e.flags!=null&&e.hasOwnProperty("flags")&&!p.isInteger(e.flags)?"flags: integer expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.SummaryDataPoint)return e;var t=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: object expected");t.attributes[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}if(e.startTimeUnixNano!=null&&(p.Long?(t.startTimeUnixNano=p.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?t.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?t.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(t.startTimeUnixNano=new p.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.timeUnixNano!=null&&(p.Long?(t.timeUnixNano=p.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?t.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?t.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(t.timeUnixNano=new p.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.count!=null&&(p.Long?(t.count=p.Long.fromValue(e.count)).unsigned=!1:typeof e.count=="string"?t.count=parseInt(e.count,10):typeof e.count=="number"?t.count=e.count:typeof e.count=="object"&&(t.count=new p.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber())),e.sum!=null&&(t.sum=Number(e.sum)),e.quantileValues){if(!Array.isArray(e.quantileValues))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected");t.quantileValues=[];for(var r=0;r<e.quantileValues.length;++r){if(typeof e.quantileValues[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: object expected");t.quantileValues[r]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.fromObject(e.quantileValues[r])}}return e.flags!=null&&(t.flags=e.flags>>>0),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.quantileValues=[],r.attributes=[]),t.defaults){if(p.Long){var a=new p.Long(0,0,!1);r.startTimeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.startTimeUnixNano=t.longs===String?"0":0;if(p.Long){var a=new p.Long(0,0,!1);r.timeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.timeUnixNano=t.longs===String?"0":0;if(p.Long){var a=new p.Long(0,0,!1);r.count=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.count=t.longs===String?"0":0;r.sum=0,r.flags=0}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?r.startTimeUnixNano=t.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:r.startTimeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.startTimeUnixNano):t.longs===Number?new p.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?r.timeUnixNano=t.longs===String?String(e.timeUnixNano):e.timeUnixNano:r.timeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.timeUnixNano):t.longs===Number?new p.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.count!=null&&e.hasOwnProperty("count")&&(typeof e.count=="number"?r.count=t.longs===String?String(e.count):e.count:r.count=t.longs===String?p.Long.prototype.toString.call(e.count):t.longs===Number?new p.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count),e.sum!=null&&e.hasOwnProperty("sum")&&(r.sum=t.json&&!isFinite(e.sum)?String(e.sum):e.sum),e.quantileValues&&e.quantileValues.length){r.quantileValues=[];for(var s=0;s<e.quantileValues.length;++s)r.quantileValues[s]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(e.quantileValues[s],t)}if(e.attributes&&e.attributes.length){r.attributes=[];for(var s=0;s<e.attributes.length;++s)r.attributes[s]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[s],t)}return e.flags!=null&&e.hasOwnProperty("flags")&&(r.flags=e.flags),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.SummaryDataPoint"},l.ValueAtQuantile=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.quantile=null,i.prototype.value=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.quantile!=null&&Object.hasOwnProperty.call(t,"quantile")&&r.uint32(9).double(t.quantile),t.value!=null&&Object.hasOwnProperty.call(t,"value")&&r.uint32(17).double(t.value),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.quantile=t.double();break}case 2:{s.value=t.double();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){return typeof t!="object"||t===null?"object expected":t.quantile!=null&&t.hasOwnProperty("quantile")&&typeof t.quantile!="number"?"quantile: number expected":t.value!=null&&t.hasOwnProperty("value")&&typeof t.value!="number"?"value: number expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return t;var r=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;return t.quantile!=null&&(r.quantile=Number(t.quantile)),t.value!=null&&(r.value=Number(t.value)),r},i.toObject=function(t,r){r||(r={});var a={};return r.defaults&&(a.quantile=0,a.value=0),t.quantile!=null&&t.hasOwnProperty("quantile")&&(a.quantile=r.json&&!isFinite(t.quantile)?String(t.quantile):t.quantile),t.value!=null&&t.hasOwnProperty("value")&&(a.value=r.json&&!isFinite(t.value)?String(t.value):t.value),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},i}(),l}(),c.Exemplar=function(){function l(e){if(this.filteredAttributes=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.filteredAttributes=p.emptyArray,l.prototype.timeUnixNano=null,l.prototype.asDouble=null,l.prototype.asInt=null,l.prototype.spanId=null,l.prototype.traceId=null;var i;return Object.defineProperty(l.prototype,"value",{get:p.oneOfGetter(i=["asDouble","asInt"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){if(r||(r=T.create()),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(17).fixed64(t.timeUnixNano),t.asDouble!=null&&Object.hasOwnProperty.call(t,"asDouble")&&r.uint32(25).double(t.asDouble),t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId")&&r.uint32(34).bytes(t.spanId),t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId")&&r.uint32(42).bytes(t.traceId),t.asInt!=null&&Object.hasOwnProperty.call(t,"asInt")&&r.uint32(49).sfixed64(t.asInt),t.filteredAttributes!=null&&t.filteredAttributes.length)for(var a=0;a<t.filteredAttributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.filteredAttributes[a],r.uint32(58).fork()).ldelim();return r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.Exemplar;t.pos<a;){var d=t.uint32();switch(d>>>3){case 7:{s.filteredAttributes&&s.filteredAttributes.length||(s.filteredAttributes=[]),s.filteredAttributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{s.timeUnixNano=t.fixed64();break}case 3:{s.asDouble=t.double();break}case 6:{s.asInt=t.sfixed64();break}case 4:{s.spanId=t.bytes();break}case 5:{s.traceId=t.bytes();break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.filteredAttributes!=null&&t.hasOwnProperty("filteredAttributes")){if(!Array.isArray(t.filteredAttributes))return"filteredAttributes: array expected";for(var a=0;a<t.filteredAttributes.length;++a){var s=f.opentelemetry.proto.common.v1.KeyValue.verify(t.filteredAttributes[a]);if(s)return"filteredAttributes."+s}}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!p.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&p.isInteger(t.timeUnixNano.low)&&p.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.asDouble!=null&&t.hasOwnProperty("asDouble")&&(r.value=1,typeof t.asDouble!="number"))return"asDouble: number expected";if(t.asInt!=null&&t.hasOwnProperty("asInt")){if(r.value===1)return"value: multiple values";if(r.value=1,!p.isInteger(t.asInt)&&!(t.asInt&&p.isInteger(t.asInt.low)&&p.isInteger(t.asInt.high)))return"asInt: integer|Long expected"}return t.spanId!=null&&t.hasOwnProperty("spanId")&&!(t.spanId&&typeof t.spanId.length=="number"||p.isString(t.spanId))?"spanId: buffer expected":t.traceId!=null&&t.hasOwnProperty("traceId")&&!(t.traceId&&typeof t.traceId.length=="number"||p.isString(t.traceId))?"traceId: buffer expected":null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.Exemplar)return t;var r=new f.opentelemetry.proto.metrics.v1.Exemplar;if(t.filteredAttributes){if(!Array.isArray(t.filteredAttributes))throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: array expected");r.filteredAttributes=[];for(var a=0;a<t.filteredAttributes.length;++a){if(typeof t.filteredAttributes[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected");r.filteredAttributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.filteredAttributes[a])}}return t.timeUnixNano!=null&&(p.Long?(r.timeUnixNano=p.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.asDouble!=null&&(r.asDouble=Number(t.asDouble)),t.asInt!=null&&(p.Long?(r.asInt=p.Long.fromValue(t.asInt)).unsigned=!1:typeof t.asInt=="string"?r.asInt=parseInt(t.asInt,10):typeof t.asInt=="number"?r.asInt=t.asInt:typeof t.asInt=="object"&&(r.asInt=new p.LongBits(t.asInt.low>>>0,t.asInt.high>>>0).toNumber())),t.spanId!=null&&(typeof t.spanId=="string"?p.base64.decode(t.spanId,r.spanId=p.newBuffer(p.base64.length(t.spanId)),0):t.spanId.length>=0&&(r.spanId=t.spanId)),t.traceId!=null&&(typeof t.traceId=="string"?p.base64.decode(t.traceId,r.traceId=p.newBuffer(p.base64.length(t.traceId)),0):t.traceId.length>=0&&(r.traceId=t.traceId)),r},l.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.filteredAttributes=[]),r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.timeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.timeUnixNano=r.longs===String?"0":0;r.bytes===String?a.spanId="":(a.spanId=[],r.bytes!==Array&&(a.spanId=p.newBuffer(a.spanId))),r.bytes===String?a.traceId="":(a.traceId=[],r.bytes!==Array&&(a.traceId=p.newBuffer(a.traceId)))}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?a.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:a.timeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.asDouble!=null&&t.hasOwnProperty("asDouble")&&(a.asDouble=r.json&&!isFinite(t.asDouble)?String(t.asDouble):t.asDouble,r.oneofs&&(a.value="asDouble")),t.spanId!=null&&t.hasOwnProperty("spanId")&&(a.spanId=r.bytes===String?p.base64.encode(t.spanId,0,t.spanId.length):r.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId),t.traceId!=null&&t.hasOwnProperty("traceId")&&(a.traceId=r.bytes===String?p.base64.encode(t.traceId,0,t.traceId.length):r.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId),t.asInt!=null&&t.hasOwnProperty("asInt")&&(typeof t.asInt=="number"?a.asInt=r.longs===String?String(t.asInt):t.asInt:a.asInt=r.longs===String?p.Long.prototype.toString.call(t.asInt):r.longs===Number?new p.LongBits(t.asInt.low>>>0,t.asInt.high>>>0).toNumber():t.asInt,r.oneofs&&(a.value="asInt")),t.filteredAttributes&&t.filteredAttributes.length){a.filteredAttributes=[];for(var d=0;d<t.filteredAttributes.length;++d)a.filteredAttributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.filteredAttributes[d],r)}return a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Exemplar"},l}(),c}(),o}(),n.logs=function(){var o={};return o.v1=function(){var c={};return c.LogsData=function(){function l(i){if(this.resourceLogs=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resourceLogs=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resourceLogs!=null&&e.resourceLogs.length)for(var r=0;r<e.resourceLogs.length;++r)f.opentelemetry.proto.logs.v1.ResourceLogs.encode(e.resourceLogs[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.logs.v1.LogsData;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resourceLogs&&a.resourceLogs.length||(a.resourceLogs=[]),a.resourceLogs.push(f.opentelemetry.proto.logs.v1.ResourceLogs.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.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 t=0;t<e.resourceLogs.length;++t){var r=f.opentelemetry.proto.logs.v1.ResourceLogs.verify(e.resourceLogs[t]);if(r)return"resourceLogs."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.logs.v1.LogsData)return e;var t=new f.opentelemetry.proto.logs.v1.LogsData;if(e.resourceLogs){if(!Array.isArray(e.resourceLogs))throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: array expected");t.resourceLogs=[];for(var r=0;r<e.resourceLogs.length;++r){if(typeof e.resourceLogs[r]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: object expected");t.resourceLogs[r]=f.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(e.resourceLogs[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.resourceLogs=[]),e.resourceLogs&&e.resourceLogs.length){r.resourceLogs=[];for(var a=0;a<e.resourceLogs.length;++a)r.resourceLogs[a]=f.opentelemetry.proto.logs.v1.ResourceLogs.toObject(e.resourceLogs[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.LogsData"},l}(),c.ResourceLogs=function(){function l(i){if(this.scopeLogs=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resource=null,l.prototype.scopeLogs=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resource!=null&&Object.hasOwnProperty.call(e,"resource")&&f.opentelemetry.proto.resource.v1.Resource.encode(e.resource,t.uint32(10).fork()).ldelim(),e.scopeLogs!=null&&e.scopeLogs.length)for(var r=0;r<e.scopeLogs.length;++r)f.opentelemetry.proto.logs.v1.ScopeLogs.encode(e.scopeLogs[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.logs.v1.ResourceLogs;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resource=f.opentelemetry.proto.resource.v1.Resource.decode(e,e.uint32());break}case 2:{a.scopeLogs&&a.scopeLogs.length||(a.scopeLogs=[]),a.scopeLogs.push(f.opentelemetry.proto.logs.v1.ScopeLogs.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resource!=null&&e.hasOwnProperty("resource")){var t=f.opentelemetry.proto.resource.v1.Resource.verify(e.resource);if(t)return"resource."+t}if(e.scopeLogs!=null&&e.hasOwnProperty("scopeLogs")){if(!Array.isArray(e.scopeLogs))return"scopeLogs: array expected";for(var r=0;r<e.scopeLogs.length;++r){var t=f.opentelemetry.proto.logs.v1.ScopeLogs.verify(e.scopeLogs[r]);if(t)return"scopeLogs."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.logs.v1.ResourceLogs)return e;var t=new f.opentelemetry.proto.logs.v1.ResourceLogs;if(e.resource!=null){if(typeof e.resource!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.resource: object expected");t.resource=f.opentelemetry.proto.resource.v1.Resource.fromObject(e.resource)}if(e.scopeLogs){if(!Array.isArray(e.scopeLogs))throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: array expected");t.scopeLogs=[];for(var r=0;r<e.scopeLogs.length;++r){if(typeof e.scopeLogs[r]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: object expected");t.scopeLogs[r]=f.opentelemetry.proto.logs.v1.ScopeLogs.fromObject(e.scopeLogs[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.scopeLogs=[]),t.defaults&&(r.resource=null,r.schemaUrl=""),e.resource!=null&&e.hasOwnProperty("resource")&&(r.resource=f.opentelemetry.proto.resource.v1.Resource.toObject(e.resource,t)),e.scopeLogs&&e.scopeLogs.length){r.scopeLogs=[];for(var a=0;a<e.scopeLogs.length;++a)r.scopeLogs[a]=f.opentelemetry.proto.logs.v1.ScopeLogs.toObject(e.scopeLogs[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.ResourceLogs"},l}(),c.ScopeLogs=function(){function l(i){if(this.logRecords=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.scope=null,l.prototype.logRecords=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.scope!=null&&Object.hasOwnProperty.call(e,"scope")&&f.opentelemetry.proto.common.v1.InstrumentationScope.encode(e.scope,t.uint32(10).fork()).ldelim(),e.logRecords!=null&&e.logRecords.length)for(var r=0;r<e.logRecords.length;++r)f.opentelemetry.proto.logs.v1.LogRecord.encode(e.logRecords[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.logs.v1.ScopeLogs;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.decode(e,e.uint32());break}case 2:{a.logRecords&&a.logRecords.length||(a.logRecords=[]),a.logRecords.push(f.opentelemetry.proto.logs.v1.LogRecord.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.scope!=null&&e.hasOwnProperty("scope")){var t=f.opentelemetry.proto.common.v1.InstrumentationScope.verify(e.scope);if(t)return"scope."+t}if(e.logRecords!=null&&e.hasOwnProperty("logRecords")){if(!Array.isArray(e.logRecords))return"logRecords: array expected";for(var r=0;r<e.logRecords.length;++r){var t=f.opentelemetry.proto.logs.v1.LogRecord.verify(e.logRecords[r]);if(t)return"logRecords."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.logs.v1.ScopeLogs)return e;var t=new f.opentelemetry.proto.logs.v1.ScopeLogs;if(e.scope!=null){if(typeof e.scope!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.scope: object expected");t.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(e.scope)}if(e.logRecords){if(!Array.isArray(e.logRecords))throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: array expected");t.logRecords=[];for(var r=0;r<e.logRecords.length;++r){if(typeof e.logRecords[r]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: object expected");t.logRecords[r]=f.opentelemetry.proto.logs.v1.LogRecord.fromObject(e.logRecords[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.logRecords=[]),t.defaults&&(r.scope=null,r.schemaUrl=""),e.scope!=null&&e.hasOwnProperty("scope")&&(r.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.toObject(e.scope,t)),e.logRecords&&e.logRecords.length){r.logRecords=[];for(var a=0;a<e.logRecords.length;++a)r.logRecords[a]=f.opentelemetry.proto.logs.v1.LogRecord.toObject(e.logRecords[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.ScopeLogs"},l}(),c.SeverityNumber=function(){var l={},i=Object.create(l);return i[l[0]="SEVERITY_NUMBER_UNSPECIFIED"]=0,i[l[1]="SEVERITY_NUMBER_TRACE"]=1,i[l[2]="SEVERITY_NUMBER_TRACE2"]=2,i[l[3]="SEVERITY_NUMBER_TRACE3"]=3,i[l[4]="SEVERITY_NUMBER_TRACE4"]=4,i[l[5]="SEVERITY_NUMBER_DEBUG"]=5,i[l[6]="SEVERITY_NUMBER_DEBUG2"]=6,i[l[7]="SEVERITY_NUMBER_DEBUG3"]=7,i[l[8]="SEVERITY_NUMBER_DEBUG4"]=8,i[l[9]="SEVERITY_NUMBER_INFO"]=9,i[l[10]="SEVERITY_NUMBER_INFO2"]=10,i[l[11]="SEVERITY_NUMBER_INFO3"]=11,i[l[12]="SEVERITY_NUMBER_INFO4"]=12,i[l[13]="SEVERITY_NUMBER_WARN"]=13,i[l[14]="SEVERITY_NUMBER_WARN2"]=14,i[l[15]="SEVERITY_NUMBER_WARN3"]=15,i[l[16]="SEVERITY_NUMBER_WARN4"]=16,i[l[17]="SEVERITY_NUMBER_ERROR"]=17,i[l[18]="SEVERITY_NUMBER_ERROR2"]=18,i[l[19]="SEVERITY_NUMBER_ERROR3"]=19,i[l[20]="SEVERITY_NUMBER_ERROR4"]=20,i[l[21]="SEVERITY_NUMBER_FATAL"]=21,i[l[22]="SEVERITY_NUMBER_FATAL2"]=22,i[l[23]="SEVERITY_NUMBER_FATAL3"]=23,i[l[24]="SEVERITY_NUMBER_FATAL4"]=24,i}(),c.LogRecordFlags=function(){var l={},i=Object.create(l);return i[l[0]="LOG_RECORD_FLAGS_DO_NOT_USE"]=0,i[l[255]="LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"]=255,i}(),c.LogRecord=function(){function l(i){if(this.attributes=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.timeUnixNano=null,l.prototype.observedTimeUnixNano=null,l.prototype.severityNumber=null,l.prototype.severityText=null,l.prototype.body=null,l.prototype.attributes=p.emptyArray,l.prototype.droppedAttributesCount=null,l.prototype.flags=null,l.prototype.traceId=null,l.prototype.spanId=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&t.uint32(9).fixed64(e.timeUnixNano),e.severityNumber!=null&&Object.hasOwnProperty.call(e,"severityNumber")&&t.uint32(16).int32(e.severityNumber),e.severityText!=null&&Object.hasOwnProperty.call(e,"severityText")&&t.uint32(26).string(e.severityText),e.body!=null&&Object.hasOwnProperty.call(e,"body")&&f.opentelemetry.proto.common.v1.AnyValue.encode(e.body,t.uint32(42).fork()).ldelim(),e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(50).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(56).uint32(e.droppedAttributesCount),e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&t.uint32(69).fixed32(e.flags),e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId")&&t.uint32(74).bytes(e.traceId),e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId")&&t.uint32(82).bytes(e.spanId),e.observedTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"observedTimeUnixNano")&&t.uint32(89).fixed64(e.observedTimeUnixNano),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.logs.v1.LogRecord;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.timeUnixNano=e.fixed64();break}case 11:{a.observedTimeUnixNano=e.fixed64();break}case 2:{a.severityNumber=e.int32();break}case 3:{a.severityText=e.string();break}case 5:{a.body=f.opentelemetry.proto.common.v1.AnyValue.decode(e,e.uint32());break}case 6:{a.attributes&&a.attributes.length||(a.attributes=[]),a.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 7:{a.droppedAttributesCount=e.uint32();break}case 8:{a.flags=e.fixed32();break}case 9:{a.traceId=e.bytes();break}case 10:{a.spanId=e.bytes();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!p.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&p.isInteger(e.timeUnixNano.low)&&p.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.observedTimeUnixNano!=null&&e.hasOwnProperty("observedTimeUnixNano")&&!p.isInteger(e.observedTimeUnixNano)&&!(e.observedTimeUnixNano&&p.isInteger(e.observedTimeUnixNano.low)&&p.isInteger(e.observedTimeUnixNano.high)))return"observedTimeUnixNano: integer|Long expected";if(e.severityNumber!=null&&e.hasOwnProperty("severityNumber"))switch(e.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(e.severityText!=null&&e.hasOwnProperty("severityText")&&!p.isString(e.severityText))return"severityText: string expected";if(e.body!=null&&e.hasOwnProperty("body")){var t=f.opentelemetry.proto.common.v1.AnyValue.verify(e.body);if(t)return"body."+t}if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var r=0;r<e.attributes.length;++r){var t=f.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[r]);if(t)return"attributes."+t}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":e.flags!=null&&e.hasOwnProperty("flags")&&!p.isInteger(e.flags)?"flags: integer expected":e.traceId!=null&&e.hasOwnProperty("traceId")&&!(e.traceId&&typeof e.traceId.length=="number"||p.isString(e.traceId))?"traceId: buffer expected":e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||p.isString(e.spanId))?"spanId: buffer expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.logs.v1.LogRecord)return e;var t=new f.opentelemetry.proto.logs.v1.LogRecord;switch(e.timeUnixNano!=null&&(p.Long?(t.timeUnixNano=p.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?t.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?t.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(t.timeUnixNano=new p.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.observedTimeUnixNano!=null&&(p.Long?(t.observedTimeUnixNano=p.Long.fromValue(e.observedTimeUnixNano)).unsigned=!1:typeof e.observedTimeUnixNano=="string"?t.observedTimeUnixNano=parseInt(e.observedTimeUnixNano,10):typeof e.observedTimeUnixNano=="number"?t.observedTimeUnixNano=e.observedTimeUnixNano:typeof e.observedTimeUnixNano=="object"&&(t.observedTimeUnixNano=new p.LongBits(e.observedTimeUnixNano.low>>>0,e.observedTimeUnixNano.high>>>0).toNumber())),e.severityNumber){default:if(typeof e.severityNumber=="number"){t.severityNumber=e.severityNumber;break}break;case"SEVERITY_NUMBER_UNSPECIFIED":case 0:t.severityNumber=0;break;case"SEVERITY_NUMBER_TRACE":case 1:t.severityNumber=1;break;case"SEVERITY_NUMBER_TRACE2":case 2:t.severityNumber=2;break;case"SEVERITY_NUMBER_TRACE3":case 3:t.severityNumber=3;break;case"SEVERITY_NUMBER_TRACE4":case 4:t.severityNumber=4;break;case"SEVERITY_NUMBER_DEBUG":case 5:t.severityNumber=5;break;case"SEVERITY_NUMBER_DEBUG2":case 6:t.severityNumber=6;break;case"SEVERITY_NUMBER_DEBUG3":case 7:t.severityNumber=7;break;case"SEVERITY_NUMBER_DEBUG4":case 8:t.severityNumber=8;break;case"SEVERITY_NUMBER_INFO":case 9:t.severityNumber=9;break;case"SEVERITY_NUMBER_INFO2":case 10:t.severityNumber=10;break;case"SEVERITY_NUMBER_INFO3":case 11:t.severityNumber=11;break;case"SEVERITY_NUMBER_INFO4":case 12:t.severityNumber=12;break;case"SEVERITY_NUMBER_WARN":case 13:t.severityNumber=13;break;case"SEVERITY_NUMBER_WARN2":case 14:t.severityNumber=14;break;case"SEVERITY_NUMBER_WARN3":case 15:t.severityNumber=15;break;case"SEVERITY_NUMBER_WARN4":case 16:t.severityNumber=16;break;case"SEVERITY_NUMBER_ERROR":case 17:t.severityNumber=17;break;case"SEVERITY_NUMBER_ERROR2":case 18:t.severityNumber=18;break;case"SEVERITY_NUMBER_ERROR3":case 19:t.severityNumber=19;break;case"SEVERITY_NUMBER_ERROR4":case 20:t.severityNumber=20;break;case"SEVERITY_NUMBER_FATAL":case 21:t.severityNumber=21;break;case"SEVERITY_NUMBER_FATAL2":case 22:t.severityNumber=22;break;case"SEVERITY_NUMBER_FATAL3":case 23:t.severityNumber=23;break;case"SEVERITY_NUMBER_FATAL4":case 24:t.severityNumber=24;break}if(e.severityText!=null&&(t.severityText=String(e.severityText)),e.body!=null){if(typeof e.body!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected");t.body=f.opentelemetry.proto.common.v1.AnyValue.fromObject(e.body)}if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: object expected");t.attributes[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}return e.droppedAttributesCount!=null&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),e.flags!=null&&(t.flags=e.flags>>>0),e.traceId!=null&&(typeof e.traceId=="string"?p.base64.decode(e.traceId,t.traceId=p.newBuffer(p.base64.length(e.traceId)),0):e.traceId.length>=0&&(t.traceId=e.traceId)),e.spanId!=null&&(typeof e.spanId=="string"?p.base64.decode(e.spanId,t.spanId=p.newBuffer(p.base64.length(e.spanId)),0):e.spanId.length>=0&&(t.spanId=e.spanId)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.attributes=[]),t.defaults){if(p.Long){var a=new p.Long(0,0,!1);r.timeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.timeUnixNano=t.longs===String?"0":0;if(r.severityNumber=t.enums===String?"SEVERITY_NUMBER_UNSPECIFIED":0,r.severityText="",r.body=null,r.droppedAttributesCount=0,r.flags=0,t.bytes===String?r.traceId="":(r.traceId=[],t.bytes!==Array&&(r.traceId=p.newBuffer(r.traceId))),t.bytes===String?r.spanId="":(r.spanId=[],t.bytes!==Array&&(r.spanId=p.newBuffer(r.spanId))),p.Long){var a=new p.Long(0,0,!1);r.observedTimeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.observedTimeUnixNano=t.longs===String?"0":0}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?r.timeUnixNano=t.longs===String?String(e.timeUnixNano):e.timeUnixNano:r.timeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.timeUnixNano):t.longs===Number?new p.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.severityNumber!=null&&e.hasOwnProperty("severityNumber")&&(r.severityNumber=t.enums===String?f.opentelemetry.proto.logs.v1.SeverityNumber[e.severityNumber]===void 0?e.severityNumber:f.opentelemetry.proto.logs.v1.SeverityNumber[e.severityNumber]:e.severityNumber),e.severityText!=null&&e.hasOwnProperty("severityText")&&(r.severityText=e.severityText),e.body!=null&&e.hasOwnProperty("body")&&(r.body=f.opentelemetry.proto.common.v1.AnyValue.toObject(e.body,t)),e.attributes&&e.attributes.length){r.attributes=[];for(var s=0;s<e.attributes.length;++s)r.attributes[s]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[s],t)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(r.droppedAttributesCount=e.droppedAttributesCount),e.flags!=null&&e.hasOwnProperty("flags")&&(r.flags=e.flags),e.traceId!=null&&e.hasOwnProperty("traceId")&&(r.traceId=t.bytes===String?p.base64.encode(e.traceId,0,e.traceId.length):t.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),e.spanId!=null&&e.hasOwnProperty("spanId")&&(r.spanId=t.bytes===String?p.base64.encode(e.spanId,0,e.spanId.length):t.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),e.observedTimeUnixNano!=null&&e.hasOwnProperty("observedTimeUnixNano")&&(typeof e.observedTimeUnixNano=="number"?r.observedTimeUnixNano=t.longs===String?String(e.observedTimeUnixNano):e.observedTimeUnixNano:r.observedTimeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.observedTimeUnixNano):t.longs===Number?new p.LongBits(e.observedTimeUnixNano.low>>>0,e.observedTimeUnixNano.high>>>0).toNumber():e.observedTimeUnixNano),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.LogRecord"},l}(),c}(),o}(),n}(),u}();dl.exports=f});var po=m(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.ServiceClientType=void 0;var bp;(function(u){u[u.SPANS=0]="SPANS",u[u.METRICS=1]="METRICS",u[u.LOGS=2]="LOGS"})(bp=ge.ServiceClientType||(ge.ServiceClientType={}))});var ho=m(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.getExportRequestProto=void 0;var yo=yl(),hl=po();function Sp(u){return u===hl.ServiceClientType.SPANS?yo.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest:u===hl.ServiceClientType.LOGS?yo.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest:yo.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest}Dr.getExportRequestProto=Sp});var ml=m(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.OTLPProtoExporterBrowserBase=void 0;var Tp=(S(),C(y)),mo=hu(),Op=ho(),vo=class extends mo.OTLPExporterBrowserBase{constructor(n={}){super(n)}send(n,o,c){if(this._shutdownOnce.isCalled){Tp.diag.debug("Shutdown already started. Cannot send objects");return}let l=this.convert(n),i=(0,Op.getExportRequestProto)(this.getServiceClientType()),e=i.create(l);if(e){let t=i.encode(e).finish();t&&(0,mo.sendWithXhr)(new Blob([t],{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 mo.OTLPExporterError("No proto"))}};Br.OTLPProtoExporterBrowserBase=vo});var vl=m(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.ServiceClientType=ne.OTLPProtoExporterBrowserBase=void 0;var gp=ml();Object.defineProperty(ne,"OTLPProtoExporterBrowserBase",{enumerable:!0,get:function(){return gp.OTLPProtoExporterBrowserBase}});var Ap=po();Object.defineProperty(ne,"ServiceClientType",{enumerable:!0,get:function(){return Ap.ServiceClientType}})});S();var Jt=N(U());S();var L=N(U()),bt=N(Et());var xi="exception";var Ls=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Is=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},Ri=function(){function u(n,o,c,l,i,e,t,r,a,s){t===void 0&&(t=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:y.SpanStatusCode.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=c,this._spanContext=l,this.parentSpanId=e,this.kind=i,this.links=t;var d=Date.now();this._performanceStartTime=L.otperformance.now(),this._performanceOffset=d-(this._performanceStartTime+(0,L.getTimeOrigin)()),this._startTimeProvided=r!=null,this.startTime=this._getTime(r??d),this.resource=n.resource,this.instrumentationLibrary=n.instrumentationLibrary,this._spanLimits=n.getSpanLimits(),s!=null&&this.setAttributes(s),this._spanProcessor=n.getActiveSpanProcessor(),this._spanProcessor.onStart(this,o),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0}return u.prototype.spanContext=function(){return this._spanContext},u.prototype.setAttribute=function(n,o){return o==null||this._isSpanEnded()?this:n.length===0?(y.diag.warn("Invalid attribute key: "+n),this):(0,L.isAttributeValue)(o)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,n)?(this._droppedAttributesCount++,this):(this.attributes[n]=this._truncateToSize(o),this):(y.diag.warn("Invalid attribute value set for key: "+n),this)},u.prototype.setAttributes=function(n){var o,c;try{for(var l=Ls(Object.entries(n)),i=l.next();!i.done;i=l.next()){var e=Is(i.value,2),t=e[0],r=e[1];this.setAttribute(t,r)}}catch(a){o={error:a}}finally{try{i&&!i.done&&(c=l.return)&&c.call(l)}finally{if(o)throw o.error}}return this},u.prototype.addEvent=function(n,o,c){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return y.diag.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(y.diag.warn("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),(0,L.isTimeInput)(o)&&((0,L.isTimeInput)(c)||(c=o),o=void 0);var l=(0,L.sanitizeAttributes)(o);return this.events.push({name:n,attributes:l,time:this._getTime(c),droppedAttributesCount:0}),this},u.prototype.setStatus=function(n){return this._isSpanEnded()?this:(this.status=n,this)},u.prototype.updateName=function(n){return this._isSpanEnded()?this:(this.name=n,this)},u.prototype.end=function(n){if(this._isSpanEnded()){y.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(n),this._duration=(0,L.hrTimeDuration)(this.startTime,this.endTime),this._duration[0]<0&&(y.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)},u.prototype._getTime=function(n){if(typeof n=="number"&&n<L.otperformance.now())return(0,L.hrTime)(n+this._performanceOffset);if(typeof n=="number")return(0,L.millisToHrTime)(n);if(n instanceof Date)return(0,L.millisToHrTime)(n.getTime());if((0,L.isTimeInputHrTime)(n))return n;if(this._startTimeProvided)return(0,L.millisToHrTime)(Date.now());var o=L.otperformance.now()-this._performanceStartTime;return(0,L.addHrTimes)(this.startTime,(0,L.millisToHrTime)(o))},u.prototype.isRecording=function(){return this._ended===!1},u.prototype.recordException=function(n,o){var c={};typeof n=="string"?c[bt.SemanticAttributes.EXCEPTION_MESSAGE]=n:n&&(n.code?c[bt.SemanticAttributes.EXCEPTION_TYPE]=n.code.toString():n.name&&(c[bt.SemanticAttributes.EXCEPTION_TYPE]=n.name),n.message&&(c[bt.SemanticAttributes.EXCEPTION_MESSAGE]=n.message),n.stack&&(c[bt.SemanticAttributes.EXCEPTION_STACKTRACE]=n.stack)),c[bt.SemanticAttributes.EXCEPTION_TYPE]||c[bt.SemanticAttributes.EXCEPTION_MESSAGE]?this.addEvent(xi,c,o):y.diag.warn("Failed to record an exception "+n)},Object.defineProperty(u.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),u.prototype._isSpanEnded=function(){return this._ended&&y.diag.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},u.prototype._truncateToLimitUtil=function(n,o){return n.length<=o?n:n.substr(0,o)},u.prototype._truncateToSize=function(n){var o=this,c=this._attributeValueLengthLimit;return c<=0?(y.diag.warn("Attribute value limit must be positive, got "+c),n):typeof n=="string"?this._truncateToLimitUtil(n,c):Array.isArray(n)?n.map(function(l){return typeof l=="string"?o._truncateToLimitUtil(l,c):l}):n},u}();S();var k=N(U());var lt;(function(u){u[u.NOT_RECORD=0]="NOT_RECORD",u[u.RECORD=1]="RECORD",u[u.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(lt||(lt={}));var ct=function(){function u(){}return u.prototype.shouldSample=function(){return{decision:lt.NOT_RECORD}},u.prototype.toString=function(){return"AlwaysOffSampler"},u}();var J=function(){function u(){}return u.prototype.shouldSample=function(){return{decision:lt.RECORD_AND_SAMPLED}},u.prototype.toString=function(){return"AlwaysOnSampler"},u}();S();var Li=N(U());var St=function(){function u(n){var o,c,l,i;this._root=n.root,this._root||((0,Li.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new J),this._remoteParentSampled=(o=n.remoteParentSampled)!==null&&o!==void 0?o:new J,this._remoteParentNotSampled=(c=n.remoteParentNotSampled)!==null&&c!==void 0?c:new ct,this._localParentSampled=(l=n.localParentSampled)!==null&&l!==void 0?l:new J,this._localParentNotSampled=(i=n.localParentNotSampled)!==null&&i!==void 0?i:new ct}return u.prototype.shouldSample=function(n,o,c,l,i,e){var t=y.trace.getSpanContext(n);return!t||!(0,y.isSpanContextValid)(t)?this._root.shouldSample(n,o,c,l,i,e):t.isRemote?t.traceFlags&y.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(n,o,c,l,i,e):this._remoteParentNotSampled.shouldSample(n,o,c,l,i,e):t.traceFlags&y.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(n,o,c,l,i,e):this._localParentNotSampled.shouldSample(n,o,c,l,i,e)},u.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},u}();S();var Kt=function(){function u(n){n===void 0&&(n=0),this._ratio=n,this._ratio=this._normalize(n),this._upperBound=Math.floor(this._ratio*4294967295)}return u.prototype.shouldSample=function(n,o){return{decision:(0,y.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?lt.RECORD_AND_SAMPLED:lt.NOT_RECORD}},u.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},u.prototype._normalize=function(n){return typeof n!="number"||isNaN(n)?0:n>=1?1:n<=0?0:n},u.prototype._accumulate=function(n){for(var o=0,c=0;c<n.length/8;c++){var l=c*8,i=parseInt(n.slice(l,l+8),16);o=(o^i)>>>0}return o},u}();var ws=(0,k.getEnv)(),Cs=k.TracesSamplerValues.AlwaysOn,Xt=1;function or(){return{sampler:Tn(ws),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,k.getEnv)().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,k.getEnv)().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:(0,k.getEnv)().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,k.getEnv)().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:(0,k.getEnv)().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:(0,k.getEnv)().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:(0,k.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:(0,k.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function Tn(u){switch(u===void 0&&(u=(0,k.getEnv)()),u.OTEL_TRACES_SAMPLER){case k.TracesSamplerValues.AlwaysOn:return new J;case k.TracesSamplerValues.AlwaysOff:return new ct;case k.TracesSamplerValues.ParentBasedAlwaysOn:return new St({root:new J});case k.TracesSamplerValues.ParentBasedAlwaysOff:return new St({root:new ct});case k.TracesSamplerValues.TraceIdRatio:return new Kt(Ii(u));case k.TracesSamplerValues.ParentBasedTraceIdRatio:return new St({root:new Kt(Ii(u))});default:return y.diag.error('OTEL_TRACES_SAMPLER value "'+u.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Cs+'".'),new J}}function Ii(u){if(u.OTEL_TRACES_SAMPLER_ARG===void 0||u.OTEL_TRACES_SAMPLER_ARG==="")return y.diag.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+Xt+"."),Xt;var n=Number(u.OTEL_TRACES_SAMPLER_ARG);return isNaN(n)?(y.diag.error("OTEL_TRACES_SAMPLER_ARG="+u.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+Xt+"."),Xt):n<0||n>1?(y.diag.error("OTEL_TRACES_SAMPLER_ARG="+u.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+Xt+"."),Xt):n}var Yt=N(U());function wi(u){var n={sampler:Tn()},o=or(),c=Object.assign({},o,n,u);return c.generalLimits=Object.assign({},o.generalLimits,u.generalLimits||{}),c.spanLimits=Object.assign({},o.spanLimits,u.spanLimits||{}),c}function Ci(u){var n,o,c,l,i,e,t,r,a,s,d,v,b=Object.assign({},u.spanLimits),g=(0,Yt.getEnvWithoutDefaults)();return b.attributeCountLimit=(e=(i=(l=(o=(n=u.spanLimits)===null||n===void 0?void 0:n.attributeCountLimit)!==null&&o!==void 0?o:(c=u.generalLimits)===null||c===void 0?void 0:c.attributeCountLimit)!==null&&l!==void 0?l:g.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&i!==void 0?i:g.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&e!==void 0?e:Yt.DEFAULT_ATTRIBUTE_COUNT_LIMIT,b.attributeValueLengthLimit=(v=(d=(s=(r=(t=u.spanLimits)===null||t===void 0?void 0:t.attributeValueLengthLimit)!==null&&r!==void 0?r:(a=u.generalLimits)===null||a===void 0?void 0:a.attributeValueLengthLimit)!==null&&s!==void 0?s:g.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&d!==void 0?d:g.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&v!==void 0?v:Yt.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},u,{spanLimits:b})}S();var Y=N(U()),Ui=function(){function u(n,o){this._exporter=n,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var c=(0,Y.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 Y.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(y.diag.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return u.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},u.prototype.onStart=function(n,o){},u.prototype.onEnd=function(n){this._shutdownOnce.isCalled||n.spanContext().traceFlags&y.TraceFlags.SAMPLED&&this._addToBuffer(n)},u.prototype.shutdown=function(){return this._shutdownOnce.call()},u.prototype._shutdown=function(){var n=this;return Promise.resolve().then(function(){return n.onShutdown()}).then(function(){return n._flushAll()}).then(function(){return n._exporter.shutdown()})},u.prototype._addToBuffer=function(n){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&y.diag.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(y.diag.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(n),this._maybeStartTimer()},u.prototype._flushAll=function(){var n=this;return new Promise(function(o,c){for(var l=[],i=Math.ceil(n._finishedSpans.length/n._maxExportBatchSize),e=0,t=i;e<t;e++)l.push(n._flushOneBatch());Promise.all(l).then(function(){o()}).catch(c)})},u.prototype._flushOneBatch=function(){var n=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(o,c){var l=setTimeout(function(){c(new Error("Timeout"))},n._exportTimeoutMillis);y.context.with((0,Y.suppressTracing)(y.context.active()),function(){var i=n._finishedSpans.splice(0,n._maxExportBatchSize),e=function(){return n._exporter.export(i,function(r){var a;clearTimeout(l),r.code===Y.ExportResultCode.SUCCESS?o():c((a=r.error)!==null&&a!==void 0?a:new Error("BatchSpanProcessor: span export failed"))})},t=i.map(function(r){return r.resource}).filter(function(r){return r.asyncAttributesPending});t.length===0?e():Promise.all(t.map(function(r){var a;return(a=r.waitForAsyncAttributes)===null||a===void 0?void 0:a.call(r)})).then(e,function(r){(0,Y.globalErrorHandler)(r),c(r)})})})},u.prototype._maybeStartTimer=function(){var n=this;if(!this._isExporting){var o=function(){n._isExporting=!0,n._flushOneBatch().then(function(){n._isExporting=!1,n._finishedSpans.length>0&&(n._clearTimer(),n._maybeStartTimer())}).catch(function(c){n._isExporting=!1,(0,Y.globalErrorHandler)(c)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return o();this._timer===void 0&&(this._timer=setTimeout(function(){return o()},this._scheduledDelayMillis),(0,Y.unrefTimer)(this._timer))}},u.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},u}();var Us=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),de=function(u){Us(n,u);function n(o,c){var l=u.call(this,o,c)||this;return l.onInit(c),l}return n.prototype.onInit=function(o){var c=this;o?.disableAutoFlushOnDocumentHide!==!0&&typeof document<"u"&&(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&c.forceFlush()},this._pageHideListener=function(){c.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},n.prototype.onShutdown=function(){typeof document<"u"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},n}(Ui);var Ms=8,Ds=16,ar=function(){function u(){this.generateTraceId=Mi(Ds),this.generateSpanId=Mi(Ms)}return u}();var ir=Array(32);function Mi(u){return function(){for(var o=0;o<u*2;o++)ir[o]=Math.floor(Math.random()*16)+48,ir[o]>=58&&(ir[o]+=39);return String.fromCharCode.apply(null,ir.slice(0,u*2))}}var Di=function(){function u(n,o,c){this._tracerProvider=c;var l=wi(o);this._sampler=l.sampler,this._generalLimits=l.generalLimits,this._spanLimits=l.spanLimits,this._idGenerator=o.idGenerator||new ar,this.resource=c.resource,this.instrumentationLibrary=n}return u.prototype.startSpan=function(n,o,c){var l,i,e;o===void 0&&(o={}),c===void 0&&(c=y.context.active()),o.root&&(c=y.trace.deleteSpan(c));var t=y.trace.getSpan(c);if((0,Jt.isTracingSuppressed)(c)){y.diag.debug("Instrumentation suppressed, returning Noop Span");var r=y.trace.wrapSpanContext(y.INVALID_SPAN_CONTEXT);return r}var a=t?.spanContext(),s=this._idGenerator.generateSpanId(),d,v,b;!a||!y.trace.isSpanContextValid(a)?d=this._idGenerator.generateTraceId():(d=a.traceId,v=a.traceState,b=a.spanId);var g=(l=o.kind)!==null&&l!==void 0?l:y.SpanKind.INTERNAL,G=((i=o.links)!==null&&i!==void 0?i:[]).map(function(Eo){return{context:Eo.context,attributes:(0,Jt.sanitizeAttributes)(Eo.attributes)}}),B=(0,Jt.sanitizeAttributes)(o.attributes),yt=this._sampler.shouldSample(c,d,n,g,B,G);v=(e=yt.traceState)!==null&&e!==void 0?e:v;var $=yt.decision===y.SamplingDecision.RECORD_AND_SAMPLED?y.TraceFlags.SAMPLED:y.TraceFlags.NONE,_o={traceId:d,spanId:s,traceFlags:$,traceState:v};if(yt.decision===y.SamplingDecision.NOT_RECORD){y.diag.debug("Recording is off, propagating context in a non-recording span");var r=y.trace.wrapSpanContext(_o);return r}var Pl=(0,Jt.sanitizeAttributes)(Object.assign(B,yt.attributes)),xl=new Ri(this,c,n,_o,g,b,G,o.startTime,void 0,Pl);return xl},u.prototype.startActiveSpan=function(n,o,c,l){var i,e,t;if(!(arguments.length<2)){arguments.length===2?t=o:arguments.length===3?(i=o,t=c):(i=o,e=c,t=l);var r=e??y.context.active(),a=this.startSpan(n,i,r),s=y.trace.setSpan(r,a);return y.context.with(s,t,void 0,a)}},u.prototype.getGeneralLimits=function(){return this._generalLimits},u.prototype.getSpanLimits=function(){return this._spanLimits},u.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},u}();S();var tt=N(U());S();var Tt=N(Et()),ur=N(U());function Bi(){return"unknown_service"}var Ot=function(){return Ot=Object.assign||function(u){for(var n,o=1,c=arguments.length;o<c;o++){n=arguments[o];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(u[l]=n[l])}return u},Ot.apply(this,arguments)},Bs=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},ks=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Vs=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},q=function(){function u(n,o){var c=this,l;this._attributes=n,this.asyncAttributesPending=o!=null,this._syncAttributes=(l=this._attributes)!==null&&l!==void 0?l:{},this._asyncAttributesPromise=o?.then(function(i){return c._attributes=Object.assign({},c._attributes,i),c.asyncAttributesPending=!1,i},function(i){return y.diag.debug("a resource's async attributes promise rejected: %s",i),c.asyncAttributesPending=!1,{}})}return u.empty=function(){return u.EMPTY},u.default=function(){var n;return new u((n={},n[Tt.SemanticResourceAttributes.SERVICE_NAME]=Bi(),n[Tt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]=ur.SDK_INFO[Tt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE],n[Tt.SemanticResourceAttributes.TELEMETRY_SDK_NAME]=ur.SDK_INFO[Tt.SemanticResourceAttributes.TELEMETRY_SDK_NAME],n[Tt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]=ur.SDK_INFO[Tt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION],n))},Object.defineProperty(u.prototype,"attributes",{get:function(){var n;return this.asyncAttributesPending&&y.diag.error("Accessing resource attributes before async attributes settled"),(n=this._attributes)!==null&&n!==void 0?n:{}},enumerable:!1,configurable:!0}),u.prototype.waitForAsyncAttributes=function(){return Bs(this,void 0,void 0,function(){return ks(this,function(n){switch(n.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},u.prototype.merge=function(n){var o=this,c;if(!n)return this;var l=Ot(Ot({},this._syncAttributes),(c=n._syncAttributes)!==null&&c!==void 0?c:n.attributes);if(!this._asyncAttributesPromise&&!n._asyncAttributesPromise)return new u(l);var i=Promise.all([this._asyncAttributesPromise,n._asyncAttributesPromise]).then(function(e){var t,r=Vs(e,2),a=r[0],s=r[1];return Ot(Ot(Ot(Ot({},o._syncAttributes),a),(t=n._syncAttributes)!==null&&t!==void 0?t:n.attributes),s)});return new u(l,i)},u.EMPTY=new u({}),u}();S();var ki=N(U()),Vi=N(Et());var Gs=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Hs=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},js=function(){function u(){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."}return u.prototype.detect=function(n){var o={},c=(0,ki.getEnv)(),l=c.OTEL_RESOURCE_ATTRIBUTES,i=c.OTEL_SERVICE_NAME;if(l)try{var e=this._parseResourceAttributes(l);Object.assign(o,e)}catch(t){y.diag.debug("EnvDetector failed: "+t.message)}return i&&(o[Vi.SemanticResourceAttributes.SERVICE_NAME]=i),new q(o)},u.prototype._parseResourceAttributes=function(n){var o,c;if(!n)return{};var l={},i=n.split(this._COMMA_SEPARATOR,-1);try{for(var e=Gs(i),t=e.next();!t.done;t=e.next()){var r=t.value,a=r.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(a.length===2){var s=Hs(a,2),d=s[0],v=s[1];if(d=d.trim(),v=v.trim().split(/^"|"$/).join(""),!this._isValidAndNotEmpty(d))throw new Error("Attribute key "+this._ERROR_MESSAGE_INVALID_CHARS);if(!this._isValid(v))throw new Error("Attribute value "+this._ERROR_MESSAGE_INVALID_VALUE);l[d]=decodeURIComponent(v)}}}catch(b){o={error:b}}finally{try{t&&!t.done&&(c=e.return)&&c.call(e)}finally{if(o)throw o.error}}return l},u.prototype._isValid=function(n){return n.length<=this._MAX_LENGTH&&this._isBaggageOctetString(n)},u.prototype._isBaggageOctetString=function(n){for(var o=0;o<n.length;o++){var c=n.charCodeAt(o);if(c<33||c===44||c===59||c===92||c>126)return!1}return!0},u.prototype._isValidAndNotEmpty=function(n){return n.length>0&&this._isValid(n)},u}(),Gi=new js;S();var Hi=function(u){return u!==null&&typeof u=="object"&&typeof u.then=="function"};var Fs=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},qs=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};var ji=function(u){var n;u===void 0&&(u={});var o=((n=u.detectors)!==null&&n!==void 0?n:[]).map(function(l){try{var i=l.detect(u),e;if(Hi(i)){var t=function(){return Fs(void 0,void 0,void 0,function(){var r;return qs(this,function(a){switch(a.label){case 0:return[4,i];case 1:return r=a.sent(),[2,r.attributes]}})})};e=new q({},t())}else e=i;return e.waitForAsyncAttributes?e.waitForAsyncAttributes().then(function(){return y.diag.debug(l.constructor.name+" found resource.",e)}):y.diag.debug(l.constructor.name+" found resource.",e),e}catch(r){return y.diag.error(l.constructor.name+" failed: "+r.message),q.empty()}}),c=o.reduce(function(l,i){return l.merge(i)},q.empty());return c.waitForAsyncAttributes&&c.waitForAsyncAttributes().then(function(){Ks(o)}),c},Ks=function(u){u.forEach(function(n){if(Object.keys(n.attributes).length>0){var o=JSON.stringify(n.attributes,null,4);y.diag.verbose(o)}})};var Fi=N(U()),lr=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},qi=function(){function u(n){this._spanProcessors=n}return u.prototype.forceFlush=function(){var n,o,c=[];try{for(var l=lr(this._spanProcessors),i=l.next();!i.done;i=l.next()){var e=i.value;c.push(e.forceFlush())}}catch(t){n={error:t}}finally{try{i&&!i.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}return new Promise(function(t){Promise.all(c).then(function(){t()}).catch(function(r){(0,Fi.globalErrorHandler)(r||new Error("MultiSpanProcessor: forceFlush failed")),t()})})},u.prototype.onStart=function(n,o){var c,l;try{for(var i=lr(this._spanProcessors),e=i.next();!e.done;e=i.next()){var t=e.value;t.onStart(n,o)}}catch(r){c={error:r}}finally{try{e&&!e.done&&(l=i.return)&&l.call(i)}finally{if(c)throw c.error}}},u.prototype.onEnd=function(n){var o,c;try{for(var l=lr(this._spanProcessors),i=l.next();!i.done;i=l.next()){var e=i.value;e.onEnd(n)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(c=l.return)&&c.call(l)}finally{if(o)throw o.error}}},u.prototype.shutdown=function(){var n,o,c=[];try{for(var l=lr(this._spanProcessors),i=l.next();!i.done;i=l.next()){var e=i.value;c.push(e.shutdown())}}catch(t){n={error:t}}finally{try{i&&!i.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}return new Promise(function(t,r){Promise.all(c).then(function(){t()},r)})},u}();var Ki=function(){function u(){}return u.prototype.onStart=function(n,o){},u.prototype.onEnd=function(n){},u.prototype.shutdown=function(){return Promise.resolve()},u.prototype.forceFlush=function(){return Promise.resolve()},u}();var Bt;(function(u){u[u.resolved=0]="resolved",u[u.timeout=1]="timeout",u[u.error=2]="error",u[u.unresolved=3]="unresolved"})(Bt||(Bt={}));var Xi=function(){function u(n){n===void 0&&(n={});var o;this._registeredSpanProcessors=[],this._tracers=new Map;var c=(0,tt.merge)({},or(),Ci(n));this.resource=(o=c.resource)!==null&&o!==void 0?o:q.empty(),this.resource=q.default().merge(this.resource),this._config=Object.assign({},c,{resource:this.resource});var l=this._buildExporterFromEnv();if(l!==void 0){var i=new de(l);this.activeSpanProcessor=i}else this.activeSpanProcessor=new Ki}return u.prototype.getTracer=function(n,o,c){var l=n+"@"+(o||"")+":"+(c?.schemaUrl||"");return this._tracers.has(l)||this._tracers.set(l,new Di({name:n,version:o,schemaUrl:c?.schemaUrl},this._config,this)),this._tracers.get(l)},u.prototype.addSpanProcessor=function(n){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(o){return y.diag.error("Error while trying to shutdown current span processor",o)}),this._registeredSpanProcessors.push(n),this.activeSpanProcessor=new qi(this._registeredSpanProcessors)},u.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},u.prototype.register=function(n){n===void 0&&(n={}),y.trace.setGlobalTracerProvider(this),n.propagator===void 0&&(n.propagator=this._buildPropagatorFromEnv()),n.contextManager&&y.context.setGlobalContextManager(n.contextManager),n.propagator&&y.propagation.setGlobalPropagator(n.propagator)},u.prototype.forceFlush=function(){var n=this._config.forceFlushTimeoutMillis,o=this._registeredSpanProcessors.map(function(c){return new Promise(function(l){var i,e=setTimeout(function(){l(new Error("Span processor did not completed within timeout period of "+n+" ms")),i=Bt.timeout},n);c.forceFlush().then(function(){clearTimeout(e),i!==Bt.timeout&&(i=Bt.resolved,l(i))}).catch(function(t){clearTimeout(e),i=Bt.error,l(t)})})});return new Promise(function(c,l){Promise.all(o).then(function(i){var e=i.filter(function(t){return t!==Bt.resolved});e.length>0?l(e):c()}).catch(function(i){return l([i])})})},u.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},u.prototype._getPropagator=function(n){var o;return(o=this.constructor._registeredPropagators.get(n))===null||o===void 0?void 0:o()},u.prototype._getSpanExporter=function(n){var o;return(o=this.constructor._registeredExporters.get(n))===null||o===void 0?void 0:o()},u.prototype._buildPropagatorFromEnv=function(){var n=this,o=Array.from(new Set((0,tt.getEnv)().OTEL_PROPAGATORS)),c=o.map(function(i){var e=n._getPropagator(i);return e||y.diag.warn('Propagator "'+i+'" requested through environment variable is unavailable.'),e}),l=c.reduce(function(i,e){return e&&i.push(e),i},[]);if(l.length!==0)return o.length===1?l[0]:new tt.CompositePropagator({propagators:l})},u.prototype._buildExporterFromEnv=function(){var n=(0,tt.getEnv)().OTEL_TRACES_EXPORTER;if(!(n==="none"||n==="")){var o=this._getSpanExporter(n);return o||y.diag.error('Exporter "'+n+'" requested through environment variable is unavailable.'),o}},u._registeredPropagators=new Map([["tracecontext",function(){return new tt.W3CTraceContextPropagator}],["baggage",function(){return new tt.W3CBaggagePropagator}]]),u._registeredExporters=new Map,u}();S();var st={};Q(st,wy);import*as wy from"@opentelemetry/api-logs";var Ol=N(Wi(),1);S();var sr=N(U());S();S();S();var zt=N(U()),zs=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Ws=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},$i=function(){function u(n,o,c){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;var l=c.timestamp,i=c.observedTimestamp,e=c.severityNumber,t=c.severityText,r=c.body,a=c.attributes,s=a===void 0?{}:a,d=c.context,v=Date.now();if(this.hrTime=(0,zt.timeInputToHrTime)(l??v),this.hrTimeObserved=(0,zt.timeInputToHrTime)(i??v),d){var b=y.trace.getSpanContext(d);b&&y.isSpanContextValid(b)&&(this.spanContext=b)}this.severityNumber=e,this.severityText=t,this.body=r,this.resource=n.resource,this.instrumentationScope=o,this._logRecordLimits=n.logRecordLimits,this.setAttributes(s)}return Object.defineProperty(u.prototype,"severityText",{get:function(){return this._severityText},set:function(n){this._isLogRecordReadonly()||(this._severityText=n)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"severityNumber",{get:function(){return this._severityNumber},set:function(n){this._isLogRecordReadonly()||(this._severityNumber=n)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"body",{get:function(){return this._body},set:function(n){this._isLogRecordReadonly()||(this._body=n)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"droppedAttributesCount",{get:function(){return this.totalAttributesCount-Object.keys(this.attributes).length},enumerable:!1,configurable:!0}),u.prototype.setAttribute=function(n,o){return this._isLogRecordReadonly()?this:o===null?this:n.length===0?(y.diag.warn("Invalid attribute key: "+n),this):!(0,zt.isAttributeValue)(o)&&!(typeof o=="object"&&!Array.isArray(o)&&Object.keys(o).length>0)?(y.diag.warn("Invalid attribute value set for key: "+n),this):(this.totalAttributesCount+=1,Object.keys(this.attributes).length>=this._logRecordLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,n)?this:((0,zt.isAttributeValue)(o)?this.attributes[n]=this._truncateToSize(o):this.attributes[n]=o,this))},u.prototype.setAttributes=function(n){var o,c;try{for(var l=zs(Object.entries(n)),i=l.next();!i.done;i=l.next()){var e=Ws(i.value,2),t=e[0],r=e[1];this.setAttribute(t,r)}}catch(a){o={error:a}}finally{try{i&&!i.done&&(c=l.return)&&c.call(l)}finally{if(o)throw o.error}}return this},u.prototype.setBody=function(n){return this.body=n,this},u.prototype.setSeverityNumber=function(n){return this.severityNumber=n,this},u.prototype.setSeverityText=function(n){return this.severityText=n,this},u.prototype._makeReadonly=function(){this._isReadonly=!0},u.prototype._truncateToSize=function(n){var o=this,c=this._logRecordLimits.attributeValueLengthLimit;return c<=0?(y.diag.warn("Attribute value limit must be positive, got "+c),n):typeof n=="string"?this._truncateToLimitUtil(n,c):Array.isArray(n)?n.map(function(l){return typeof l=="string"?o._truncateToLimitUtil(l,c):l}):n},u.prototype._truncateToLimitUtil=function(n,o){return n.length<=o?n:n.substring(0,o)},u.prototype._isLogRecordReadonly=function(){return this._isReadonly&&y.diag.warn("Can not execute the operation on emitted log record"),this._isReadonly},u}();var gn=function(){return gn=Object.assign||function(u){for(var n,o=1,c=arguments.length;o<c;o++){n=arguments[o];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(u[l]=n[l])}return u},gn.apply(this,arguments)},Qi=function(){function u(n,o){this.instrumentationScope=n,this._sharedState=o}return u.prototype.emit=function(n){var o=n.context||y.context.active(),c=new $i(this._sharedState,this.instrumentationScope,gn({context:o},n));this._sharedState.activeProcessor.onEmit(c,o),c._makeReadonly()},u}();var ft=N(U());function Zi(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:(0,ft.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,ft.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT},includeTraceContext:!0}}function ta(u){var n,o,c,l,i,e,t=(0,ft.getEnvWithoutDefaults)();return{attributeCountLimit:(c=(o=(n=u.attributeCountLimit)!==null&&n!==void 0?n:t.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:t.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&c!==void 0?c:ft.DEFAULT_ATTRIBUTE_COUNT_LIMIT,attributeValueLengthLimit:(e=(i=(l=u.attributeValueLengthLimit)!==null&&l!==void 0?l:t.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&i!==void 0?i:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&e!==void 0?e:ft.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT}}var na=N(U()),ea=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},ra=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},oa=function(){function u(n,o){this.processors=n,this.forceFlushTimeoutMillis=o}return u.prototype.forceFlush=function(){return ea(this,void 0,void 0,function(){var n;return ra(this,function(o){switch(o.label){case 0:return n=this.forceFlushTimeoutMillis,[4,Promise.all(this.processors.map(function(c){return(0,na.callWithTimeout)(c.forceFlush(),n)}))];case 1:return o.sent(),[2]}})})},u.prototype.onEmit=function(n,o){this.processors.forEach(function(c){return c.onEmit(n,o)})},u.prototype.shutdown=function(){return ea(this,void 0,void 0,function(){return ra(this,function(n){switch(n.label){case 0:return[4,Promise.all(this.processors.map(function(o){return o.shutdown()}))];case 1:return n.sent(),[2]}})})},u}();var ia=function(){function u(){}return u.prototype.forceFlush=function(){return Promise.resolve()},u.prototype.onEmit=function(n,o){},u.prototype.shutdown=function(){return Promise.resolve()},u}();var aa=function(){function u(n,o,c){this.resource=n,this.forceFlushTimeoutMillis=o,this.logRecordLimits=c,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new ia}return u}();var $s="unknown",An=function(){function u(n){n===void 0&&(n={});var o=(0,sr.merge)({},Zi(),n),c=o.resource,l=c===void 0?q.default():c,i=o.logRecordLimits,e=o.forceFlushTimeoutMillis;this._sharedState=new aa(l,e,ta(i)),this._shutdownOnce=new sr.BindOnceFuture(this._shutdown,this)}return u.prototype.getLogger=function(n,o,c){if(this._shutdownOnce.isCalled)return y.diag.warn("A shutdown LoggerProvider cannot provide a Logger"),st.NOOP_LOGGER;n||y.diag.warn("Logger requested without instrumentation scope name.");var l=n||$s,i=l+"@"+(o||"")+":"+(c?.schemaUrl||"");return this._sharedState.loggers.has(i)||this._sharedState.loggers.set(i,new Qi({name:l,version:o,schemaUrl:c?.schemaUrl},this._sharedState)),this._sharedState.loggers.get(i)},u.prototype.addLogRecordProcessor=function(n){this._sharedState.registeredLogRecordProcessors.length===0&&this._sharedState.activeProcessor.shutdown().catch(function(o){return y.diag.error("Error while trying to shutdown current log record processor",o)}),this._sharedState.registeredLogRecordProcessors.push(n),this._sharedState.activeProcessor=new oa(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)},u.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?(y.diag.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()},u.prototype.shutdown=function(){return this._shutdownOnce.isCalled?(y.diag.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()},u.prototype._shutdown=function(){return this._sharedState.activeProcessor.shutdown()},u}();var fr;(function(u){u[u.DELTA=0]="DELTA",u[u.CUMULATIVE=1]="CUMULATIVE"})(fr||(fr={}));var Qs=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),ua=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},la=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};var Zs=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")};function ca(u){return u!=null}function sa(u){var n=Object.keys(u);return n.length===0?"":(n=n.sort(),JSON.stringify(n.map(function(o){return[o,u[o]]})))}function fa(u){var n,o;return u.name+":"+((n=u.version)!==null&&n!==void 0?n:"")+":"+((o=u.schemaUrl)!==null&&o!==void 0?o:"")}var tf=function(u){Qs(n,u);function n(o){var c=u.call(this,o)||this;return Object.setPrototypeOf(c,n.prototype),c}return n}(Error);function Nn(u,n){var o,c=new Promise(function(i,e){o=setTimeout(function(){e(new tf("Operation timed out."))},n)});return Promise.race([u,c]).then(function(l){return clearTimeout(o),l},function(l){throw clearTimeout(o),l})}function pa(u){return ua(this,void 0,void 0,function(){var n=this;return la(this,function(o){return[2,Promise.all(u.map(function(c){return ua(n,void 0,void 0,function(){var l,i;return la(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,c];case 1:return l=e.sent(),[2,{status:"fulfilled",value:l}];case 2:return i=e.sent(),[2,{status:"rejected",reason:i}];case 3:return[2]}})})}))]})})}function da(u){return u.status==="rejected"}function ya(u,n){var o,c;if(u.size!==n.size)return!1;try{for(var l=Zs(u),i=l.next();!i.done;i=l.next()){var e=i.value;if(!n.has(e))return!1}}catch(t){o={error:t}}finally{try{i&&!i.done&&(c=l.return)&&c.call(l)}finally{if(o)throw o.error}}return!0}function ha(u,n){return u.toLowerCase()===n.toLowerCase()}S();var pt;(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"})(pt||(pt={}));function dt(u,n,o){var c,l,i,e;return rf(u)||y.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:n,description:(c=o?.description)!==null&&c!==void 0?c:"",unit:(l=o?.unit)!==null&&l!==void 0?l:"",valueType:(i=o?.valueType)!==null&&i!==void 0?i:y.ValueType.DOUBLE,advice:(e=o?.advice)!==null&&e!==void 0?e:{}}}function ma(u,n){var o,c;return{name:(o=u.name)!==null&&o!==void 0?o:n.name,description:(c=u.description)!==null&&c!==void 0?c:n.description,type:n.type,unit:n.unit,valueType:n.valueType,advice:n.advice}}function va(u,n){return ha(u.name,n.name)&&u.unit===n.unit&&u.type===n.type&&u.valueType===n.valueType}var ef=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function rf(u){return u.match(ef)!=null}S();var _a=function(){function u(){this._registeredViews=[]}return u.prototype.addView=function(n){this._registeredViews.push(n)},u.prototype.findViews=function(n,o){var c=this,l=this._registeredViews.filter(function(i){return c._matchInstrument(i.instrumentSelector,n)&&c._matchMeter(i.meterSelector,o)});return l},u.prototype._matchInstrument=function(n,o){return(n.getType()===void 0||o.type===n.getType())&&n.getNameFilter().match(o.name)&&n.getUnitFilter().match(o.unit)},u.prototype._matchMeter=function(n,o){return n.getNameFilter().match(o.name)&&(o.version===void 0||n.getVersionFilter().match(o.version))&&(o.schemaUrl===void 0||n.getSchemaUrlFilter().match(o.schemaUrl))},u}();S();var Ea=N(U()),Wt=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),Pn=function(){function u(n,o){this._writableMetricStorage=n,this._descriptor=o}return u.prototype._record=function(n,o,c){if(o===void 0&&(o={}),c===void 0&&(c=y.context.active()),typeof n!="number"){y.diag.warn("non-number value provided to metric "+this._descriptor.name+": "+n);return}this._descriptor.valueType===y.ValueType.INT&&!Number.isInteger(n)&&(y.diag.warn("INT value type cannot accept a floating-point value for "+this._descriptor.name+", ignoring the fractional digits."),n=Math.trunc(n),!Number.isInteger(n))||this._writableMetricStorage.record(n,o,c,(0,Ea.millisToHrTime)(Date.now()))},u}();var ba=function(u){Wt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n.prototype.add=function(o,c,l){this._record(o,c,l)},n}(Pn);var Sa=function(u){Wt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n.prototype.add=function(o,c,l){if(o<0){y.diag.warn("negative value provided to counter "+this._descriptor.name+": "+o);return}this._record(o,c,l)},n}(Pn);var Ta=function(u){Wt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n.prototype.record=function(o,c,l){if(o<0){y.diag.warn("negative value provided to histogram "+this._descriptor.name+": "+o);return}this._record(o,c,l)},n}(Pn);var pr=function(){function u(n,o,c){this._observableRegistry=c,this._descriptor=n,this._metricStorages=o}return u.prototype.addCallback=function(n){this._observableRegistry.addCallback(n,this)},u.prototype.removeCallback=function(n){this._observableRegistry.removeCallback(n,this)},u}();var Oa=function(u){Wt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n}(pr);var ga=function(u){Wt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n}(pr);var Aa=function(u){Wt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n}(pr);function ye(u){return u instanceof pr}var Na=function(){function u(n){this._meterSharedState=n}return u.prototype.createHistogram=function(n,o){var c=dt(n,pt.HISTOGRAM,o),l=this._meterSharedState.registerMetricStorage(c);return new Ta(l,c)},u.prototype.createCounter=function(n,o){var c=dt(n,pt.COUNTER,o),l=this._meterSharedState.registerMetricStorage(c);return new Sa(l,c)},u.prototype.createUpDownCounter=function(n,o){var c=dt(n,pt.UP_DOWN_COUNTER,o),l=this._meterSharedState.registerMetricStorage(c);return new ba(l,c)},u.prototype.createObservableGauge=function(n,o){var c=dt(n,pt.OBSERVABLE_GAUGE,o),l=this._meterSharedState.registerAsyncMetricStorage(c);return new ga(c,l,this._meterSharedState.observableRegistry)},u.prototype.createObservableCounter=function(n,o){var c=dt(n,pt.OBSERVABLE_COUNTER,o),l=this._meterSharedState.registerAsyncMetricStorage(c);return new Oa(c,l,this._meterSharedState.observableRegistry)},u.prototype.createObservableUpDownCounter=function(n,o){var c=dt(n,pt.OBSERVABLE_UP_DOWN_COUNTER,o),l=this._meterSharedState.registerAsyncMetricStorage(c);return new Aa(c,l,this._meterSharedState.observableRegistry)},u.prototype.addBatchObservableCallback=function(n,o){this._meterSharedState.observableRegistry.addBatchCallback(n,o)},u.prototype.removeBatchObservableCallback=function(n,o){this._meterSharedState.observableRegistry.removeBatchCallback(n,o)},u}();var dr=function(){function u(n){this._instrumentDescriptor=n}return u.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},u.prototype.updateDescription=function(n){this._instrumentDescriptor=dt(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:n,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})},u}();var nf=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),Pa=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},of=function(){function u(n){this._hash=n,this._valueMap=new Map,this._keyMap=new Map}return u.prototype.get=function(n,o){return o??(o=this._hash(n)),this._valueMap.get(o)},u.prototype.getOrDefault=function(n,o){var c=this._hash(n);if(this._valueMap.has(c))return this._valueMap.get(c);var l=o();return this._keyMap.has(c)||this._keyMap.set(c,n),this._valueMap.set(c,l),l},u.prototype.set=function(n,o,c){c??(c=this._hash(n)),this._keyMap.has(c)||this._keyMap.set(c,n),this._valueMap.set(c,o)},u.prototype.has=function(n,o){return o??(o=this._hash(n)),this._valueMap.has(o)},u.prototype.keys=function(){var n,o;return Pa(this,function(c){switch(c.label){case 0:n=this._keyMap.entries(),o=n.next(),c.label=1;case 1:return o.done===!0?[3,3]:[4,[o.value[1],o.value[0]]];case 2:return c.sent(),o=n.next(),[3,1];case 3:return[2]}})},u.prototype.entries=function(){var n,o;return Pa(this,function(c){switch(c.label){case 0:n=this._valueMap.entries(),o=n.next(),c.label=1;case 1:return o.done===!0?[3,3]:[4,[this._keyMap.get(o.value[0]),o.value[1],o.value[0]]];case 2:return c.sent(),o=n.next(),[3,1];case 3:return[2]}})},Object.defineProperty(u.prototype,"size",{get:function(){return this._valueMap.size},enumerable:!1,configurable:!0}),u}();var et=function(u){nf(n,u);function n(){return u.call(this,sa)||this}return n}(of);var af=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},yr=function(){function u(n){this._aggregator=n,this._activeCollectionStorage=new et,this._cumulativeMemoStorage=new et}return u.prototype.record=function(n,o,c,l){var i=this,e=this._activeCollectionStorage.getOrDefault(o,function(){return i._aggregator.createAccumulation(l)});e?.record(n)},u.prototype.batchCumulate=function(n,o){var c=this;Array.from(n.entries()).forEach(function(l){var i=af(l,3),e=i[0],t=i[1],r=i[2],a=c._aggregator.createAccumulation(o);a?.record(t);var s=a;if(c._cumulativeMemoStorage.has(e,r)){var d=c._cumulativeMemoStorage.get(e,r);s=c._aggregator.diff(d,a)}if(c._activeCollectionStorage.has(e,r)){var v=c._activeCollectionStorage.get(e,r);s=c._aggregator.merge(v,s)}c._cumulativeMemoStorage.set(e,a,r),c._activeCollectionStorage.set(e,s,r)})},u.prototype.collect=function(){var n=this._activeCollectionStorage;return this._activeCollectionStorage=new et,n},u}();var xn=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},xa=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},hr=function(){function u(n,o){var c=this;this._aggregator=n,this._unreportedAccumulations=new Map,this._reportHistory=new Map,o.forEach(function(l){c._unreportedAccumulations.set(l,[])})}return u.prototype.buildMetrics=function(n,o,c,l){this._stashAccumulations(c);var i=this._getMergedUnreportedAccumulations(n),e=i,t;if(this._reportHistory.has(n)){var r=this._reportHistory.get(n),a=r.collectionTime;t=r.aggregationTemporality,t===fr.CUMULATIVE?e=u.merge(r.accumulations,i,this._aggregator):e=u.calibrateStartTime(r.accumulations,i,a)}else t=n.selectAggregationTemporality(o.type);this._reportHistory.set(n,{accumulations:e,collectionTime:l,aggregationTemporality:t});var s=uf(e);if(s.length!==0)return this._aggregator.toMetricData(o,t,s,l)},u.prototype._stashAccumulations=function(n){var o,c,l=this._unreportedAccumulations.keys();try{for(var i=xn(l),e=i.next();!e.done;e=i.next()){var t=e.value,r=this._unreportedAccumulations.get(t);r===void 0&&(r=[],this._unreportedAccumulations.set(t,r)),r.push(n)}}catch(a){o={error:a}}finally{try{e&&!e.done&&(c=i.return)&&c.call(i)}finally{if(o)throw o.error}}},u.prototype._getMergedUnreportedAccumulations=function(n){var o,c,l=new et,i=this._unreportedAccumulations.get(n);if(this._unreportedAccumulations.set(n,[]),i===void 0)return l;try{for(var e=xn(i),t=e.next();!t.done;t=e.next()){var r=t.value;l=u.merge(l,r,this._aggregator)}}catch(a){o={error:a}}finally{try{t&&!t.done&&(c=e.return)&&c.call(e)}finally{if(o)throw o.error}}return l},u.merge=function(n,o,c){for(var l=n,i=o.entries(),e=i.next();e.done!==!0;){var t=xa(e.value,3),r=t[0],a=t[1],s=t[2];if(n.has(r,s)){var d=n.get(r,s),v=c.merge(d,a);l.set(r,v,s)}else l.set(r,a,s);e=i.next()}return l},u.calibrateStartTime=function(n,o,c){var l,i;try{for(var e=xn(n.keys()),t=e.next();!t.done;t=e.next()){var r=xa(t.value,2),a=r[0],s=r[1],d=o.get(a,s);d?.setStartTime(c)}}catch(v){l={error:v}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(l)throw l.error}}return o},u}();function uf(u){return Array.from(u.entries())}var lf=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),cf=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},Ra=function(u){lf(n,u);function n(o,c,l,i){var e=u.call(this,o)||this;return e._attributesProcessor=l,e._deltaMetricStorage=new yr(c),e._temporalMetricStorage=new hr(c,i),e}return n.prototype.record=function(o,c){var l=this,i=new et;Array.from(o.entries()).forEach(function(e){var t=cf(e,2),r=t[0],a=t[1];i.set(l._attributesProcessor.process(r),a)}),this._deltaMetricStorage.batchCumulate(i,c)},n.prototype.collect=function(o,c){var l=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(o,this._instrumentDescriptor,l,c)},n}(dr);S();function Rn(u,n){var o="";return u.unit!==n.unit&&(o+=" - Unit '"+u.unit+"' does not match '"+n.unit+`'
|
|
6
6
|
`),u.type!==n.type&&(o+=" - Type '"+u.type+"' does not match '"+n.type+`'
|
|
7
7
|
`),u.valueType!==n.valueType&&(o+=" - Value Type '"+u.valueType+"' does not match '"+n.valueType+`'
|
|
8
8
|
`),u.description!==n.description&&(o+=" - Description '"+u.description+"' does not match '"+n.description+`'
|
|
9
|
-
`),o}function
|
|
9
|
+
`),o}function sf(u,n){return" - use valueType '"+u.valueType+"' on instrument creation or use an instrument name other than '"+n.name+"'"}function ff(u,n){return" - use unit '"+u.unit+"' on instrument creation or use an instrument name other than '"+n.name+"'"}function pf(u,n){var o={name:n.name,type:n.type,unit:n.unit},c=JSON.stringify(o);return" - create a new view with a name other than '"+u.name+"' and InstrumentSelector '"+c+"'"}function df(u,n){var o={name:n.name,type:n.type,unit:n.unit},c=JSON.stringify(o);return" - create a new view with a name other than '"+u.name+"' and InstrumentSelector '"+c+`'
|
|
10
10
|
- OR - create a new view with the name `+u.name+" and description '"+u.description+"' and InstrumentSelector "+c+`
|
|
11
|
-
- OR - create a new view with the name `+n.name+" and description '"+u.description+"' and InstrumentSelector "+c}function Ln(u,n){return u.valueType!==n.valueType?
|
|
11
|
+
- OR - create a new view with the name `+n.name+" and description '"+u.description+"' and InstrumentSelector "+c}function Ln(u,n){return u.valueType!==n.valueType?sf(u,n):u.unit!==n.unit?ff(u,n):u.type!==n.type?pf(u,n):u.description!==n.description?df(u,n):""}var In=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},La=function(){function u(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}return u.create=function(){return new u},u.prototype.getStorages=function(n){var o,c,l,i,e=[];try{for(var t=In(this._sharedRegistry.values()),r=t.next();!r.done;r=t.next()){var a=r.value;e=e.concat(a)}}catch(b){o={error:b}}finally{try{r&&!r.done&&(c=t.return)&&c.call(t)}finally{if(o)throw o.error}}var s=this._perCollectorRegistry.get(n);if(s!=null)try{for(var d=In(s.values()),v=d.next();!v.done;v=d.next()){var a=v.value;e=e.concat(a)}}catch(b){l={error:b}}finally{try{v&&!v.done&&(i=d.return)&&i.call(d)}finally{if(l)throw l.error}}return e},u.prototype.register=function(n){this._registerStorage(n,this._sharedRegistry)},u.prototype.registerForCollector=function(n,o){var c=this._perCollectorRegistry.get(n);c==null&&(c=new Map,this._perCollectorRegistry.set(n,c)),this._registerStorage(o,c)},u.prototype.findOrUpdateCompatibleStorage=function(n){var o=this._sharedRegistry.get(n.name);return o===void 0?null:this._findOrUpdateCompatibleStorage(n,o)},u.prototype.findOrUpdateCompatibleCollectorStorage=function(n,o){var c=this._perCollectorRegistry.get(n);if(c===void 0)return null;var l=c.get(o.name);return l===void 0?null:this._findOrUpdateCompatibleStorage(o,l)},u.prototype._registerStorage=function(n,o){var c=n.getInstrumentDescriptor(),l=o.get(c.name);if(l===void 0){o.set(c.name,[n]);return}l.push(n)},u.prototype._findOrUpdateCompatibleStorage=function(n,o){var c,l,i=null;try{for(var e=In(o),t=e.next();!t.done;t=e.next()){var r=t.value,a=r.getInstrumentDescriptor();va(a,n)?(a.description!==n.description&&(n.description.length>a.description.length&&r.updateDescription(n.description),y.diag.warn("A view or instrument with the name ",n.name,` has already been registered, but has a different description and is incompatible with another registered view.
|
|
12
12
|
`,`Details:
|
|
13
13
|
`,Rn(a,n),`The longer description will be used.
|
|
14
14
|
To resolve the conflict:`,Ln(a,n))),i=r):y.diag.warn("A view or instrument with the name ",n.name,` has already been registered and is incompatible with another registered view.
|
|
15
15
|
`,`Details:
|
|
16
16
|
`,Rn(a,n),`To resolve the conflict:
|
|
17
|
-
`,Ln(a,n))}}catch(s){c={error:s}}finally{try{t&&!t.done&&(l=e.return)&&l.call(e)}finally{if(c)throw c.error}}return i},u}();var La=function(){function u(n){this._backingStorages=n}return u.prototype.record=function(n,o,c,l){this._backingStorages.forEach(function(i){i.record(n,o,c,l)})},u}();S();S();var Ia=function(){function u(n,o){this._instrumentName=n,this._valueType=o,this._buffer=new et}return u.prototype.observe=function(n,o){if(o===void 0&&(o={}),typeof n!="number"){y.diag.warn("non-number value provided to metric "+this._instrumentName+": "+n);return}this._valueType===y.ValueType.INT&&!Number.isInteger(n)&&(y.diag.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),n=Math.trunc(n),!Number.isInteger(n))||this._buffer.set(o,n)},u}();var wa=function(){function u(){this._buffer=new Map}return u.prototype.observe=function(n,o,c){if(c===void 0&&(c={}),!!ye(n)){var l=this._buffer.get(n);if(l==null&&(l=new et,this._buffer.set(n,l)),typeof o!="number"){y.diag.warn("non-number value provided to metric "+n._descriptor.name+": "+o);return}n._descriptor.valueType===y.ValueType.INT&&!Number.isInteger(o)&&(y.diag.warn("INT value type cannot accept a floating-point value for "+n._descriptor.name+", ignoring the fractional digits."),o=Math.trunc(o),!Number.isInteger(o))||l.set(c,o)}},u}();var wn=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},Cn=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Ca=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},Ua=function(u,n,o){if(o||arguments.length===2)for(var c=0,l=n.length,i;c<l;c++)(i||!(c in n))&&(i||(i=Array.prototype.slice.call(n,0,c)),i[c]=n[c]);return u.concat(i||Array.prototype.slice.call(n))},Ma=function(){function u(){this._callbacks=[],this._batchCallbacks=[]}return u.prototype.addCallback=function(n,o){var c=this._findCallback(n,o);c>=0||this._callbacks.push({callback:n,instrument:o})},u.prototype.removeCallback=function(n,o){var c=this._findCallback(n,o);c<0||this._callbacks.splice(c,1)},u.prototype.addBatchCallback=function(n,o){var c=new Set(o.filter(ye));if(c.size===0){y.diag.error("BatchObservableCallback is not associated with valid instruments",o);return}var l=this._findBatchCallback(n,c);l>=0||this._batchCallbacks.push({callback:n,instruments:c})},u.prototype.removeBatchCallback=function(n,o){var c=new Set(o.filter(ye)),l=this._findBatchCallback(n,c);l<0||this._batchCallbacks.splice(l,1)},u.prototype.observe=function(n,o){return wn(this,void 0,void 0,function(){var c,l,i,e;return Cn(this,function(t){switch(t.label){case 0:return c=this._observeCallbacks(n,o),l=this._observeBatchCallbacks(n,o),[4,fa(Ua(Ua([],Ca(c),!1),Ca(l),!1))];case 1:return i=t.sent(),e=i.filter(pa).map(function(r){return r.reason}),[2,e]}})})},u.prototype._observeCallbacks=function(n,o){var c=this;return this._callbacks.map(function(l){var i=l.callback,e=l.instrument;return wn(c,void 0,void 0,function(){var t,r;return Cn(this,function(a){switch(a.label){case 0:return t=new Ia(e._descriptor.name,e._descriptor.valueType),r=Promise.resolve(i(t)),o!=null&&(r=Nn(r,o)),[4,r];case 1:return a.sent(),e._metricStorages.forEach(function(s){s.record(t._buffer,n)}),[2]}})})})},u.prototype._observeBatchCallbacks=function(n,o){var c=this;return this._batchCallbacks.map(function(l){var i=l.callback,e=l.instruments;return wn(c,void 0,void 0,function(){var t,r;return Cn(this,function(a){switch(a.label){case 0:return t=new wa,r=Promise.resolve(i(t)),o!=null&&(r=Nn(r,o)),[4,r];case 1:return a.sent(),e.forEach(function(s){var d=t._buffer.get(s);d!=null&&s._metricStorages.forEach(function(v){v.record(d,n)})}),[2]}})})})},u.prototype._findCallback=function(n,o){return this._callbacks.findIndex(function(c){return c.callback===n&&c.instrument===o})},u.prototype._findBatchCallback=function(n,o){return this._batchCallbacks.findIndex(function(c){return c.callback===n&&da(c.instruments,o)})},u}();var pf=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),Da=function(u){pf(n,u);function n(o,c,l,i){var e=u.call(this,o)||this;return e._attributesProcessor=l,e._deltaMetricStorage=new yr(c),e._temporalMetricStorage=new hr(c,i),e}return n.prototype.record=function(o,c,l,i){c=this._attributesProcessor.process(c,l),this._deltaMetricStorage.record(o,c,l,i)},n.prototype.collect=function(o,c){var l=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(o,this._instrumentDescriptor,l,c)},n}(dr);var Ba=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),mr=function(){function u(){}return u.Noop=function(){return yf},u}();var df=function(u){Ba(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n.prototype.process=function(o,c){return o},n}(mr);var Hh=function(u){Ba(n,u);function n(o){var c=u.call(this)||this;return c._allowedAttributeNames=o,c}return n.prototype.process=function(o,c){var l=this,i={};return Object.keys(o).filter(function(e){return l._allowedAttributeNames.includes(e)}).forEach(function(e){return i[e]=o[e]}),i},n}(mr);var yf=new df;var hf=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},mf=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},vf=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},ka=function(){function u(n,o){this._meterProviderSharedState=n,this._instrumentationScope=o,this.metricStorageRegistry=new Ra,this.observableRegistry=new Ma,this.meter=new Aa(this)}return u.prototype.registerMetricStorage=function(n){var o=this._registerMetricStorage(n,Da);return o.length===1?o[0]:new La(o)},u.prototype.registerAsyncMetricStorage=function(n){var o=this._registerMetricStorage(n,xa);return o},u.prototype.collect=function(n,o,c){return hf(this,void 0,void 0,function(){var l,i,e;return mf(this,function(t){switch(t.label){case 0:return[4,this.observableRegistry.observe(o,c?.timeoutMillis)];case 1:return l=t.sent(),i=this.metricStorageRegistry.getStorages(n),i.length===0?[2,null]:(e=i.map(function(r){return r.collect(n,o)}).filter(la),e.length===0?[2,{errors:l}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:e},errors:l}])}})})},u.prototype._registerMetricStorage=function(n,o){var c=this,l=this._meterProviderSharedState.viewRegistry.findViews(n,this._instrumentationScope),i=l.map(function(r){var a=ha(r,n),s=c.metricStorageRegistry.findOrUpdateCompatibleStorage(a);if(s!=null)return s;var d=r.aggregation.createAggregator(a),v=new o(a,d,r.attributesProcessor,c._meterProviderSharedState.metricCollectors);return c.metricStorageRegistry.register(v),v});if(i.length===0){var e=this._meterProviderSharedState.selectAggregations(n.type),t=e.map(function(r){var a=vf(r,2),s=a[0],d=a[1],v=c.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(s,n);if(v!=null)return v;var b=d.createAggregator(n),g=new o(n,b,mr.Noop(),[s]);return c.metricStorageRegistry.registerForCollector(s,g),g});i=i.concat(t)}return i},u}();var _f=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Va=function(){function u(n){this.resource=n,this.viewRegistry=new va,this.metricCollectors=[],this.meterSharedStates=new Map}return u.prototype.getMeterSharedState=function(n){var o=sa(n),c=this.meterSharedStates.get(o);return c==null&&(c=new ka(this,n),this.meterSharedStates.set(o,c)),c},u.prototype.selectAggregations=function(n){var o,c,l=[];try{for(var i=_f(this.metricCollectors),e=i.next();!e.done;e=i.next()){var t=e.value;l.push([t,t.selectAggregation(n)])}}catch(r){o={error:r}}finally{try{e&&!e.done&&(c=i.return)&&c.call(i)}finally{if(o)throw o.error}}return l},u}();var Ga=N(U()),vr=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},_r=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Ef=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},bf=function(u,n,o){if(o||arguments.length===2)for(var c=0,l=n.length,i;c<l;c++)(i||!(c in n))&&(i||(i=Array.prototype.slice.call(n,0,c)),i[c]=n[c]);return u.concat(i||Array.prototype.slice.call(n))},Ha=function(){function u(n,o){this._sharedState=n,this._metricReader=o}return u.prototype.collect=function(n){return vr(this,void 0,void 0,function(){var o,c,l,i,e=this;return _r(this,function(t){switch(t.label){case 0:return o=(0,Ga.millisToHrTime)(Date.now()),c=[],l=[],i=Array.from(this._sharedState.meterSharedStates.values()).map(function(r){return vr(e,void 0,void 0,function(){var a;return _r(this,function(s){switch(s.label){case 0:return[4,r.collect(this,o,n)];case 1:return a=s.sent(),a?.scopeMetrics!=null&&c.push(a.scopeMetrics),a?.errors!=null&&l.push.apply(l,bf([],Ef(a.errors),!1)),[2]}})})}),[4,Promise.all(i)];case 1:return t.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:c},errors:l}]}})})},u.prototype.forceFlush=function(n){return vr(this,void 0,void 0,function(){return _r(this,function(o){switch(o.label){case 0:return[4,this._metricReader.forceFlush(n)];case 1:return o.sent(),[2]}})})},u.prototype.shutdown=function(n){return vr(this,void 0,void 0,function(){return _r(this,function(o){switch(o.label){case 0:return[4,this._metricReader.shutdown(n)];case 1:return o.sent(),[2]}})})},u.prototype.selectAggregationTemporality=function(n){return this._metricReader.selectAggregationTemporality(n)},u.prototype.selectAggregation=function(n){return this._metricReader.selectAggregation(n)},u}();var ja=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},Fa=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Sf=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Un=function(){function u(n){var o,c,l;this._shutdown=!1;var i=q.default().merge((l=n?.resource)!==null&&l!==void 0?l:q.empty());if(this._sharedState=new Va(i),n?.views!=null&&n.views.length>0)try{for(var e=Sf(n.views),t=e.next();!t.done;t=e.next()){var r=t.value;this._sharedState.viewRegistry.addView(r)}}catch(a){o={error:a}}finally{try{t&&!t.done&&(c=e.return)&&c.call(e)}finally{if(o)throw o.error}}}return u.prototype.getMeter=function(n,o,c){return o===void 0&&(o=""),c===void 0&&(c={}),this._shutdown?(y.diag.warn("A shutdown MeterProvider cannot provide a Meter"),(0,y.createNoopMeter)()):this._sharedState.getMeterSharedState({name:n,version:o,schemaUrl:c.schemaUrl}).meter},u.prototype.addMetricReader=function(n){var o=new Ha(this._sharedState,n);n.setMetricProducer(o),this._sharedState.metricCollectors.push(o)},u.prototype.shutdown=function(n){return ja(this,void 0,void 0,function(){return Fa(this,function(o){switch(o.label){case 0:return this._shutdown?(y.diag.warn("shutdown may only be called once per MeterProvider"),[2]):(this._shutdown=!0,[4,Promise.all(this._sharedState.metricCollectors.map(function(c){return c.shutdown(n)}))]);case 1:return o.sent(),[2]}})})},u.prototype.forceFlush=function(n){return ja(this,void 0,void 0,function(){return Fa(this,function(o){switch(o.label){case 0:return this._shutdown?(y.diag.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._sharedState.metricCollectors.map(function(c){return c.forceFlush(n)}))];case 1:return o.sent(),[2]}})})},u}();var Tl=N(Et(),1),ae=N(Ie(),1),Ol=N(Ya(),1),it=N(U(),1);S();var Pf=Symbol.for("@vercel/request-context");function Sr(){return globalThis[Pf]?.get()}var Bn=N(Et(),1);function Tr(u){return Object.fromEntries(Object.entries(u).filter(([n,o])=>o!==void 0))}function Ja(u){return u?u.split("::").at(-1):void 0}function za(u=Sr()){if(u)return Tr({[Bn.SemanticAttributes.HTTP_HOST]:u.headers.host,[Bn.SemanticAttributes.HTTP_USER_AGENT]:u.headers["user-agent"],"http.referer":u.headers.referer,"vercel.request_id":Ja(u.headers["x-vercel-id"]),"vercel.matched_path":u.headers["x-matched-path"],"vercel.edge_region":u.headers["x-vercel-edge-region"]})}var Or=class{constructor(n){this.processors=n;this.rootSpanIds=new Map;this.waitSpanEnd=new Map}forceFlush(){return Promise.all(this.processors.map(n=>n.forceFlush().catch(o=>{y.diag.error("@vercel/otel: forceFlush failed:",o)}))).then(()=>{})}shutdown(){return Promise.all(this.processors.map(n=>n.shutdown().catch(()=>{}))).then(()=>{})}onStart(n,o){let{traceId:c,spanId:l,traceFlags:i}=n.spanContext(),e=!n.parentSpanId||!this.rootSpanIds.has(c);if(e&&this.rootSpanIds.set(c,l),e&&xf(i)){let t=za();t&&n.setAttributes(t);let r=Sr();r&&r.waitUntil(async()=>{if(this.rootSpanIds.has(c)){let a=new Promise(d=>{this.waitSpanEnd.set(c,d)}),s;await Promise.race([a,new Promise(d=>{s=setTimeout(()=>{this.waitSpanEnd.delete(c),d(void 0)},50)})]),s&&clearTimeout(s)}return this.forceFlush()})}for(let t of this.processors)t.onStart(n,o)}onEnd(n){let{traceId:o,spanId:c}=n.spanContext(),l=this.rootSpanIds.get(o)===c;for(let i of this.processors)i.onEnd(n);if(l){this.rootSpanIds.delete(o);let i=this.waitSpanEnd.get(o);i&&(this.waitSpanEnd.delete(o),i())}}};function xf(u){return(u&y.TraceFlags.SAMPLED)!==0}var lu=N(qn(),1);var uu=N(Pr(),1);S();var $t=class extends uu.OTLPExporterBase{constructor(n={}){super(n),n.headers&&(this._headers=n.headers)}onShutdown(){y.diag.debug("@vercel/otel/otlp: onShutdown")}onInit(){y.diag.debug("@vercel/otel/otlp: onInit")}send(n,o,c){if(this._shutdownOnce.isCalled){y.diag.debug("@vercel/otel/otlp: Shutdown already started. Cannot send objects");return}let l=this.convert(n),i,e,t;try{({body:i,contentType:e,headers:t}=this.toMessage(l))}catch(a){y.diag.warn("@vercel/otel/otlp: no proto",a);return}let r=fetch(this.url,{method:"POST",body:i,headers:{...this._headers,...t,"Content-Type":e,"User-Agent":"OTel-OTLP-Exporter-JavaScript/0.46.0"},next:{internal:!0}}).then(a=>{y.diag.debug("@vercel/otel/otlp: onSuccess",a.status,a.statusText),o(),a.arrayBuffer().catch(()=>{})}).catch(a=>{y.diag.error("@vercel/otel/otlp: onError",a),c(a)}).finally(()=>{let a=this._sendingPromises.indexOf(r);this._sendingPromises.splice(a,1)});this._sendingPromises.push(r)}getDefaultUrl(n){throw new Error("Method not implemented.")}};var zf="v1/traces",Wf=`http://localhost:4318/${zf}`;function xr(u){return typeof u.url=="string"?u.url:Wf}var Qt=class extends $t{convert(n){return(0,lu.createExportTraceServiceRequest)(n,{useHex:!0,useLongBits:!1})}toMessage(n){return{body:JSON.stringify(n),contentType:"application/json"}}getDefaultUrl(n){return xr(n)}};var ml=N(qn(),1),vl=N(hl(),1),_l=N(yo(),1);var Gt=class extends $t{convert(n){return(0,ml.createExportTraceServiceRequest)(n,void 0)}toMessage(n){let o=vl.ServiceClientType.SPANS,c=(0,_l.getExportRequestProto)(o),l=c.create(n);return{body:c.encode(l).finish(),contentType:"application/x-protobuf",headers:{accept:"application/x-protobuf"}}}getDefaultUrl(n){return xr(n)}};S();var Lt=N(Et(),1),oe=class{constructor(n={}){this.instrumentationName="@vercel/otel/fetch";this.instrumentationVersion="1.0.0";this.config=n}getConfig(){return this.config}setConfig(){}setTracerProvider(n){this.tracerProvider=n}setMeterProvider(){}enable(){this.disable();let{tracerProvider:n}=this;if(!n)return;let o=n.getTracer(this.instrumentationName,this.instrumentationVersion),c=this.config.ignoreUrls??[],l=d=>{if(c.length===0)return!1;let v=d.toString();return c.some(b=>typeof b=="string"?v.startsWith(b):b.test(v))},i=process.env.VERCEL_URL||process.env.NEXT_PUBLIC_VERCEL_URL||null,e=this.config.propagateContextUrls??[],t=this.config.dontPropagateContextUrls??[],r=d=>{let v=d.toString();return t.length>0&&t.some(b=>typeof b=="string"?v.startsWith(b):b.test(v))?!1:i&&d.protocol==="https:"&&d.host===i?!0:e.some(b=>typeof b=="string"?v.startsWith(b):b.test(v))};process.env.NEXT_OTEL_FETCH_DISABLED="1";let a=globalThis.fetch;this.originalFetch=a;let s=(d,v)=>{if(v?.next?.internal)return a(d,v);let b=new Request(d,v),g=new URL(b.url);return l(g)?a(d,v):o.startActiveSpan(`fetch ${b.method} ${b.url}`,{kind:y.SpanKind.CLIENT,attributes:{[Lt.SemanticAttributes.HTTP_METHOD]:b.method,[Lt.SemanticAttributes.HTTP_URL]:b.url,[Lt.SemanticAttributes.HTTP_HOST]:g.host,[Lt.SemanticAttributes.HTTP_SCHEME]:g.protocol.replace(":",""),[Lt.SemanticAttributes.NET_PEER_NAME]:g.hostname,[Lt.SemanticAttributes.NET_PEER_PORT]:g.port}},async G=>{r(g)&&y.propagation.inject(y.context.active(),b.headers,Op);try{let B=await a(d,{...v,headers:b.headers});return G.setAttribute(Lt.SemanticAttributes.HTTP_STATUS_CODE,B.status),B.status>=500&&G.setStatus({code:y.SpanStatusCode.ERROR,message:`Status: ${B.status} (${B.statusText})`}),G.end(),B}catch(B){throw B instanceof Error?(G.recordException(B),G.setStatus({code:y.SpanStatusCode.ERROR,message:B.message})):G.setStatus({code:y.SpanStatusCode.ERROR,message:String(B)}),G.end(),B}})};globalThis.fetch=s}disable(){this.originalFetch&&(globalThis.fetch=this.originalFetch)}},Op={set(u,n,o){u.set(n,o)}};var kr=class{constructor(n={}){this.configuration=n}start(){let n=gp(),o=(0,ae.getEnvWithoutDefaults)(),c=this.configuration,l=process.env.NEXT_RUNTIME||"nodejs",i=!!n.OTEL_SDK_DISABLED;if(o.OTEL_LOG_LEVEL&&y.diag.setLogger(new y.DiagConsoleLogger,{logLevel:o.OTEL_LOG_LEVEL}),i)return;let e=c.idGenerator??new ar,t=c.contextManager??new Ol.AsyncLocalStorageContextManager;t.enable(),this.contextManager=t;let r=n.OTEL_SERVICE_NAME||c.serviceName||"app",a=new q(Tr({[Tl.SemanticResourceAttributes.SERVICE_NAME]:r,"node.ci":process.env.CI?!0:void 0,"node.env":"production","vercel.env":process.env.VERCEL_ENV||process.env.NEXT_PUBLIC_VERCEL_ENV,"vercel.region":process.env.VERCEL_REGION,"vercel.runtime":l,"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})),s=c.resourceDetectors??[Vi];if(c.autoDetectResources??!0){let $={detectors:s};a=a.merge(Hi($))}let v=Np(c.propagators,n),b=Pp(c.traceSampler,n),g=xp(c.spanProcessors,c,n);g.length===0&&y.diag.warn("@vercel/otel: No span processors configured. No spans will be exported.");let G=c.spanLimits,B=new Ki({resource:a,idGenerator:e,sampler:b,spanLimits:G});if(B.addSpanProcessor(new Or(g)),B.register({contextManager:t,propagator:new it.CompositePropagator({propagators:v})}),this.tracerProvider=B,c.logRecordProcessor){let $=new An({resource:a});this.loggerProvider=$,$.addLogRecordProcessor(c.logRecordProcessor),st.logs.setGlobalLoggerProvider($)}if(c.metricReader||c.views){let $=new Un({resource:a,views:c.views??[]});c.metricReader&&$.addMetricReader(c.metricReader),y.metrics.setGlobalMeterProvider($),this.meterProvider=$}let yt=Ap(c.instrumentations,c.instrumentationConfig);this.disableInstumentations=(0,Sl.registerInstrumentations)({instrumentations:yt}),y.diag.info("@vercel/otel: started",r,l)}async shutdown(){let n=[];this.tracerProvider&&n.push(this.tracerProvider.shutdown()),this.loggerProvider&&n.push(this.loggerProvider.shutdown()),this.meterProvider&&n.push(this.meterProvider.shutdown()),y.diag.info("@vercel/otel: shutting down",n.length,process.env.NEXT_RUNTIME),await Promise.all(n),this.contextManager&&this.contextManager.disable();let{disableInstumentations:o}=this;o&&o()}};function gp(){let u=(0,ae.parseEnvironment)(process.env);return{...ae.DEFAULT_ENVIRONMENT,...u}}function Ap(u,n){return(u??["auto"]).map(o=>o==="auto"?(y.diag.debug("@vercel/otel: Configure instrumentations: fetch",n?.fetch),[new oe(n?.fetch)]):o==="fetch"?(y.diag.debug("@vercel/otel: Configure instrumentations: fetch",n?.fetch),new oe(n?.fetch)):o).flat()}function Np(u,n){let o=n.OTEL_PROPAGATORS&&n.OTEL_PROPAGATORS.length>0?n.OTEL_PROPAGATORS:void 0;return(u??o??["auto"]).map(c=>{if(c==="none")return[];if(c==="auto")return y.diag.debug("@vercel/otel: Configure propagators: tracecontext, baggage"),[new it.W3CTraceContextPropagator,new it.W3CBaggagePropagator];if(c==="tracecontext")return y.diag.debug("@vercel/otel: Configure propagator: tracecontext"),new it.W3CTraceContextPropagator;if(c==="baggage")return y.diag.debug("@vercel/otel: Configure propagator: baggage"),new it.W3CBaggagePropagator;if(typeof c=="string")throw new Error(`Unknown propagator: "${c}"`);return c}).flat()}var El="always_on",ie=1;function Pp(u,n){if(u&&typeof u!="string")return u;let o=u&&u!=="auto"?u:n.OTEL_TRACES_SAMPLER||El;switch(y.diag.debug("@vercel/otel: Configure sampler: ",o),o){case"always_on":return new J;case"always_off":return new ct;case"parentbased_always_on":return new St({root:new J});case"parentbased_always_off":return new St({root:new ct});case"traceidratio":return new Kt(bl(n));case"parentbased_traceidratio":return new St({root:new Kt(bl(n))});default:return y.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER value "${String(n.OTEL_TRACES_SAMPLER)} invalid, defaulting to ${El}".`),new J}}function bl(u){if(u.OTEL_TRACES_SAMPLER_ARG===void 0||u.OTEL_TRACES_SAMPLER_ARG==="")return y.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${ie}.`),ie;y.diag.debug("@vercel/otel: Configure sampler probability: ",u.OTEL_TRACES_SAMPLER_ARG);let n=Number(u.OTEL_TRACES_SAMPLER_ARG);return isNaN(n)?(y.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${u.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${ie}.`),ie):n<0||n>1?(y.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 ${ie}.`),ie):n}function xp(u,n,o){return(u??["auto"]).map(c=>{if(c==="auto"){if(process.env.VERCEL_OTEL_ENDPOINTS){let l=process.env.VERCEL_OTEL_ENDPOINTS_PORT||"4318",i=process.env.VERCEL_OTEL_ENDPOINTS_PROTOCOL||"http/protobuf";y.diag.debug("@vercel/otel: Configure vercel otel collector on port: ",l,i);let e={url:`http://localhost:${l}/v1/traces`,headers:{}},t=i==="http/protobuf"?new Gt(e):new Qt(e);return new de(t)}return n.traceExporter||o.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT||o.OTEL_EXPORTER_OTLP_ENDPOINT?new de(Rp(n.traceExporter,o)):void 0}return c}).filter(wp)}function Rp(u,n){if(u&&u!=="auto")return u;let o=process.env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL??process.env.OTEL_EXPORTER_OTLP_PROTOCOL??"http/protobuf",c=Ip(n),l={...it.baggageUtils.parseKeyPairsIntoRecord(n.OTEL_EXPORTER_OTLP_HEADERS),...it.baggageUtils.parseKeyPairsIntoRecord(n.OTEL_EXPORTER_OTLP_TRACES_HEADERS)};switch(y.diag.debug("@vercel/otel: Configure trace exporter: ",o,c,`headers: ${Object.keys(l).join(",")||"<none>"}`),o){case"http/json":return new Qt({url:c,headers:l});case"http/protobuf":return new Gt({url:c,headers:l});default:return y.diag.warn(`@vercel/otel: Unsupported OTLP traces protocol: ${o}. Using http/protobuf.`),new Gt}}var gl="v1/traces",Lp=`http://localhost:4318/${gl}`;function Ip(u){let n=u.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT;if(n&&typeof n=="string")return n;let o=u.OTEL_EXPORTER_OTLP_ENDPOINT;return o&&typeof o=="string"?`${o}/${gl}`:Lp}function wp(u){return u!=null}function Rv(u){let n;u?typeof u=="string"?n={serviceName:u}:n=u:n={},new kr(n).start()}export{oe as FetchInstrumentation,Qt as OTLPHttpJsonTraceExporter,Gt as OTLPHttpProtoTraceExporter,Rv as registerOTel};
|
|
17
|
+
`,Ln(a,n))}}catch(s){c={error:s}}finally{try{t&&!t.done&&(l=e.return)&&l.call(e)}finally{if(c)throw c.error}}return i},u}();var Ia=function(){function u(n){this._backingStorages=n}return u.prototype.record=function(n,o,c,l){this._backingStorages.forEach(function(i){i.record(n,o,c,l)})},u}();S();S();var wa=function(){function u(n,o){this._instrumentName=n,this._valueType=o,this._buffer=new et}return u.prototype.observe=function(n,o){if(o===void 0&&(o={}),typeof n!="number"){y.diag.warn("non-number value provided to metric "+this._instrumentName+": "+n);return}this._valueType===y.ValueType.INT&&!Number.isInteger(n)&&(y.diag.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),n=Math.trunc(n),!Number.isInteger(n))||this._buffer.set(o,n)},u}();var Ca=function(){function u(){this._buffer=new Map}return u.prototype.observe=function(n,o,c){if(c===void 0&&(c={}),!!ye(n)){var l=this._buffer.get(n);if(l==null&&(l=new et,this._buffer.set(n,l)),typeof o!="number"){y.diag.warn("non-number value provided to metric "+n._descriptor.name+": "+o);return}n._descriptor.valueType===y.ValueType.INT&&!Number.isInteger(o)&&(y.diag.warn("INT value type cannot accept a floating-point value for "+n._descriptor.name+", ignoring the fractional digits."),o=Math.trunc(o),!Number.isInteger(o))||l.set(c,o)}},u}();var wn=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},Cn=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Ua=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},Ma=function(u,n,o){if(o||arguments.length===2)for(var c=0,l=n.length,i;c<l;c++)(i||!(c in n))&&(i||(i=Array.prototype.slice.call(n,0,c)),i[c]=n[c]);return u.concat(i||Array.prototype.slice.call(n))},Da=function(){function u(){this._callbacks=[],this._batchCallbacks=[]}return u.prototype.addCallback=function(n,o){var c=this._findCallback(n,o);c>=0||this._callbacks.push({callback:n,instrument:o})},u.prototype.removeCallback=function(n,o){var c=this._findCallback(n,o);c<0||this._callbacks.splice(c,1)},u.prototype.addBatchCallback=function(n,o){var c=new Set(o.filter(ye));if(c.size===0){y.diag.error("BatchObservableCallback is not associated with valid instruments",o);return}var l=this._findBatchCallback(n,c);l>=0||this._batchCallbacks.push({callback:n,instruments:c})},u.prototype.removeBatchCallback=function(n,o){var c=new Set(o.filter(ye)),l=this._findBatchCallback(n,c);l<0||this._batchCallbacks.splice(l,1)},u.prototype.observe=function(n,o){return wn(this,void 0,void 0,function(){var c,l,i,e;return Cn(this,function(t){switch(t.label){case 0:return c=this._observeCallbacks(n,o),l=this._observeBatchCallbacks(n,o),[4,pa(Ma(Ma([],Ua(c),!1),Ua(l),!1))];case 1:return i=t.sent(),e=i.filter(da).map(function(r){return r.reason}),[2,e]}})})},u.prototype._observeCallbacks=function(n,o){var c=this;return this._callbacks.map(function(l){var i=l.callback,e=l.instrument;return wn(c,void 0,void 0,function(){var t,r;return Cn(this,function(a){switch(a.label){case 0:return t=new wa(e._descriptor.name,e._descriptor.valueType),r=Promise.resolve(i(t)),o!=null&&(r=Nn(r,o)),[4,r];case 1:return a.sent(),e._metricStorages.forEach(function(s){s.record(t._buffer,n)}),[2]}})})})},u.prototype._observeBatchCallbacks=function(n,o){var c=this;return this._batchCallbacks.map(function(l){var i=l.callback,e=l.instruments;return wn(c,void 0,void 0,function(){var t,r;return Cn(this,function(a){switch(a.label){case 0:return t=new Ca,r=Promise.resolve(i(t)),o!=null&&(r=Nn(r,o)),[4,r];case 1:return a.sent(),e.forEach(function(s){var d=t._buffer.get(s);d!=null&&s._metricStorages.forEach(function(v){v.record(d,n)})}),[2]}})})})},u.prototype._findCallback=function(n,o){return this._callbacks.findIndex(function(c){return c.callback===n&&c.instrument===o})},u.prototype._findBatchCallback=function(n,o){return this._batchCallbacks.findIndex(function(c){return c.callback===n&&ya(c.instruments,o)})},u}();var yf=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),Ba=function(u){yf(n,u);function n(o,c,l,i){var e=u.call(this,o)||this;return e._attributesProcessor=l,e._deltaMetricStorage=new yr(c),e._temporalMetricStorage=new hr(c,i),e}return n.prototype.record=function(o,c,l,i){c=this._attributesProcessor.process(c,l),this._deltaMetricStorage.record(o,c,l,i)},n.prototype.collect=function(o,c){var l=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(o,this._instrumentDescriptor,l,c)},n}(dr);var ka=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),mr=function(){function u(){}return u.Noop=function(){return mf},u}();var hf=function(u){ka(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n.prototype.process=function(o,c){return o},n}(mr);var qh=function(u){ka(n,u);function n(o){var c=u.call(this)||this;return c._allowedAttributeNames=o,c}return n.prototype.process=function(o,c){var l=this,i={};return Object.keys(o).filter(function(e){return l._allowedAttributeNames.includes(e)}).forEach(function(e){return i[e]=o[e]}),i},n}(mr);var mf=new hf;var vf=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},_f=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Ef=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},Va=function(){function u(n,o){this._meterProviderSharedState=n,this._instrumentationScope=o,this.metricStorageRegistry=new La,this.observableRegistry=new Da,this.meter=new Na(this)}return u.prototype.registerMetricStorage=function(n){var o=this._registerMetricStorage(n,Ba);return o.length===1?o[0]:new Ia(o)},u.prototype.registerAsyncMetricStorage=function(n){var o=this._registerMetricStorage(n,Ra);return o},u.prototype.collect=function(n,o,c){return vf(this,void 0,void 0,function(){var l,i,e;return _f(this,function(t){switch(t.label){case 0:return[4,this.observableRegistry.observe(o,c?.timeoutMillis)];case 1:return l=t.sent(),i=this.metricStorageRegistry.getStorages(n),i.length===0?[2,null]:(e=i.map(function(r){return r.collect(n,o)}).filter(ca),e.length===0?[2,{errors:l}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:e},errors:l}])}})})},u.prototype._registerMetricStorage=function(n,o){var c=this,l=this._meterProviderSharedState.viewRegistry.findViews(n,this._instrumentationScope),i=l.map(function(r){var a=ma(r,n),s=c.metricStorageRegistry.findOrUpdateCompatibleStorage(a);if(s!=null)return s;var d=r.aggregation.createAggregator(a),v=new o(a,d,r.attributesProcessor,c._meterProviderSharedState.metricCollectors);return c.metricStorageRegistry.register(v),v});if(i.length===0){var e=this._meterProviderSharedState.selectAggregations(n.type),t=e.map(function(r){var a=Ef(r,2),s=a[0],d=a[1],v=c.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(s,n);if(v!=null)return v;var b=d.createAggregator(n),g=new o(n,b,mr.Noop(),[s]);return c.metricStorageRegistry.registerForCollector(s,g),g});i=i.concat(t)}return i},u}();var bf=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Ga=function(){function u(n){this.resource=n,this.viewRegistry=new _a,this.metricCollectors=[],this.meterSharedStates=new Map}return u.prototype.getMeterSharedState=function(n){var o=fa(n),c=this.meterSharedStates.get(o);return c==null&&(c=new Va(this,n),this.meterSharedStates.set(o,c)),c},u.prototype.selectAggregations=function(n){var o,c,l=[];try{for(var i=bf(this.metricCollectors),e=i.next();!e.done;e=i.next()){var t=e.value;l.push([t,t.selectAggregation(n)])}}catch(r){o={error:r}}finally{try{e&&!e.done&&(c=i.return)&&c.call(i)}finally{if(o)throw o.error}}return l},u}();var Ha=N(U()),vr=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},_r=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Sf=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},Tf=function(u,n,o){if(o||arguments.length===2)for(var c=0,l=n.length,i;c<l;c++)(i||!(c in n))&&(i||(i=Array.prototype.slice.call(n,0,c)),i[c]=n[c]);return u.concat(i||Array.prototype.slice.call(n))},ja=function(){function u(n,o){this._sharedState=n,this._metricReader=o}return u.prototype.collect=function(n){return vr(this,void 0,void 0,function(){var o,c,l,i,e=this;return _r(this,function(t){switch(t.label){case 0:return o=(0,Ha.millisToHrTime)(Date.now()),c=[],l=[],i=Array.from(this._sharedState.meterSharedStates.values()).map(function(r){return vr(e,void 0,void 0,function(){var a;return _r(this,function(s){switch(s.label){case 0:return[4,r.collect(this,o,n)];case 1:return a=s.sent(),a?.scopeMetrics!=null&&c.push(a.scopeMetrics),a?.errors!=null&&l.push.apply(l,Tf([],Sf(a.errors),!1)),[2]}})})}),[4,Promise.all(i)];case 1:return t.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:c},errors:l}]}})})},u.prototype.forceFlush=function(n){return vr(this,void 0,void 0,function(){return _r(this,function(o){switch(o.label){case 0:return[4,this._metricReader.forceFlush(n)];case 1:return o.sent(),[2]}})})},u.prototype.shutdown=function(n){return vr(this,void 0,void 0,function(){return _r(this,function(o){switch(o.label){case 0:return[4,this._metricReader.shutdown(n)];case 1:return o.sent(),[2]}})})},u.prototype.selectAggregationTemporality=function(n){return this._metricReader.selectAggregationTemporality(n)},u.prototype.selectAggregation=function(n){return this._metricReader.selectAggregation(n)},u}();var Fa=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},qa=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Of=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Un=function(){function u(n){var o,c,l;this._shutdown=!1;var i=q.default().merge((l=n?.resource)!==null&&l!==void 0?l:q.empty());if(this._sharedState=new Ga(i),n?.views!=null&&n.views.length>0)try{for(var e=Of(n.views),t=e.next();!t.done;t=e.next()){var r=t.value;this._sharedState.viewRegistry.addView(r)}}catch(a){o={error:a}}finally{try{t&&!t.done&&(c=e.return)&&c.call(e)}finally{if(o)throw o.error}}}return u.prototype.getMeter=function(n,o,c){return o===void 0&&(o=""),c===void 0&&(c={}),this._shutdown?(y.diag.warn("A shutdown MeterProvider cannot provide a Meter"),(0,y.createNoopMeter)()):this._sharedState.getMeterSharedState({name:n,version:o,schemaUrl:c.schemaUrl}).meter},u.prototype.addMetricReader=function(n){var o=new ja(this._sharedState,n);n.setMetricProducer(o),this._sharedState.metricCollectors.push(o)},u.prototype.shutdown=function(n){return Fa(this,void 0,void 0,function(){return qa(this,function(o){switch(o.label){case 0:return this._shutdown?(y.diag.warn("shutdown may only be called once per MeterProvider"),[2]):(this._shutdown=!0,[4,Promise.all(this._sharedState.metricCollectors.map(function(c){return c.shutdown(n)}))]);case 1:return o.sent(),[2]}})})},u.prototype.forceFlush=function(n){return Fa(this,void 0,void 0,function(){return qa(this,function(o){switch(o.label){case 0:return this._shutdown?(y.diag.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._sharedState.metricCollectors.map(function(c){return c.forceFlush(n)}))];case 1:return o.sent(),[2]}})})},u}();var gl=N(Et(),1),ae=N(Ie(),1),Al=N(Ja(),1),it=N(U(),1);S();var Rf=Symbol.for("@vercel/request-context");function Sr(){return globalThis[Rf]?.get()}var Bn=N(Et(),1);function Tr(u){return Object.fromEntries(Object.entries(u).filter(([n,o])=>o!==void 0))}function za(u){return u?u.split("::").at(-1):void 0}function Wa(u=Sr()){if(u)return Tr({[Bn.SemanticAttributes.HTTP_HOST]:u.headers.host,[Bn.SemanticAttributes.HTTP_USER_AGENT]:u.headers["user-agent"],"http.referer":u.headers.referer,"vercel.request_id":za(u.headers["x-vercel-id"]),"vercel.matched_path":u.headers["x-matched-path"],"vercel.edge_region":u.headers["x-vercel-edge-region"]})}var Or=class{constructor(n){this.processors=n;this.rootSpanIds=new Map;this.waitSpanEnd=new Map}forceFlush(){return Promise.all(this.processors.map(n=>n.forceFlush().catch(o=>{y.diag.error("@vercel/otel: forceFlush failed:",o)}))).then(()=>{})}shutdown(){return Promise.all(this.processors.map(n=>n.shutdown().catch(()=>{}))).then(()=>{})}onStart(n,o){let{traceId:c,spanId:l,traceFlags:i}=n.spanContext(),e=!n.parentSpanId||!this.rootSpanIds.has(c);if(e&&this.rootSpanIds.set(c,l),e&&Lf(i)){let t=Wa();t&&n.setAttributes(t);let r=Sr();r&&r.waitUntil(async()=>{if(this.rootSpanIds.has(c)){let a=new Promise(d=>{this.waitSpanEnd.set(c,d)}),s;await Promise.race([a,new Promise(d=>{s=setTimeout(()=>{this.waitSpanEnd.delete(c),d(void 0)},50)})]),s&&clearTimeout(s)}return this.forceFlush()})}for(let t of this.processors)t.onStart(n,o)}onEnd(n){let{traceId:o,spanId:c}=n.spanContext(),l=this.rootSpanIds.get(o)===c,i=If(n);i&&Object.assign(n.attributes,i);for(let e of this.processors)e.onEnd(n);if(l){this.rootSpanIds.delete(o);let e=this.waitSpanEnd.get(o);e&&(this.waitSpanEnd.delete(o),e())}}};function Lf(u){return(u&y.TraceFlags.SAMPLED)!==0}var $a={[y.SpanKind.INTERNAL]:"internal",[y.SpanKind.SERVER]:"server",[y.SpanKind.CLIENT]:"client",[y.SpanKind.PRODUCER]:"producer",[y.SpanKind.CONSUMER]:"consumer"};function If(u){let{kind:n,attributes:o}=u,{"operation.name":c,"resouce.name":l,"span.type":i,"next.span_type":e,"http.method":t,"http.route":r}=o;if(c)return;let a=u.instrumentationLibrary.name,s=e??i;return s&&typeof s=="string"?{"operation.name":kn(a,s)}:t&&r&&typeof t=="string"&&typeof r=="string"?{"operation.name":kn(a,`http.${$a[n]||"internal"}.request`),"resource.name":l??`${t} ${r}`}:{"operation.name":kn(a,n===y.SpanKind.INTERNAL?"":$a[n])}}function kn(u,n){if(!u)return n;let o=u.replace(/[ @./]/g,"_");return o.startsWith("_")&&(o=o.slice(1)),n?`${o}.${n}`:o}var su=N(Kn(),1);var cu=N(Pr(),1);S();var $t=class extends cu.OTLPExporterBase{constructor(n={}){super(n),n.headers&&(this._headers=n.headers)}onShutdown(){y.diag.debug("@vercel/otel/otlp: onShutdown")}onInit(){y.diag.debug("@vercel/otel/otlp: onInit")}send(n,o,c){if(this._shutdownOnce.isCalled){y.diag.debug("@vercel/otel/otlp: Shutdown already started. Cannot send objects");return}let l=this.convert(n),i,e,t;try{({body:i,contentType:e,headers:t}=this.toMessage(l))}catch(a){y.diag.warn("@vercel/otel/otlp: no proto",a);return}let r=fetch(this.url,{method:"POST",body:i,headers:{...this._headers,...t,"Content-Type":e,"User-Agent":"OTel-OTLP-Exporter-JavaScript/0.46.0"},next:{internal:!0}}).then(a=>{y.diag.debug("@vercel/otel/otlp: onSuccess",a.status,a.statusText),o(),a.arrayBuffer().catch(()=>{})}).catch(a=>{y.diag.error("@vercel/otel/otlp: onError",a),c(a)}).finally(()=>{let a=this._sendingPromises.indexOf(r);this._sendingPromises.splice(a,1)});this._sendingPromises.push(r)}getDefaultUrl(n){throw new Error("Method not implemented.")}};var Qf="v1/traces",Zf=`http://localhost:4318/${Qf}`;function xr(u){return typeof u.url=="string"?u.url:Zf}var Qt=class extends $t{convert(n){return(0,su.createExportTraceServiceRequest)(n,{useHex:!0,useLongBits:!1})}toMessage(n){return{body:JSON.stringify(n),contentType:"application/json"}}getDefaultUrl(n){return xr(n)}};var _l=N(Kn(),1),El=N(vl(),1),bl=N(ho(),1);var Gt=class extends $t{convert(n){return(0,_l.createExportTraceServiceRequest)(n,void 0)}toMessage(n){let o=El.ServiceClientType.SPANS,c=(0,bl.getExportRequestProto)(o),l=c.create(n);return{body:c.encode(l).finish(),contentType:"application/x-protobuf",headers:{accept:"application/x-protobuf"}}}getDefaultUrl(n){return xr(n)}};S();var Lt=N(Et(),1),oe=class{constructor(n={}){this.instrumentationName="@vercel/otel/fetch";this.instrumentationVersion="1.0.0";this.config=n}getConfig(){return this.config}setConfig(){}setTracerProvider(n){this.tracerProvider=n}setMeterProvider(){}enable(){this.disable();let{tracerProvider:n}=this;if(!n)return;let o=n.getTracer(this.instrumentationName,this.instrumentationVersion),c=this.config.ignoreUrls??[],l=d=>{if(c.length===0)return!1;let v=d.toString();return c.some(b=>typeof b=="string"?v.startsWith(b):b.test(v))},i=process.env.VERCEL_URL||process.env.NEXT_PUBLIC_VERCEL_URL||null,e=this.config.propagateContextUrls??[],t=this.config.dontPropagateContextUrls??[],r=d=>{let v=d.toString();return t.length>0&&t.some(b=>typeof b=="string"?v.startsWith(b):b.test(v))?!1:i&&d.protocol==="https:"&&d.host===i?!0:e.some(b=>typeof b=="string"?v.startsWith(b):b.test(v))};process.env.NEXT_OTEL_FETCH_DISABLED="1";let a=globalThis.fetch;this.originalFetch=a;let s=(d,v)=>{if(v?.next?.internal)return a(d,v);let b=new Request(d,v),g=new URL(b.url);return l(g)?a(d,v):o.startActiveSpan(`fetch ${b.method} ${b.url}`,{kind:y.SpanKind.CLIENT,attributes:{[Lt.SemanticAttributes.HTTP_METHOD]:b.method,[Lt.SemanticAttributes.HTTP_URL]:b.url,[Lt.SemanticAttributes.HTTP_HOST]:g.host,[Lt.SemanticAttributes.HTTP_SCHEME]:g.protocol.replace(":",""),[Lt.SemanticAttributes.NET_PEER_NAME]:g.hostname,[Lt.SemanticAttributes.NET_PEER_PORT]:g.port,"operation.name":"fetch","resource.name":`${b.method} ${b.url}`}},async G=>{r(g)&&y.propagation.inject(y.context.active(),b.headers,Np);try{let B=await a(d,{...v,headers:b.headers});return G.setAttribute(Lt.SemanticAttributes.HTTP_STATUS_CODE,B.status),B.status>=500&&G.setStatus({code:y.SpanStatusCode.ERROR,message:`Status: ${B.status} (${B.statusText})`}),G.end(),B}catch(B){throw B instanceof Error?(G.recordException(B),G.setStatus({code:y.SpanStatusCode.ERROR,message:B.message})):G.setStatus({code:y.SpanStatusCode.ERROR,message:String(B)}),G.end(),B}})};globalThis.fetch=s}disable(){this.originalFetch&&(globalThis.fetch=this.originalFetch)}},Np={set(u,n,o){u.set(n,o)}};var kr=class{constructor(n={}){this.configuration=n}start(){let n=Pp(),o=(0,ae.getEnvWithoutDefaults)(),c=this.configuration,l=process.env.NEXT_RUNTIME||"nodejs",i=!!n.OTEL_SDK_DISABLED;if(o.OTEL_LOG_LEVEL&&y.diag.setLogger(new y.DiagConsoleLogger,{logLevel:o.OTEL_LOG_LEVEL}),i)return;let e=c.idGenerator??new ar,t=c.contextManager??new Al.AsyncLocalStorageContextManager;t.enable(),this.contextManager=t;let r=n.OTEL_SERVICE_NAME||c.serviceName||"app",a=new q(Tr({[gl.SemanticResourceAttributes.SERVICE_NAME]:r,"node.ci":process.env.CI?!0:void 0,"node.env":"production","vercel.env":process.env.VERCEL_ENV||process.env.NEXT_PUBLIC_VERCEL_ENV,"vercel.region":process.env.VERCEL_REGION,"vercel.runtime":l,"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})),s=c.resourceDetectors??[Gi];if(c.autoDetectResources??!0){let $={detectors:s};a=a.merge(ji($))}let v=Rp(c.propagators,n),b=Lp(c.traceSampler,n),g=Ip(c.spanProcessors,c,n);g.length===0&&y.diag.warn("@vercel/otel: No span processors configured. No spans will be exported.");let G=c.spanLimits,B=new Xi({resource:a,idGenerator:e,sampler:b,spanLimits:G});if(B.addSpanProcessor(new Or(g)),B.register({contextManager:t,propagator:new it.CompositePropagator({propagators:v})}),this.tracerProvider=B,c.logRecordProcessor){let $=new An({resource:a});this.loggerProvider=$,$.addLogRecordProcessor(c.logRecordProcessor),st.logs.setGlobalLoggerProvider($)}if(c.metricReader||c.views){let $=new Un({resource:a,views:c.views??[]});c.metricReader&&$.addMetricReader(c.metricReader),y.metrics.setGlobalMeterProvider($),this.meterProvider=$}let yt=xp(c.instrumentations,c.instrumentationConfig);this.disableInstumentations=(0,Ol.registerInstrumentations)({instrumentations:yt}),y.diag.info("@vercel/otel: started",r,l)}async shutdown(){let n=[];this.tracerProvider&&n.push(this.tracerProvider.shutdown()),this.loggerProvider&&n.push(this.loggerProvider.shutdown()),this.meterProvider&&n.push(this.meterProvider.shutdown()),y.diag.info("@vercel/otel: shutting down",n.length,process.env.NEXT_RUNTIME),await Promise.all(n),this.contextManager&&this.contextManager.disable();let{disableInstumentations:o}=this;o&&o()}};function Pp(){let u=(0,ae.parseEnvironment)(process.env);return{...ae.DEFAULT_ENVIRONMENT,...u}}function xp(u,n){return(u??["auto"]).map(o=>o==="auto"?(y.diag.debug("@vercel/otel: Configure instrumentations: fetch",n?.fetch),[new oe(n?.fetch)]):o==="fetch"?(y.diag.debug("@vercel/otel: Configure instrumentations: fetch",n?.fetch),new oe(n?.fetch)):o).flat()}function Rp(u,n){let o=n.OTEL_PROPAGATORS&&n.OTEL_PROPAGATORS.length>0?n.OTEL_PROPAGATORS:void 0;return(u??o??["auto"]).map(c=>{if(c==="none")return[];if(c==="auto")return y.diag.debug("@vercel/otel: Configure propagators: tracecontext, baggage"),[new it.W3CTraceContextPropagator,new it.W3CBaggagePropagator];if(c==="tracecontext")return y.diag.debug("@vercel/otel: Configure propagator: tracecontext"),new it.W3CTraceContextPropagator;if(c==="baggage")return y.diag.debug("@vercel/otel: Configure propagator: baggage"),new it.W3CBaggagePropagator;if(typeof c=="string")throw new Error(`Unknown propagator: "${c}"`);return c}).flat()}var Sl="always_on",ie=1;function Lp(u,n){if(u&&typeof u!="string")return u;let o=u&&u!=="auto"?u:n.OTEL_TRACES_SAMPLER||Sl;switch(y.diag.debug("@vercel/otel: Configure sampler: ",o),o){case"always_on":return new J;case"always_off":return new ct;case"parentbased_always_on":return new St({root:new J});case"parentbased_always_off":return new St({root:new ct});case"traceidratio":return new Kt(Tl(n));case"parentbased_traceidratio":return new St({root:new Kt(Tl(n))});default:return y.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER value "${String(n.OTEL_TRACES_SAMPLER)} invalid, defaulting to ${Sl}".`),new J}}function Tl(u){if(u.OTEL_TRACES_SAMPLER_ARG===void 0||u.OTEL_TRACES_SAMPLER_ARG==="")return y.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${ie}.`),ie;y.diag.debug("@vercel/otel: Configure sampler probability: ",u.OTEL_TRACES_SAMPLER_ARG);let n=Number(u.OTEL_TRACES_SAMPLER_ARG);return isNaN(n)?(y.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${u.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${ie}.`),ie):n<0||n>1?(y.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 ${ie}.`),ie):n}function Ip(u,n,o){return(u??["auto"]).map(c=>{if(c==="auto"){if(process.env.VERCEL_OTEL_ENDPOINTS){let l=process.env.VERCEL_OTEL_ENDPOINTS_PORT||"4318",i=process.env.VERCEL_OTEL_ENDPOINTS_PROTOCOL||"http/protobuf";y.diag.debug("@vercel/otel: Configure vercel otel collector on port: ",l,i);let e={url:`http://localhost:${l}/v1/traces`,headers:{}},t=i==="http/protobuf"?new Gt(e):new Qt(e);return new de(t)}return n.traceExporter||o.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT||o.OTEL_EXPORTER_OTLP_ENDPOINT?new de(wp(n.traceExporter,o)):void 0}return c}).filter(Mp)}function wp(u,n){if(u&&u!=="auto")return u;let o=process.env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL??process.env.OTEL_EXPORTER_OTLP_PROTOCOL??"http/protobuf",c=Up(n),l={...it.baggageUtils.parseKeyPairsIntoRecord(n.OTEL_EXPORTER_OTLP_HEADERS),...it.baggageUtils.parseKeyPairsIntoRecord(n.OTEL_EXPORTER_OTLP_TRACES_HEADERS)};switch(y.diag.debug("@vercel/otel: Configure trace exporter: ",o,c,`headers: ${Object.keys(l).join(",")||"<none>"}`),o){case"http/json":return new Qt({url:c,headers:l});case"http/protobuf":return new Gt({url:c,headers:l});default:return y.diag.warn(`@vercel/otel: Unsupported OTLP traces protocol: ${o}. Using http/protobuf.`),new Gt}}var Nl="v1/traces",Cp=`http://localhost:4318/${Nl}`;function Up(u){let n=u.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT;if(n&&typeof n=="string")return n;let o=u.OTEL_EXPORTER_OTLP_ENDPOINT;return o&&typeof o=="string"?`${o}/${Nl}`:Cp}function Mp(u){return u!=null}function wv(u){let n;u?typeof u=="string"?n={serviceName:u}:n=u:n={},new kr(n).start()}export{oe as FetchInstrumentation,Qt as OTLPHttpJsonTraceExporter,Gt as OTLPHttpProtoTraceExporter,wv as registerOTel};
|
|
18
18
|
//# sourceMappingURL=index.js.map
|