manifest 5.1.3 → 5.1.4

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -12,11 +12,11 @@ var __fromEnv=globalThis["proc"+"ess"]?.env||{};
12
12
  To resolve the conflict:`,(0,qo.getConflictResolutionRecipe)(u,r))),c=a):GM.diag.warn("A view or instrument with the name ",r.name,` has already been registered and is incompatible with another registered view.
13
13
  `,`Details:
14
14
  `,(0,qo.getIncompatibilityDetails)(u,r),`To resolve the conflict:
15
- `,(0,qo.getConflictResolutionRecipe)(u,r))}return c}};Wo.MetricStorageRegistry=ds});var kM=S(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.MultiMetricStorage=void 0;var As=class{constructor(r){this._backingStorages=r}record(r,i,c,a){this._backingStorages.forEach(u=>{u.record(r,i,c,a)})}};zo.MultiMetricStorage=As});var FM=S(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.BatchObservableResultImpl=tr.ObservableResultImpl=void 0;var er=(m(),h(y)),YM=br(),mJ=Go(),vs=class{constructor(r,i){this._instrumentName=r,this._valueType=i,this._buffer=new YM.AttributeHashMap}observe(r,i={}){if(typeof r!="number"){er.diag.warn(`non-number value provided to metric ${this._instrumentName}: ${r}`);return}this._valueType===er.ValueType.INT&&!Number.isInteger(r)&&(er.diag.warn(`INT value type cannot accept a floating-point value for ${this._instrumentName}, ignoring the fractional digits.`),r=Math.trunc(r),!Number.isInteger(r))||this._buffer.set(i,r)}};tr.ObservableResultImpl=vs;var Os=class{constructor(){this._buffer=new Map}observe(r,i,c={}){if(!(0,mJ.isObservableInstrument)(r))return;let a=this._buffer.get(r);if(a==null&&(a=new YM.AttributeHashMap,this._buffer.set(r,a)),typeof i!="number"){er.diag.warn(`non-number value provided to metric ${r._descriptor.name}: ${i}`);return}r._descriptor.valueType===er.ValueType.INT&&!Number.isInteger(i)&&(er.diag.warn(`INT value type cannot accept a floating-point value for ${r._descriptor.name}, ignoring the fractional digits.`),i=Math.trunc(i),!Number.isInteger(i))||a.set(c,i)}};tr.BatchObservableResultImpl=Os});var qM=S(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});Jo.ObservableRegistry=void 0;var NJ=(m(),h(y)),KM=Go(),jM=FM(),Ur=Ee(),ms=class{constructor(){this._callbacks=[],this._batchCallbacks=[]}addCallback(r,i){this._findCallback(r,i)>=0||this._callbacks.push({callback:r,instrument:i})}removeCallback(r,i){let c=this._findCallback(r,i);c<0||this._callbacks.splice(c,1)}addBatchCallback(r,i){let c=new Set(i.filter(KM.isObservableInstrument));if(c.size===0){NJ.diag.error("BatchObservableCallback is not associated with valid instruments",i);return}this._findBatchCallback(r,c)>=0||this._batchCallbacks.push({callback:r,instruments:c})}removeBatchCallback(r,i){let c=new Set(i.filter(KM.isObservableInstrument)),a=this._findBatchCallback(r,c);a<0||this._batchCallbacks.splice(a,1)}async observe(r,i){let c=this._observeCallbacks(r,i),a=this._observeBatchCallbacks(r,i);return(await(0,Ur.PromiseAllSettled)([...c,...a])).filter(Ur.isPromiseAllSettledRejectionResult).map(e=>e.reason)}_observeCallbacks(r,i){return this._callbacks.map(async({callback:c,instrument:a})=>{let u=new jM.ObservableResultImpl(a._descriptor.name,a._descriptor.valueType),t=Promise.resolve(c(u));i!=null&&(t=(0,Ur.callWithTimeout)(t,i)),await t,a._metricStorages.forEach(e=>{e.record(u._buffer,r)})})}_observeBatchCallbacks(r,i){return this._batchCallbacks.map(async({callback:c,instruments:a})=>{let u=new jM.BatchObservableResultImpl,t=Promise.resolve(c(u));i!=null&&(t=(0,Ur.callWithTimeout)(t,i)),await t,a.forEach(e=>{let n=u._buffer.get(e);n!=null&&e._metricStorages.forEach(s=>{s.record(n,r)})})})}_findCallback(r,i){return this._callbacks.findIndex(c=>c.callback===r&&c.instrument===i)}_findBatchCallback(r,i){return this._batchCallbacks.findIndex(c=>c.callback===r&&(0,Ur.setEquals)(c.instruments,i))}};Jo.ObservableRegistry=ms});var WM=S(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.SyncMetricStorage=void 0;var hJ=cs(),RJ=Es(),yJ=Ss(),Ns=class extends hJ.MetricStorage{constructor(r,i,c,a,u){super(r),this._attributesProcessor=c,this._aggregationCardinalityLimit=u,this._deltaMetricStorage=new RJ.DeltaMetricProcessor(i,this._aggregationCardinalityLimit),this._temporalMetricStorage=new yJ.TemporalMetricProcessor(i,a)}record(r,i,c,a){i=this._attributesProcessor.process(i,c),this._deltaMetricStorage.record(r,i,c,a)}collect(r,i){let c=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,c,i)}};Xo.SyncMetricStorage=Ns});var Rs=S(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.FilteringAttributesProcessor=Ke.NoopAttributesProcessor=Ke.AttributesProcessor=void 0;var Dr=class{static Noop(){return PJ}};Ke.AttributesProcessor=Dr;var $o=class extends Dr{process(r,i){return r}};Ke.NoopAttributesProcessor=$o;var hs=class extends Dr{constructor(r){super(),this._allowedAttributeNames=r}process(r,i){let c={};return Object.keys(r).filter(a=>this._allowedAttributeNames.includes(a)).forEach(a=>c[a]=r[a]),c}};Ke.FilteringAttributesProcessor=hs;var PJ=new $o});var zM=S(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.MeterSharedState=void 0;var MJ=Ce(),gJ=CM(),LJ=Ee(),IJ=bM(),xJ=HM(),CJ=kM(),bJ=qM(),UJ=WM(),DJ=Rs(),ys=class{constructor(r,i){this._meterProviderSharedState=r,this._instrumentationScope=i,this.metricStorageRegistry=new xJ.MetricStorageRegistry,this.observableRegistry=new bJ.ObservableRegistry,this.meter=new gJ.Meter(this)}registerMetricStorage(r){let i=this._registerMetricStorage(r,UJ.SyncMetricStorage);return i.length===1?i[0]:new CJ.MultiMetricStorage(i)}registerAsyncMetricStorage(r){return this._registerMetricStorage(r,IJ.AsyncMetricStorage)}async collect(r,i,c){let a=await this.observableRegistry.observe(i,c?.timeoutMillis),u=this.metricStorageRegistry.getStorages(r);if(u.length===0)return null;let t=u.map(e=>e.collect(r,i)).filter(LJ.isNotNullish);return t.length===0?{errors:a}:{scopeMetrics:{scope:this._instrumentationScope,metrics:t},errors:a}}_registerMetricStorage(r,i){let a=this._meterProviderSharedState.viewRegistry.findViews(r,this._instrumentationScope).map(u=>{let t=(0,MJ.createInstrumentDescriptorWithView)(u,r),e=this.metricStorageRegistry.findOrUpdateCompatibleStorage(t);if(e!=null)return e;let n=u.aggregation.createAggregator(t),s=new i(t,n,u.attributesProcessor,this._meterProviderSharedState.metricCollectors,u.aggregationCardinalityLimit);return this.metricStorageRegistry.register(s),s});if(a.length===0){let t=this._meterProviderSharedState.selectAggregations(r.type).map(([e,n])=>{let s=this.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(e,r);if(s!=null)return s;let l=n.createAggregator(r),E=e.selectCardinalityLimit(r.type),O=new i(r,l,DJ.AttributesProcessor.Noop(),[e],E);return this.metricStorageRegistry.registerForCollector(e,O),O});a=a.concat(t)}return a}};Qo.MeterSharedState=ys});var JM=S(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.MeterProviderSharedState=void 0;var VJ=Ee(),wJ=xM(),BJ=zM(),Ps=class{constructor(r){this.resource=r,this.viewRegistry=new wJ.ViewRegistry,this.metricCollectors=[],this.meterSharedStates=new Map}getMeterSharedState(r){let i=(0,VJ.instrumentationScopeId)(r),c=this.meterSharedStates.get(i);return c==null&&(c=new BJ.MeterSharedState(this,r),this.meterSharedStates.set(i,c)),c}selectAggregations(r){let i=[];for(let c of this.metricCollectors)i.push([c,c.selectAggregation(r)]);return i}};Zo.MeterProviderSharedState=Ps});var XM=S(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.MetricCollector=void 0;var GJ=C(),Ms=class{constructor(r,i){this._sharedState=r,this._metricReader=i}async collect(r){let i=(0,GJ.millisToHrTime)(Date.now()),c=[],a=[],u=Array.from(this._sharedState.meterSharedStates.values()).map(async t=>{let e=await t.collect(this,i,r);e?.scopeMetrics!=null&&c.push(e.scopeMetrics),e?.errors!=null&&a.push(...e.errors)});return await Promise.all(u),{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:c},errors:a}}async forceFlush(r){await this._metricReader.forceFlush(r)}async shutdown(r){await this._metricReader.shutdown(r)}selectAggregationTemporality(r){return this._metricReader.selectAggregationTemporality(r)}selectAggregation(r){return this._metricReader.selectAggregation(r)}selectCardinalityLimit(r){var i,c,a;return(a=(c=(i=this._metricReader).selectCardinalityLimit)===null||c===void 0?void 0:c.call(i,r))!==null&&a!==void 0?a:2e3}};ei.MetricCollector=Ms});var QM=S(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});ri.MeterProvider=void 0;var ti=(m(),h(y)),$M=co(),HJ=JM(),kJ=XM();function YJ(o,r){let i=r??$M.Resource.empty();return o?$M.Resource.default().merge(i):i}var gs=class{constructor(r){var i;if(this._shutdown=!1,this._sharedState=new HJ.MeterProviderSharedState(YJ((i=r?.mergeResourceWithDefaults)!==null&&i!==void 0?i:!0,r?.resource)),r?.views!=null&&r.views.length>0)for(let c of r.views)this._sharedState.viewRegistry.addView(c);if(r?.readers!=null&&r.readers.length>0)for(let c of r.readers)this.addMetricReader(c)}getMeter(r,i="",c={}){return this._shutdown?(ti.diag.warn("A shutdown MeterProvider cannot provide a Meter"),(0,ti.createNoopMeter)()):this._sharedState.getMeterSharedState({name:r,version:i,schemaUrl:c.schemaUrl}).meter}addMetricReader(r){let i=new kJ.MetricCollector(this._sharedState,r);r.setMetricProducer(i),this._sharedState.metricCollectors.push(i)}async shutdown(r){if(this._shutdown){ti.diag.warn("shutdown may only be called once per MeterProvider");return}this._shutdown=!0,await Promise.all(this._sharedState.metricCollectors.map(i=>i.shutdown(r)))}async forceFlush(r){if(this._shutdown){ti.diag.warn("invalid attempt to force flush after MeterProvider shutdown");return}await Promise.all(this._sharedState.metricCollectors.map(i=>i.forceFlush(r)))}};ri.MeterProvider=gs});var ni=S(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.ExactPredicate=rr.PatternPredicate=void 0;var FJ=/[\^$\\.+?()[\]{}|]/g,Ls=class o{constructor(r){r==="*"?(this._matchAll=!0,this._regexp=/.*/):(this._matchAll=!1,this._regexp=new RegExp(o.escapePattern(r)))}match(r){return this._matchAll?!0:this._regexp.test(r)}static escapePattern(r){return`^${r.replace(FJ,"\\$&").replace("*",".*")}$`}static hasWildcard(r){return r.includes("*")}};rr.PatternPredicate=Ls;var Is=class{constructor(r){this._matchAll=r===void 0,this._pattern=r}match(r){return!!(this._matchAll||r===this._pattern)}};rr.ExactPredicate=Is});var eg=S(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.InstrumentSelector=void 0;var ZM=ni(),xs=class{constructor(r){var i;this._nameFilter=new ZM.PatternPredicate((i=r?.name)!==null&&i!==void 0?i:"*"),this._type=r?.type,this._unitFilter=new ZM.ExactPredicate(r?.unit)}getType(){return this._type}getNameFilter(){return this._nameFilter}getUnitFilter(){return this._unitFilter}};oi.InstrumentSelector=xs});var tg=S(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});ii.MeterSelector=void 0;var Cs=ni(),bs=class{constructor(r){this._nameFilter=new Cs.ExactPredicate(r?.name),this._versionFilter=new Cs.ExactPredicate(r?.version),this._schemaUrlFilter=new Cs.ExactPredicate(r?.schemaUrl)}getNameFilter(){return this._nameFilter}getVersionFilter(){return this._versionFilter}getSchemaUrlFilter(){return this._schemaUrlFilter}};ii.MeterSelector=bs});var ng=S(ai=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0});ai.View=void 0;var KJ=ni(),rg=Rs(),jJ=eg(),qJ=tg(),WJ=Co();function zJ(o){return o.instrumentName==null&&o.instrumentType==null&&o.instrumentUnit==null&&o.meterName==null&&o.meterVersion==null&&o.meterSchemaUrl==null}var Us=class{constructor(r){var i;if(zJ(r))throw new Error("Cannot create view with no selector arguments supplied");if(r.name!=null&&(r?.instrumentName==null||KJ.PatternPredicate.hasWildcard(r.instrumentName)))throw new Error("Views with a specified name must be declared with an instrument selector that selects at most one instrument per meter.");r.attributeKeys!=null?this.attributesProcessor=new rg.FilteringAttributesProcessor(r.attributeKeys):this.attributesProcessor=rg.AttributesProcessor.Noop(),this.name=r.name,this.description=r.description,this.aggregation=(i=r.aggregation)!==null&&i!==void 0?i:WJ.Aggregation.Default(),this.instrumentSelector=new jJ.InstrumentSelector({name:r.instrumentName,type:r.instrumentType,unit:r.instrumentUnit}),this.meterSelector=new qJ.MeterSelector({name:r.meterName,version:r.meterVersion,schemaUrl:r.meterSchemaUrl}),this.aggregationCardinalityLimit=r.aggregationCardinalityLimit}};ai.View=Us});var ui=S(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.TimeoutError=R.View=R.Aggregation=R.SumAggregation=R.LastValueAggregation=R.HistogramAggregation=R.DropAggregation=R.ExponentialHistogramAggregation=R.ExplicitBucketHistogramAggregation=R.DefaultAggregation=R.MeterProvider=R.InstrumentType=R.ConsoleMetricExporter=R.InMemoryMetricExporter=R.PeriodicExportingMetricReader=R.MetricReader=R.DataPointType=R.AggregationTemporality=void 0;var JJ=So();Object.defineProperty(R,"AggregationTemporality",{enumerable:!0,get:function(){return JJ.AggregationTemporality}});var XJ=Bt();Object.defineProperty(R,"DataPointType",{enumerable:!0,get:function(){return XJ.DataPointType}});var $J=zu();Object.defineProperty(R,"MetricReader",{enumerable:!0,get:function(){return $J.MetricReader}});var QJ=PM();Object.defineProperty(R,"PeriodicExportingMetricReader",{enumerable:!0,get:function(){return QJ.PeriodicExportingMetricReader}});var ZJ=gM();Object.defineProperty(R,"InMemoryMetricExporter",{enumerable:!0,get:function(){return ZJ.InMemoryMetricExporter}});var eX=IM();Object.defineProperty(R,"ConsoleMetricExporter",{enumerable:!0,get:function(){return eX.ConsoleMetricExporter}});var tX=Ce();Object.defineProperty(R,"InstrumentType",{enumerable:!0,get:function(){return tX.InstrumentType}});var rX=QM();Object.defineProperty(R,"MeterProvider",{enumerable:!0,get:function(){return rX.MeterProvider}});var je=Co();Object.defineProperty(R,"DefaultAggregation",{enumerable:!0,get:function(){return je.DefaultAggregation}});Object.defineProperty(R,"ExplicitBucketHistogramAggregation",{enumerable:!0,get:function(){return je.ExplicitBucketHistogramAggregation}});Object.defineProperty(R,"ExponentialHistogramAggregation",{enumerable:!0,get:function(){return je.ExponentialHistogramAggregation}});Object.defineProperty(R,"DropAggregation",{enumerable:!0,get:function(){return je.DropAggregation}});Object.defineProperty(R,"HistogramAggregation",{enumerable:!0,get:function(){return je.HistogramAggregation}});Object.defineProperty(R,"LastValueAggregation",{enumerable:!0,get:function(){return je.LastValueAggregation}});Object.defineProperty(R,"SumAggregation",{enumerable:!0,get:function(){return je.SumAggregation}});Object.defineProperty(R,"Aggregation",{enumerable:!0,get:function(){return je.Aggregation}});var nX=ng();Object.defineProperty(R,"View",{enumerable:!0,get:function(){return nX.View}});var oX=Ee();Object.defineProperty(R,"TimeoutError",{enumerable:!0,get:function(){return oX.TimeoutError}})});var og,ig=d(()=>{og=function(){function o(r){this._delegate=r}return o.prototype.export=function(r,i){this._delegate.export(r,i)},o.prototype.forceFlush=function(){return this._delegate.forceFlush()},o.prototype.shutdown=function(){return this._delegate.shutdown()},o}()});var iX,ct,si=d(()=>{iX=function(){var o=function(r,i){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,a){c.__proto__=a}||function(c,a){for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(c[u]=a[u])},o(r,i)};return function(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");o(r,i);function c(){this.constructor=r}r.prototype=i===null?Object.create(i):(c.prototype=i.prototype,new c)}}(),ct=function(o){iX(r,o);function r(i,c,a){var u=o.call(this,i)||this;return u.name="OTLPExporterError",u.data=a,u.code=c,u}return r}(Error)});function aX(o){if(!Number.isNaN(o)&&Number.isFinite(o)&&o>0)return o;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+o+"')")}function ci(o){if(o!=null)return function(){return o}}function li(o,r,i){var c,a,u,t,e,n;return{timeoutMillis:aX((a=(c=o.timeoutMillis)!==null&&c!==void 0?c:r.timeoutMillis)!==null&&a!==void 0?a:i.timeoutMillis),concurrencyLimit:(t=(u=o.concurrencyLimit)!==null&&u!==void 0?u:r.concurrencyLimit)!==null&&t!==void 0?t:i.concurrencyLimit,compression:(n=(e=o.compression)!==null&&e!==void 0?e:r.compression)!==null&&n!==void 0?n:i.compression}}function pi(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var Vr=d(()=>{});var _i,ag=d(()=>{(function(o){o.NONE="none",o.GZIP="gzip"})(_i||(_i={}))});function Ei(o){return new cX(o.concurrencyLimit)}var uX,sX,cX,Ds=d(()=>{uX=function(o,r,i,c){function a(u){return u instanceof i?u:new i(function(t){t(u)})}return new(i||(i=Promise))(function(u,t){function e(l){try{s(c.next(l))}catch(E){t(E)}}function n(l){try{s(c.throw(l))}catch(E){t(E)}}function s(l){l.done?u(l.value):a(l.value).then(e,n)}s((c=c.apply(o,r||[])).next())})},sX=function(o,r){var i={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},c,a,u,t;return t={next:e(0),throw:e(1),return:e(2)},typeof Symbol=="function"&&(t[Symbol.iterator]=function(){return this}),t;function e(s){return function(l){return n([s,l])}}function n(s){if(c)throw new TypeError("Generator is already executing.");for(;i;)try{if(c=1,a&&(u=s[0]&2?a.return:s[0]?a.throw||((u=a.return)&&u.call(a),0):a.next)&&!(u=u.call(a,s[1])).done)return u;switch(a=0,u&&(s=[s[0]&2,u.value]),s[0]){case 0:case 1:u=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,a=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(u=i.trys,!(u=u.length>0&&u[u.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!u||s[1]>u[0]&&s[1]<u[3])){i.label=s[1];break}if(s[0]===6&&i.label<u[1]){i.label=u[1],u=s;break}if(u&&i.label<u[2]){i.label=u[2],i.ops.push(s);break}u[2]&&i.ops.pop(),i.trys.pop();continue}s=r.call(o,i)}catch(l){s=[6,l],a=0}finally{c=u=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},cX=function(){function o(r){this._sendingPromises=[],this._concurrencyLimit=r}return o.prototype.pushPromise=function(r){var i=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(r);var c=function(){var a=i._sendingPromises.indexOf(r);i._sendingPromises.splice(a,1)};r.then(c,c)},o.prototype.hasReachedLimit=function(){return this._sendingPromises.length>=this._concurrencyLimit},o.prototype.awaitAll=function(){return uX(this,void 0,void 0,function(){return sX(this,function(r){switch(r.label){case 0:return[4,Promise.all(this._sendingPromises)];case 1:return r.sent(),[2]}})})},o}()});function lX(o){return Object.prototype.hasOwnProperty.call(o,"partialSuccess")}function ug(){return{handleResponse:function(o){o==null||!lX(o)||o.partialSuccess==null||Object.keys(o.partialSuccess).length===0||H.warn("Received Partial Success response:",JSON.stringify(o.partialSuccess))}}}var sg=d(()=>{m()});function Ti(o,r){return new EX(o.transport,o.serializer,ug(),o.promiseHandler,r.timeout)}var qe,pX,_X,EX,Vs=d(()=>{qe=Ae(C());si();sg();m();pX=function(o,r,i,c){function a(u){return u instanceof i?u:new i(function(t){t(u)})}return new(i||(i=Promise))(function(u,t){function e(l){try{s(c.next(l))}catch(E){t(E)}}function n(l){try{s(c.throw(l))}catch(E){t(E)}}function s(l){l.done?u(l.value):a(l.value).then(e,n)}s((c=c.apply(o,r||[])).next())})},_X=function(o,r){var i={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},c,a,u,t;return t={next:e(0),throw:e(1),return:e(2)},typeof Symbol=="function"&&(t[Symbol.iterator]=function(){return this}),t;function e(s){return function(l){return n([s,l])}}function n(s){if(c)throw new TypeError("Generator is already executing.");for(;i;)try{if(c=1,a&&(u=s[0]&2?a.return:s[0]?a.throw||((u=a.return)&&u.call(a),0):a.next)&&!(u=u.call(a,s[1])).done)return u;switch(a=0,u&&(s=[s[0]&2,u.value]),s[0]){case 0:case 1:u=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,a=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(u=i.trys,!(u=u.length>0&&u[u.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!u||s[1]>u[0]&&s[1]<u[3])){i.label=s[1];break}if(s[0]===6&&i.label<u[1]){i.label=u[1],u=s;break}if(u&&i.label<u[2]){i.label=u[2],i.ops.push(s);break}u[2]&&i.ops.pop(),i.trys.pop();continue}s=r.call(o,i)}catch(l){s=[6,l],a=0}finally{c=u=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},EX=function(){function o(r,i,c,a,u){this._transport=r,this._serializer=i,this._responseHandler=c,this._promiseQueue=a,this._timeout=u,this._diagLogger=H.createComponentLogger({namespace:"OTLPExportDelegate"})}return o.prototype.export=function(r,i){var c=this;if(this._diagLogger.debug("items to be sent",r),this._promiseQueue.hasReachedLimit()){i({code:qe.ExportResultCode.FAILED,error:new Error("Concurrent export limit reached")});return}var a=this._serializer.serializeRequest(r);if(a==null){i({code:qe.ExportResultCode.FAILED,error:new Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(a,this._timeout).then(function(u){if(u.status==="success"){if(u.data!=null)try{c._responseHandler.handleResponse(c._serializer.deserializeResponse(u.data))}catch(t){c._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",t,u.data)}i({code:qe.ExportResultCode.SUCCESS});return}else if(u.status==="failure"&&u.error){i({code:qe.ExportResultCode.FAILED,error:u.error});return}else u.status==="retryable"?i({code:qe.ExportResultCode.FAILED,error:new ct("Export failed with retryable status")}):i({code:qe.ExportResultCode.FAILED,error:new ct("Export failed with unknown error")})},function(u){return i({code:qe.ExportResultCode.FAILED,error:u})}))},o.prototype.forceFlush=function(){return this._promiseQueue.awaitAll()},o.prototype.shutdown=function(){return pX(this,void 0,void 0,function(){return _X(this,function(r){switch(r.label){case 0:return this._diagLogger.debug("shutdown started"),[4,this.forceFlush()];case 1:return r.sent(),this._transport.shutdown(),[2]}})})},o}()});function cg(o,r,i){return Ti({transport:i,serializer:r,promiseHandler:Ei(o)},{timeout:o.timeoutMillis})}var lg=d(()=>{Ds();Vs()});var ws={};ft(ws,{CompressionAlgorithm:()=>_i,OTLPExporterBase:()=>og,OTLPExporterError:()=>ct,createOtlpNetworkExportDelegate:()=>cg,getSharedConfigurationDefaults:()=>pi,mergeOtlpSharedConfigurationWithDefaults:()=>li});var Bs=d(()=>{ig();si();Vr();ag();lg()});var pg=S(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.VERSION=void 0;Si.VERSION="0.57.2"});var Eg=S((Uee,_g)=>{"use strict";_g.exports=TX;function TX(o,r){for(var i=new Array(arguments.length-1),c=0,a=2,u=!0;a<arguments.length;)i[c++]=arguments[a++];return new Promise(function(e,n){i[c]=function(l){if(u)if(u=!1,l)n(l);else{for(var E=new Array(arguments.length-1),O=0;O<E.length;)E[O++]=arguments[O];e.apply(null,E)}};try{o.apply(r||null,i)}catch(s){u&&(u=!1,n(s))}})}});var dg=S(fg=>{"use strict";var fi=fg;fi.length=function(r){var i=r.length;if(!i)return 0;for(var c=0;--i%4>1&&r.charAt(i)==="=";)++c;return Math.ceil(r.length*3)/4-c};var nr=new Array(64),Sg=new Array(123);for(Te=0;Te<64;)Sg[nr[Te]=Te<26?Te+65:Te<52?Te+71:Te<62?Te-4:Te-59|43]=Te++;var Te;fi.encode=function(r,i,c){for(var a=null,u=[],t=0,e=0,n;i<c;){var s=r[i++];switch(e){case 0:u[t++]=nr[s>>2],n=(s&3)<<4,e=1;break;case 1:u[t++]=nr[n|s>>4],n=(s&15)<<2,e=2;break;case 2:u[t++]=nr[n|s>>6],u[t++]=nr[s&63],e=0;break}t>8191&&((a||(a=[])).push(String.fromCharCode.apply(String,u)),t=0)}return e&&(u[t++]=nr[n],u[t++]=61,e===1&&(u[t++]=61)),a?(t&&a.push(String.fromCharCode.apply(String,u.slice(0,t))),a.join("")):String.fromCharCode.apply(String,u.slice(0,t))};var Tg="invalid encoding";fi.decode=function(r,i,c){for(var a=c,u=0,t,e=0;e<r.length;){var n=r.charCodeAt(e++);if(n===61&&u>1)break;if((n=Sg[n])===void 0)throw Error(Tg);switch(u){case 0:t=n,u=1;break;case 1:i[c++]=t<<2|(n&48)>>4,t=n,u=2;break;case 2:i[c++]=(t&15)<<4|(n&60)>>2,t=n,u=3;break;case 3:i[c++]=(t&3)<<6|n,u=0;break}}if(u===1)throw Error(Tg);return c-a};fi.test=function(r){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r)}});var vg=S((Vee,Ag)=>{"use strict";Ag.exports=di;function di(){this._listeners={}}di.prototype.on=function(r,i,c){return(this._listeners[r]||(this._listeners[r]=[])).push({fn:i,ctx:c||this}),this};di.prototype.off=function(r,i){if(r===void 0)this._listeners={};else if(i===void 0)this._listeners[r]=[];else for(var c=this._listeners[r],a=0;a<c.length;)c[a].fn===i?c.splice(a,1):++a;return this};di.prototype.emit=function(r){var i=this._listeners[r];if(i){for(var c=[],a=1;a<arguments.length;)c.push(arguments[a++]);for(a=0;a<i.length;)i[a].fn.apply(i[a++].ctx,c)}return this}});var Pg=S((wee,yg)=>{"use strict";yg.exports=Og(Og);function Og(o){return typeof Float32Array<"u"?function(){var r=new Float32Array([-0]),i=new Uint8Array(r.buffer),c=i[3]===128;function a(n,s,l){r[0]=n,s[l]=i[0],s[l+1]=i[1],s[l+2]=i[2],s[l+3]=i[3]}function u(n,s,l){r[0]=n,s[l]=i[3],s[l+1]=i[2],s[l+2]=i[1],s[l+3]=i[0]}o.writeFloatLE=c?a:u,o.writeFloatBE=c?u:a;function t(n,s){return i[0]=n[s],i[1]=n[s+1],i[2]=n[s+2],i[3]=n[s+3],r[0]}function e(n,s){return i[3]=n[s],i[2]=n[s+1],i[1]=n[s+2],i[0]=n[s+3],r[0]}o.readFloatLE=c?t:e,o.readFloatBE=c?e:t}():function(){function r(c,a,u,t){var e=a<0?1:0;if(e&&(a=-a),a===0)c(1/a>0?0:2147483648,u,t);else if(isNaN(a))c(2143289344,u,t);else if(a>34028234663852886e22)c((e<<31|2139095040)>>>0,u,t);else if(a<11754943508222875e-54)c((e<<31|Math.round(a/1401298464324817e-60))>>>0,u,t);else{var n=Math.floor(Math.log(a)/Math.LN2),s=Math.round(a*Math.pow(2,-n)*8388608)&8388607;c((e<<31|n+127<<23|s)>>>0,u,t)}}o.writeFloatLE=r.bind(null,mg),o.writeFloatBE=r.bind(null,Ng);function i(c,a,u){var t=c(a,u),e=(t>>31)*2+1,n=t>>>23&255,s=t&8388607;return n===255?s?NaN:e*(1/0):n===0?e*1401298464324817e-60*s:e*Math.pow(2,n-150)*(s+8388608)}o.readFloatLE=i.bind(null,hg),o.readFloatBE=i.bind(null,Rg)}(),typeof Float64Array<"u"?function(){var r=new Float64Array([-0]),i=new Uint8Array(r.buffer),c=i[7]===128;function a(n,s,l){r[0]=n,s[l]=i[0],s[l+1]=i[1],s[l+2]=i[2],s[l+3]=i[3],s[l+4]=i[4],s[l+5]=i[5],s[l+6]=i[6],s[l+7]=i[7]}function u(n,s,l){r[0]=n,s[l]=i[7],s[l+1]=i[6],s[l+2]=i[5],s[l+3]=i[4],s[l+4]=i[3],s[l+5]=i[2],s[l+6]=i[1],s[l+7]=i[0]}o.writeDoubleLE=c?a:u,o.writeDoubleBE=c?u:a;function t(n,s){return i[0]=n[s],i[1]=n[s+1],i[2]=n[s+2],i[3]=n[s+3],i[4]=n[s+4],i[5]=n[s+5],i[6]=n[s+6],i[7]=n[s+7],r[0]}function e(n,s){return i[7]=n[s],i[6]=n[s+1],i[5]=n[s+2],i[4]=n[s+3],i[3]=n[s+4],i[2]=n[s+5],i[1]=n[s+6],i[0]=n[s+7],r[0]}o.readDoubleLE=c?t:e,o.readDoubleBE=c?e:t}():function(){function r(c,a,u,t,e,n){var s=t<0?1:0;if(s&&(t=-t),t===0)c(0,e,n+a),c(1/t>0?0:2147483648,e,n+u);else if(isNaN(t))c(0,e,n+a),c(2146959360,e,n+u);else if(t>17976931348623157e292)c(0,e,n+a),c((s<<31|2146435072)>>>0,e,n+u);else{var l;if(t<22250738585072014e-324)l=t/5e-324,c(l>>>0,e,n+a),c((s<<31|l/4294967296)>>>0,e,n+u);else{var E=Math.floor(Math.log(t)/Math.LN2);E===1024&&(E=1023),l=t*Math.pow(2,-E),c(l*4503599627370496>>>0,e,n+a),c((s<<31|E+1023<<20|l*1048576&1048575)>>>0,e,n+u)}}}o.writeDoubleLE=r.bind(null,mg,0,4),o.writeDoubleBE=r.bind(null,Ng,4,0);function i(c,a,u,t,e){var n=c(t,e+a),s=c(t,e+u),l=(s>>31)*2+1,E=s>>>20&2047,O=4294967296*(s&1048575)+n;return E===2047?O?NaN:l*(1/0):E===0?l*5e-324*O:l*Math.pow(2,E-1075)*(O+4503599627370496)}o.readDoubleLE=i.bind(null,hg,0,4),o.readDoubleBE=i.bind(null,Rg,4,0)}(),o}function mg(o,r,i){r[i]=o&255,r[i+1]=o>>>8&255,r[i+2]=o>>>16&255,r[i+3]=o>>>24}function Ng(o,r,i){r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=o&255}function hg(o,r){return(o[r]|o[r+1]<<8|o[r+2]<<16|o[r+3]<<24)>>>0}function Rg(o,r){return(o[r]<<24|o[r+1]<<16|o[r+2]<<8|o[r+3])>>>0}});var gg=S((Bee,Mg)=>{"use strict";Mg.exports=function(){return null}});var Ig=S(Lg=>{"use strict";var Gs=Lg;Gs.length=function(r){for(var i=0,c=0,a=0;a<r.length;++a)c=r.charCodeAt(a),c<128?i+=1:c<2048?i+=2:(c&64512)===55296&&(r.charCodeAt(a+1)&64512)===56320?(++a,i+=4):i+=3;return i};Gs.read=function(r,i,c){var a=c-i;if(a<1)return"";for(var u=null,t=[],e=0,n;i<c;)n=r[i++],n<128?t[e++]=n:n>191&&n<224?t[e++]=(n&31)<<6|r[i++]&63:n>239&&n<365?(n=((n&7)<<18|(r[i++]&63)<<12|(r[i++]&63)<<6|r[i++]&63)-65536,t[e++]=55296+(n>>10),t[e++]=56320+(n&1023)):t[e++]=(n&15)<<12|(r[i++]&63)<<6|r[i++]&63,e>8191&&((u||(u=[])).push(String.fromCharCode.apply(String,t)),e=0);return u?(e&&u.push(String.fromCharCode.apply(String,t.slice(0,e))),u.join("")):String.fromCharCode.apply(String,t.slice(0,e))};Gs.write=function(r,i,c){for(var a=c,u,t,e=0;e<r.length;++e)u=r.charCodeAt(e),u<128?i[c++]=u:u<2048?(i[c++]=u>>6|192,i[c++]=u&63|128):(u&64512)===55296&&((t=r.charCodeAt(e+1))&64512)===56320?(u=65536+((u&1023)<<10)+(t&1023),++e,i[c++]=u>>18|240,i[c++]=u>>12&63|128,i[c++]=u>>6&63|128,i[c++]=u&63|128):(i[c++]=u>>12|224,i[c++]=u>>6&63|128,i[c++]=u&63|128);return c-a}});var Cg=S((Hee,xg)=>{"use strict";xg.exports=SX;function SX(o,r,i){var c=i||8192,a=c>>>1,u=null,t=c;return function(n){if(n<1||n>a)return o(n);t+n>c&&(u=o(c),t=0);var s=r.call(u,t,t+=n);return t&7&&(t=(t|7)+1),s}}});var Ug=S((kee,bg)=>{"use strict";bg.exports=K;var wr=ze();function K(o,r){this.lo=o>>>0,this.hi=r>>>0}var lt=K.zero=new K(0,0);lt.toNumber=function(){return 0};lt.zzEncode=lt.zzDecode=function(){return this};lt.length=function(){return 1};var fX=K.zeroHash="\0\0\0\0\0\0\0\0";K.fromNumber=function(r){if(r===0)return lt;var i=r<0;i&&(r=-r);var c=r>>>0,a=(r-c)/4294967296>>>0;return i&&(a=~a>>>0,c=~c>>>0,++c>4294967295&&(c=0,++a>4294967295&&(a=0))),new K(c,a)};K.from=function(r){if(typeof r=="number")return K.fromNumber(r);if(wr.isString(r))if(wr.Long)r=wr.Long.fromString(r);else return K.fromNumber(parseInt(r,10));return r.low||r.high?new K(r.low>>>0,r.high>>>0):lt};K.prototype.toNumber=function(r){if(!r&&this.hi>>>31){var i=~this.lo+1>>>0,c=~this.hi>>>0;return i||(c=c+1>>>0),-(i+c*4294967296)}return this.lo+this.hi*4294967296};K.prototype.toLong=function(r){return wr.Long?new wr.Long(this.lo|0,this.hi|0,!!r):{low:this.lo|0,high:this.hi|0,unsigned:!!r}};var We=String.prototype.charCodeAt;K.fromHash=function(r){return r===fX?lt:new K((We.call(r,0)|We.call(r,1)<<8|We.call(r,2)<<16|We.call(r,3)<<24)>>>0,(We.call(r,4)|We.call(r,5)<<8|We.call(r,6)<<16|We.call(r,7)<<24)>>>0)};K.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)};K.prototype.zzEncode=function(){var r=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^r)>>>0,this.lo=(this.lo<<1^r)>>>0,this};K.prototype.zzDecode=function(){var r=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^r)>>>0,this.hi=(this.hi>>>1^r)>>>0,this};K.prototype.length=function(){var r=this.lo,i=(this.lo>>>28|this.hi<<4)>>>0,c=this.hi>>>24;return c===0?i===0?r<16384?r<128?1:2:r<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:c<128?9:10}});var ze=S(Hs=>{"use strict";var A=Hs;A.asPromise=Eg();A.base64=dg();A.EventEmitter=vg();A.float=Pg();A.inquire=gg();A.utf8=Ig();A.pool=Cg();A.LongBits=Ug();A.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);A.global=A.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||Hs;A.emptyArray=Object.freeze?Object.freeze([]):[];A.emptyObject=Object.freeze?Object.freeze({}):{};A.isInteger=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r};A.isString=function(r){return typeof r=="string"||r instanceof String};A.isObject=function(r){return r&&typeof r=="object"};A.isset=A.isSet=function(r,i){var c=r[i];return c!=null&&r.hasOwnProperty(i)?typeof c!="object"||(Array.isArray(c)?c.length:Object.keys(c).length)>0:!1};A.Buffer=function(){try{var o=A.inquire("buffer").Buffer;return o.prototype.utf8Write?o:null}catch{return null}}();A._Buffer_from=null;A._Buffer_allocUnsafe=null;A.newBuffer=function(r){return typeof r=="number"?A.Buffer?A._Buffer_allocUnsafe(r):new A.Array(r):A.Buffer?A._Buffer_from(r):typeof Uint8Array>"u"?r:new Uint8Array(r)};A.Array=typeof Uint8Array<"u"?Uint8Array:Array;A.Long=A.global.dcodeIO&&A.global.dcodeIO.Long||A.global.Long||A.inquire("long");A.key2Re=/^true|false|0|1$/;A.key32Re=/^-?(?:0|[1-9][0-9]*)$/;A.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;A.longToHash=function(r){return r?A.LongBits.from(r).toHash():A.LongBits.zeroHash};A.longFromHash=function(r,i){var c=A.LongBits.fromHash(r);return A.Long?A.Long.fromBits(c.lo,c.hi,i):c.toNumber(!!i)};function Dg(o,r,i){for(var c=Object.keys(r),a=0;a<c.length;++a)(o[c[a]]===void 0||!i)&&(o[c[a]]=r[c[a]]);return o}A.merge=Dg;A.lcFirst=function(r){return r.charAt(0).toLowerCase()+r.substring(1)};function Vg(o){function r(i,c){if(!(this instanceof r))return new r(i,c);Object.defineProperty(this,"message",{get:function(){return i}}),Error.captureStackTrace?Error.captureStackTrace(this,r):Object.defineProperty(this,"stack",{value:new Error().stack||""}),c&&Dg(this,c)}return r.prototype=Object.create(Error.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return o},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),r}A.newError=Vg;A.ProtocolError=Vg("ProtocolError");A.oneOfGetter=function(r){for(var i={},c=0;c<r.length;++c)i[r[c]]=1;return function(){for(var a=Object.keys(this),u=a.length-1;u>-1;--u)if(i[a[u]]===1&&this[a[u]]!==void 0&&this[a[u]]!==null)return a[u]}};A.oneOfSetter=function(r){return function(i){for(var c=0;c<r.length;++c)r[c]!==i&&delete this[r[c]]}};A.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};A._configure=function(){var o=A.Buffer;if(!o){A._Buffer_from=A._Buffer_allocUnsafe=null;return}A._Buffer_from=o.from!==Uint8Array.from&&o.from||function(i,c){return new o(i,c)},A._Buffer_allocUnsafe=o.allocUnsafe||function(i){return new o(i)}}});var Ws=S((Fee,Hg)=>{"use strict";Hg.exports=P;var se=ze(),ks,Ai=se.LongBits,wg=se.base64,Bg=se.utf8;function Br(o,r,i){this.fn=o,this.len=r,this.next=void 0,this.val=i}function Fs(){}function dX(o){this.head=o.head,this.tail=o.tail,this.len=o.len,this.next=o.states}function P(){this.len=0,this.head=new Br(Fs,0,0),this.tail=this.head,this.states=null}var Gg=function(){return se.Buffer?function(){return(P.create=function(){return new ks})()}:function(){return new P}};P.create=Gg();P.alloc=function(r){return new se.Array(r)};se.Array!==Array&&(P.alloc=se.pool(P.alloc,se.Array.prototype.subarray));P.prototype._push=function(r,i,c){return this.tail=this.tail.next=new Br(r,i,c),this.len+=i,this};function Ks(o,r,i){r[i]=o&255}function AX(o,r,i){for(;o>127;)r[i++]=o&127|128,o>>>=7;r[i]=o}function js(o,r){this.len=o,this.next=void 0,this.val=r}js.prototype=Object.create(Br.prototype);js.prototype.fn=AX;P.prototype.uint32=function(r){return this.len+=(this.tail=this.tail.next=new js((r=r>>>0)<128?1:r<16384?2:r<2097152?3:r<268435456?4:5,r)).len,this};P.prototype.int32=function(r){return r<0?this._push(qs,10,Ai.fromNumber(r)):this.uint32(r)};P.prototype.sint32=function(r){return this.uint32((r<<1^r>>31)>>>0)};function qs(o,r,i){for(;o.hi;)r[i++]=o.lo&127|128,o.lo=(o.lo>>>7|o.hi<<25)>>>0,o.hi>>>=7;for(;o.lo>127;)r[i++]=o.lo&127|128,o.lo=o.lo>>>7;r[i++]=o.lo}P.prototype.uint64=function(r){var i=Ai.from(r);return this._push(qs,i.length(),i)};P.prototype.int64=P.prototype.uint64;P.prototype.sint64=function(r){var i=Ai.from(r).zzEncode();return this._push(qs,i.length(),i)};P.prototype.bool=function(r){return this._push(Ks,1,r?1:0)};function Ys(o,r,i){r[i]=o&255,r[i+1]=o>>>8&255,r[i+2]=o>>>16&255,r[i+3]=o>>>24}P.prototype.fixed32=function(r){return this._push(Ys,4,r>>>0)};P.prototype.sfixed32=P.prototype.fixed32;P.prototype.fixed64=function(r){var i=Ai.from(r);return this._push(Ys,4,i.lo)._push(Ys,4,i.hi)};P.prototype.sfixed64=P.prototype.fixed64;P.prototype.float=function(r){return this._push(se.float.writeFloatLE,4,r)};P.prototype.double=function(r){return this._push(se.float.writeDoubleLE,8,r)};var vX=se.Array.prototype.set?function(r,i,c){i.set(r,c)}:function(r,i,c){for(var a=0;a<r.length;++a)i[c+a]=r[a]};P.prototype.bytes=function(r){var i=r.length>>>0;if(!i)return this._push(Ks,1,0);if(se.isString(r)){var c=P.alloc(i=wg.length(r));wg.decode(r,c,0),r=c}return this.uint32(i)._push(vX,i,r)};P.prototype.string=function(r){var i=Bg.length(r);return i?this.uint32(i)._push(Bg.write,i,r):this._push(Ks,1,0)};P.prototype.fork=function(){return this.states=new dX(this),this.head=this.tail=new Br(Fs,0,0),this.len=0,this};P.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 Br(Fs,0,0),this.len=0),this};P.prototype.ldelim=function(){var r=this.head,i=this.tail,c=this.len;return this.reset().uint32(c),c&&(this.tail.next=r.next,this.tail=i,this.len+=c),this};P.prototype.finish=function(){for(var r=this.head.next,i=this.constructor.alloc(this.len),c=0;r;)r.fn(r.val,i,c),c+=r.len,r=r.next;return i};P._configure=function(o){ks=o,P.create=Gg(),ks._configure()}});var Fg=S((Kee,Yg)=>{"use strict";Yg.exports=ye;var kg=Ws();(ye.prototype=Object.create(kg.prototype)).constructor=ye;var Je=ze();function ye(){kg.call(this)}ye._configure=function(){ye.alloc=Je._Buffer_allocUnsafe,ye.writeBytesBuffer=Je.Buffer&&Je.Buffer.prototype instanceof Uint8Array&&Je.Buffer.prototype.set.name==="set"?function(r,i,c){i.set(r,c)}:function(r,i,c){if(r.copy)r.copy(i,c,0,r.length);else for(var a=0;a<r.length;)i[c++]=r[a++]}};ye.prototype.bytes=function(r){Je.isString(r)&&(r=Je._Buffer_from(r,"base64"));var i=r.length>>>0;return this.uint32(i),i&&this._push(ye.writeBytesBuffer,i,r),this};function OX(o,r,i){o.length<40?Je.utf8.write(o,r,i):r.utf8Write?r.utf8Write(o,i):r.write(o,i)}ye.prototype.string=function(r){var i=Je.Buffer.byteLength(r);return this.uint32(i),i&&this._push(OX,i,r),this};ye._configure()});var Xs=S((jee,zg)=>{"use strict";zg.exports=V;var Se=ze(),Js,qg=Se.LongBits,mX=Se.utf8;function fe(o,r){return RangeError("index out of range: "+o.pos+" + "+(r||1)+" > "+o.len)}function V(o){this.buf=o,this.pos=0,this.len=o.length}var Kg=typeof Uint8Array<"u"?function(r){if(r instanceof Uint8Array||Array.isArray(r))return new V(r);throw Error("illegal buffer")}:function(r){if(Array.isArray(r))return new V(r);throw Error("illegal buffer")},Wg=function(){return Se.Buffer?function(i){return(V.create=function(a){return Se.Buffer.isBuffer(a)?new Js(a):Kg(a)})(i)}:Kg};V.create=Wg();V.prototype._slice=Se.Array.prototype.subarray||Se.Array.prototype.slice;V.prototype.uint32=function(){var r=4294967295;return function(){if(r=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(r=(r|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return r;if((this.pos+=5)>this.len)throw this.pos=this.len,fe(this,10);return r}}();V.prototype.int32=function(){return this.uint32()|0};V.prototype.sint32=function(){var r=this.uint32();return r>>>1^-(r&1)|0};function zs(){var o=new qg(0,0),r=0;if(this.len-this.pos>4){for(;r<4;++r)if(o.lo=(o.lo|(this.buf[this.pos]&127)<<r*7)>>>0,this.buf[this.pos++]<128)return o;if(o.lo=(o.lo|(this.buf[this.pos]&127)<<28)>>>0,o.hi=(o.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return o;r=0}else{for(;r<3;++r){if(this.pos>=this.len)throw fe(this);if(o.lo=(o.lo|(this.buf[this.pos]&127)<<r*7)>>>0,this.buf[this.pos++]<128)return o}return o.lo=(o.lo|(this.buf[this.pos++]&127)<<r*7)>>>0,o}if(this.len-this.pos>4){for(;r<5;++r)if(o.hi=(o.hi|(this.buf[this.pos]&127)<<r*7+3)>>>0,this.buf[this.pos++]<128)return o}else for(;r<5;++r){if(this.pos>=this.len)throw fe(this);if(o.hi=(o.hi|(this.buf[this.pos]&127)<<r*7+3)>>>0,this.buf[this.pos++]<128)return o}throw Error("invalid varint encoding")}V.prototype.bool=function(){return this.uint32()!==0};function vi(o,r){return(o[r-4]|o[r-3]<<8|o[r-2]<<16|o[r-1]<<24)>>>0}V.prototype.fixed32=function(){if(this.pos+4>this.len)throw fe(this,4);return vi(this.buf,this.pos+=4)};V.prototype.sfixed32=function(){if(this.pos+4>this.len)throw fe(this,4);return vi(this.buf,this.pos+=4)|0};function jg(){if(this.pos+8>this.len)throw fe(this,8);return new qg(vi(this.buf,this.pos+=4),vi(this.buf,this.pos+=4))}V.prototype.float=function(){if(this.pos+4>this.len)throw fe(this,4);var r=Se.float.readFloatLE(this.buf,this.pos);return this.pos+=4,r};V.prototype.double=function(){if(this.pos+8>this.len)throw fe(this,4);var r=Se.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,r};V.prototype.bytes=function(){var r=this.uint32(),i=this.pos,c=this.pos+r;if(c>this.len)throw fe(this,r);if(this.pos+=r,Array.isArray(this.buf))return this.buf.slice(i,c);if(i===c){var a=Se.Buffer;return a?a.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,i,c)};V.prototype.string=function(){var r=this.bytes();return mX.read(r,0,r.length)};V.prototype.skip=function(r){if(typeof r=="number"){if(this.pos+r>this.len)throw fe(this,r);this.pos+=r}else do if(this.pos>=this.len)throw fe(this);while(this.buf[this.pos++]&128);return this};V.prototype.skipType=function(o){switch(o){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(o=this.uint32()&7)!==4;)this.skipType(o);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+o+" at offset "+this.pos)}return this};V._configure=function(o){Js=o,V.create=Wg(),Js._configure();var r=Se.Long?"toLong":"toNumber";Se.merge(V.prototype,{int64:function(){return zs.call(this)[r](!1)},uint64:function(){return zs.call(this)[r](!0)},sint64:function(){return zs.call(this).zzDecode()[r](!1)},fixed64:function(){return jg.call(this)[r](!0)},sfixed64:function(){return jg.call(this)[r](!1)}})}});var Qg=S((qee,$g)=>{"use strict";$g.exports=pt;var Xg=Xs();(pt.prototype=Object.create(Xg.prototype)).constructor=pt;var Jg=ze();function pt(o){Xg.call(this,o)}pt._configure=function(){Jg.Buffer&&(pt.prototype._slice=Jg.Buffer.prototype.slice)};pt.prototype.string=function(){var r=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+r,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+r,this.len))};pt._configure()});var eL=S((Wee,Zg)=>{"use strict";Zg.exports=Gr;var $s=ze();(Gr.prototype=Object.create($s.EventEmitter.prototype)).constructor=Gr;function Gr(o,r,i){if(typeof o!="function")throw TypeError("rpcImpl must be a function");$s.EventEmitter.call(this),this.rpcImpl=o,this.requestDelimited=!!r,this.responseDelimited=!!i}Gr.prototype.rpcCall=function o(r,i,c,a,u){if(!a)throw TypeError("request must be specified");var t=this;if(!u)return $s.asPromise(o,t,r,i,c,a);if(!t.rpcImpl){setTimeout(function(){u(Error("already ended"))},0);return}try{return t.rpcImpl(r,i[t.requestDelimited?"encodeDelimited":"encode"](a).finish(),function(n,s){if(n)return t.emit("error",n,r),u(n);if(s===null){t.end(!0);return}if(!(s instanceof c))try{s=c[t.responseDelimited?"decodeDelimited":"decode"](s)}catch(l){return t.emit("error",l,r),u(l)}return t.emit("data",s,r),u(null,s)})}catch(e){t.emit("error",e,r),setTimeout(function(){u(e)},0);return}};Gr.prototype.end=function(r){return this.rpcImpl&&(r||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var rL=S(tL=>{"use strict";var NX=tL;NX.Service=eL()});var oL=S((Jee,nL)=>{"use strict";nL.exports={}});var uL=S(aL=>{"use strict";var te=aL;te.build="minimal";te.Writer=Ws();te.BufferWriter=Fg();te.Reader=Xs();te.BufferReader=Qg();te.util=ze();te.rpc=rL();te.roots=oL();te.configure=iL;function iL(){te.util._configure(),te.Writer._configure(te.BufferWriter),te.Reader._configure(te.BufferReader)}iL()});var cL=S(($ee,sL)=>{"use strict";sL.exports=uL()});var Oi=S((Qee,lL)=>{"use strict";var v=cL(),T=v.Reader,N=v.Writer,_=v.util,p=v.roots.default||(v.roots.default={});p.opentelemetry=function(){var o={};return o.proto=function(){var r={};return r.common=function(){var i={};return i.v1=function(){var c={};return c.AnyValue=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}a.prototype.stringValue=null,a.prototype.boolValue=null,a.prototype.intValue=null,a.prototype.doubleValue=null,a.prototype.arrayValue=null,a.prototype.kvlistValue=null,a.prototype.bytesValue=null;var u;return Object.defineProperty(a.prototype,"value",{get:_.oneOfGetter(u=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"]),set:_.oneOfSetter(u)}),a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=N.create()),e.stringValue!=null&&Object.hasOwnProperty.call(e,"stringValue")&&n.uint32(10).string(e.stringValue),e.boolValue!=null&&Object.hasOwnProperty.call(e,"boolValue")&&n.uint32(16).bool(e.boolValue),e.intValue!=null&&Object.hasOwnProperty.call(e,"intValue")&&n.uint32(24).int64(e.intValue),e.doubleValue!=null&&Object.hasOwnProperty.call(e,"doubleValue")&&n.uint32(33).double(e.doubleValue),e.arrayValue!=null&&Object.hasOwnProperty.call(e,"arrayValue")&&p.opentelemetry.proto.common.v1.ArrayValue.encode(e.arrayValue,n.uint32(42).fork()).ldelim(),e.kvlistValue!=null&&Object.hasOwnProperty.call(e,"kvlistValue")&&p.opentelemetry.proto.common.v1.KeyValueList.encode(e.kvlistValue,n.uint32(50).fork()).ldelim(),e.bytesValue!=null&&Object.hasOwnProperty.call(e,"bytesValue")&&n.uint32(58).bytes(e.bytesValue),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.common.v1.AnyValue;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.stringValue=e.string();break}case 2:{l.boolValue=e.bool();break}case 3:{l.intValue=e.int64();break}case 4:{l.doubleValue=e.double();break}case 5:{l.arrayValue=p.opentelemetry.proto.common.v1.ArrayValue.decode(e,e.uint32());break}case 6:{l.kvlistValue=p.opentelemetry.proto.common.v1.KeyValueList.decode(e,e.uint32());break}case 7:{l.bytesValue=e.bytes();break}default:e.skipType(E&7);break}}return l},a.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.stringValue!=null&&e.hasOwnProperty("stringValue")&&(n.value=1,!_.isString(e.stringValue)))return"stringValue: string expected";if(e.boolValue!=null&&e.hasOwnProperty("boolValue")){if(n.value===1)return"value: multiple values";if(n.value=1,typeof e.boolValue!="boolean")return"boolValue: boolean expected"}if(e.intValue!=null&&e.hasOwnProperty("intValue")){if(n.value===1)return"value: multiple values";if(n.value=1,!_.isInteger(e.intValue)&&!(e.intValue&&_.isInteger(e.intValue.low)&&_.isInteger(e.intValue.high)))return"intValue: integer|Long expected"}if(e.doubleValue!=null&&e.hasOwnProperty("doubleValue")){if(n.value===1)return"value: multiple values";if(n.value=1,typeof e.doubleValue!="number")return"doubleValue: number expected"}if(e.arrayValue!=null&&e.hasOwnProperty("arrayValue")){if(n.value===1)return"value: multiple values";n.value=1;{var s=p.opentelemetry.proto.common.v1.ArrayValue.verify(e.arrayValue);if(s)return"arrayValue."+s}}if(e.kvlistValue!=null&&e.hasOwnProperty("kvlistValue")){if(n.value===1)return"value: multiple values";n.value=1;{var s=p.opentelemetry.proto.common.v1.KeyValueList.verify(e.kvlistValue);if(s)return"kvlistValue."+s}}if(e.bytesValue!=null&&e.hasOwnProperty("bytesValue")){if(n.value===1)return"value: multiple values";if(n.value=1,!(e.bytesValue&&typeof e.bytesValue.length=="number"||_.isString(e.bytesValue)))return"bytesValue: buffer expected"}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.common.v1.AnyValue)return e;var n=new p.opentelemetry.proto.common.v1.AnyValue;if(e.stringValue!=null&&(n.stringValue=String(e.stringValue)),e.boolValue!=null&&(n.boolValue=!!e.boolValue),e.intValue!=null&&(_.Long?(n.intValue=_.Long.fromValue(e.intValue)).unsigned=!1:typeof e.intValue=="string"?n.intValue=parseInt(e.intValue,10):typeof e.intValue=="number"?n.intValue=e.intValue:typeof e.intValue=="object"&&(n.intValue=new _.LongBits(e.intValue.low>>>0,e.intValue.high>>>0).toNumber())),e.doubleValue!=null&&(n.doubleValue=Number(e.doubleValue)),e.arrayValue!=null){if(typeof e.arrayValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected");n.arrayValue=p.opentelemetry.proto.common.v1.ArrayValue.fromObject(e.arrayValue)}if(e.kvlistValue!=null){if(typeof e.kvlistValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected");n.kvlistValue=p.opentelemetry.proto.common.v1.KeyValueList.fromObject(e.kvlistValue)}return e.bytesValue!=null&&(typeof e.bytesValue=="string"?_.base64.decode(e.bytesValue,n.bytesValue=_.newBuffer(_.base64.length(e.bytesValue)),0):e.bytesValue.length>=0&&(n.bytesValue=e.bytesValue)),n},a.toObject=function(e,n){n||(n={});var s={};return e.stringValue!=null&&e.hasOwnProperty("stringValue")&&(s.stringValue=e.stringValue,n.oneofs&&(s.value="stringValue")),e.boolValue!=null&&e.hasOwnProperty("boolValue")&&(s.boolValue=e.boolValue,n.oneofs&&(s.value="boolValue")),e.intValue!=null&&e.hasOwnProperty("intValue")&&(typeof e.intValue=="number"?s.intValue=n.longs===String?String(e.intValue):e.intValue:s.intValue=n.longs===String?_.Long.prototype.toString.call(e.intValue):n.longs===Number?new _.LongBits(e.intValue.low>>>0,e.intValue.high>>>0).toNumber():e.intValue,n.oneofs&&(s.value="intValue")),e.doubleValue!=null&&e.hasOwnProperty("doubleValue")&&(s.doubleValue=n.json&&!isFinite(e.doubleValue)?String(e.doubleValue):e.doubleValue,n.oneofs&&(s.value="doubleValue")),e.arrayValue!=null&&e.hasOwnProperty("arrayValue")&&(s.arrayValue=p.opentelemetry.proto.common.v1.ArrayValue.toObject(e.arrayValue,n),n.oneofs&&(s.value="arrayValue")),e.kvlistValue!=null&&e.hasOwnProperty("kvlistValue")&&(s.kvlistValue=p.opentelemetry.proto.common.v1.KeyValueList.toObject(e.kvlistValue,n),n.oneofs&&(s.value="kvlistValue")),e.bytesValue!=null&&e.hasOwnProperty("bytesValue")&&(s.bytesValue=n.bytes===String?_.base64.encode(e.bytesValue,0,e.bytesValue.length):n.bytes===Array?Array.prototype.slice.call(e.bytesValue):e.bytesValue,n.oneofs&&(s.value="bytesValue")),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.AnyValue"},a}(),c.ArrayValue=function(){function a(u){if(this.values=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.values=_.emptyArray,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.values!=null&&t.values.length)for(var n=0;n<t.values.length;++n)p.opentelemetry.proto.common.v1.AnyValue.encode(t.values[n],e.uint32(10).fork()).ldelim();return e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.ArrayValue;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.values&&s.values.length||(s.values=[]),s.values.push(p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.values!=null&&t.hasOwnProperty("values")){if(!Array.isArray(t.values))return"values: array expected";for(var e=0;e<t.values.length;++e){var n=p.opentelemetry.proto.common.v1.AnyValue.verify(t.values[e]);if(n)return"values."+n}}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.common.v1.ArrayValue)return t;var e=new p.opentelemetry.proto.common.v1.ArrayValue;if(t.values){if(!Array.isArray(t.values))throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: array expected");e.values=[];for(var n=0;n<t.values.length;++n){if(typeof t.values[n]!="object")throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: object expected");e.values[n]=p.opentelemetry.proto.common.v1.AnyValue.fromObject(t.values[n])}}return e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.values=[]),t.values&&t.values.length){n.values=[];for(var s=0;s<t.values.length;++s)n.values[s]=p.opentelemetry.proto.common.v1.AnyValue.toObject(t.values[s],e)}return n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.ArrayValue"},a}(),c.KeyValueList=function(){function a(u){if(this.values=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.values=_.emptyArray,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.values!=null&&t.values.length)for(var n=0;n<t.values.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.values[n],e.uint32(10).fork()).ldelim();return e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.KeyValueList;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.values&&s.values.length||(s.values=[]),s.values.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.values!=null&&t.hasOwnProperty("values")){if(!Array.isArray(t.values))return"values: array expected";for(var e=0;e<t.values.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.values[e]);if(n)return"values."+n}}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.common.v1.KeyValueList)return t;var e=new p.opentelemetry.proto.common.v1.KeyValueList;if(t.values){if(!Array.isArray(t.values))throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: array expected");e.values=[];for(var n=0;n<t.values.length;++n){if(typeof t.values[n]!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: object expected");e.values[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.values[n])}}return e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.values=[]),t.values&&t.values.length){n.values=[];for(var s=0;s<t.values.length;++s)n.values[s]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.values[s],e)}return n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.KeyValueList"},a}(),c.KeyValue=function(){function a(u){if(u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.key=null,a.prototype.value=null,a.create=function(t){return new a(t)},a.encode=function(t,e){return e||(e=N.create()),t.key!=null&&Object.hasOwnProperty.call(t,"key")&&e.uint32(10).string(t.key),t.value!=null&&Object.hasOwnProperty.call(t,"value")&&p.opentelemetry.proto.common.v1.AnyValue.encode(t.value,e.uint32(18).fork()).ldelim(),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.KeyValue;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.key=t.string();break}case 2:{s.value=p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32());break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.key!=null&&t.hasOwnProperty("key")&&!_.isString(t.key))return"key: string expected";if(t.value!=null&&t.hasOwnProperty("value")){var e=p.opentelemetry.proto.common.v1.AnyValue.verify(t.value);if(e)return"value."+e}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.common.v1.KeyValue)return t;var e=new p.opentelemetry.proto.common.v1.KeyValue;if(t.key!=null&&(e.key=String(t.key)),t.value!=null){if(typeof t.value!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected");e.value=p.opentelemetry.proto.common.v1.AnyValue.fromObject(t.value)}return e},a.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.key="",n.value=null),t.key!=null&&t.hasOwnProperty("key")&&(n.key=t.key),t.value!=null&&t.hasOwnProperty("value")&&(n.value=p.opentelemetry.proto.common.v1.AnyValue.toObject(t.value,e)),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.KeyValue"},a}(),c.InstrumentationScope=function(){function a(u){if(this.attributes=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.name=null,a.prototype.version=null,a.prototype.attributes=_.emptyArray,a.prototype.droppedAttributesCount=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.name!=null&&Object.hasOwnProperty.call(t,"name")&&e.uint32(10).string(t.name),t.version!=null&&Object.hasOwnProperty.call(t,"version")&&e.uint32(18).string(t.version),t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(26).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&e.uint32(32).uint32(t.droppedAttributesCount),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.InstrumentationScope;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.name=t.string();break}case 2:{s.version=t.string();break}case 3:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 4:{s.droppedAttributesCount=t.uint32();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.name!=null&&t.hasOwnProperty("name")&&!_.isString(t.name))return"name: string expected";if(t.version!=null&&t.hasOwnProperty("version")&&!_.isString(t.version))return"version: string expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(n)return"attributes."+n}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!_.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.common.v1.InstrumentationScope)return t;var e=new p.opentelemetry.proto.common.v1.InstrumentationScope;if(t.name!=null&&(e.name=String(t.name)),t.version!=null&&(e.version=String(t.version)),t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}return t.droppedAttributesCount!=null&&(e.droppedAttributesCount=t.droppedAttributesCount>>>0),e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),e.defaults&&(n.name="",n.version="",n.droppedAttributesCount=0),t.name!=null&&t.hasOwnProperty("name")&&(n.name=t.name),t.version!=null&&t.hasOwnProperty("version")&&(n.version=t.version),t.attributes&&t.attributes.length){n.attributes=[];for(var s=0;s<t.attributes.length;++s)n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[s],e)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.InstrumentationScope"},a}(),c}(),i}(),r.resource=function(){var i={};return i.v1=function(){var c={};return c.Resource=function(){function a(u){if(this.attributes=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.attributes=_.emptyArray,a.prototype.droppedAttributesCount=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(10).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&e.uint32(16).uint32(t.droppedAttributesCount),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.resource.v1.Resource;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{s.droppedAttributesCount=t.uint32();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(n)return"attributes."+n}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!_.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.resource.v1.Resource)return t;var e=new p.opentelemetry.proto.resource.v1.Resource;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}return t.droppedAttributesCount!=null&&(e.droppedAttributesCount=t.droppedAttributesCount>>>0),e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),e.defaults&&(n.droppedAttributesCount=0),t.attributes&&t.attributes.length){n.attributes=[];for(var s=0;s<t.attributes.length;++s)n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[s],e)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.resource.v1.Resource"},a}(),c}(),i}(),r.trace=function(){var i={};return i.v1=function(){var c={};return c.TracesData=function(){function a(u){if(this.resourceSpans=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.resourceSpans=_.emptyArray,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.resourceSpans!=null&&t.resourceSpans.length)for(var n=0;n<t.resourceSpans.length;++n)p.opentelemetry.proto.trace.v1.ResourceSpans.encode(t.resourceSpans[n],e.uint32(10).fork()).ldelim();return e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.TracesData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resourceSpans&&s.resourceSpans.length||(s.resourceSpans=[]),s.resourceSpans.push(p.opentelemetry.proto.trace.v1.ResourceSpans.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resourceSpans!=null&&t.hasOwnProperty("resourceSpans")){if(!Array.isArray(t.resourceSpans))return"resourceSpans: array expected";for(var e=0;e<t.resourceSpans.length;++e){var n=p.opentelemetry.proto.trace.v1.ResourceSpans.verify(t.resourceSpans[e]);if(n)return"resourceSpans."+n}}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.TracesData)return t;var e=new p.opentelemetry.proto.trace.v1.TracesData;if(t.resourceSpans){if(!Array.isArray(t.resourceSpans))throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: array expected");e.resourceSpans=[];for(var n=0;n<t.resourceSpans.length;++n){if(typeof t.resourceSpans[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: object expected");e.resourceSpans[n]=p.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(t.resourceSpans[n])}}return e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.resourceSpans=[]),t.resourceSpans&&t.resourceSpans.length){n.resourceSpans=[];for(var s=0;s<t.resourceSpans.length;++s)n.resourceSpans[s]=p.opentelemetry.proto.trace.v1.ResourceSpans.toObject(t.resourceSpans[s],e)}return n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.TracesData"},a}(),c.ResourceSpans=function(){function a(u){if(this.scopeSpans=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.resource=null,a.prototype.scopeSpans=_.emptyArray,a.prototype.schemaUrl=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.resource!=null&&Object.hasOwnProperty.call(t,"resource")&&p.opentelemetry.proto.resource.v1.Resource.encode(t.resource,e.uint32(10).fork()).ldelim(),t.scopeSpans!=null&&t.scopeSpans.length)for(var n=0;n<t.scopeSpans.length;++n)p.opentelemetry.proto.trace.v1.ScopeSpans.encode(t.scopeSpans[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.ResourceSpans;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{s.scopeSpans&&s.scopeSpans.length||(s.scopeSpans=[]),s.scopeSpans.push(p.opentelemetry.proto.trace.v1.ScopeSpans.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resource!=null&&t.hasOwnProperty("resource")){var e=p.opentelemetry.proto.resource.v1.Resource.verify(t.resource);if(e)return"resource."+e}if(t.scopeSpans!=null&&t.hasOwnProperty("scopeSpans")){if(!Array.isArray(t.scopeSpans))return"scopeSpans: array expected";for(var n=0;n<t.scopeSpans.length;++n){var e=p.opentelemetry.proto.trace.v1.ScopeSpans.verify(t.scopeSpans[n]);if(e)return"scopeSpans."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!_.isString(t.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.ResourceSpans)return t;var e=new p.opentelemetry.proto.trace.v1.ResourceSpans;if(t.resource!=null){if(typeof t.resource!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.resource: object expected");e.resource=p.opentelemetry.proto.resource.v1.Resource.fromObject(t.resource)}if(t.scopeSpans){if(!Array.isArray(t.scopeSpans))throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: array expected");e.scopeSpans=[];for(var n=0;n<t.scopeSpans.length;++n){if(typeof t.scopeSpans[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: object expected");e.scopeSpans[n]=p.opentelemetry.proto.trace.v1.ScopeSpans.fromObject(t.scopeSpans[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.scopeSpans=[]),e.defaults&&(n.resource=null,n.schemaUrl=""),t.resource!=null&&t.hasOwnProperty("resource")&&(n.resource=p.opentelemetry.proto.resource.v1.Resource.toObject(t.resource,e)),t.scopeSpans&&t.scopeSpans.length){n.scopeSpans=[];for(var s=0;s<t.scopeSpans.length;++s)n.scopeSpans[s]=p.opentelemetry.proto.trace.v1.ScopeSpans.toObject(t.scopeSpans[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.ResourceSpans"},a}(),c.ScopeSpans=function(){function a(u){if(this.spans=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.scope=null,a.prototype.spans=_.emptyArray,a.prototype.schemaUrl=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.scope!=null&&Object.hasOwnProperty.call(t,"scope")&&p.opentelemetry.proto.common.v1.InstrumentationScope.encode(t.scope,e.uint32(10).fork()).ldelim(),t.spans!=null&&t.spans.length)for(var n=0;n<t.spans.length;++n)p.opentelemetry.proto.trace.v1.Span.encode(t.spans[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.ScopeSpans;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{s.spans&&s.spans.length||(s.spans=[]),s.spans.push(p.opentelemetry.proto.trace.v1.Span.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.scope!=null&&t.hasOwnProperty("scope")){var e=p.opentelemetry.proto.common.v1.InstrumentationScope.verify(t.scope);if(e)return"scope."+e}if(t.spans!=null&&t.hasOwnProperty("spans")){if(!Array.isArray(t.spans))return"spans: array expected";for(var n=0;n<t.spans.length;++n){var e=p.opentelemetry.proto.trace.v1.Span.verify(t.spans[n]);if(e)return"spans."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!_.isString(t.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.ScopeSpans)return t;var e=new p.opentelemetry.proto.trace.v1.ScopeSpans;if(t.scope!=null){if(typeof t.scope!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.scope: object expected");e.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(t.scope)}if(t.spans){if(!Array.isArray(t.spans))throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: array expected");e.spans=[];for(var n=0;n<t.spans.length;++n){if(typeof t.spans[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: object expected");e.spans[n]=p.opentelemetry.proto.trace.v1.Span.fromObject(t.spans[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.spans=[]),e.defaults&&(n.scope=null,n.schemaUrl=""),t.scope!=null&&t.hasOwnProperty("scope")&&(n.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.toObject(t.scope,e)),t.spans&&t.spans.length){n.spans=[];for(var s=0;s<t.spans.length;++s)n.spans[s]=p.opentelemetry.proto.trace.v1.Span.toObject(t.spans[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.ScopeSpans"},a}(),c.Span=function(){function a(u){if(this.attributes=[],this.events=[],this.links=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.traceId=null,a.prototype.spanId=null,a.prototype.traceState=null,a.prototype.parentSpanId=null,a.prototype.name=null,a.prototype.kind=null,a.prototype.startTimeUnixNano=null,a.prototype.endTimeUnixNano=null,a.prototype.attributes=_.emptyArray,a.prototype.droppedAttributesCount=null,a.prototype.events=_.emptyArray,a.prototype.droppedEventsCount=null,a.prototype.links=_.emptyArray,a.prototype.droppedLinksCount=null,a.prototype.status=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId")&&e.uint32(10).bytes(t.traceId),t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId")&&e.uint32(18).bytes(t.spanId),t.traceState!=null&&Object.hasOwnProperty.call(t,"traceState")&&e.uint32(26).string(t.traceState),t.parentSpanId!=null&&Object.hasOwnProperty.call(t,"parentSpanId")&&e.uint32(34).bytes(t.parentSpanId),t.name!=null&&Object.hasOwnProperty.call(t,"name")&&e.uint32(42).string(t.name),t.kind!=null&&Object.hasOwnProperty.call(t,"kind")&&e.uint32(48).int32(t.kind),t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&e.uint32(57).fixed64(t.startTimeUnixNano),t.endTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"endTimeUnixNano")&&e.uint32(65).fixed64(t.endTimeUnixNano),t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(74).fork()).ldelim();if(t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&e.uint32(80).uint32(t.droppedAttributesCount),t.events!=null&&t.events.length)for(var n=0;n<t.events.length;++n)p.opentelemetry.proto.trace.v1.Span.Event.encode(t.events[n],e.uint32(90).fork()).ldelim();if(t.droppedEventsCount!=null&&Object.hasOwnProperty.call(t,"droppedEventsCount")&&e.uint32(96).uint32(t.droppedEventsCount),t.links!=null&&t.links.length)for(var n=0;n<t.links.length;++n)p.opentelemetry.proto.trace.v1.Span.Link.encode(t.links[n],e.uint32(106).fork()).ldelim();return t.droppedLinksCount!=null&&Object.hasOwnProperty.call(t,"droppedLinksCount")&&e.uint32(112).uint32(t.droppedLinksCount),t.status!=null&&Object.hasOwnProperty.call(t,"status")&&p.opentelemetry.proto.trace.v1.Status.encode(t.status,e.uint32(122).fork()).ldelim(),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.Span;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.traceId=t.bytes();break}case 2:{s.spanId=t.bytes();break}case 3:{s.traceState=t.string();break}case 4:{s.parentSpanId=t.bytes();break}case 5:{s.name=t.string();break}case 6:{s.kind=t.int32();break}case 7:{s.startTimeUnixNano=t.fixed64();break}case 8:{s.endTimeUnixNano=t.fixed64();break}case 9:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 10:{s.droppedAttributesCount=t.uint32();break}case 11:{s.events&&s.events.length||(s.events=[]),s.events.push(p.opentelemetry.proto.trace.v1.Span.Event.decode(t,t.uint32()));break}case 12:{s.droppedEventsCount=t.uint32();break}case 13:{s.links&&s.links.length||(s.links=[]),s.links.push(p.opentelemetry.proto.trace.v1.Span.Link.decode(t,t.uint32()));break}case 14:{s.droppedLinksCount=t.uint32();break}case 15:{s.status=p.opentelemetry.proto.trace.v1.Status.decode(t,t.uint32());break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.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"||_.isString(t.traceId)))return"traceId: buffer expected";if(t.spanId!=null&&t.hasOwnProperty("spanId")&&!(t.spanId&&typeof t.spanId.length=="number"||_.isString(t.spanId)))return"spanId: buffer expected";if(t.traceState!=null&&t.hasOwnProperty("traceState")&&!_.isString(t.traceState))return"traceState: string expected";if(t.parentSpanId!=null&&t.hasOwnProperty("parentSpanId")&&!(t.parentSpanId&&typeof t.parentSpanId.length=="number"||_.isString(t.parentSpanId)))return"parentSpanId: buffer expected";if(t.name!=null&&t.hasOwnProperty("name")&&!_.isString(t.name))return"name: string expected";if(t.kind!=null&&t.hasOwnProperty("kind"))switch(t.kind){default:return"kind: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!_.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&_.isInteger(t.startTimeUnixNano.low)&&_.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.endTimeUnixNano!=null&&t.hasOwnProperty("endTimeUnixNano")&&!_.isInteger(t.endTimeUnixNano)&&!(t.endTimeUnixNano&&_.isInteger(t.endTimeUnixNano.low)&&_.isInteger(t.endTimeUnixNano.high)))return"endTimeUnixNano: integer|Long expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(n)return"attributes."+n}}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!_.isInteger(t.droppedAttributesCount))return"droppedAttributesCount: integer expected";if(t.events!=null&&t.hasOwnProperty("events")){if(!Array.isArray(t.events))return"events: array expected";for(var e=0;e<t.events.length;++e){var n=p.opentelemetry.proto.trace.v1.Span.Event.verify(t.events[e]);if(n)return"events."+n}}if(t.droppedEventsCount!=null&&t.hasOwnProperty("droppedEventsCount")&&!_.isInteger(t.droppedEventsCount))return"droppedEventsCount: integer expected";if(t.links!=null&&t.hasOwnProperty("links")){if(!Array.isArray(t.links))return"links: array expected";for(var e=0;e<t.links.length;++e){var n=p.opentelemetry.proto.trace.v1.Span.Link.verify(t.links[e]);if(n)return"links."+n}}if(t.droppedLinksCount!=null&&t.hasOwnProperty("droppedLinksCount")&&!_.isInteger(t.droppedLinksCount))return"droppedLinksCount: integer expected";if(t.status!=null&&t.hasOwnProperty("status")){var n=p.opentelemetry.proto.trace.v1.Status.verify(t.status);if(n)return"status."+n}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.Span)return t;var e=new p.opentelemetry.proto.trace.v1.Span;switch(t.traceId!=null&&(typeof t.traceId=="string"?_.base64.decode(t.traceId,e.traceId=_.newBuffer(_.base64.length(t.traceId)),0):t.traceId.length>=0&&(e.traceId=t.traceId)),t.spanId!=null&&(typeof t.spanId=="string"?_.base64.decode(t.spanId,e.spanId=_.newBuffer(_.base64.length(t.spanId)),0):t.spanId.length>=0&&(e.spanId=t.spanId)),t.traceState!=null&&(e.traceState=String(t.traceState)),t.parentSpanId!=null&&(typeof t.parentSpanId=="string"?_.base64.decode(t.parentSpanId,e.parentSpanId=_.newBuffer(_.base64.length(t.parentSpanId)),0):t.parentSpanId.length>=0&&(e.parentSpanId=t.parentSpanId)),t.name!=null&&(e.name=String(t.name)),t.kind){default:if(typeof t.kind=="number"){e.kind=t.kind;break}break;case"SPAN_KIND_UNSPECIFIED":case 0:e.kind=0;break;case"SPAN_KIND_INTERNAL":case 1:e.kind=1;break;case"SPAN_KIND_SERVER":case 2:e.kind=2;break;case"SPAN_KIND_CLIENT":case 3:e.kind=3;break;case"SPAN_KIND_PRODUCER":case 4:e.kind=4;break;case"SPAN_KIND_CONSUMER":case 5:e.kind=5;break}if(t.startTimeUnixNano!=null&&(_.Long?(e.startTimeUnixNano=_.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?e.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?e.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(e.startTimeUnixNano=new _.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.endTimeUnixNano!=null&&(_.Long?(e.endTimeUnixNano=_.Long.fromValue(t.endTimeUnixNano)).unsigned=!1:typeof t.endTimeUnixNano=="string"?e.endTimeUnixNano=parseInt(t.endTimeUnixNano,10):typeof t.endTimeUnixNano=="number"?e.endTimeUnixNano=t.endTimeUnixNano:typeof t.endTimeUnixNano=="object"&&(e.endTimeUnixNano=new _.LongBits(t.endTimeUnixNano.low>>>0,t.endTimeUnixNano.high>>>0).toNumber())),t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}if(t.droppedAttributesCount!=null&&(e.droppedAttributesCount=t.droppedAttributesCount>>>0),t.events){if(!Array.isArray(t.events))throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected");e.events=[];for(var n=0;n<t.events.length;++n){if(typeof t.events[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.events: object expected");e.events[n]=p.opentelemetry.proto.trace.v1.Span.Event.fromObject(t.events[n])}}if(t.droppedEventsCount!=null&&(e.droppedEventsCount=t.droppedEventsCount>>>0),t.links){if(!Array.isArray(t.links))throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected");e.links=[];for(var n=0;n<t.links.length;++n){if(typeof t.links[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.links: object expected");e.links[n]=p.opentelemetry.proto.trace.v1.Span.Link.fromObject(t.links[n])}}if(t.droppedLinksCount!=null&&(e.droppedLinksCount=t.droppedLinksCount>>>0),t.status!=null){if(typeof t.status!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected");e.status=p.opentelemetry.proto.trace.v1.Status.fromObject(t.status)}return e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[],n.events=[],n.links=[]),e.defaults){if(e.bytes===String?n.traceId="":(n.traceId=[],e.bytes!==Array&&(n.traceId=_.newBuffer(n.traceId))),e.bytes===String?n.spanId="":(n.spanId=[],e.bytes!==Array&&(n.spanId=_.newBuffer(n.spanId))),n.traceState="",e.bytes===String?n.parentSpanId="":(n.parentSpanId=[],e.bytes!==Array&&(n.parentSpanId=_.newBuffer(n.parentSpanId))),n.name="",n.kind=e.enums===String?"SPAN_KIND_UNSPECIFIED":0,_.Long){var s=new _.Long(0,0,!1);n.startTimeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}else n.startTimeUnixNano=e.longs===String?"0":0;if(_.Long){var s=new _.Long(0,0,!1);n.endTimeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}else n.endTimeUnixNano=e.longs===String?"0":0;n.droppedAttributesCount=0,n.droppedEventsCount=0,n.droppedLinksCount=0,n.status=null}if(t.traceId!=null&&t.hasOwnProperty("traceId")&&(n.traceId=e.bytes===String?_.base64.encode(t.traceId,0,t.traceId.length):e.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId),t.spanId!=null&&t.hasOwnProperty("spanId")&&(n.spanId=e.bytes===String?_.base64.encode(t.spanId,0,t.spanId.length):e.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId),t.traceState!=null&&t.hasOwnProperty("traceState")&&(n.traceState=t.traceState),t.parentSpanId!=null&&t.hasOwnProperty("parentSpanId")&&(n.parentSpanId=e.bytes===String?_.base64.encode(t.parentSpanId,0,t.parentSpanId.length):e.bytes===Array?Array.prototype.slice.call(t.parentSpanId):t.parentSpanId),t.name!=null&&t.hasOwnProperty("name")&&(n.name=t.name),t.kind!=null&&t.hasOwnProperty("kind")&&(n.kind=e.enums===String?p.opentelemetry.proto.trace.v1.Span.SpanKind[t.kind]===void 0?t.kind:p.opentelemetry.proto.trace.v1.Span.SpanKind[t.kind]:t.kind),t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?n.startTimeUnixNano=e.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:n.startTimeUnixNano=e.longs===String?_.Long.prototype.toString.call(t.startTimeUnixNano):e.longs===Number?new _.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.endTimeUnixNano!=null&&t.hasOwnProperty("endTimeUnixNano")&&(typeof t.endTimeUnixNano=="number"?n.endTimeUnixNano=e.longs===String?String(t.endTimeUnixNano):t.endTimeUnixNano:n.endTimeUnixNano=e.longs===String?_.Long.prototype.toString.call(t.endTimeUnixNano):e.longs===Number?new _.LongBits(t.endTimeUnixNano.low>>>0,t.endTimeUnixNano.high>>>0).toNumber():t.endTimeUnixNano),t.attributes&&t.attributes.length){n.attributes=[];for(var l=0;l<t.attributes.length;++l)n.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[l],e)}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),t.events&&t.events.length){n.events=[];for(var l=0;l<t.events.length;++l)n.events[l]=p.opentelemetry.proto.trace.v1.Span.Event.toObject(t.events[l],e)}if(t.droppedEventsCount!=null&&t.hasOwnProperty("droppedEventsCount")&&(n.droppedEventsCount=t.droppedEventsCount),t.links&&t.links.length){n.links=[];for(var l=0;l<t.links.length;++l)n.links[l]=p.opentelemetry.proto.trace.v1.Span.Link.toObject(t.links[l],e)}return t.droppedLinksCount!=null&&t.hasOwnProperty("droppedLinksCount")&&(n.droppedLinksCount=t.droppedLinksCount),t.status!=null&&t.hasOwnProperty("status")&&(n.status=p.opentelemetry.proto.trace.v1.Status.toObject(t.status,e)),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Span"},a.SpanKind=function(){var u={},t=Object.create(u);return t[u[0]="SPAN_KIND_UNSPECIFIED"]=0,t[u[1]="SPAN_KIND_INTERNAL"]=1,t[u[2]="SPAN_KIND_SERVER"]=2,t[u[3]="SPAN_KIND_CLIENT"]=3,t[u[4]="SPAN_KIND_PRODUCER"]=4,t[u[5]="SPAN_KIND_CONSUMER"]=5,t}(),a.Event=function(){function u(t){if(this.attributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.timeUnixNano=null,u.prototype.name=null,u.prototype.attributes=_.emptyArray,u.prototype.droppedAttributesCount=null,u.create=function(e){return new u(e)},u.encode=function(e,n){if(n||(n=N.create()),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(9).fixed64(e.timeUnixNano),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&n.uint32(18).string(e.name),e.attributes!=null&&e.attributes.length)for(var s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],n.uint32(26).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&n.uint32(32).uint32(e.droppedAttributesCount),n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.trace.v1.Span.Event;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.timeUnixNano=e.fixed64();break}case 2:{l.name=e.string();break}case 3:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 4:{l.droppedAttributesCount=e.uint32();break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!_.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&_.isInteger(e.timeUnixNano.low)&&_.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.name!=null&&e.hasOwnProperty("name")&&!_.isString(e.name))return"name: string expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var n=0;n<e.attributes.length;++n){var s=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[n]);if(s)return"attributes."+s}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!_.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.trace.v1.Span.Event)return e;var n=new p.opentelemetry.proto.trace.v1.Span.Event;if(e.timeUnixNano!=null&&(_.Long?(n.timeUnixNano=_.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new _.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.name!=null&&(n.name=String(e.name)),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");n.attributes=[];for(var s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}return e.droppedAttributesCount!=null&&(n.droppedAttributesCount=e.droppedAttributesCount>>>0),n},u.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.attributes=[]),n.defaults){if(_.Long){var l=new _.Long(0,0,!1);s.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.timeUnixNano=n.longs===String?"0":0;s.name="",s.droppedAttributesCount=0}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?s.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:s.timeUnixNano=n.longs===String?_.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new _.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.name!=null&&e.hasOwnProperty("name")&&(s.name=e.name),e.attributes&&e.attributes.length){s.attributes=[];for(var E=0;E<e.attributes.length;++E)s.attributes[E]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[E],n)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(s.droppedAttributesCount=e.droppedAttributesCount),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span.Event"},u}(),a.Link=function(){function u(t){if(this.attributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.traceId=null,u.prototype.spanId=null,u.prototype.traceState=null,u.prototype.attributes=_.emptyArray,u.prototype.droppedAttributesCount=null,u.create=function(e){return new u(e)},u.encode=function(e,n){if(n||(n=N.create()),e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId")&&n.uint32(10).bytes(e.traceId),e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId")&&n.uint32(18).bytes(e.spanId),e.traceState!=null&&Object.hasOwnProperty.call(e,"traceState")&&n.uint32(26).string(e.traceState),e.attributes!=null&&e.attributes.length)for(var s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],n.uint32(34).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&n.uint32(40).uint32(e.droppedAttributesCount),n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.trace.v1.Span.Link;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.traceId=e.bytes();break}case 2:{l.spanId=e.bytes();break}case 3:{l.traceState=e.string();break}case 4:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 5:{l.droppedAttributesCount=e.uint32();break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.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"||_.isString(e.traceId)))return"traceId: buffer expected";if(e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||_.isString(e.spanId)))return"spanId: buffer expected";if(e.traceState!=null&&e.hasOwnProperty("traceState")&&!_.isString(e.traceState))return"traceState: string expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var n=0;n<e.attributes.length;++n){var s=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[n]);if(s)return"attributes."+s}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!_.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.trace.v1.Span.Link)return e;var n=new p.opentelemetry.proto.trace.v1.Span.Link;if(e.traceId!=null&&(typeof e.traceId=="string"?_.base64.decode(e.traceId,n.traceId=_.newBuffer(_.base64.length(e.traceId)),0):e.traceId.length>=0&&(n.traceId=e.traceId)),e.spanId!=null&&(typeof e.spanId=="string"?_.base64.decode(e.spanId,n.spanId=_.newBuffer(_.base64.length(e.spanId)),0):e.spanId.length>=0&&(n.spanId=e.spanId)),e.traceState!=null&&(n.traceState=String(e.traceState)),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");n.attributes=[];for(var s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}return e.droppedAttributesCount!=null&&(n.droppedAttributesCount=e.droppedAttributesCount>>>0),n},u.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.attributes=[]),n.defaults&&(n.bytes===String?s.traceId="":(s.traceId=[],n.bytes!==Array&&(s.traceId=_.newBuffer(s.traceId))),n.bytes===String?s.spanId="":(s.spanId=[],n.bytes!==Array&&(s.spanId=_.newBuffer(s.spanId))),s.traceState="",s.droppedAttributesCount=0),e.traceId!=null&&e.hasOwnProperty("traceId")&&(s.traceId=n.bytes===String?_.base64.encode(e.traceId,0,e.traceId.length):n.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),e.spanId!=null&&e.hasOwnProperty("spanId")&&(s.spanId=n.bytes===String?_.base64.encode(e.spanId,0,e.spanId.length):n.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),e.traceState!=null&&e.hasOwnProperty("traceState")&&(s.traceState=e.traceState),e.attributes&&e.attributes.length){s.attributes=[];for(var l=0;l<e.attributes.length;++l)s.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[l],n)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(s.droppedAttributesCount=e.droppedAttributesCount),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span.Link"},u}(),a}(),c.Status=function(){function a(u){if(u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.message=null,a.prototype.code=null,a.create=function(t){return new a(t)},a.encode=function(t,e){return e||(e=N.create()),t.message!=null&&Object.hasOwnProperty.call(t,"message")&&e.uint32(18).string(t.message),t.code!=null&&Object.hasOwnProperty.call(t,"code")&&e.uint32(24).int32(t.code),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.Status;t.pos<n;){var l=t.uint32();switch(l>>>3){case 2:{s.message=t.string();break}case 3:{s.code=t.int32();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.message!=null&&t.hasOwnProperty("message")&&!_.isString(t.message))return"message: string expected";if(t.code!=null&&t.hasOwnProperty("code"))switch(t.code){default:return"code: enum value expected";case 0:case 1:case 2:break}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.Status)return t;var e=new p.opentelemetry.proto.trace.v1.Status;switch(t.message!=null&&(e.message=String(t.message)),t.code){default:if(typeof t.code=="number"){e.code=t.code;break}break;case"STATUS_CODE_UNSET":case 0:e.code=0;break;case"STATUS_CODE_OK":case 1:e.code=1;break;case"STATUS_CODE_ERROR":case 2:e.code=2;break}return e},a.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.message="",n.code=e.enums===String?"STATUS_CODE_UNSET":0),t.message!=null&&t.hasOwnProperty("message")&&(n.message=t.message),t.code!=null&&t.hasOwnProperty("code")&&(n.code=e.enums===String?p.opentelemetry.proto.trace.v1.Status.StatusCode[t.code]===void 0?t.code:p.opentelemetry.proto.trace.v1.Status.StatusCode[t.code]:t.code),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Status"},a.StatusCode=function(){var u={},t=Object.create(u);return t[u[0]="STATUS_CODE_UNSET"]=0,t[u[1]="STATUS_CODE_OK"]=1,t[u[2]="STATUS_CODE_ERROR"]=2,t}(),a}(),c}(),i}(),r.collector=function(){var i={};return i.trace=function(){var c={};return c.v1=function(){var a={};return a.TraceService=function(){function u(t,e,n){v.rpc.Service.call(this,t,e,n)}return(u.prototype=Object.create(v.rpc.Service.prototype)).constructor=u,u.create=function(e,n,s){return new this(e,n,s)},Object.defineProperty(u.prototype.export=function t(e,n){return this.rpcCall(t,p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,e,n)},"name",{value:"Export"}),u}(),a.ExportTraceServiceRequest=function(){function u(t){if(this.resourceSpans=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.resourceSpans=_.emptyArray,u.create=function(e){return new u(e)},u.encode=function(e,n){if(n||(n=N.create()),e.resourceSpans!=null&&e.resourceSpans.length)for(var s=0;s<e.resourceSpans.length;++s)p.opentelemetry.proto.trace.v1.ResourceSpans.encode(e.resourceSpans[s],n.uint32(10).fork()).ldelim();return n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.resourceSpans&&l.resourceSpans.length||(l.resourceSpans=[]),l.resourceSpans.push(p.opentelemetry.proto.trace.v1.ResourceSpans.decode(e,e.uint32()));break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceSpans!=null&&e.hasOwnProperty("resourceSpans")){if(!Array.isArray(e.resourceSpans))return"resourceSpans: array expected";for(var n=0;n<e.resourceSpans.length;++n){var s=p.opentelemetry.proto.trace.v1.ResourceSpans.verify(e.resourceSpans[n]);if(s)return"resourceSpans."+s}}return null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;if(e.resourceSpans){if(!Array.isArray(e.resourceSpans))throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected");n.resourceSpans=[];for(var s=0;s<e.resourceSpans.length;++s){if(typeof e.resourceSpans[s]!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected");n.resourceSpans[s]=p.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(e.resourceSpans[s])}}return n},u.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.resourceSpans=[]),e.resourceSpans&&e.resourceSpans.length){s.resourceSpans=[];for(var l=0;l<e.resourceSpans.length;++l)s.resourceSpans[l]=p.opentelemetry.proto.trace.v1.ResourceSpans.toObject(e.resourceSpans[l],n)}return s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"},u}(),a.ExportTraceServiceResponse=function(){function u(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.partialSuccess=null,u.create=function(e){return new u(e)},u.encode=function(e,n){return n||(n=N.create()),e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess")&&p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(e.partialSuccess,n.uint32(10).fork()).ldelim(),n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(e,e.uint32());break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(e.partialSuccess)}return n},u.toObject=function(e,n){n||(n={});var s={};return n.defaults&&(s.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(s.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(e.partialSuccess,n)),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},u}(),a.ExportTracePartialSuccess=function(){function u(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.rejectedSpans=null,u.prototype.errorMessage=null,u.create=function(e){return new u(e)},u.encode=function(e,n){return n||(n=N.create()),e.rejectedSpans!=null&&Object.hasOwnProperty.call(e,"rejectedSpans")&&n.uint32(8).int64(e.rejectedSpans),e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage")&&n.uint32(18).string(e.errorMessage),n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.rejectedSpans=e.int64();break}case 2:{l.errorMessage=e.string();break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedSpans!=null&&e.hasOwnProperty("rejectedSpans")&&!_.isInteger(e.rejectedSpans)&&!(e.rejectedSpans&&_.isInteger(e.rejectedSpans.low)&&_.isInteger(e.rejectedSpans.high))?"rejectedSpans: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!_.isString(e.errorMessage)?"errorMessage: string expected":null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;return e.rejectedSpans!=null&&(_.Long?(n.rejectedSpans=_.Long.fromValue(e.rejectedSpans)).unsigned=!1:typeof e.rejectedSpans=="string"?n.rejectedSpans=parseInt(e.rejectedSpans,10):typeof e.rejectedSpans=="number"?n.rejectedSpans=e.rejectedSpans:typeof e.rejectedSpans=="object"&&(n.rejectedSpans=new _.LongBits(e.rejectedSpans.low>>>0,e.rejectedSpans.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},u.toObject=function(e,n){n||(n={});var s={};if(n.defaults){if(_.Long){var l=new _.Long(0,0,!1);s.rejectedSpans=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.rejectedSpans=n.longs===String?"0":0;s.errorMessage=""}return e.rejectedSpans!=null&&e.hasOwnProperty("rejectedSpans")&&(typeof e.rejectedSpans=="number"?s.rejectedSpans=n.longs===String?String(e.rejectedSpans):e.rejectedSpans:s.rejectedSpans=n.longs===String?_.Long.prototype.toString.call(e.rejectedSpans):n.longs===Number?new _.LongBits(e.rejectedSpans.low>>>0,e.rejectedSpans.high>>>0).toNumber():e.rejectedSpans),e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&(s.errorMessage=e.errorMessage),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},u}(),a}(),c}(),i.metrics=function(){var c={};return c.v1=function(){var a={};return a.MetricsService=function(){function u(t,e,n){v.rpc.Service.call(this,t,e,n)}return(u.prototype=Object.create(v.rpc.Service.prototype)).constructor=u,u.create=function(e,n,s){return new this(e,n,s)},Object.defineProperty(u.prototype.export=function t(e,n){return this.rpcCall(t,p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,e,n)},"name",{value:"Export"}),u}(),a.ExportMetricsServiceRequest=function(){function u(t){if(this.resourceMetrics=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.resourceMetrics=_.emptyArray,u.create=function(e){return new u(e)},u.encode=function(e,n){if(n||(n=N.create()),e.resourceMetrics!=null&&e.resourceMetrics.length)for(var s=0;s<e.resourceMetrics.length;++s)p.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(e.resourceMetrics[s],n.uint32(10).fork()).ldelim();return n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.resourceMetrics&&l.resourceMetrics.length||(l.resourceMetrics=[]),l.resourceMetrics.push(p.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(e,e.uint32()));break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceMetrics!=null&&e.hasOwnProperty("resourceMetrics")){if(!Array.isArray(e.resourceMetrics))return"resourceMetrics: array expected";for(var n=0;n<e.resourceMetrics.length;++n){var s=p.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(e.resourceMetrics[n]);if(s)return"resourceMetrics."+s}}return null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;if(e.resourceMetrics){if(!Array.isArray(e.resourceMetrics))throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected");n.resourceMetrics=[];for(var s=0;s<e.resourceMetrics.length;++s){if(typeof e.resourceMetrics[s]!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected");n.resourceMetrics[s]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(e.resourceMetrics[s])}}return n},u.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.resourceMetrics=[]),e.resourceMetrics&&e.resourceMetrics.length){s.resourceMetrics=[];for(var l=0;l<e.resourceMetrics.length;++l)s.resourceMetrics[l]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(e.resourceMetrics[l],n)}return s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"},u}(),a.ExportMetricsServiceResponse=function(){function u(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.partialSuccess=null,u.create=function(e){return new u(e)},u.encode=function(e,n){return n||(n=N.create()),e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess")&&p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(e.partialSuccess,n.uint32(10).fork()).ldelim(),n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(e,e.uint32());break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(e.partialSuccess)}return n},u.toObject=function(e,n){n||(n={});var s={};return n.defaults&&(s.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(s.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(e.partialSuccess,n)),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},u}(),a.ExportMetricsPartialSuccess=function(){function u(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.rejectedDataPoints=null,u.prototype.errorMessage=null,u.create=function(e){return new u(e)},u.encode=function(e,n){return n||(n=N.create()),e.rejectedDataPoints!=null&&Object.hasOwnProperty.call(e,"rejectedDataPoints")&&n.uint32(8).int64(e.rejectedDataPoints),e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage")&&n.uint32(18).string(e.errorMessage),n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.rejectedDataPoints=e.int64();break}case 2:{l.errorMessage=e.string();break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedDataPoints!=null&&e.hasOwnProperty("rejectedDataPoints")&&!_.isInteger(e.rejectedDataPoints)&&!(e.rejectedDataPoints&&_.isInteger(e.rejectedDataPoints.low)&&_.isInteger(e.rejectedDataPoints.high))?"rejectedDataPoints: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!_.isString(e.errorMessage)?"errorMessage: string expected":null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;return e.rejectedDataPoints!=null&&(_.Long?(n.rejectedDataPoints=_.Long.fromValue(e.rejectedDataPoints)).unsigned=!1:typeof e.rejectedDataPoints=="string"?n.rejectedDataPoints=parseInt(e.rejectedDataPoints,10):typeof e.rejectedDataPoints=="number"?n.rejectedDataPoints=e.rejectedDataPoints:typeof e.rejectedDataPoints=="object"&&(n.rejectedDataPoints=new _.LongBits(e.rejectedDataPoints.low>>>0,e.rejectedDataPoints.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},u.toObject=function(e,n){n||(n={});var s={};if(n.defaults){if(_.Long){var l=new _.Long(0,0,!1);s.rejectedDataPoints=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.rejectedDataPoints=n.longs===String?"0":0;s.errorMessage=""}return e.rejectedDataPoints!=null&&e.hasOwnProperty("rejectedDataPoints")&&(typeof e.rejectedDataPoints=="number"?s.rejectedDataPoints=n.longs===String?String(e.rejectedDataPoints):e.rejectedDataPoints:s.rejectedDataPoints=n.longs===String?_.Long.prototype.toString.call(e.rejectedDataPoints):n.longs===Number?new _.LongBits(e.rejectedDataPoints.low>>>0,e.rejectedDataPoints.high>>>0).toNumber():e.rejectedDataPoints),e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&(s.errorMessage=e.errorMessage),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},u}(),a}(),c}(),i.logs=function(){var c={};return c.v1=function(){var a={};return a.LogsService=function(){function u(t,e,n){v.rpc.Service.call(this,t,e,n)}return(u.prototype=Object.create(v.rpc.Service.prototype)).constructor=u,u.create=function(e,n,s){return new this(e,n,s)},Object.defineProperty(u.prototype.export=function t(e,n){return this.rpcCall(t,p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,e,n)},"name",{value:"Export"}),u}(),a.ExportLogsServiceRequest=function(){function u(t){if(this.resourceLogs=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.resourceLogs=_.emptyArray,u.create=function(e){return new u(e)},u.encode=function(e,n){if(n||(n=N.create()),e.resourceLogs!=null&&e.resourceLogs.length)for(var s=0;s<e.resourceLogs.length;++s)p.opentelemetry.proto.logs.v1.ResourceLogs.encode(e.resourceLogs[s],n.uint32(10).fork()).ldelim();return n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.resourceLogs&&l.resourceLogs.length||(l.resourceLogs=[]),l.resourceLogs.push(p.opentelemetry.proto.logs.v1.ResourceLogs.decode(e,e.uint32()));break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceLogs!=null&&e.hasOwnProperty("resourceLogs")){if(!Array.isArray(e.resourceLogs))return"resourceLogs: array expected";for(var n=0;n<e.resourceLogs.length;++n){var s=p.opentelemetry.proto.logs.v1.ResourceLogs.verify(e.resourceLogs[n]);if(s)return"resourceLogs."+s}}return null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;if(e.resourceLogs){if(!Array.isArray(e.resourceLogs))throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected");n.resourceLogs=[];for(var s=0;s<e.resourceLogs.length;++s){if(typeof e.resourceLogs[s]!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected");n.resourceLogs[s]=p.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(e.resourceLogs[s])}}return n},u.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.resourceLogs=[]),e.resourceLogs&&e.resourceLogs.length){s.resourceLogs=[];for(var l=0;l<e.resourceLogs.length;++l)s.resourceLogs[l]=p.opentelemetry.proto.logs.v1.ResourceLogs.toObject(e.resourceLogs[l],n)}return s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"},u}(),a.ExportLogsServiceResponse=function(){function u(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.partialSuccess=null,u.create=function(e){return new u(e)},u.encode=function(e,n){return n||(n=N.create()),e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess")&&p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(e.partialSuccess,n.uint32(10).fork()).ldelim(),n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(e,e.uint32());break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(e.partialSuccess)}return n},u.toObject=function(e,n){n||(n={});var s={};return n.defaults&&(s.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(s.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(e.partialSuccess,n)),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},u}(),a.ExportLogsPartialSuccess=function(){function u(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.rejectedLogRecords=null,u.prototype.errorMessage=null,u.create=function(e){return new u(e)},u.encode=function(e,n){return n||(n=N.create()),e.rejectedLogRecords!=null&&Object.hasOwnProperty.call(e,"rejectedLogRecords")&&n.uint32(8).int64(e.rejectedLogRecords),e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage")&&n.uint32(18).string(e.errorMessage),n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.rejectedLogRecords=e.int64();break}case 2:{l.errorMessage=e.string();break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedLogRecords!=null&&e.hasOwnProperty("rejectedLogRecords")&&!_.isInteger(e.rejectedLogRecords)&&!(e.rejectedLogRecords&&_.isInteger(e.rejectedLogRecords.low)&&_.isInteger(e.rejectedLogRecords.high))?"rejectedLogRecords: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!_.isString(e.errorMessage)?"errorMessage: string expected":null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;return e.rejectedLogRecords!=null&&(_.Long?(n.rejectedLogRecords=_.Long.fromValue(e.rejectedLogRecords)).unsigned=!1:typeof e.rejectedLogRecords=="string"?n.rejectedLogRecords=parseInt(e.rejectedLogRecords,10):typeof e.rejectedLogRecords=="number"?n.rejectedLogRecords=e.rejectedLogRecords:typeof e.rejectedLogRecords=="object"&&(n.rejectedLogRecords=new _.LongBits(e.rejectedLogRecords.low>>>0,e.rejectedLogRecords.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},u.toObject=function(e,n){n||(n={});var s={};if(n.defaults){if(_.Long){var l=new _.Long(0,0,!1);s.rejectedLogRecords=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.rejectedLogRecords=n.longs===String?"0":0;s.errorMessage=""}return e.rejectedLogRecords!=null&&e.hasOwnProperty("rejectedLogRecords")&&(typeof e.rejectedLogRecords=="number"?s.rejectedLogRecords=n.longs===String?String(e.rejectedLogRecords):e.rejectedLogRecords:s.rejectedLogRecords=n.longs===String?_.Long.prototype.toString.call(e.rejectedLogRecords):n.longs===Number?new _.LongBits(e.rejectedLogRecords.low>>>0,e.rejectedLogRecords.high>>>0).toNumber():e.rejectedLogRecords),e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&(s.errorMessage=e.errorMessage),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},u}(),a}(),c}(),i}(),r.metrics=function(){var i={};return i.v1=function(){var c={};return c.MetricsData=function(){function a(u){if(this.resourceMetrics=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.resourceMetrics=_.emptyArray,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.resourceMetrics!=null&&t.resourceMetrics.length)for(var n=0;n<t.resourceMetrics.length;++n)p.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(t.resourceMetrics[n],e.uint32(10).fork()).ldelim();return e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.MetricsData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resourceMetrics&&s.resourceMetrics.length||(s.resourceMetrics=[]),s.resourceMetrics.push(p.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resourceMetrics!=null&&t.hasOwnProperty("resourceMetrics")){if(!Array.isArray(t.resourceMetrics))return"resourceMetrics: array expected";for(var e=0;e<t.resourceMetrics.length;++e){var n=p.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(t.resourceMetrics[e]);if(n)return"resourceMetrics."+n}}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.MetricsData)return t;var e=new p.opentelemetry.proto.metrics.v1.MetricsData;if(t.resourceMetrics){if(!Array.isArray(t.resourceMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: array expected");e.resourceMetrics=[];for(var n=0;n<t.resourceMetrics.length;++n){if(typeof t.resourceMetrics[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: object expected");e.resourceMetrics[n]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(t.resourceMetrics[n])}}return e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.resourceMetrics=[]),t.resourceMetrics&&t.resourceMetrics.length){n.resourceMetrics=[];for(var s=0;s<t.resourceMetrics.length;++s)n.resourceMetrics[s]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(t.resourceMetrics[s],e)}return n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.MetricsData"},a}(),c.ResourceMetrics=function(){function a(u){if(this.scopeMetrics=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.resource=null,a.prototype.scopeMetrics=_.emptyArray,a.prototype.schemaUrl=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.resource!=null&&Object.hasOwnProperty.call(t,"resource")&&p.opentelemetry.proto.resource.v1.Resource.encode(t.resource,e.uint32(10).fork()).ldelim(),t.scopeMetrics!=null&&t.scopeMetrics.length)for(var n=0;n<t.scopeMetrics.length;++n)p.opentelemetry.proto.metrics.v1.ScopeMetrics.encode(t.scopeMetrics[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.ResourceMetrics;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{s.scopeMetrics&&s.scopeMetrics.length||(s.scopeMetrics=[]),s.scopeMetrics.push(p.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resource!=null&&t.hasOwnProperty("resource")){var e=p.opentelemetry.proto.resource.v1.Resource.verify(t.resource);if(e)return"resource."+e}if(t.scopeMetrics!=null&&t.hasOwnProperty("scopeMetrics")){if(!Array.isArray(t.scopeMetrics))return"scopeMetrics: array expected";for(var n=0;n<t.scopeMetrics.length;++n){var e=p.opentelemetry.proto.metrics.v1.ScopeMetrics.verify(t.scopeMetrics[n]);if(e)return"scopeMetrics."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!_.isString(t.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.ResourceMetrics)return t;var e=new p.opentelemetry.proto.metrics.v1.ResourceMetrics;if(t.resource!=null){if(typeof t.resource!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.resource: object expected");e.resource=p.opentelemetry.proto.resource.v1.Resource.fromObject(t.resource)}if(t.scopeMetrics){if(!Array.isArray(t.scopeMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: array expected");e.scopeMetrics=[];for(var n=0;n<t.scopeMetrics.length;++n){if(typeof t.scopeMetrics[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: object expected");e.scopeMetrics[n]=p.opentelemetry.proto.metrics.v1.ScopeMetrics.fromObject(t.scopeMetrics[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.scopeMetrics=[]),e.defaults&&(n.resource=null,n.schemaUrl=""),t.resource!=null&&t.hasOwnProperty("resource")&&(n.resource=p.opentelemetry.proto.resource.v1.Resource.toObject(t.resource,e)),t.scopeMetrics&&t.scopeMetrics.length){n.scopeMetrics=[];for(var s=0;s<t.scopeMetrics.length;++s)n.scopeMetrics[s]=p.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(t.scopeMetrics[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ResourceMetrics"},a}(),c.ScopeMetrics=function(){function a(u){if(this.metrics=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.scope=null,a.prototype.metrics=_.emptyArray,a.prototype.schemaUrl=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.scope!=null&&Object.hasOwnProperty.call(t,"scope")&&p.opentelemetry.proto.common.v1.InstrumentationScope.encode(t.scope,e.uint32(10).fork()).ldelim(),t.metrics!=null&&t.metrics.length)for(var n=0;n<t.metrics.length;++n)p.opentelemetry.proto.metrics.v1.Metric.encode(t.metrics[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.ScopeMetrics;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{s.metrics&&s.metrics.length||(s.metrics=[]),s.metrics.push(p.opentelemetry.proto.metrics.v1.Metric.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.scope!=null&&t.hasOwnProperty("scope")){var e=p.opentelemetry.proto.common.v1.InstrumentationScope.verify(t.scope);if(e)return"scope."+e}if(t.metrics!=null&&t.hasOwnProperty("metrics")){if(!Array.isArray(t.metrics))return"metrics: array expected";for(var n=0;n<t.metrics.length;++n){var e=p.opentelemetry.proto.metrics.v1.Metric.verify(t.metrics[n]);if(e)return"metrics."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!_.isString(t.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.ScopeMetrics)return t;var e=new p.opentelemetry.proto.metrics.v1.ScopeMetrics;if(t.scope!=null){if(typeof t.scope!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.scope: object expected");e.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(t.scope)}if(t.metrics){if(!Array.isArray(t.metrics))throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: array expected");e.metrics=[];for(var n=0;n<t.metrics.length;++n){if(typeof t.metrics[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: object expected");e.metrics[n]=p.opentelemetry.proto.metrics.v1.Metric.fromObject(t.metrics[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.metrics=[]),e.defaults&&(n.scope=null,n.schemaUrl=""),t.scope!=null&&t.hasOwnProperty("scope")&&(n.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.toObject(t.scope,e)),t.metrics&&t.metrics.length){n.metrics=[];for(var s=0;s<t.metrics.length;++s)n.metrics[s]=p.opentelemetry.proto.metrics.v1.Metric.toObject(t.metrics[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ScopeMetrics"},a}(),c.Metric=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}a.prototype.name=null,a.prototype.description=null,a.prototype.unit=null,a.prototype.gauge=null,a.prototype.sum=null,a.prototype.histogram=null,a.prototype.exponentialHistogram=null,a.prototype.summary=null;var u;return Object.defineProperty(a.prototype,"data",{get:_.oneOfGetter(u=["gauge","sum","histogram","exponentialHistogram","summary"]),set:_.oneOfSetter(u)}),a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=N.create()),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&n.uint32(10).string(e.name),e.description!=null&&Object.hasOwnProperty.call(e,"description")&&n.uint32(18).string(e.description),e.unit!=null&&Object.hasOwnProperty.call(e,"unit")&&n.uint32(26).string(e.unit),e.gauge!=null&&Object.hasOwnProperty.call(e,"gauge")&&p.opentelemetry.proto.metrics.v1.Gauge.encode(e.gauge,n.uint32(42).fork()).ldelim(),e.sum!=null&&Object.hasOwnProperty.call(e,"sum")&&p.opentelemetry.proto.metrics.v1.Sum.encode(e.sum,n.uint32(58).fork()).ldelim(),e.histogram!=null&&Object.hasOwnProperty.call(e,"histogram")&&p.opentelemetry.proto.metrics.v1.Histogram.encode(e.histogram,n.uint32(74).fork()).ldelim(),e.exponentialHistogram!=null&&Object.hasOwnProperty.call(e,"exponentialHistogram")&&p.opentelemetry.proto.metrics.v1.ExponentialHistogram.encode(e.exponentialHistogram,n.uint32(82).fork()).ldelim(),e.summary!=null&&Object.hasOwnProperty.call(e,"summary")&&p.opentelemetry.proto.metrics.v1.Summary.encode(e.summary,n.uint32(90).fork()).ldelim(),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.Metric;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.name=e.string();break}case 2:{l.description=e.string();break}case 3:{l.unit=e.string();break}case 5:{l.gauge=p.opentelemetry.proto.metrics.v1.Gauge.decode(e,e.uint32());break}case 7:{l.sum=p.opentelemetry.proto.metrics.v1.Sum.decode(e,e.uint32());break}case 9:{l.histogram=p.opentelemetry.proto.metrics.v1.Histogram.decode(e,e.uint32());break}case 10:{l.exponentialHistogram=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(e,e.uint32());break}case 11:{l.summary=p.opentelemetry.proto.metrics.v1.Summary.decode(e,e.uint32());break}default:e.skipType(E&7);break}}return l},a.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.name!=null&&e.hasOwnProperty("name")&&!_.isString(e.name))return"name: string expected";if(e.description!=null&&e.hasOwnProperty("description")&&!_.isString(e.description))return"description: string expected";if(e.unit!=null&&e.hasOwnProperty("unit")&&!_.isString(e.unit))return"unit: string expected";if(e.gauge!=null&&e.hasOwnProperty("gauge")){n.data=1;{var s=p.opentelemetry.proto.metrics.v1.Gauge.verify(e.gauge);if(s)return"gauge."+s}}if(e.sum!=null&&e.hasOwnProperty("sum")){if(n.data===1)return"data: multiple values";n.data=1;{var s=p.opentelemetry.proto.metrics.v1.Sum.verify(e.sum);if(s)return"sum."+s}}if(e.histogram!=null&&e.hasOwnProperty("histogram")){if(n.data===1)return"data: multiple values";n.data=1;{var s=p.opentelemetry.proto.metrics.v1.Histogram.verify(e.histogram);if(s)return"histogram."+s}}if(e.exponentialHistogram!=null&&e.hasOwnProperty("exponentialHistogram")){if(n.data===1)return"data: multiple values";n.data=1;{var s=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(e.exponentialHistogram);if(s)return"exponentialHistogram."+s}}if(e.summary!=null&&e.hasOwnProperty("summary")){if(n.data===1)return"data: multiple values";n.data=1;{var s=p.opentelemetry.proto.metrics.v1.Summary.verify(e.summary);if(s)return"summary."+s}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.Metric)return e;var n=new p.opentelemetry.proto.metrics.v1.Metric;if(e.name!=null&&(n.name=String(e.name)),e.description!=null&&(n.description=String(e.description)),e.unit!=null&&(n.unit=String(e.unit)),e.gauge!=null){if(typeof e.gauge!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected");n.gauge=p.opentelemetry.proto.metrics.v1.Gauge.fromObject(e.gauge)}if(e.sum!=null){if(typeof e.sum!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.sum: object expected");n.sum=p.opentelemetry.proto.metrics.v1.Sum.fromObject(e.sum)}if(e.histogram!=null){if(typeof e.histogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.histogram: object expected");n.histogram=p.opentelemetry.proto.metrics.v1.Histogram.fromObject(e.histogram)}if(e.exponentialHistogram!=null){if(typeof e.exponentialHistogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected");n.exponentialHistogram=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(e.exponentialHistogram)}if(e.summary!=null){if(typeof e.summary!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.summary: object expected");n.summary=p.opentelemetry.proto.metrics.v1.Summary.fromObject(e.summary)}return n},a.toObject=function(e,n){n||(n={});var s={};return n.defaults&&(s.name="",s.description="",s.unit=""),e.name!=null&&e.hasOwnProperty("name")&&(s.name=e.name),e.description!=null&&e.hasOwnProperty("description")&&(s.description=e.description),e.unit!=null&&e.hasOwnProperty("unit")&&(s.unit=e.unit),e.gauge!=null&&e.hasOwnProperty("gauge")&&(s.gauge=p.opentelemetry.proto.metrics.v1.Gauge.toObject(e.gauge,n),n.oneofs&&(s.data="gauge")),e.sum!=null&&e.hasOwnProperty("sum")&&(s.sum=p.opentelemetry.proto.metrics.v1.Sum.toObject(e.sum,n),n.oneofs&&(s.data="sum")),e.histogram!=null&&e.hasOwnProperty("histogram")&&(s.histogram=p.opentelemetry.proto.metrics.v1.Histogram.toObject(e.histogram,n),n.oneofs&&(s.data="histogram")),e.exponentialHistogram!=null&&e.hasOwnProperty("exponentialHistogram")&&(s.exponentialHistogram=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(e.exponentialHistogram,n),n.oneofs&&(s.data="exponentialHistogram")),e.summary!=null&&e.hasOwnProperty("summary")&&(s.summary=p.opentelemetry.proto.metrics.v1.Summary.toObject(e.summary,n),n.oneofs&&(s.data="summary")),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Metric"},a}(),c.Gauge=function(){function a(u){if(this.dataPoints=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.dataPoints=_.emptyArray,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Gauge;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.Gauge)return t;var e=new p.opentelemetry.proto.metrics.v1.Gauge;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(t.dataPoints[n])}}return e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var s=0;s<t.dataPoints.length;++s)n.dataPoints[s]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(t.dataPoints[s],e)}return n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Gauge"},a}(),c.Sum=function(){function a(u){if(this.dataPoints=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.dataPoints=_.emptyArray,a.prototype.aggregationTemporality=null,a.prototype.isMonotonic=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return t.aggregationTemporality!=null&&Object.hasOwnProperty.call(t,"aggregationTemporality")&&e.uint32(16).int32(t.aggregationTemporality),t.isMonotonic!=null&&Object.hasOwnProperty.call(t,"isMonotonic")&&e.uint32(24).bool(t.isMonotonic),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Sum;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(t,t.uint32()));break}case 2:{s.aggregationTemporality=t.int32();break}case 3:{s.isMonotonic=t.bool();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))switch(t.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return t.isMonotonic!=null&&t.hasOwnProperty("isMonotonic")&&typeof t.isMonotonic!="boolean"?"isMonotonic: boolean expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.Sum)return t;var e=new p.opentelemetry.proto.metrics.v1.Sum;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(t.dataPoints[n])}}switch(t.aggregationTemporality){default:if(typeof t.aggregationTemporality=="number"){e.aggregationTemporality=t.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:e.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:e.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:e.aggregationTemporality=2;break}return t.isMonotonic!=null&&(e.isMonotonic=!!t.isMonotonic),e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),e.defaults&&(n.aggregationTemporality=e.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0,n.isMonotonic=!1),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var s=0;s<t.dataPoints.length;++s)n.dataPoints[s]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(t.dataPoints[s],e)}return t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality")&&(n.aggregationTemporality=e.enums===String?p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]===void 0?t.aggregationTemporality:p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]:t.aggregationTemporality),t.isMonotonic!=null&&t.hasOwnProperty("isMonotonic")&&(n.isMonotonic=t.isMonotonic),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Sum"},a}(),c.Histogram=function(){function a(u){if(this.dataPoints=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.dataPoints=_.emptyArray,a.prototype.aggregationTemporality=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.HistogramDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return t.aggregationTemporality!=null&&Object.hasOwnProperty.call(t,"aggregationTemporality")&&e.uint32(16).int32(t.aggregationTemporality),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Histogram;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(t,t.uint32()));break}case 2:{s.aggregationTemporality=t.int32();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.HistogramDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))switch(t.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.Histogram)return t;var e=new p.opentelemetry.proto.metrics.v1.Histogram;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.HistogramDataPoint.fromObject(t.dataPoints[n])}}switch(t.aggregationTemporality){default:if(typeof t.aggregationTemporality=="number"){e.aggregationTemporality=t.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:e.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:e.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:e.aggregationTemporality=2;break}return e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),e.defaults&&(n.aggregationTemporality=e.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var s=0;s<t.dataPoints.length;++s)n.dataPoints[s]=p.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(t.dataPoints[s],e)}return t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality")&&(n.aggregationTemporality=e.enums===String?p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]===void 0?t.aggregationTemporality:p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]:t.aggregationTemporality),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Histogram"},a}(),c.ExponentialHistogram=function(){function a(u){if(this.dataPoints=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.dataPoints=_.emptyArray,a.prototype.aggregationTemporality=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return t.aggregationTemporality!=null&&Object.hasOwnProperty.call(t,"aggregationTemporality")&&e.uint32(16).int32(t.aggregationTemporality),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.ExponentialHistogram;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(t,t.uint32()));break}case 2:{s.aggregationTemporality=t.int32();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))switch(t.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.ExponentialHistogram)return t;var e=new p.opentelemetry.proto.metrics.v1.ExponentialHistogram;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.fromObject(t.dataPoints[n])}}switch(t.aggregationTemporality){default:if(typeof t.aggregationTemporality=="number"){e.aggregationTemporality=t.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:e.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:e.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:e.aggregationTemporality=2;break}return e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),e.defaults&&(n.aggregationTemporality=e.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var s=0;s<t.dataPoints.length;++s)n.dataPoints[s]=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(t.dataPoints[s],e)}return t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality")&&(n.aggregationTemporality=e.enums===String?p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]===void 0?t.aggregationTemporality:p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]:t.aggregationTemporality),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ExponentialHistogram"},a}(),c.Summary=function(){function a(u){if(this.dataPoints=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.dataPoints=_.emptyArray,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.SummaryDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Summary;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.Summary)return t;var e=new p.opentelemetry.proto.metrics.v1.Summary;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.fromObject(t.dataPoints[n])}}return e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var s=0;s<t.dataPoints.length;++s)n.dataPoints[s]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(t.dataPoints[s],e)}return n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Summary"},a}(),c.AggregationTemporality=function(){var a={},u=Object.create(a);return u[a[0]="AGGREGATION_TEMPORALITY_UNSPECIFIED"]=0,u[a[1]="AGGREGATION_TEMPORALITY_DELTA"]=1,u[a[2]="AGGREGATION_TEMPORALITY_CUMULATIVE"]=2,u}(),c.DataPointFlags=function(){var a={},u=Object.create(a);return u[a[0]="DATA_POINT_FLAGS_DO_NOT_USE"]=0,u[a[1]="DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"]=1,u}(),c.NumberDataPoint=function(){function a(t){if(this.attributes=[],this.exemplars=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}a.prototype.attributes=_.emptyArray,a.prototype.startTimeUnixNano=null,a.prototype.timeUnixNano=null,a.prototype.asDouble=null,a.prototype.asInt=null,a.prototype.exemplars=_.emptyArray,a.prototype.flags=null;var u;return Object.defineProperty(a.prototype,"value",{get:_.oneOfGetter(u=["asDouble","asInt"]),set:_.oneOfSetter(u)}),a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=N.create()),e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&n.uint32(17).fixed64(e.startTimeUnixNano),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(25).fixed64(e.timeUnixNano),e.asDouble!=null&&Object.hasOwnProperty.call(e,"asDouble")&&n.uint32(33).double(e.asDouble),e.exemplars!=null&&e.exemplars.length)for(var s=0;s<e.exemplars.length;++s)p.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[s],n.uint32(42).fork()).ldelim();if(e.asInt!=null&&Object.hasOwnProperty.call(e,"asInt")&&n.uint32(49).sfixed64(e.asInt),e.attributes!=null&&e.attributes.length)for(var s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],n.uint32(58).fork()).ldelim();return e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&n.uint32(64).uint32(e.flags),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.NumberDataPoint;e.pos<s;){var E=e.uint32();switch(E>>>3){case 7:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.startTimeUnixNano=e.fixed64();break}case 3:{l.timeUnixNano=e.fixed64();break}case 4:{l.asDouble=e.double();break}case 6:{l.asInt=e.sfixed64();break}case 5:{l.exemplars&&l.exemplars.length||(l.exemplars=[]),l.exemplars.push(p.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 8:{l.flags=e.uint32();break}default:e.skipType(E&7);break}}return l},a.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var s=0;s<e.attributes.length;++s){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[s]);if(l)return"attributes."+l}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!_.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&_.isInteger(e.startTimeUnixNano.low)&&_.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!_.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&_.isInteger(e.timeUnixNano.low)&&_.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.asDouble!=null&&e.hasOwnProperty("asDouble")&&(n.value=1,typeof e.asDouble!="number"))return"asDouble: number expected";if(e.asInt!=null&&e.hasOwnProperty("asInt")){if(n.value===1)return"value: multiple values";if(n.value=1,!_.isInteger(e.asInt)&&!(e.asInt&&_.isInteger(e.asInt.low)&&_.isInteger(e.asInt.high)))return"asInt: integer|Long expected"}if(e.exemplars!=null&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(var s=0;s<e.exemplars.length;++s){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[s]);if(l)return"exemplars."+l}}return e.flags!=null&&e.hasOwnProperty("flags")&&!_.isInteger(e.flags)?"flags: integer expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.NumberDataPoint)return e;var n=new p.opentelemetry.proto.metrics.v1.NumberDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: array expected");n.attributes=[];for(var s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}if(e.startTimeUnixNano!=null&&(_.Long?(n.startTimeUnixNano=_.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?n.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?n.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(n.startTimeUnixNano=new _.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.timeUnixNano!=null&&(_.Long?(n.timeUnixNano=_.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new _.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.asDouble!=null&&(n.asDouble=Number(e.asDouble)),e.asInt!=null&&(_.Long?(n.asInt=_.Long.fromValue(e.asInt)).unsigned=!1:typeof e.asInt=="string"?n.asInt=parseInt(e.asInt,10):typeof e.asInt=="number"?n.asInt=e.asInt:typeof e.asInt=="object"&&(n.asInt=new _.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber())),e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected");n.exemplars=[];for(var s=0;s<e.exemplars.length;++s){if(typeof e.exemplars[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected");n.exemplars[s]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[s])}}return e.flags!=null&&(n.flags=e.flags>>>0),n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.exemplars=[],s.attributes=[]),n.defaults){if(_.Long){var l=new _.Long(0,0,!1);s.startTimeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.startTimeUnixNano=n.longs===String?"0":0;if(_.Long){var l=new _.Long(0,0,!1);s.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.timeUnixNano=n.longs===String?"0":0;s.flags=0}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?s.startTimeUnixNano=n.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:s.startTimeUnixNano=n.longs===String?_.Long.prototype.toString.call(e.startTimeUnixNano):n.longs===Number?new _.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?s.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:s.timeUnixNano=n.longs===String?_.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new _.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.asDouble!=null&&e.hasOwnProperty("asDouble")&&(s.asDouble=n.json&&!isFinite(e.asDouble)?String(e.asDouble):e.asDouble,n.oneofs&&(s.value="asDouble")),e.exemplars&&e.exemplars.length){s.exemplars=[];for(var E=0;E<e.exemplars.length;++E)s.exemplars[E]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[E],n)}if(e.asInt!=null&&e.hasOwnProperty("asInt")&&(typeof e.asInt=="number"?s.asInt=n.longs===String?String(e.asInt):e.asInt:s.asInt=n.longs===String?_.Long.prototype.toString.call(e.asInt):n.longs===Number?new _.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber():e.asInt,n.oneofs&&(s.value="asInt")),e.attributes&&e.attributes.length){s.attributes=[];for(var E=0;E<e.attributes.length;++E)s.attributes[E]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[E],n)}return e.flags!=null&&e.hasOwnProperty("flags")&&(s.flags=e.flags),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.NumberDataPoint"},a}(),c.HistogramDataPoint=function(){function a(t){if(this.attributes=[],this.bucketCounts=[],this.explicitBounds=[],this.exemplars=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}a.prototype.attributes=_.emptyArray,a.prototype.startTimeUnixNano=null,a.prototype.timeUnixNano=null,a.prototype.count=null,a.prototype.sum=null,a.prototype.bucketCounts=_.emptyArray,a.prototype.explicitBounds=_.emptyArray,a.prototype.exemplars=_.emptyArray,a.prototype.flags=null,a.prototype.min=null,a.prototype.max=null;var u;return Object.defineProperty(a.prototype,"_sum",{get:_.oneOfGetter(u=["sum"]),set:_.oneOfSetter(u)}),Object.defineProperty(a.prototype,"_min",{get:_.oneOfGetter(u=["min"]),set:_.oneOfSetter(u)}),Object.defineProperty(a.prototype,"_max",{get:_.oneOfGetter(u=["max"]),set:_.oneOfSetter(u)}),a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=N.create()),e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&n.uint32(17).fixed64(e.startTimeUnixNano),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(25).fixed64(e.timeUnixNano),e.count!=null&&Object.hasOwnProperty.call(e,"count")&&n.uint32(33).fixed64(e.count),e.sum!=null&&Object.hasOwnProperty.call(e,"sum")&&n.uint32(41).double(e.sum),e.bucketCounts!=null&&e.bucketCounts.length){n.uint32(50).fork();for(var s=0;s<e.bucketCounts.length;++s)n.fixed64(e.bucketCounts[s]);n.ldelim()}if(e.explicitBounds!=null&&e.explicitBounds.length){n.uint32(58).fork();for(var s=0;s<e.explicitBounds.length;++s)n.double(e.explicitBounds[s]);n.ldelim()}if(e.exemplars!=null&&e.exemplars.length)for(var s=0;s<e.exemplars.length;++s)p.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[s],n.uint32(66).fork()).ldelim();if(e.attributes!=null&&e.attributes.length)for(var s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],n.uint32(74).fork()).ldelim();return e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&n.uint32(80).uint32(e.flags),e.min!=null&&Object.hasOwnProperty.call(e,"min")&&n.uint32(89).double(e.min),e.max!=null&&Object.hasOwnProperty.call(e,"max")&&n.uint32(97).double(e.max),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.HistogramDataPoint;e.pos<s;){var E=e.uint32();switch(E>>>3){case 9:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.startTimeUnixNano=e.fixed64();break}case 3:{l.timeUnixNano=e.fixed64();break}case 4:{l.count=e.fixed64();break}case 5:{l.sum=e.double();break}case 6:{if(l.bucketCounts&&l.bucketCounts.length||(l.bucketCounts=[]),(E&7)===2)for(var O=e.uint32()+e.pos;e.pos<O;)l.bucketCounts.push(e.fixed64());else l.bucketCounts.push(e.fixed64());break}case 7:{if(l.explicitBounds&&l.explicitBounds.length||(l.explicitBounds=[]),(E&7)===2)for(var O=e.uint32()+e.pos;e.pos<O;)l.explicitBounds.push(e.double());else l.explicitBounds.push(e.double());break}case 8:{l.exemplars&&l.exemplars.length||(l.exemplars=[]),l.exemplars.push(p.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 10:{l.flags=e.uint32();break}case 11:{l.min=e.double();break}case 12:{l.max=e.double();break}default:e.skipType(E&7);break}}return l},a.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var s=0;s<e.attributes.length;++s){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[s]);if(l)return"attributes."+l}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!_.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&_.isInteger(e.startTimeUnixNano.low)&&_.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!_.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&_.isInteger(e.timeUnixNano.low)&&_.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.count!=null&&e.hasOwnProperty("count")&&!_.isInteger(e.count)&&!(e.count&&_.isInteger(e.count.low)&&_.isInteger(e.count.high)))return"count: integer|Long expected";if(e.sum!=null&&e.hasOwnProperty("sum")&&(n._sum=1,typeof e.sum!="number"))return"sum: number expected";if(e.bucketCounts!=null&&e.hasOwnProperty("bucketCounts")){if(!Array.isArray(e.bucketCounts))return"bucketCounts: array expected";for(var s=0;s<e.bucketCounts.length;++s)if(!_.isInteger(e.bucketCounts[s])&&!(e.bucketCounts[s]&&_.isInteger(e.bucketCounts[s].low)&&_.isInteger(e.bucketCounts[s].high)))return"bucketCounts: integer|Long[] expected"}if(e.explicitBounds!=null&&e.hasOwnProperty("explicitBounds")){if(!Array.isArray(e.explicitBounds))return"explicitBounds: array expected";for(var s=0;s<e.explicitBounds.length;++s)if(typeof e.explicitBounds[s]!="number")return"explicitBounds: number[] expected"}if(e.exemplars!=null&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(var s=0;s<e.exemplars.length;++s){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[s]);if(l)return"exemplars."+l}}return e.flags!=null&&e.hasOwnProperty("flags")&&!_.isInteger(e.flags)?"flags: integer expected":e.min!=null&&e.hasOwnProperty("min")&&(n._min=1,typeof e.min!="number")?"min: number expected":e.max!=null&&e.hasOwnProperty("max")&&(n._max=1,typeof e.max!="number")?"max: number expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.HistogramDataPoint)return e;var n=new p.opentelemetry.proto.metrics.v1.HistogramDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: array expected");n.attributes=[];for(var s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}if(e.startTimeUnixNano!=null&&(_.Long?(n.startTimeUnixNano=_.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?n.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?n.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(n.startTimeUnixNano=new _.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.timeUnixNano!=null&&(_.Long?(n.timeUnixNano=_.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new _.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.count!=null&&(_.Long?(n.count=_.Long.fromValue(e.count)).unsigned=!1:typeof e.count=="string"?n.count=parseInt(e.count,10):typeof e.count=="number"?n.count=e.count:typeof e.count=="object"&&(n.count=new _.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber())),e.sum!=null&&(n.sum=Number(e.sum)),e.bucketCounts){if(!Array.isArray(e.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected");n.bucketCounts=[];for(var s=0;s<e.bucketCounts.length;++s)_.Long?(n.bucketCounts[s]=_.Long.fromValue(e.bucketCounts[s])).unsigned=!1:typeof e.bucketCounts[s]=="string"?n.bucketCounts[s]=parseInt(e.bucketCounts[s],10):typeof e.bucketCounts[s]=="number"?n.bucketCounts[s]=e.bucketCounts[s]:typeof e.bucketCounts[s]=="object"&&(n.bucketCounts[s]=new _.LongBits(e.bucketCounts[s].low>>>0,e.bucketCounts[s].high>>>0).toNumber())}if(e.explicitBounds){if(!Array.isArray(e.explicitBounds))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected");n.explicitBounds=[];for(var s=0;s<e.explicitBounds.length;++s)n.explicitBounds[s]=Number(e.explicitBounds[s])}if(e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected");n.exemplars=[];for(var s=0;s<e.exemplars.length;++s){if(typeof e.exemplars[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected");n.exemplars[s]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[s])}}return e.flags!=null&&(n.flags=e.flags>>>0),e.min!=null&&(n.min=Number(e.min)),e.max!=null&&(n.max=Number(e.max)),n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.bucketCounts=[],s.explicitBounds=[],s.exemplars=[],s.attributes=[]),n.defaults){if(_.Long){var l=new _.Long(0,0,!1);s.startTimeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.startTimeUnixNano=n.longs===String?"0":0;if(_.Long){var l=new _.Long(0,0,!1);s.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.timeUnixNano=n.longs===String?"0":0;if(_.Long){var l=new _.Long(0,0,!1);s.count=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.count=n.longs===String?"0":0;s.flags=0}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?s.startTimeUnixNano=n.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:s.startTimeUnixNano=n.longs===String?_.Long.prototype.toString.call(e.startTimeUnixNano):n.longs===Number?new _.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?s.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:s.timeUnixNano=n.longs===String?_.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new _.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.count!=null&&e.hasOwnProperty("count")&&(typeof e.count=="number"?s.count=n.longs===String?String(e.count):e.count:s.count=n.longs===String?_.Long.prototype.toString.call(e.count):n.longs===Number?new _.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count),e.sum!=null&&e.hasOwnProperty("sum")&&(s.sum=n.json&&!isFinite(e.sum)?String(e.sum):e.sum,n.oneofs&&(s._sum="sum")),e.bucketCounts&&e.bucketCounts.length){s.bucketCounts=[];for(var E=0;E<e.bucketCounts.length;++E)typeof e.bucketCounts[E]=="number"?s.bucketCounts[E]=n.longs===String?String(e.bucketCounts[E]):e.bucketCounts[E]:s.bucketCounts[E]=n.longs===String?_.Long.prototype.toString.call(e.bucketCounts[E]):n.longs===Number?new _.LongBits(e.bucketCounts[E].low>>>0,e.bucketCounts[E].high>>>0).toNumber():e.bucketCounts[E]}if(e.explicitBounds&&e.explicitBounds.length){s.explicitBounds=[];for(var E=0;E<e.explicitBounds.length;++E)s.explicitBounds[E]=n.json&&!isFinite(e.explicitBounds[E])?String(e.explicitBounds[E]):e.explicitBounds[E]}if(e.exemplars&&e.exemplars.length){s.exemplars=[];for(var E=0;E<e.exemplars.length;++E)s.exemplars[E]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[E],n)}if(e.attributes&&e.attributes.length){s.attributes=[];for(var E=0;E<e.attributes.length;++E)s.attributes[E]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[E],n)}return e.flags!=null&&e.hasOwnProperty("flags")&&(s.flags=e.flags),e.min!=null&&e.hasOwnProperty("min")&&(s.min=n.json&&!isFinite(e.min)?String(e.min):e.min,n.oneofs&&(s._min="min")),e.max!=null&&e.hasOwnProperty("max")&&(s.max=n.json&&!isFinite(e.max)?String(e.max):e.max,n.oneofs&&(s._max="max")),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.HistogramDataPoint"},a}(),c.ExponentialHistogramDataPoint=function(){function a(t){if(this.attributes=[],this.exemplars=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}a.prototype.attributes=_.emptyArray,a.prototype.startTimeUnixNano=null,a.prototype.timeUnixNano=null,a.prototype.count=null,a.prototype.sum=null,a.prototype.scale=null,a.prototype.zeroCount=null,a.prototype.positive=null,a.prototype.negative=null,a.prototype.flags=null,a.prototype.exemplars=_.emptyArray,a.prototype.min=null,a.prototype.max=null,a.prototype.zeroThreshold=null;var u;return Object.defineProperty(a.prototype,"_sum",{get:_.oneOfGetter(u=["sum"]),set:_.oneOfSetter(u)}),Object.defineProperty(a.prototype,"_min",{get:_.oneOfGetter(u=["min"]),set:_.oneOfSetter(u)}),Object.defineProperty(a.prototype,"_max",{get:_.oneOfGetter(u=["max"]),set:_.oneOfSetter(u)}),a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=N.create()),e.attributes!=null&&e.attributes.length)for(var s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],n.uint32(10).fork()).ldelim();if(e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&n.uint32(17).fixed64(e.startTimeUnixNano),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(25).fixed64(e.timeUnixNano),e.count!=null&&Object.hasOwnProperty.call(e,"count")&&n.uint32(33).fixed64(e.count),e.sum!=null&&Object.hasOwnProperty.call(e,"sum")&&n.uint32(41).double(e.sum),e.scale!=null&&Object.hasOwnProperty.call(e,"scale")&&n.uint32(48).sint32(e.scale),e.zeroCount!=null&&Object.hasOwnProperty.call(e,"zeroCount")&&n.uint32(57).fixed64(e.zeroCount),e.positive!=null&&Object.hasOwnProperty.call(e,"positive")&&p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(e.positive,n.uint32(66).fork()).ldelim(),e.negative!=null&&Object.hasOwnProperty.call(e,"negative")&&p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(e.negative,n.uint32(74).fork()).ldelim(),e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&n.uint32(80).uint32(e.flags),e.exemplars!=null&&e.exemplars.length)for(var s=0;s<e.exemplars.length;++s)p.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[s],n.uint32(90).fork()).ldelim();return e.min!=null&&Object.hasOwnProperty.call(e,"min")&&n.uint32(97).double(e.min),e.max!=null&&Object.hasOwnProperty.call(e,"max")&&n.uint32(105).double(e.max),e.zeroThreshold!=null&&Object.hasOwnProperty.call(e,"zeroThreshold")&&n.uint32(113).double(e.zeroThreshold),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.startTimeUnixNano=e.fixed64();break}case 3:{l.timeUnixNano=e.fixed64();break}case 4:{l.count=e.fixed64();break}case 5:{l.sum=e.double();break}case 6:{l.scale=e.sint32();break}case 7:{l.zeroCount=e.fixed64();break}case 8:{l.positive=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(e,e.uint32());break}case 9:{l.negative=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(e,e.uint32());break}case 10:{l.flags=e.uint32();break}case 11:{l.exemplars&&l.exemplars.length||(l.exemplars=[]),l.exemplars.push(p.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 12:{l.min=e.double();break}case 13:{l.max=e.double();break}case 14:{l.zeroThreshold=e.double();break}default:e.skipType(E&7);break}}return l},a.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var s=0;s<e.attributes.length;++s){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[s]);if(l)return"attributes."+l}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!_.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&_.isInteger(e.startTimeUnixNano.low)&&_.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!_.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&_.isInteger(e.timeUnixNano.low)&&_.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.count!=null&&e.hasOwnProperty("count")&&!_.isInteger(e.count)&&!(e.count&&_.isInteger(e.count.low)&&_.isInteger(e.count.high)))return"count: integer|Long expected";if(e.sum!=null&&e.hasOwnProperty("sum")&&(n._sum=1,typeof e.sum!="number"))return"sum: number expected";if(e.scale!=null&&e.hasOwnProperty("scale")&&!_.isInteger(e.scale))return"scale: integer expected";if(e.zeroCount!=null&&e.hasOwnProperty("zeroCount")&&!_.isInteger(e.zeroCount)&&!(e.zeroCount&&_.isInteger(e.zeroCount.low)&&_.isInteger(e.zeroCount.high)))return"zeroCount: integer|Long expected";if(e.positive!=null&&e.hasOwnProperty("positive")){var l=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(e.positive);if(l)return"positive."+l}if(e.negative!=null&&e.hasOwnProperty("negative")){var l=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(e.negative);if(l)return"negative."+l}if(e.flags!=null&&e.hasOwnProperty("flags")&&!_.isInteger(e.flags))return"flags: integer expected";if(e.exemplars!=null&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(var s=0;s<e.exemplars.length;++s){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[s]);if(l)return"exemplars."+l}}return e.min!=null&&e.hasOwnProperty("min")&&(n._min=1,typeof e.min!="number")?"min: number expected":e.max!=null&&e.hasOwnProperty("max")&&(n._max=1,typeof e.max!="number")?"max: number expected":e.zeroThreshold!=null&&e.hasOwnProperty("zeroThreshold")&&typeof e.zeroThreshold!="number"?"zeroThreshold: number expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint)return e;var n=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: array expected");n.attributes=[];for(var s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}if(e.startTimeUnixNano!=null&&(_.Long?(n.startTimeUnixNano=_.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?n.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?n.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(n.startTimeUnixNano=new _.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.timeUnixNano!=null&&(_.Long?(n.timeUnixNano=_.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new _.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.count!=null&&(_.Long?(n.count=_.Long.fromValue(e.count)).unsigned=!1:typeof e.count=="string"?n.count=parseInt(e.count,10):typeof e.count=="number"?n.count=e.count:typeof e.count=="object"&&(n.count=new _.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber())),e.sum!=null&&(n.sum=Number(e.sum)),e.scale!=null&&(n.scale=e.scale|0),e.zeroCount!=null&&(_.Long?(n.zeroCount=_.Long.fromValue(e.zeroCount)).unsigned=!1:typeof e.zeroCount=="string"?n.zeroCount=parseInt(e.zeroCount,10):typeof e.zeroCount=="number"?n.zeroCount=e.zeroCount:typeof e.zeroCount=="object"&&(n.zeroCount=new _.LongBits(e.zeroCount.low>>>0,e.zeroCount.high>>>0).toNumber())),e.positive!=null){if(typeof e.positive!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected");n.positive=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(e.positive)}if(e.negative!=null){if(typeof e.negative!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected");n.negative=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(e.negative)}if(e.flags!=null&&(n.flags=e.flags>>>0),e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected");n.exemplars=[];for(var s=0;s<e.exemplars.length;++s){if(typeof e.exemplars[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected");n.exemplars[s]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[s])}}return e.min!=null&&(n.min=Number(e.min)),e.max!=null&&(n.max=Number(e.max)),e.zeroThreshold!=null&&(n.zeroThreshold=Number(e.zeroThreshold)),n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.attributes=[],s.exemplars=[]),n.defaults){if(_.Long){var l=new _.Long(0,0,!1);s.startTimeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.startTimeUnixNano=n.longs===String?"0":0;if(_.Long){var l=new _.Long(0,0,!1);s.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.timeUnixNano=n.longs===String?"0":0;if(_.Long){var l=new _.Long(0,0,!1);s.count=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.count=n.longs===String?"0":0;if(s.scale=0,_.Long){var l=new _.Long(0,0,!1);s.zeroCount=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.zeroCount=n.longs===String?"0":0;s.positive=null,s.negative=null,s.flags=0,s.zeroThreshold=0}if(e.attributes&&e.attributes.length){s.attributes=[];for(var E=0;E<e.attributes.length;++E)s.attributes[E]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[E],n)}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?s.startTimeUnixNano=n.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:s.startTimeUnixNano=n.longs===String?_.Long.prototype.toString.call(e.startTimeUnixNano):n.longs===Number?new _.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?s.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:s.timeUnixNano=n.longs===String?_.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new _.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.count!=null&&e.hasOwnProperty("count")&&(typeof e.count=="number"?s.count=n.longs===String?String(e.count):e.count:s.count=n.longs===String?_.Long.prototype.toString.call(e.count):n.longs===Number?new _.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count),e.sum!=null&&e.hasOwnProperty("sum")&&(s.sum=n.json&&!isFinite(e.sum)?String(e.sum):e.sum,n.oneofs&&(s._sum="sum")),e.scale!=null&&e.hasOwnProperty("scale")&&(s.scale=e.scale),e.zeroCount!=null&&e.hasOwnProperty("zeroCount")&&(typeof e.zeroCount=="number"?s.zeroCount=n.longs===String?String(e.zeroCount):e.zeroCount:s.zeroCount=n.longs===String?_.Long.prototype.toString.call(e.zeroCount):n.longs===Number?new _.LongBits(e.zeroCount.low>>>0,e.zeroCount.high>>>0).toNumber():e.zeroCount),e.positive!=null&&e.hasOwnProperty("positive")&&(s.positive=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(e.positive,n)),e.negative!=null&&e.hasOwnProperty("negative")&&(s.negative=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(e.negative,n)),e.flags!=null&&e.hasOwnProperty("flags")&&(s.flags=e.flags),e.exemplars&&e.exemplars.length){s.exemplars=[];for(var E=0;E<e.exemplars.length;++E)s.exemplars[E]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[E],n)}return e.min!=null&&e.hasOwnProperty("min")&&(s.min=n.json&&!isFinite(e.min)?String(e.min):e.min,n.oneofs&&(s._min="min")),e.max!=null&&e.hasOwnProperty("max")&&(s.max=n.json&&!isFinite(e.max)?String(e.max):e.max,n.oneofs&&(s._max="max")),e.zeroThreshold!=null&&e.hasOwnProperty("zeroThreshold")&&(s.zeroThreshold=n.json&&!isFinite(e.zeroThreshold)?String(e.zeroThreshold):e.zeroThreshold),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"},a.Buckets=function(){function t(e){if(this.bucketCounts=[],e)for(var n=Object.keys(e),s=0;s<n.length;++s)e[n[s]]!=null&&(this[n[s]]=e[n[s]])}return t.prototype.offset=null,t.prototype.bucketCounts=_.emptyArray,t.create=function(n){return new t(n)},t.encode=function(n,s){if(s||(s=N.create()),n.offset!=null&&Object.hasOwnProperty.call(n,"offset")&&s.uint32(8).sint32(n.offset),n.bucketCounts!=null&&n.bucketCounts.length){s.uint32(18).fork();for(var l=0;l<n.bucketCounts.length;++l)s.uint64(n.bucketCounts[l]);s.ldelim()}return s},t.encodeDelimited=function(n,s){return this.encode(n,s).ldelim()},t.decode=function(n,s){n instanceof T||(n=T.create(n));for(var l=s===void 0?n.len:n.pos+s,E=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;n.pos<l;){var O=n.uint32();switch(O>>>3){case 1:{E.offset=n.sint32();break}case 2:{if(E.bucketCounts&&E.bucketCounts.length||(E.bucketCounts=[]),(O&7)===2)for(var x=n.uint32()+n.pos;n.pos<x;)E.bucketCounts.push(n.uint64());else E.bucketCounts.push(n.uint64());break}default:n.skipType(O&7);break}}return E},t.decodeDelimited=function(n){return n instanceof T||(n=new T(n)),this.decode(n,n.uint32())},t.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.offset!=null&&n.hasOwnProperty("offset")&&!_.isInteger(n.offset))return"offset: integer expected";if(n.bucketCounts!=null&&n.hasOwnProperty("bucketCounts")){if(!Array.isArray(n.bucketCounts))return"bucketCounts: array expected";for(var s=0;s<n.bucketCounts.length;++s)if(!_.isInteger(n.bucketCounts[s])&&!(n.bucketCounts[s]&&_.isInteger(n.bucketCounts[s].low)&&_.isInteger(n.bucketCounts[s].high)))return"bucketCounts: integer|Long[] expected"}return null},t.fromObject=function(n){if(n instanceof p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets)return n;var s=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;if(n.offset!=null&&(s.offset=n.offset|0),n.bucketCounts){if(!Array.isArray(n.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected");s.bucketCounts=[];for(var l=0;l<n.bucketCounts.length;++l)_.Long?(s.bucketCounts[l]=_.Long.fromValue(n.bucketCounts[l])).unsigned=!0:typeof n.bucketCounts[l]=="string"?s.bucketCounts[l]=parseInt(n.bucketCounts[l],10):typeof n.bucketCounts[l]=="number"?s.bucketCounts[l]=n.bucketCounts[l]:typeof n.bucketCounts[l]=="object"&&(s.bucketCounts[l]=new _.LongBits(n.bucketCounts[l].low>>>0,n.bucketCounts[l].high>>>0).toNumber(!0))}return s},t.toObject=function(n,s){s||(s={});var l={};if((s.arrays||s.defaults)&&(l.bucketCounts=[]),s.defaults&&(l.offset=0),n.offset!=null&&n.hasOwnProperty("offset")&&(l.offset=n.offset),n.bucketCounts&&n.bucketCounts.length){l.bucketCounts=[];for(var E=0;E<n.bucketCounts.length;++E)typeof n.bucketCounts[E]=="number"?l.bucketCounts[E]=s.longs===String?String(n.bucketCounts[E]):n.bucketCounts[E]:l.bucketCounts[E]=s.longs===String?_.Long.prototype.toString.call(n.bucketCounts[E]):s.longs===Number?new _.LongBits(n.bucketCounts[E].low>>>0,n.bucketCounts[E].high>>>0).toNumber(!0):n.bucketCounts[E]}return l},t.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},t.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},t}(),a}(),c.SummaryDataPoint=function(){function a(u){if(this.attributes=[],this.quantileValues=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.attributes=_.emptyArray,a.prototype.startTimeUnixNano=null,a.prototype.timeUnixNano=null,a.prototype.count=null,a.prototype.sum=null,a.prototype.quantileValues=_.emptyArray,a.prototype.flags=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&e.uint32(17).fixed64(t.startTimeUnixNano),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&e.uint32(25).fixed64(t.timeUnixNano),t.count!=null&&Object.hasOwnProperty.call(t,"count")&&e.uint32(33).fixed64(t.count),t.sum!=null&&Object.hasOwnProperty.call(t,"sum")&&e.uint32(41).double(t.sum),t.quantileValues!=null&&t.quantileValues.length)for(var n=0;n<t.quantileValues.length;++n)p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.encode(t.quantileValues[n],e.uint32(50).fork()).ldelim();if(t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(58).fork()).ldelim();return t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&e.uint32(64).uint32(t.flags),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint;t.pos<n;){var l=t.uint32();switch(l>>>3){case 7:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{s.startTimeUnixNano=t.fixed64();break}case 3:{s.timeUnixNano=t.fixed64();break}case 4:{s.count=t.fixed64();break}case 5:{s.sum=t.double();break}case 6:{s.quantileValues&&s.quantileValues.length||(s.quantileValues=[]),s.quantileValues.push(p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(t,t.uint32()));break}case 8:{s.flags=t.uint32();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(n)return"attributes."+n}}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!_.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&_.isInteger(t.startTimeUnixNano.low)&&_.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!_.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&_.isInteger(t.timeUnixNano.low)&&_.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.count!=null&&t.hasOwnProperty("count")&&!_.isInteger(t.count)&&!(t.count&&_.isInteger(t.count.low)&&_.isInteger(t.count.high)))return"count: integer|Long expected";if(t.sum!=null&&t.hasOwnProperty("sum")&&typeof t.sum!="number")return"sum: number expected";if(t.quantileValues!=null&&t.hasOwnProperty("quantileValues")){if(!Array.isArray(t.quantileValues))return"quantileValues: array expected";for(var e=0;e<t.quantileValues.length;++e){var n=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify(t.quantileValues[e]);if(n)return"quantileValues."+n}}return t.flags!=null&&t.hasOwnProperty("flags")&&!_.isInteger(t.flags)?"flags: integer expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.SummaryDataPoint)return t;var e=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}if(t.startTimeUnixNano!=null&&(_.Long?(e.startTimeUnixNano=_.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?e.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?e.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(e.startTimeUnixNano=new _.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.timeUnixNano!=null&&(_.Long?(e.timeUnixNano=_.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?e.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?e.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(e.timeUnixNano=new _.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.count!=null&&(_.Long?(e.count=_.Long.fromValue(t.count)).unsigned=!1:typeof t.count=="string"?e.count=parseInt(t.count,10):typeof t.count=="number"?e.count=t.count:typeof t.count=="object"&&(e.count=new _.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber())),t.sum!=null&&(e.sum=Number(t.sum)),t.quantileValues){if(!Array.isArray(t.quantileValues))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected");e.quantileValues=[];for(var n=0;n<t.quantileValues.length;++n){if(typeof t.quantileValues[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: object expected");e.quantileValues[n]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.fromObject(t.quantileValues[n])}}return t.flags!=null&&(e.flags=t.flags>>>0),e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.quantileValues=[],n.attributes=[]),e.defaults){if(_.Long){var s=new _.Long(0,0,!1);n.startTimeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}else n.startTimeUnixNano=e.longs===String?"0":0;if(_.Long){var s=new _.Long(0,0,!1);n.timeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}else n.timeUnixNano=e.longs===String?"0":0;if(_.Long){var s=new _.Long(0,0,!1);n.count=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}else n.count=e.longs===String?"0":0;n.sum=0,n.flags=0}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?n.startTimeUnixNano=e.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:n.startTimeUnixNano=e.longs===String?_.Long.prototype.toString.call(t.startTimeUnixNano):e.longs===Number?new _.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?n.timeUnixNano=e.longs===String?String(t.timeUnixNano):t.timeUnixNano:n.timeUnixNano=e.longs===String?_.Long.prototype.toString.call(t.timeUnixNano):e.longs===Number?new _.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.count!=null&&t.hasOwnProperty("count")&&(typeof t.count=="number"?n.count=e.longs===String?String(t.count):t.count:n.count=e.longs===String?_.Long.prototype.toString.call(t.count):e.longs===Number?new _.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber():t.count),t.sum!=null&&t.hasOwnProperty("sum")&&(n.sum=e.json&&!isFinite(t.sum)?String(t.sum):t.sum),t.quantileValues&&t.quantileValues.length){n.quantileValues=[];for(var l=0;l<t.quantileValues.length;++l)n.quantileValues[l]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(t.quantileValues[l],e)}if(t.attributes&&t.attributes.length){n.attributes=[];for(var l=0;l<t.attributes.length;++l)n.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[l],e)}return t.flags!=null&&t.hasOwnProperty("flags")&&(n.flags=t.flags),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.SummaryDataPoint"},a.ValueAtQuantile=function(){function u(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.quantile=null,u.prototype.value=null,u.create=function(e){return new u(e)},u.encode=function(e,n){return n||(n=N.create()),e.quantile!=null&&Object.hasOwnProperty.call(e,"quantile")&&n.uint32(9).double(e.quantile),e.value!=null&&Object.hasOwnProperty.call(e,"value")&&n.uint32(17).double(e.value),n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.quantile=e.double();break}case 2:{l.value=e.double();break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.verify=function(e){return typeof e!="object"||e===null?"object expected":e.quantile!=null&&e.hasOwnProperty("quantile")&&typeof e.quantile!="number"?"quantile: number expected":e.value!=null&&e.hasOwnProperty("value")&&typeof e.value!="number"?"value: number expected":null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return e;var n=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;return e.quantile!=null&&(n.quantile=Number(e.quantile)),e.value!=null&&(n.value=Number(e.value)),n},u.toObject=function(e,n){n||(n={});var s={};return n.defaults&&(s.quantile=0,s.value=0),e.quantile!=null&&e.hasOwnProperty("quantile")&&(s.quantile=n.json&&!isFinite(e.quantile)?String(e.quantile):e.quantile),e.value!=null&&e.hasOwnProperty("value")&&(s.value=n.json&&!isFinite(e.value)?String(e.value):e.value),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},u}(),a}(),c.Exemplar=function(){function a(t){if(this.filteredAttributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}a.prototype.filteredAttributes=_.emptyArray,a.prototype.timeUnixNano=null,a.prototype.asDouble=null,a.prototype.asInt=null,a.prototype.spanId=null,a.prototype.traceId=null;var u;return Object.defineProperty(a.prototype,"value",{get:_.oneOfGetter(u=["asDouble","asInt"]),set:_.oneOfSetter(u)}),a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=N.create()),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(17).fixed64(e.timeUnixNano),e.asDouble!=null&&Object.hasOwnProperty.call(e,"asDouble")&&n.uint32(25).double(e.asDouble),e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId")&&n.uint32(34).bytes(e.spanId),e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId")&&n.uint32(42).bytes(e.traceId),e.asInt!=null&&Object.hasOwnProperty.call(e,"asInt")&&n.uint32(49).sfixed64(e.asInt),e.filteredAttributes!=null&&e.filteredAttributes.length)for(var s=0;s<e.filteredAttributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.filteredAttributes[s],n.uint32(58).fork()).ldelim();return n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.Exemplar;e.pos<s;){var E=e.uint32();switch(E>>>3){case 7:{l.filteredAttributes&&l.filteredAttributes.length||(l.filteredAttributes=[]),l.filteredAttributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.timeUnixNano=e.fixed64();break}case 3:{l.asDouble=e.double();break}case 6:{l.asInt=e.sfixed64();break}case 4:{l.spanId=e.bytes();break}case 5:{l.traceId=e.bytes();break}default:e.skipType(E&7);break}}return l},a.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.filteredAttributes!=null&&e.hasOwnProperty("filteredAttributes")){if(!Array.isArray(e.filteredAttributes))return"filteredAttributes: array expected";for(var s=0;s<e.filteredAttributes.length;++s){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.filteredAttributes[s]);if(l)return"filteredAttributes."+l}}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!_.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&_.isInteger(e.timeUnixNano.low)&&_.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.asDouble!=null&&e.hasOwnProperty("asDouble")&&(n.value=1,typeof e.asDouble!="number"))return"asDouble: number expected";if(e.asInt!=null&&e.hasOwnProperty("asInt")){if(n.value===1)return"value: multiple values";if(n.value=1,!_.isInteger(e.asInt)&&!(e.asInt&&_.isInteger(e.asInt.low)&&_.isInteger(e.asInt.high)))return"asInt: integer|Long expected"}return e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||_.isString(e.spanId))?"spanId: buffer expected":e.traceId!=null&&e.hasOwnProperty("traceId")&&!(e.traceId&&typeof e.traceId.length=="number"||_.isString(e.traceId))?"traceId: buffer expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.Exemplar)return e;var n=new p.opentelemetry.proto.metrics.v1.Exemplar;if(e.filteredAttributes){if(!Array.isArray(e.filteredAttributes))throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: array expected");n.filteredAttributes=[];for(var s=0;s<e.filteredAttributes.length;++s){if(typeof e.filteredAttributes[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected");n.filteredAttributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.filteredAttributes[s])}}return e.timeUnixNano!=null&&(_.Long?(n.timeUnixNano=_.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new _.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.asDouble!=null&&(n.asDouble=Number(e.asDouble)),e.asInt!=null&&(_.Long?(n.asInt=_.Long.fromValue(e.asInt)).unsigned=!1:typeof e.asInt=="string"?n.asInt=parseInt(e.asInt,10):typeof e.asInt=="number"?n.asInt=e.asInt:typeof e.asInt=="object"&&(n.asInt=new _.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber())),e.spanId!=null&&(typeof e.spanId=="string"?_.base64.decode(e.spanId,n.spanId=_.newBuffer(_.base64.length(e.spanId)),0):e.spanId.length>=0&&(n.spanId=e.spanId)),e.traceId!=null&&(typeof e.traceId=="string"?_.base64.decode(e.traceId,n.traceId=_.newBuffer(_.base64.length(e.traceId)),0):e.traceId.length>=0&&(n.traceId=e.traceId)),n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.filteredAttributes=[]),n.defaults){if(_.Long){var l=new _.Long(0,0,!1);s.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.timeUnixNano=n.longs===String?"0":0;n.bytes===String?s.spanId="":(s.spanId=[],n.bytes!==Array&&(s.spanId=_.newBuffer(s.spanId))),n.bytes===String?s.traceId="":(s.traceId=[],n.bytes!==Array&&(s.traceId=_.newBuffer(s.traceId)))}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?s.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:s.timeUnixNano=n.longs===String?_.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new _.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.asDouble!=null&&e.hasOwnProperty("asDouble")&&(s.asDouble=n.json&&!isFinite(e.asDouble)?String(e.asDouble):e.asDouble,n.oneofs&&(s.value="asDouble")),e.spanId!=null&&e.hasOwnProperty("spanId")&&(s.spanId=n.bytes===String?_.base64.encode(e.spanId,0,e.spanId.length):n.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),e.traceId!=null&&e.hasOwnProperty("traceId")&&(s.traceId=n.bytes===String?_.base64.encode(e.traceId,0,e.traceId.length):n.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),e.asInt!=null&&e.hasOwnProperty("asInt")&&(typeof e.asInt=="number"?s.asInt=n.longs===String?String(e.asInt):e.asInt:s.asInt=n.longs===String?_.Long.prototype.toString.call(e.asInt):n.longs===Number?new _.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber():e.asInt,n.oneofs&&(s.value="asInt")),e.filteredAttributes&&e.filteredAttributes.length){s.filteredAttributes=[];for(var E=0;E<e.filteredAttributes.length;++E)s.filteredAttributes[E]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.filteredAttributes[E],n)}return s},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Exemplar"},a}(),c}(),i}(),r.logs=function(){var i={};return i.v1=function(){var c={};return c.LogsData=function(){function a(u){if(this.resourceLogs=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.resourceLogs=_.emptyArray,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.resourceLogs!=null&&t.resourceLogs.length)for(var n=0;n<t.resourceLogs.length;++n)p.opentelemetry.proto.logs.v1.ResourceLogs.encode(t.resourceLogs[n],e.uint32(10).fork()).ldelim();return e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.LogsData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resourceLogs&&s.resourceLogs.length||(s.resourceLogs=[]),s.resourceLogs.push(p.opentelemetry.proto.logs.v1.ResourceLogs.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resourceLogs!=null&&t.hasOwnProperty("resourceLogs")){if(!Array.isArray(t.resourceLogs))return"resourceLogs: array expected";for(var e=0;e<t.resourceLogs.length;++e){var n=p.opentelemetry.proto.logs.v1.ResourceLogs.verify(t.resourceLogs[e]);if(n)return"resourceLogs."+n}}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.logs.v1.LogsData)return t;var e=new p.opentelemetry.proto.logs.v1.LogsData;if(t.resourceLogs){if(!Array.isArray(t.resourceLogs))throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: array expected");e.resourceLogs=[];for(var n=0;n<t.resourceLogs.length;++n){if(typeof t.resourceLogs[n]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: object expected");e.resourceLogs[n]=p.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(t.resourceLogs[n])}}return e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.resourceLogs=[]),t.resourceLogs&&t.resourceLogs.length){n.resourceLogs=[];for(var s=0;s<t.resourceLogs.length;++s)n.resourceLogs[s]=p.opentelemetry.proto.logs.v1.ResourceLogs.toObject(t.resourceLogs[s],e)}return n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.LogsData"},a}(),c.ResourceLogs=function(){function a(u){if(this.scopeLogs=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.resource=null,a.prototype.scopeLogs=_.emptyArray,a.prototype.schemaUrl=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.resource!=null&&Object.hasOwnProperty.call(t,"resource")&&p.opentelemetry.proto.resource.v1.Resource.encode(t.resource,e.uint32(10).fork()).ldelim(),t.scopeLogs!=null&&t.scopeLogs.length)for(var n=0;n<t.scopeLogs.length;++n)p.opentelemetry.proto.logs.v1.ScopeLogs.encode(t.scopeLogs[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.ResourceLogs;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{s.scopeLogs&&s.scopeLogs.length||(s.scopeLogs=[]),s.scopeLogs.push(p.opentelemetry.proto.logs.v1.ScopeLogs.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resource!=null&&t.hasOwnProperty("resource")){var e=p.opentelemetry.proto.resource.v1.Resource.verify(t.resource);if(e)return"resource."+e}if(t.scopeLogs!=null&&t.hasOwnProperty("scopeLogs")){if(!Array.isArray(t.scopeLogs))return"scopeLogs: array expected";for(var n=0;n<t.scopeLogs.length;++n){var e=p.opentelemetry.proto.logs.v1.ScopeLogs.verify(t.scopeLogs[n]);if(e)return"scopeLogs."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!_.isString(t.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.logs.v1.ResourceLogs)return t;var e=new p.opentelemetry.proto.logs.v1.ResourceLogs;if(t.resource!=null){if(typeof t.resource!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.resource: object expected");e.resource=p.opentelemetry.proto.resource.v1.Resource.fromObject(t.resource)}if(t.scopeLogs){if(!Array.isArray(t.scopeLogs))throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: array expected");e.scopeLogs=[];for(var n=0;n<t.scopeLogs.length;++n){if(typeof t.scopeLogs[n]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: object expected");e.scopeLogs[n]=p.opentelemetry.proto.logs.v1.ScopeLogs.fromObject(t.scopeLogs[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.scopeLogs=[]),e.defaults&&(n.resource=null,n.schemaUrl=""),t.resource!=null&&t.hasOwnProperty("resource")&&(n.resource=p.opentelemetry.proto.resource.v1.Resource.toObject(t.resource,e)),t.scopeLogs&&t.scopeLogs.length){n.scopeLogs=[];for(var s=0;s<t.scopeLogs.length;++s)n.scopeLogs[s]=p.opentelemetry.proto.logs.v1.ScopeLogs.toObject(t.scopeLogs[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.ResourceLogs"},a}(),c.ScopeLogs=function(){function a(u){if(this.logRecords=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.scope=null,a.prototype.logRecords=_.emptyArray,a.prototype.schemaUrl=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.scope!=null&&Object.hasOwnProperty.call(t,"scope")&&p.opentelemetry.proto.common.v1.InstrumentationScope.encode(t.scope,e.uint32(10).fork()).ldelim(),t.logRecords!=null&&t.logRecords.length)for(var n=0;n<t.logRecords.length;++n)p.opentelemetry.proto.logs.v1.LogRecord.encode(t.logRecords[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.ScopeLogs;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{s.logRecords&&s.logRecords.length||(s.logRecords=[]),s.logRecords.push(p.opentelemetry.proto.logs.v1.LogRecord.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.scope!=null&&t.hasOwnProperty("scope")){var e=p.opentelemetry.proto.common.v1.InstrumentationScope.verify(t.scope);if(e)return"scope."+e}if(t.logRecords!=null&&t.hasOwnProperty("logRecords")){if(!Array.isArray(t.logRecords))return"logRecords: array expected";for(var n=0;n<t.logRecords.length;++n){var e=p.opentelemetry.proto.logs.v1.LogRecord.verify(t.logRecords[n]);if(e)return"logRecords."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!_.isString(t.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.logs.v1.ScopeLogs)return t;var e=new p.opentelemetry.proto.logs.v1.ScopeLogs;if(t.scope!=null){if(typeof t.scope!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.scope: object expected");e.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(t.scope)}if(t.logRecords){if(!Array.isArray(t.logRecords))throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: array expected");e.logRecords=[];for(var n=0;n<t.logRecords.length;++n){if(typeof t.logRecords[n]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: object expected");e.logRecords[n]=p.opentelemetry.proto.logs.v1.LogRecord.fromObject(t.logRecords[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.logRecords=[]),e.defaults&&(n.scope=null,n.schemaUrl=""),t.scope!=null&&t.hasOwnProperty("scope")&&(n.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.toObject(t.scope,e)),t.logRecords&&t.logRecords.length){n.logRecords=[];for(var s=0;s<t.logRecords.length;++s)n.logRecords[s]=p.opentelemetry.proto.logs.v1.LogRecord.toObject(t.logRecords[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.ScopeLogs"},a}(),c.SeverityNumber=function(){var a={},u=Object.create(a);return u[a[0]="SEVERITY_NUMBER_UNSPECIFIED"]=0,u[a[1]="SEVERITY_NUMBER_TRACE"]=1,u[a[2]="SEVERITY_NUMBER_TRACE2"]=2,u[a[3]="SEVERITY_NUMBER_TRACE3"]=3,u[a[4]="SEVERITY_NUMBER_TRACE4"]=4,u[a[5]="SEVERITY_NUMBER_DEBUG"]=5,u[a[6]="SEVERITY_NUMBER_DEBUG2"]=6,u[a[7]="SEVERITY_NUMBER_DEBUG3"]=7,u[a[8]="SEVERITY_NUMBER_DEBUG4"]=8,u[a[9]="SEVERITY_NUMBER_INFO"]=9,u[a[10]="SEVERITY_NUMBER_INFO2"]=10,u[a[11]="SEVERITY_NUMBER_INFO3"]=11,u[a[12]="SEVERITY_NUMBER_INFO4"]=12,u[a[13]="SEVERITY_NUMBER_WARN"]=13,u[a[14]="SEVERITY_NUMBER_WARN2"]=14,u[a[15]="SEVERITY_NUMBER_WARN3"]=15,u[a[16]="SEVERITY_NUMBER_WARN4"]=16,u[a[17]="SEVERITY_NUMBER_ERROR"]=17,u[a[18]="SEVERITY_NUMBER_ERROR2"]=18,u[a[19]="SEVERITY_NUMBER_ERROR3"]=19,u[a[20]="SEVERITY_NUMBER_ERROR4"]=20,u[a[21]="SEVERITY_NUMBER_FATAL"]=21,u[a[22]="SEVERITY_NUMBER_FATAL2"]=22,u[a[23]="SEVERITY_NUMBER_FATAL3"]=23,u[a[24]="SEVERITY_NUMBER_FATAL4"]=24,u}(),c.LogRecordFlags=function(){var a={},u=Object.create(a);return u[a[0]="LOG_RECORD_FLAGS_DO_NOT_USE"]=0,u[a[255]="LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"]=255,u}(),c.LogRecord=function(){function a(u){if(this.attributes=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.timeUnixNano=null,a.prototype.observedTimeUnixNano=null,a.prototype.severityNumber=null,a.prototype.severityText=null,a.prototype.body=null,a.prototype.attributes=_.emptyArray,a.prototype.droppedAttributesCount=null,a.prototype.flags=null,a.prototype.traceId=null,a.prototype.spanId=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&e.uint32(9).fixed64(t.timeUnixNano),t.severityNumber!=null&&Object.hasOwnProperty.call(t,"severityNumber")&&e.uint32(16).int32(t.severityNumber),t.severityText!=null&&Object.hasOwnProperty.call(t,"severityText")&&e.uint32(26).string(t.severityText),t.body!=null&&Object.hasOwnProperty.call(t,"body")&&p.opentelemetry.proto.common.v1.AnyValue.encode(t.body,e.uint32(42).fork()).ldelim(),t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(50).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&e.uint32(56).uint32(t.droppedAttributesCount),t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&e.uint32(69).fixed32(t.flags),t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId")&&e.uint32(74).bytes(t.traceId),t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId")&&e.uint32(82).bytes(t.spanId),t.observedTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"observedTimeUnixNano")&&e.uint32(89).fixed64(t.observedTimeUnixNano),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.LogRecord;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.timeUnixNano=t.fixed64();break}case 11:{s.observedTimeUnixNano=t.fixed64();break}case 2:{s.severityNumber=t.int32();break}case 3:{s.severityText=t.string();break}case 5:{s.body=p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32());break}case 6:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 7:{s.droppedAttributesCount=t.uint32();break}case 8:{s.flags=t.fixed32();break}case 9:{s.traceId=t.bytes();break}case 10:{s.spanId=t.bytes();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!_.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&_.isInteger(t.timeUnixNano.low)&&_.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.observedTimeUnixNano!=null&&t.hasOwnProperty("observedTimeUnixNano")&&!_.isInteger(t.observedTimeUnixNano)&&!(t.observedTimeUnixNano&&_.isInteger(t.observedTimeUnixNano.low)&&_.isInteger(t.observedTimeUnixNano.high)))return"observedTimeUnixNano: integer|Long expected";if(t.severityNumber!=null&&t.hasOwnProperty("severityNumber"))switch(t.severityNumber){default:return"severityNumber: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:break}if(t.severityText!=null&&t.hasOwnProperty("severityText")&&!_.isString(t.severityText))return"severityText: string expected";if(t.body!=null&&t.hasOwnProperty("body")){var e=p.opentelemetry.proto.common.v1.AnyValue.verify(t.body);if(e)return"body."+e}if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var n=0;n<t.attributes.length;++n){var e=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[n]);if(e)return"attributes."+e}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!_.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":t.flags!=null&&t.hasOwnProperty("flags")&&!_.isInteger(t.flags)?"flags: integer expected":t.traceId!=null&&t.hasOwnProperty("traceId")&&!(t.traceId&&typeof t.traceId.length=="number"||_.isString(t.traceId))?"traceId: buffer expected":t.spanId!=null&&t.hasOwnProperty("spanId")&&!(t.spanId&&typeof t.spanId.length=="number"||_.isString(t.spanId))?"spanId: buffer expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.logs.v1.LogRecord)return t;var e=new p.opentelemetry.proto.logs.v1.LogRecord;switch(t.timeUnixNano!=null&&(_.Long?(e.timeUnixNano=_.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?e.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?e.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(e.timeUnixNano=new _.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.observedTimeUnixNano!=null&&(_.Long?(e.observedTimeUnixNano=_.Long.fromValue(t.observedTimeUnixNano)).unsigned=!1:typeof t.observedTimeUnixNano=="string"?e.observedTimeUnixNano=parseInt(t.observedTimeUnixNano,10):typeof t.observedTimeUnixNano=="number"?e.observedTimeUnixNano=t.observedTimeUnixNano:typeof t.observedTimeUnixNano=="object"&&(e.observedTimeUnixNano=new _.LongBits(t.observedTimeUnixNano.low>>>0,t.observedTimeUnixNano.high>>>0).toNumber())),t.severityNumber){default:if(typeof t.severityNumber=="number"){e.severityNumber=t.severityNumber;break}break;case"SEVERITY_NUMBER_UNSPECIFIED":case 0:e.severityNumber=0;break;case"SEVERITY_NUMBER_TRACE":case 1:e.severityNumber=1;break;case"SEVERITY_NUMBER_TRACE2":case 2:e.severityNumber=2;break;case"SEVERITY_NUMBER_TRACE3":case 3:e.severityNumber=3;break;case"SEVERITY_NUMBER_TRACE4":case 4:e.severityNumber=4;break;case"SEVERITY_NUMBER_DEBUG":case 5:e.severityNumber=5;break;case"SEVERITY_NUMBER_DEBUG2":case 6:e.severityNumber=6;break;case"SEVERITY_NUMBER_DEBUG3":case 7:e.severityNumber=7;break;case"SEVERITY_NUMBER_DEBUG4":case 8:e.severityNumber=8;break;case"SEVERITY_NUMBER_INFO":case 9:e.severityNumber=9;break;case"SEVERITY_NUMBER_INFO2":case 10:e.severityNumber=10;break;case"SEVERITY_NUMBER_INFO3":case 11:e.severityNumber=11;break;case"SEVERITY_NUMBER_INFO4":case 12:e.severityNumber=12;break;case"SEVERITY_NUMBER_WARN":case 13:e.severityNumber=13;break;case"SEVERITY_NUMBER_WARN2":case 14:e.severityNumber=14;break;case"SEVERITY_NUMBER_WARN3":case 15:e.severityNumber=15;break;case"SEVERITY_NUMBER_WARN4":case 16:e.severityNumber=16;break;case"SEVERITY_NUMBER_ERROR":case 17:e.severityNumber=17;break;case"SEVERITY_NUMBER_ERROR2":case 18:e.severityNumber=18;break;case"SEVERITY_NUMBER_ERROR3":case 19:e.severityNumber=19;break;case"SEVERITY_NUMBER_ERROR4":case 20:e.severityNumber=20;break;case"SEVERITY_NUMBER_FATAL":case 21:e.severityNumber=21;break;case"SEVERITY_NUMBER_FATAL2":case 22:e.severityNumber=22;break;case"SEVERITY_NUMBER_FATAL3":case 23:e.severityNumber=23;break;case"SEVERITY_NUMBER_FATAL4":case 24:e.severityNumber=24;break}if(t.severityText!=null&&(e.severityText=String(t.severityText)),t.body!=null){if(typeof t.body!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected");e.body=p.opentelemetry.proto.common.v1.AnyValue.fromObject(t.body)}if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}return t.droppedAttributesCount!=null&&(e.droppedAttributesCount=t.droppedAttributesCount>>>0),t.flags!=null&&(e.flags=t.flags>>>0),t.traceId!=null&&(typeof t.traceId=="string"?_.base64.decode(t.traceId,e.traceId=_.newBuffer(_.base64.length(t.traceId)),0):t.traceId.length>=0&&(e.traceId=t.traceId)),t.spanId!=null&&(typeof t.spanId=="string"?_.base64.decode(t.spanId,e.spanId=_.newBuffer(_.base64.length(t.spanId)),0):t.spanId.length>=0&&(e.spanId=t.spanId)),e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),e.defaults){if(_.Long){var s=new _.Long(0,0,!1);n.timeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}else n.timeUnixNano=e.longs===String?"0":0;if(n.severityNumber=e.enums===String?"SEVERITY_NUMBER_UNSPECIFIED":0,n.severityText="",n.body=null,n.droppedAttributesCount=0,n.flags=0,e.bytes===String?n.traceId="":(n.traceId=[],e.bytes!==Array&&(n.traceId=_.newBuffer(n.traceId))),e.bytes===String?n.spanId="":(n.spanId=[],e.bytes!==Array&&(n.spanId=_.newBuffer(n.spanId))),_.Long){var s=new _.Long(0,0,!1);n.observedTimeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}else n.observedTimeUnixNano=e.longs===String?"0":0}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?n.timeUnixNano=e.longs===String?String(t.timeUnixNano):t.timeUnixNano:n.timeUnixNano=e.longs===String?_.Long.prototype.toString.call(t.timeUnixNano):e.longs===Number?new _.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.severityNumber!=null&&t.hasOwnProperty("severityNumber")&&(n.severityNumber=e.enums===String?p.opentelemetry.proto.logs.v1.SeverityNumber[t.severityNumber]===void 0?t.severityNumber:p.opentelemetry.proto.logs.v1.SeverityNumber[t.severityNumber]:t.severityNumber),t.severityText!=null&&t.hasOwnProperty("severityText")&&(n.severityText=t.severityText),t.body!=null&&t.hasOwnProperty("body")&&(n.body=p.opentelemetry.proto.common.v1.AnyValue.toObject(t.body,e)),t.attributes&&t.attributes.length){n.attributes=[];for(var l=0;l<t.attributes.length;++l)n.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[l],e)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),t.flags!=null&&t.hasOwnProperty("flags")&&(n.flags=t.flags),t.traceId!=null&&t.hasOwnProperty("traceId")&&(n.traceId=e.bytes===String?_.base64.encode(t.traceId,0,t.traceId.length):e.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId),t.spanId!=null&&t.hasOwnProperty("spanId")&&(n.spanId=e.bytes===String?_.base64.encode(t.spanId,0,t.spanId.length):e.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId),t.observedTimeUnixNano!=null&&t.hasOwnProperty("observedTimeUnixNano")&&(typeof t.observedTimeUnixNano=="number"?n.observedTimeUnixNano=e.longs===String?String(t.observedTimeUnixNano):t.observedTimeUnixNano:n.observedTimeUnixNano=e.longs===String?_.Long.prototype.toString.call(t.observedTimeUnixNano):e.longs===Number?new _.LongBits(t.observedTimeUnixNano.low>>>0,t.observedTimeUnixNano.high>>>0).toNumber():t.observedTimeUnixNano),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.LogRecord"},a}(),c}(),i}(),r}(),o}();lL.exports=p});var Ni=S(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.getOtlpEncoder=ce.encodeAsString=ce.encodeAsLongBits=ce.toLongBits=ce.hrTimeToNanos=void 0;var mi=C();function Qs(o){let r=BigInt(1e9);return BigInt(o[0])*r+BigInt(o[1])}ce.hrTimeToNanos=Qs;function _L(o){let r=Number(BigInt.asUintN(32,o)),i=Number(BigInt.asUintN(32,o>>BigInt(32)));return{low:r,high:i}}ce.toLongBits=_L;function Zs(o){let r=Qs(o);return _L(r)}ce.encodeAsLongBits=Zs;function EL(o){return Qs(o).toString()}ce.encodeAsString=EL;var hX=typeof BigInt<"u"?EL:mi.hrTimeToNanoseconds;function pL(o){return o}function TL(o){if(o!==void 0)return(0,mi.hexToBinary)(o)}var RX={encodeHrTime:Zs,encodeSpanContext:mi.hexToBinary,encodeOptionalSpanContext:TL};function yX(o){var r,i;if(o===void 0)return RX;let c=(r=o.useLongBits)!==null&&r!==void 0?r:!0,a=(i=o.useHex)!==null&&i!==void 0?i:!1;return{encodeHrTime:c?Zs:hX,encodeSpanContext:a?pL:mi.hexToBinary,encodeOptionalSpanContext:a?pL:TL}}ce.getOtlpEncoder=yX});var hi=S(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.toAnyValue=le.toKeyValue=le.toAttributes=le.createInstrumentationScope=le.createResource=void 0;function PX(o){return{attributes:SL(o.attributes),droppedAttributesCount:0}}le.createResource=PX;function MX(o){return{name:o.name,version:o.version}}le.createInstrumentationScope=MX;function SL(o){return Object.keys(o).map(r=>ec(r,o[r]))}le.toAttributes=SL;function ec(o,r){return{key:o,value:tc(r)}}le.toKeyValue=ec;function tc(o){let r=typeof o;return r==="string"?{stringValue:o}:r==="number"?Number.isInteger(o)?{intValue:o}:{doubleValue:o}:r==="boolean"?{boolValue:o}:o instanceof Uint8Array?{bytesValue:o}:Array.isArray(o)?{arrayValue:{values:o.map(tc)}}:r==="object"&&o!=null?{kvlistValue:{values:Object.entries(o).map(([i,c])=>ec(i,c))}}:{}}le.toAnyValue=tc});var rc=S(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.toLogAttributes=or.createExportLogsServiceRequest=void 0;var gX=Ni(),Ri=hi();function LX(o,r){let i=(0,gX.getOtlpEncoder)(r);return{resourceLogs:xX(o,i)}}or.createExportLogsServiceRequest=LX;function IX(o){let r=new Map;for(let i of o){let{resource:c,instrumentationScope:{name:a,version:u="",schemaUrl:t=""}}=i,e=r.get(c);e||(e=new Map,r.set(c,e));let n=`${a}@${u}:${t}`,s=e.get(n);s||(s=[],e.set(n,s)),s.push(i)}return r}function xX(o,r){let i=IX(o);return Array.from(i,([c,a])=>({resource:(0,Ri.createResource)(c),scopeLogs:Array.from(a,([,u])=>({scope:(0,Ri.createInstrumentationScope)(u[0].instrumentationScope),logRecords:u.map(t=>CX(t,r)),schemaUrl:u[0].instrumentationScope.schemaUrl})),schemaUrl:void 0}))}function CX(o,r){var i,c,a;return{timeUnixNano:r.encodeHrTime(o.hrTime),observedTimeUnixNano:r.encodeHrTime(o.hrTimeObserved),severityNumber:o.severityNumber,severityText:o.severityText,body:(0,Ri.toAnyValue)(o.body),attributes:fL(o.attributes),droppedAttributesCount:o.droppedAttributesCount,flags:(i=o.spanContext)===null||i===void 0?void 0:i.traceFlags,traceId:r.encodeOptionalSpanContext((c=o.spanContext)===null||c===void 0?void 0:c.traceId),spanId:r.encodeOptionalSpanContext((a=o.spanContext)===null||a===void 0?void 0:a.spanId)}}function fL(o){return Object.keys(o).map(r=>(0,Ri.toKeyValue)(r,o[r]))}or.toLogAttributes=fL});var AL=S(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.ProtobufLogsSerializer=void 0;var dL=Oi(),bX=rc(),UX=dL.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,DX=dL.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;yi.ProtobufLogsSerializer={serializeRequest:o=>{let r=(0,bX.createExportLogsServiceRequest)(o);return DX.encode(r).finish()},deserializeResponse:o=>UX.decode(o)}});var vL=S(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.ProtobufLogsSerializer=void 0;var VX=AL();Object.defineProperty(Pi,"ProtobufLogsSerializer",{enumerable:!0,get:function(){return VX.ProtobufLogsSerializer}})});var nc=S(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.createExportMetricsServiceRequest=Pe.toMetric=Pe.toScopeMetrics=Pe.toResourceMetrics=void 0;var OL=(m(),h(y)),ir=ui(),wX=Ni(),Hr=hi();function NL(o,r){let i=(0,wX.getOtlpEncoder)(r);return{resource:(0,Hr.createResource)(o.resource),schemaUrl:void 0,scopeMetrics:hL(o.scopeMetrics,i)}}Pe.toResourceMetrics=NL;function hL(o,r){return Array.from(o.map(i=>({scope:(0,Hr.createInstrumentationScope)(i.scope),metrics:i.metrics.map(c=>RL(c,r)),schemaUrl:i.scope.schemaUrl})))}Pe.toScopeMetrics=hL;function RL(o,r){let i={name:o.descriptor.name,description:o.descriptor.description,unit:o.descriptor.unit},c=kX(o.aggregationTemporality);switch(o.dataPointType){case ir.DataPointType.SUM:i.sum={aggregationTemporality:c,isMonotonic:o.isMonotonic,dataPoints:mL(o,r)};break;case ir.DataPointType.GAUGE:i.gauge={dataPoints:mL(o,r)};break;case ir.DataPointType.HISTOGRAM:i.histogram={aggregationTemporality:c,dataPoints:GX(o,r)};break;case ir.DataPointType.EXPONENTIAL_HISTOGRAM:i.exponentialHistogram={aggregationTemporality:c,dataPoints:HX(o,r)};break}return i}Pe.toMetric=RL;function BX(o,r,i){let c={attributes:(0,Hr.toAttributes)(o.attributes),startTimeUnixNano:i.encodeHrTime(o.startTime),timeUnixNano:i.encodeHrTime(o.endTime)};switch(r){case OL.ValueType.INT:c.asInt=o.value;break;case OL.ValueType.DOUBLE:c.asDouble=o.value;break}return c}function mL(o,r){return o.dataPoints.map(i=>BX(i,o.descriptor.valueType,r))}function GX(o,r){return o.dataPoints.map(i=>{let c=i.value;return{attributes:(0,Hr.toAttributes)(i.attributes),bucketCounts:c.buckets.counts,explicitBounds:c.buckets.boundaries,count:c.count,sum:c.sum,min:c.min,max:c.max,startTimeUnixNano:r.encodeHrTime(i.startTime),timeUnixNano:r.encodeHrTime(i.endTime)}})}function HX(o,r){return o.dataPoints.map(i=>{let c=i.value;return{attributes:(0,Hr.toAttributes)(i.attributes),count:c.count,min:c.min,max:c.max,sum:c.sum,positive:{offset:c.positive.offset,bucketCounts:c.positive.bucketCounts},negative:{offset:c.negative.offset,bucketCounts:c.negative.bucketCounts},scale:c.scale,zeroCount:c.zeroCount,startTimeUnixNano:r.encodeHrTime(i.startTime),timeUnixNano:r.encodeHrTime(i.endTime)}})}function kX(o){switch(o){case ir.AggregationTemporality.DELTA:return 1;case ir.AggregationTemporality.CUMULATIVE:return 2}}function YX(o,r){return{resourceMetrics:o.map(i=>NL(i,r))}}Pe.createExportMetricsServiceRequest=YX});var PL=S(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});Mi.ProtobufMetricsSerializer=void 0;var yL=Oi(),FX=nc(),KX=yL.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,jX=yL.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;Mi.ProtobufMetricsSerializer={serializeRequest:o=>{let r=(0,FX.createExportMetricsServiceRequest)([o]);return jX.encode(r).finish()},deserializeResponse:o=>KX.decode(o)}});var ML=S(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.ProtobufMetricsSerializer=void 0;var qX=PL();Object.defineProperty(gi,"ProtobufMetricsSerializer",{enumerable:!0,get:function(){return qX.ProtobufMetricsSerializer}})});var oc=S(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.createExportTraceServiceRequest=Me.toOtlpSpanEvent=Me.toOtlpLink=Me.sdkSpanToOtlpSpan=void 0;var kr=hi(),WX=Ni();function gL(o,r){var i;let c=o.spanContext(),a=o.status;return{traceId:r.encodeSpanContext(c.traceId),spanId:r.encodeSpanContext(c.spanId),parentSpanId:r.encodeOptionalSpanContext(o.parentSpanId),traceState:(i=c.traceState)===null||i===void 0?void 0:i.serialize(),name:o.name,kind:o.kind==null?0:o.kind+1,startTimeUnixNano:r.encodeHrTime(o.startTime),endTimeUnixNano:r.encodeHrTime(o.endTime),attributes:(0,kr.toAttributes)(o.attributes),droppedAttributesCount:o.droppedAttributesCount,events:o.events.map(u=>IL(u,r)),droppedEventsCount:o.droppedEventsCount,status:{code:a.code,message:a.message},links:o.links.map(u=>LL(u,r)),droppedLinksCount:o.droppedLinksCount}}Me.sdkSpanToOtlpSpan=gL;function LL(o,r){var i;return{attributes:o.attributes?(0,kr.toAttributes)(o.attributes):[],spanId:r.encodeSpanContext(o.context.spanId),traceId:r.encodeSpanContext(o.context.traceId),traceState:(i=o.context.traceState)===null||i===void 0?void 0:i.serialize(),droppedAttributesCount:o.droppedAttributesCount||0}}Me.toOtlpLink=LL;function IL(o,r){return{attributes:o.attributes?(0,kr.toAttributes)(o.attributes):[],name:o.name,timeUnixNano:r.encodeHrTime(o.time),droppedAttributesCount:o.droppedAttributesCount||0}}Me.toOtlpSpanEvent=IL;function zX(o,r){let i=(0,WX.getOtlpEncoder)(r);return{resourceSpans:XX(o,i)}}Me.createExportTraceServiceRequest=zX;function JX(o){let r=new Map;for(let i of o){let c=r.get(i.resource);c||(c=new Map,r.set(i.resource,c));let a=`${i.instrumentationLibrary.name}@${i.instrumentationLibrary.version||""}:${i.instrumentationLibrary.schemaUrl||""}`,u=c.get(a);u||(u=[],c.set(a,u)),u.push(i)}return r}function XX(o,r){let i=JX(o),c=[],a=i.entries(),u=a.next();for(;!u.done;){let[t,e]=u.value,n=[],s=e.values(),l=s.next();for(;!l.done;){let O=l.value;if(O.length>0){let x=O.map(pe=>gL(pe,r));n.push({scope:(0,kr.createInstrumentationScope)(O[0].instrumentationLibrary),spans:x,schemaUrl:O[0].instrumentationLibrary.schemaUrl})}l=s.next()}let E={resource:(0,kr.createResource)(t),scopeSpans:n,schemaUrl:void 0};c.push(E),u=a.next()}return c}});var CL=S(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.ProtobufTraceSerializer=void 0;var xL=Oi(),$X=oc(),QX=xL.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,ZX=xL.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;Li.ProtobufTraceSerializer={serializeRequest:o=>{let r=(0,$X.createExportTraceServiceRequest)(o);return ZX.encode(r).finish()},deserializeResponse:o=>QX.decode(o)}});var bL=S(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.ProtobufTraceSerializer=void 0;var e5=CL();Object.defineProperty(Ii,"ProtobufTraceSerializer",{enumerable:!0,get:function(){return e5.ProtobufTraceSerializer}})});var UL=S(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});xi.JsonLogsSerializer=void 0;var t5=rc();xi.JsonLogsSerializer={serializeRequest:o=>{let r=(0,t5.createExportLogsServiceRequest)(o,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(r))},deserializeResponse:o=>{let r=new TextDecoder;return JSON.parse(r.decode(o))}}});var DL=S(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.JsonLogsSerializer=void 0;var r5=UL();Object.defineProperty(Ci,"JsonLogsSerializer",{enumerable:!0,get:function(){return r5.JsonLogsSerializer}})});var VL=S(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.JsonMetricsSerializer=void 0;var n5=nc();bi.JsonMetricsSerializer={serializeRequest:o=>{let r=(0,n5.createExportMetricsServiceRequest)([o],{useLongBits:!1});return new TextEncoder().encode(JSON.stringify(r))},deserializeResponse:o=>{let r=new TextDecoder;return JSON.parse(r.decode(o))}}});var wL=S(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.JsonMetricsSerializer=void 0;var o5=VL();Object.defineProperty(Ui,"JsonMetricsSerializer",{enumerable:!0,get:function(){return o5.JsonMetricsSerializer}})});var BL=S(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.JsonTraceSerializer=void 0;var i5=oc();Di.JsonTraceSerializer={serializeRequest:o=>{let r=(0,i5.createExportTraceServiceRequest)(o,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(r))},deserializeResponse:o=>{let r=new TextDecoder;return JSON.parse(r.decode(o))}}});var GL=S(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});Vi.JsonTraceSerializer=void 0;var a5=BL();Object.defineProperty(Vi,"JsonTraceSerializer",{enumerable:!0,get:function(){return a5.JsonTraceSerializer}})});var ic=S(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.JsonTraceSerializer=re.JsonMetricsSerializer=re.JsonLogsSerializer=re.ProtobufTraceSerializer=re.ProtobufMetricsSerializer=re.ProtobufLogsSerializer=void 0;var u5=vL();Object.defineProperty(re,"ProtobufLogsSerializer",{enumerable:!0,get:function(){return u5.ProtobufLogsSerializer}});var s5=ML();Object.defineProperty(re,"ProtobufMetricsSerializer",{enumerable:!0,get:function(){return s5.ProtobufMetricsSerializer}});var c5=bL();Object.defineProperty(re,"ProtobufTraceSerializer",{enumerable:!0,get:function(){return c5.ProtobufTraceSerializer}});var l5=DL();Object.defineProperty(re,"JsonLogsSerializer",{enumerable:!0,get:function(){return l5.JsonLogsSerializer}});var p5=wL();Object.defineProperty(re,"JsonMetricsSerializer",{enumerable:!0,get:function(){return p5.JsonMetricsSerializer}});var _5=GL();Object.defineProperty(re,"JsonTraceSerializer",{enumerable:!0,get:function(){return _5.JsonTraceSerializer}})});function HL(o){var r=[429,502,503,504];return r.includes(o)}function kL(o){if(o!=null){var r=Number.parseInt(o,10);if(Number.isInteger(r))return r>0?r*1e3:-1;var i=new Date(o).getTime()-Date.now();return i>=0?i:0}}var YL=d(()=>{});var qL={};ft(qL,{compressAndSend:()=>jL,createHttpAgent:()=>S5,sendWithHttp:()=>E5});function E5(o,r,i,c,a){var u=new URL(o.url),t=Number(process.versions.node.split(".")[0]),e={hostname:u.hostname,port:u.port,path:u.pathname,method:"POST",headers:ac({},o.headers()),agent:r},n=u.protocol==="http:"?wi.request:Bi.request,s=n(e,function(E){var O=[];E.on("data",function(x){return O.push(x)}),E.on("end",function(){if(E.statusCode&&E.statusCode<299)c({status:"success",data:Buffer.concat(O)});else if(E.statusCode&&HL(E.statusCode))c({status:"retryable",retryInMillis:kL(E.headers["retry-after"])});else{var x=new ct(E.statusMessage,E.statusCode,Buffer.concat(O).toString());c({status:"failure",error:x})}})});s.setTimeout(a,function(){s.destroy(),c({status:"failure",error:new Error("Request Timeout")})}),s.on("error",function(E){c({status:"failure",error:E})});var l=t>=14?"close":"abort";s.on(l,function(){c({status:"failure",error:new Error("Request timed out")})}),jL(s,o.compression,i,function(E){c({status:"failure",error:E})})}function jL(o,r,i,c){var a=T5(i);r==="gzip"&&(o.setHeader("Content-Encoding","gzip"),a=a.on("error",c).pipe(FL.createGzip()).on("error",c)),a.pipe(o).on("error",c)}function T5(o){var r=new KL.Readable;return r.push(o),r.push(null),r}function S5(o,r){var i=new URL(o),c=i.protocol==="http:"?wi.Agent:Bi.Agent;return new c(r)}var wi,Bi,FL,KL,ac,WL=d(()=>{wi=Ae(require("http")),Bi=Ae(require("https")),FL=Ae(require("zlib")),KL=require("stream");YL();si();ac=function(){return ac=Object.assign||function(o){for(var r,i=1,c=arguments.length;i<c;i++){r=arguments[i];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(o[a]=r[a])}return o},ac.apply(this,arguments)}});function zL(o){return new A5(o)}var f5,d5,A5,JL=d(()=>{f5=function(o,r,i,c){function a(u){return u instanceof i?u:new i(function(t){t(u)})}return new(i||(i=Promise))(function(u,t){function e(l){try{s(c.next(l))}catch(E){t(E)}}function n(l){try{s(c.throw(l))}catch(E){t(E)}}function s(l){l.done?u(l.value):a(l.value).then(e,n)}s((c=c.apply(o,r||[])).next())})},d5=function(o,r){var i={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},c,a,u,t;return t={next:e(0),throw:e(1),return:e(2)},typeof Symbol=="function"&&(t[Symbol.iterator]=function(){return this}),t;function e(s){return function(l){return n([s,l])}}function n(s){if(c)throw new TypeError("Generator is already executing.");for(;i;)try{if(c=1,a&&(u=s[0]&2?a.return:s[0]?a.throw||((u=a.return)&&u.call(a),0):a.next)&&!(u=u.call(a,s[1])).done)return u;switch(a=0,u&&(s=[s[0]&2,u.value]),s[0]){case 0:case 1:u=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,a=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(u=i.trys,!(u=u.length>0&&u[u.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!u||s[1]>u[0]&&s[1]<u[3])){i.label=s[1];break}if(s[0]===6&&i.label<u[1]){i.label=u[1],u=s;break}if(u&&i.label<u[2]){i.label=u[2],i.ops.push(s);break}u[2]&&i.ops.pop(),i.trys.pop();continue}s=r.call(o,i)}catch(l){s=[6,l],a=0}finally{c=u=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},A5=function(){function o(r){this._parameters=r,this._send=null,this._agent=null}return o.prototype.send=function(r,i){return f5(this,void 0,void 0,function(){var c,a,u,t=this;return d5(this,function(e){return this._send==null&&(c=(WL(),h(qL)),a=c.sendWithHttp,u=c.createHttpAgent,this._agent=u(this._parameters.url,this._parameters.agentOptions),this._send=a),[2,new Promise(function(n){var s;(s=t._send)===null||s===void 0||s.call(t,t._parameters,t._agent,r,function(l){n(l)},i)})]})})},o.prototype.shutdown=function(){},o}()});function y5(){return Math.random()*(2*XL)-XL}function $L(o){return new P5(o.transport)}var v5,O5,m5,N5,h5,R5,XL,P5,QL=d(()=>{v5=function(o,r,i,c){function a(u){return u instanceof i?u:new i(function(t){t(u)})}return new(i||(i=Promise))(function(u,t){function e(l){try{s(c.next(l))}catch(E){t(E)}}function n(l){try{s(c.throw(l))}catch(E){t(E)}}function s(l){l.done?u(l.value):a(l.value).then(e,n)}s((c=c.apply(o,r||[])).next())})},O5=function(o,r){var i={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},c,a,u,t;return t={next:e(0),throw:e(1),return:e(2)},typeof Symbol=="function"&&(t[Symbol.iterator]=function(){return this}),t;function e(s){return function(l){return n([s,l])}}function n(s){if(c)throw new TypeError("Generator is already executing.");for(;i;)try{if(c=1,a&&(u=s[0]&2?a.return:s[0]?a.throw||((u=a.return)&&u.call(a),0):a.next)&&!(u=u.call(a,s[1])).done)return u;switch(a=0,u&&(s=[s[0]&2,u.value]),s[0]){case 0:case 1:u=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,a=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(u=i.trys,!(u=u.length>0&&u[u.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!u||s[1]>u[0]&&s[1]<u[3])){i.label=s[1];break}if(s[0]===6&&i.label<u[1]){i.label=u[1],u=s;break}if(u&&i.label<u[2]){i.label=u[2],i.ops.push(s);break}u[2]&&i.ops.pop(),i.trys.pop();continue}s=r.call(o,i)}catch(l){s=[6,l],a=0}finally{c=u=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},m5=5,N5=1e3,h5=5e3,R5=1.5,XL=.2;P5=function(){function o(r){this._transport=r}return o.prototype.retry=function(r,i,c){var a=this;return new Promise(function(u,t){setTimeout(function(){a._transport.send(r,i).then(u,t)},c)})},o.prototype.send=function(r,i){var c;return v5(this,void 0,void 0,function(){var a,u,t,e,n,s,l;return O5(this,function(E){switch(E.label){case 0:return a=Date.now()+i,[4,this._transport.send(r,i)];case 1:u=E.sent(),t=m5,e=N5,E.label=2;case 2:return u.status==="retryable"&&t>0?(t--,n=Math.max(Math.min(e,h5)+y5(),0),e=e*R5,s=(c=u.retryInMillis)!==null&&c!==void 0?c:n,l=a-Date.now(),s>l?[2,u]:[4,this.retry(r,l,s)]):[3,4];case 3:return u=E.sent(),[3,2];case 4:return[2,u]}})})},o.prototype.shutdown=function(){return this._transport.shutdown()},o}()});function ZL(o,r){return Ti({transport:$L({transport:zL(o)}),serializer:r,promiseHandler:Ei(o)},{timeout:o.timeoutMillis})}var eI=d(()=>{Vs();JL();Ds();QL()});function tI(o){var r,i=(r=__fromEnv[o])===null||r===void 0?void 0:r.trim();if(i!=null&&i!==""){var c=Number(i);if(!Number.isNaN(c)&&Number.isFinite(c)&&c>0)return c;H.warn("Configuration: "+o+" is invalid, expected number greater than 0 (actual: "+i+")")}}function M5(o){var r=tI("OTEL_EXPORTER_OTLP_"+o+"_TIMEOUT"),i=tI("OTEL_EXPORTER_OTLP_TIMEOUT");return r??i}function rI(o){var r,i=(r=__fromEnv[o])===null||r===void 0?void 0:r.trim();if(i!==""){if(i==null||i==="none"||i==="gzip")return i;H.warn("Configuration: "+o+" is invalid, expected 'none' or 'gzip' (actual: '"+i+"')")}}function g5(o){var r=rI("OTEL_EXPORTER_OTLP_"+o+"_COMPRESSION"),i=rI("OTEL_EXPORTER_OTLP_COMPRESSION");return r??i}function Gi(o){return{timeoutMillis:M5(o),compression:g5(o)}}var uc=d(()=>{m()});function nI(o){return function(){var r,i={};return Object.entries((r=o?.())!==null&&r!==void 0?r:{}).forEach(function(c){var a=L5(c,2),u=a[0],t=a[1];typeof t<"u"?i[u]=String(t):H.warn('Header "'+u+'" has invalid value ('+t+") and will be ignored")}),i}}var L5,oI=d(()=>{m();L5=function(o,r){var i=typeof Symbol=="function"&&o[Symbol.iterator];if(!i)return o;var c=i.call(o),a,u=[],t;try{for(;(r===void 0||r-- >0)&&!(a=c.next()).done;)u.push(a.value)}catch(e){t={error:e}}finally{try{a&&!a.done&&(i=c.return)&&i.call(c)}finally{if(t)throw t.error}}return u}});function I5(o,r,i){var c=_t({},i()),a={};return function(){return r!=null&&Object.assign(a,r()),o!=null&&Object.assign(a,o()),Object.assign(a,c)}}function x5(o){if(o!=null)try{return new URL(o),o}catch{throw new Error("Configuration: Could not parse user-provided export URL: '"+o+"'")}}function iI(o,r,i){var c,a,u,t;return _t(_t({},li(o,r,i)),{headers:I5(nI(o.headers),r.headers,i.headers),url:(a=(c=x5(o.url))!==null&&c!==void 0?c:r.url)!==null&&a!==void 0?a:i.url,agentOptions:(t=(u=o.agentOptions)!==null&&u!==void 0?u:r.agentOptions)!==null&&t!==void 0?t:i.agentOptions})}function aI(o,r){return _t(_t({},pi()),{headers:function(){return o},url:"http://localhost:4318/"+r,agentOptions:{keepAlive:!0}})}var _t,uI=d(()=>{Vr();oI();_t=function(){return _t=Object.assign||function(o){for(var r,i=1,c=arguments.length;i<c;i++){r=arguments[i];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(o[a]=r[a])}return o},_t.apply(this,arguments)}});function C5(o){var r,i,c=(r=__fromEnv["OTEL_EXPORTER_OTLP_"+o+"_HEADERS"])===null||r===void 0?void 0:r.trim(),a=(i=__fromEnv.OTEL_EXPORTER_OTLP_HEADERS)===null||i===void 0?void 0:i.trim(),u=Yr.baggageUtils.parseKeyPairsIntoRecord(c),t=Yr.baggageUtils.parseKeyPairsIntoRecord(a);if(!(Object.keys(u).length===0&&Object.keys(t).length===0))return Object.assign({},Yr.baggageUtils.parseKeyPairsIntoRecord(a),Yr.baggageUtils.parseKeyPairsIntoRecord(c))}function b5(o){try{var r=new URL(o);return r.toString()}catch{H.warn("Configuration: Could not parse environment-provided export URL: '"+o+"', falling back to undefined");return}}function U5(o,r){try{new URL(o)}catch{H.warn("Configuration: Could not parse environment-provided export URL: '"+o+"', falling back to undefined");return}o.endsWith("/")||(o=o+"/"),o+=r;try{new URL(o)}catch{H.warn("Configuration: Provided URL appended with '"+r+"' is not a valid URL, using 'undefined' instead of '"+o+"'");return}return o}function D5(o){var r,i=(r=__fromEnv.OTEL_EXPORTER_OTLP_ENDPOINT)===null||r===void 0?void 0:r.trim();if(!(i==null||i===""))return U5(i,o)}function V5(o){var r,i=(r=__fromEnv["OTEL_EXPORTER_OTLP_"+o+"_ENDPOINT"])===null||r===void 0?void 0:r.trim();if(!(i==null||i===""))return b5(i)}function sI(o,r){var i;return Hi(Hi({},Gi(o)),{url:(i=V5(o))!==null&&i!==void 0?i:D5(r),headers:ci(C5(o))})}var Yr,Hi,cI=d(()=>{Yr=Ae(C());m();uc();Vr();Hi=function(){return Hi=Object.assign||function(o){for(var r,i=1,c=arguments.length;i<c;i++){r=arguments[i];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(o[a]=r[a])}return o},Hi.apply(this,arguments)}});function w5(o){return o?.keepAlive!=null&&(o.httpAgentOptions!=null?o.httpAgentOptions.keepAlive==null&&(o.httpAgentOptions.keepAlive=o.keepAlive):o.httpAgentOptions={keepAlive:o.keepAlive}),o.httpAgentOptions}function lI(o,r,i,c){return o.metadata&&H.warn("Metadata cannot be set when using http"),iI({url:o.url,headers:ci(o.headers),concurrencyLimit:o.concurrencyLimit,timeoutMillis:o.timeoutMillis,compression:o.compression,agentOptions:w5(o)},sI(r,i),aI(c,i))}var pI=d(()=>{uI();cI();m();Vr()});var sc={};ft(sc,{convertLegacyHttpOptions:()=>lI,createOtlpHttpExportDelegate:()=>ZL,getSharedConfigurationFromEnvironment:()=>Gi});var cc=d(()=>{eI();uc();pI()});var EI=S(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.OTLPTraceExporter=void 0;var B5=(Bs(),h(ws)),G5=pg(),H5=ic(),_I=(cc(),h(sc)),lc=class extends B5.OTLPExporterBase{constructor(r={}){super((0,_I.createOtlpHttpExportDelegate)((0,_I.convertLegacyHttpOptions)(r,"TRACES","v1/traces",{"User-Agent":`OTel-OTLP-Exporter-JavaScript/${G5.VERSION}`,"Content-Type":"application/json"}),H5.JsonTraceSerializer))}};ki.OTLPTraceExporter=lc});var TI=S(Et=>{"use strict";var k5=Et&&Et.__createBinding||(Object.create?function(o,r,i,c){c===void 0&&(c=i),Object.defineProperty(o,c,{enumerable:!0,get:function(){return r[i]}})}:function(o,r,i,c){c===void 0&&(c=i),o[c]=r[i]}),Y5=Et&&Et.__exportStar||function(o,r){for(var i in o)i!=="default"&&!Object.prototype.hasOwnProperty.call(r,i)&&k5(r,o,i)};Object.defineProperty(Et,"__esModule",{value:!0});Y5(EI(),Et)});var SI=S(Tt=>{"use strict";var F5=Tt&&Tt.__createBinding||(Object.create?function(o,r,i,c){c===void 0&&(c=i),Object.defineProperty(o,c,{enumerable:!0,get:function(){return r[i]}})}:function(o,r,i,c){c===void 0&&(c=i),o[c]=r[i]}),K5=Tt&&Tt.__exportStar||function(o,r){for(var i in o)i!=="default"&&!Object.prototype.hasOwnProperty.call(r,i)&&F5(r,o,i)};Object.defineProperty(Tt,"__esModule",{value:!0});K5(TI(),Tt)});var fI=S(St=>{"use strict";var j5=St&&St.__createBinding||(Object.create?function(o,r,i,c){c===void 0&&(c=i),Object.defineProperty(o,c,{enumerable:!0,get:function(){return r[i]}})}:function(o,r,i,c){c===void 0&&(c=i),o[c]=r[i]}),q5=St&&St.__exportStar||function(o,r){for(var i in o)i!=="default"&&!Object.prototype.hasOwnProperty.call(r,i)&&j5(r,o,i)};Object.defineProperty(St,"__esModule",{value:!0});q5(SI(),St)});var pc=S(Fr=>{"use strict";Object.defineProperty(Fr,"__esModule",{value:!0});Fr.AggregationTemporalityPreference=void 0;var W5;(function(o){o[o.DELTA=0]="DELTA",o[o.CUMULATIVE=1]="CUMULATIVE",o[o.LOWMEMORY=2]="LOWMEMORY"})(W5=Fr.AggregationTemporalityPreference||(Fr.AggregationTemporalityPreference={}))});var Ec=S(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.OTLPMetricExporterBase=W.LowMemoryTemporalitySelector=W.DeltaTemporalitySelector=W.CumulativeTemporalitySelector=void 0;var z5=C(),G=ui(),dI=pc(),J5=(Bs(),h(ws)),X5=(m(),h(y)),$5=()=>G.AggregationTemporality.CUMULATIVE;W.CumulativeTemporalitySelector=$5;var Q5=o=>{switch(o){case G.InstrumentType.COUNTER:case G.InstrumentType.OBSERVABLE_COUNTER:case G.InstrumentType.GAUGE:case G.InstrumentType.HISTOGRAM:case G.InstrumentType.OBSERVABLE_GAUGE:return G.AggregationTemporality.DELTA;case G.InstrumentType.UP_DOWN_COUNTER:case G.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:return G.AggregationTemporality.CUMULATIVE}};W.DeltaTemporalitySelector=Q5;var Z5=o=>{switch(o){case G.InstrumentType.COUNTER:case G.InstrumentType.HISTOGRAM:return G.AggregationTemporality.DELTA;case G.InstrumentType.GAUGE:case G.InstrumentType.UP_DOWN_COUNTER:case G.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:case G.InstrumentType.OBSERVABLE_COUNTER:case G.InstrumentType.OBSERVABLE_GAUGE:return G.AggregationTemporality.CUMULATIVE}};W.LowMemoryTemporalitySelector=Z5;function e$(){let o=(0,z5.getEnv)(),r=o.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return r==="cumulative"?W.CumulativeTemporalitySelector:r==="delta"?W.DeltaTemporalitySelector:r==="lowmemory"?W.LowMemoryTemporalitySelector:(X5.diag.warn(`OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '${o.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE}', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead.`),W.CumulativeTemporalitySelector)}function t$(o){return o!=null?o===dI.AggregationTemporalityPreference.DELTA?W.DeltaTemporalitySelector:o===dI.AggregationTemporalityPreference.LOWMEMORY?W.LowMemoryTemporalitySelector:W.CumulativeTemporalitySelector:e$()}function r$(o){return o?.aggregationPreference?o.aggregationPreference:r=>G.Aggregation.Default()}var _c=class extends J5.OTLPExporterBase{constructor(r,i){super(r),this._aggregationSelector=r$(i),this._aggregationTemporalitySelector=t$(i?.temporalityPreference)}selectAggregation(r){return this._aggregationSelector(r)}selectAggregationTemporality(r){return this._aggregationTemporalitySelector(r)}};W.OTLPMetricExporterBase=_c});var AI=S(Yi=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.VERSION=void 0;Yi.VERSION="0.57.2"});var OI=S(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.OTLPMetricExporter=void 0;var n$=Ec(),o$=ic(),i$=AI(),vI=(cc(),h(sc)),a$={"User-Agent":`OTel-OTLP-Exporter-JavaScript/${i$.VERSION}`},Tc=class extends n$.OTLPMetricExporterBase{constructor(r){super((0,vI.createOtlpHttpExportDelegate)((0,vI.convertLegacyHttpOptions)(r??{},"METRICS","v1/metrics",Object.assign(Object.assign({},a$),{"Content-Type":"application/json"})),o$.JsonMetricsSerializer),r)}};Fi.OTLPMetricExporter=Tc});var mI=S(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.OTLPMetricExporter=void 0;var u$=OI();Object.defineProperty(Ki,"OTLPMetricExporter",{enumerable:!0,get:function(){return u$.OTLPMetricExporter}})});var NI=S(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.OTLPMetricExporter=void 0;var s$=mI();Object.defineProperty(ji,"OTLPMetricExporter",{enumerable:!0,get:function(){return s$.OTLPMetricExporter}})});var hI=S(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.OTLPMetricExporterBase=ne.LowMemoryTemporalitySelector=ne.DeltaTemporalitySelector=ne.CumulativeTemporalitySelector=ne.AggregationTemporalityPreference=ne.OTLPMetricExporter=void 0;var c$=NI();Object.defineProperty(ne,"OTLPMetricExporter",{enumerable:!0,get:function(){return c$.OTLPMetricExporter}});var l$=pc();Object.defineProperty(ne,"AggregationTemporalityPreference",{enumerable:!0,get:function(){return l$.AggregationTemporalityPreference}});var qi=Ec();Object.defineProperty(ne,"CumulativeTemporalitySelector",{enumerable:!0,get:function(){return qi.CumulativeTemporalitySelector}});Object.defineProperty(ne,"DeltaTemporalitySelector",{enumerable:!0,get:function(){return qi.DeltaTemporalitySelector}});Object.defineProperty(ne,"LowMemoryTemporalitySelector",{enumerable:!0,get:function(){return qi.LowMemoryTemporalitySelector}});Object.defineProperty(ne,"OTLPMetricExporterBase",{enumerable:!0,get:function(){return qi.OTLPMetricExporterBase}})});var Jr={REQUEST:"openclaw.request",AGENT_TURN:"openclaw.agent.turn",TOOL_PREFIX:"tool.",MESSAGE_RECEIVED:"openclaw.message.received"},ve={LLM_REQUESTS:"openclaw.llm.requests",LLM_TOKENS_INPUT:"openclaw.llm.tokens.input",LLM_TOKENS_OUTPUT:"openclaw.llm.tokens.output",LLM_TOKENS_CACHE_READ:"openclaw.llm.tokens.cache_read",LLM_DURATION:"openclaw.llm.duration",TOOL_CALLS:"openclaw.tool.calls",TOOL_ERRORS:"openclaw.tool.errors",TOOL_DURATION:"openclaw.tool.duration",MESSAGES_RECEIVED:"openclaw.messages.received",ESTIMATED_COST_USD:"openclaw.estimated_cost.usd"},w={SESSION_KEY:"openclaw.session.key",CHANNEL:"openclaw.message.channel",MODEL:"gen_ai.request.model",PROVIDER:"gen_ai.system",INPUT_TOKENS:"gen_ai.usage.input_tokens",OUTPUT_TOKENS:"gen_ai.usage.output_tokens",CACHE_READ_TOKENS:"gen_ai.usage.cache_read.input_tokens",CACHE_WRITE_TOKENS:"gen_ai.usage.cache_write.input_tokens",TOOL_NAME:"tool.name",TOOL_SUCCESS:"tool.success",AGENT_NAME:"openclaw.agent.name"},Xi={API_KEY:"MANIFEST_API_KEY",ENDPOINT:"MANIFEST_ENDPOINT"},Xr={ENDPOINT:"https://app.manifest.build/api/v1/otlp",SERVICE_NAME:"openclaw-gateway",METRICS_INTERVAL_MS:3e4};function vc(o){let r=o&&typeof o=="object"&&!Array.isArray(o)?o:{};r.config&&typeof r.config=="object"&&!Array.isArray(r.config)&&(r=r.config);let i=typeof r.apiKey=="string"&&r.apiKey.length>0?r.apiKey:__fromEnv[Xi.API_KEY]||"",c=__fromEnv[Xi.ENDPOINT],a=typeof r.endpoint=="string"&&r.endpoint.length>0?r.endpoint:c&&c.length>0?c:Xr.ENDPOINT,u=typeof r.serviceName=="string"&&r.serviceName.length>0?r.serviceName:Xr.SERVICE_NAME,t=typeof r.captureContent=="boolean"?r.captureContent:!1,e=typeof r.metricsIntervalMs=="number"&&r.metricsIntervalMs>=5e3?r.metricsIntervalMs:Xr.METRICS_INTERVAL_MS;return{apiKey:i,endpoint:a,serviceName:u,captureContent:t,metricsIntervalMs:e}}function Oc(o){return o.apiKey?o.apiKey.startsWith("osk_")?o.endpoint.startsWith("http")?null:`Invalid endpoint URL '${o.endpoint}'. Must start with http:// or https://. Fix it via:
16
- openclaw config set plugins.entries.manifest.config.endpoint https://app.manifest.build/api/v1/otlp`:`Invalid apiKey format '${o.apiKey.slice(0,8)}\u2026'. Keys must start with 'osk_'. Fix it via:
15
+ `,(0,qo.getConflictResolutionRecipe)(u,r))}return c}};Wo.MetricStorageRegistry=ds});var kM=S(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.MultiMetricStorage=void 0;var As=class{constructor(r){this._backingStorages=r}record(r,i,c,a){this._backingStorages.forEach(u=>{u.record(r,i,c,a)})}};zo.MultiMetricStorage=As});var FM=S(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.BatchObservableResultImpl=tr.ObservableResultImpl=void 0;var er=(m(),h(y)),YM=br(),mJ=Go(),vs=class{constructor(r,i){this._instrumentName=r,this._valueType=i,this._buffer=new YM.AttributeHashMap}observe(r,i={}){if(typeof r!="number"){er.diag.warn(`non-number value provided to metric ${this._instrumentName}: ${r}`);return}this._valueType===er.ValueType.INT&&!Number.isInteger(r)&&(er.diag.warn(`INT value type cannot accept a floating-point value for ${this._instrumentName}, ignoring the fractional digits.`),r=Math.trunc(r),!Number.isInteger(r))||this._buffer.set(i,r)}};tr.ObservableResultImpl=vs;var Os=class{constructor(){this._buffer=new Map}observe(r,i,c={}){if(!(0,mJ.isObservableInstrument)(r))return;let a=this._buffer.get(r);if(a==null&&(a=new YM.AttributeHashMap,this._buffer.set(r,a)),typeof i!="number"){er.diag.warn(`non-number value provided to metric ${r._descriptor.name}: ${i}`);return}r._descriptor.valueType===er.ValueType.INT&&!Number.isInteger(i)&&(er.diag.warn(`INT value type cannot accept a floating-point value for ${r._descriptor.name}, ignoring the fractional digits.`),i=Math.trunc(i),!Number.isInteger(i))||a.set(c,i)}};tr.BatchObservableResultImpl=Os});var qM=S(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});Jo.ObservableRegistry=void 0;var NJ=(m(),h(y)),KM=Go(),jM=FM(),Ur=Ee(),ms=class{constructor(){this._callbacks=[],this._batchCallbacks=[]}addCallback(r,i){this._findCallback(r,i)>=0||this._callbacks.push({callback:r,instrument:i})}removeCallback(r,i){let c=this._findCallback(r,i);c<0||this._callbacks.splice(c,1)}addBatchCallback(r,i){let c=new Set(i.filter(KM.isObservableInstrument));if(c.size===0){NJ.diag.error("BatchObservableCallback is not associated with valid instruments",i);return}this._findBatchCallback(r,c)>=0||this._batchCallbacks.push({callback:r,instruments:c})}removeBatchCallback(r,i){let c=new Set(i.filter(KM.isObservableInstrument)),a=this._findBatchCallback(r,c);a<0||this._batchCallbacks.splice(a,1)}async observe(r,i){let c=this._observeCallbacks(r,i),a=this._observeBatchCallbacks(r,i);return(await(0,Ur.PromiseAllSettled)([...c,...a])).filter(Ur.isPromiseAllSettledRejectionResult).map(e=>e.reason)}_observeCallbacks(r,i){return this._callbacks.map(async({callback:c,instrument:a})=>{let u=new jM.ObservableResultImpl(a._descriptor.name,a._descriptor.valueType),t=Promise.resolve(c(u));i!=null&&(t=(0,Ur.callWithTimeout)(t,i)),await t,a._metricStorages.forEach(e=>{e.record(u._buffer,r)})})}_observeBatchCallbacks(r,i){return this._batchCallbacks.map(async({callback:c,instruments:a})=>{let u=new jM.BatchObservableResultImpl,t=Promise.resolve(c(u));i!=null&&(t=(0,Ur.callWithTimeout)(t,i)),await t,a.forEach(e=>{let n=u._buffer.get(e);n!=null&&e._metricStorages.forEach(s=>{s.record(n,r)})})})}_findCallback(r,i){return this._callbacks.findIndex(c=>c.callback===r&&c.instrument===i)}_findBatchCallback(r,i){return this._batchCallbacks.findIndex(c=>c.callback===r&&(0,Ur.setEquals)(c.instruments,i))}};Jo.ObservableRegistry=ms});var WM=S(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.SyncMetricStorage=void 0;var hJ=cs(),RJ=Es(),yJ=Ss(),Ns=class extends hJ.MetricStorage{constructor(r,i,c,a,u){super(r),this._attributesProcessor=c,this._aggregationCardinalityLimit=u,this._deltaMetricStorage=new RJ.DeltaMetricProcessor(i,this._aggregationCardinalityLimit),this._temporalMetricStorage=new yJ.TemporalMetricProcessor(i,a)}record(r,i,c,a){i=this._attributesProcessor.process(i,c),this._deltaMetricStorage.record(r,i,c,a)}collect(r,i){let c=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,c,i)}};Xo.SyncMetricStorage=Ns});var Rs=S(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.FilteringAttributesProcessor=Ke.NoopAttributesProcessor=Ke.AttributesProcessor=void 0;var Dr=class{static Noop(){return PJ}};Ke.AttributesProcessor=Dr;var $o=class extends Dr{process(r,i){return r}};Ke.NoopAttributesProcessor=$o;var hs=class extends Dr{constructor(r){super(),this._allowedAttributeNames=r}process(r,i){let c={};return Object.keys(r).filter(a=>this._allowedAttributeNames.includes(a)).forEach(a=>c[a]=r[a]),c}};Ke.FilteringAttributesProcessor=hs;var PJ=new $o});var zM=S(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.MeterSharedState=void 0;var MJ=Ce(),gJ=CM(),LJ=Ee(),IJ=bM(),xJ=HM(),CJ=kM(),bJ=qM(),UJ=WM(),DJ=Rs(),ys=class{constructor(r,i){this._meterProviderSharedState=r,this._instrumentationScope=i,this.metricStorageRegistry=new xJ.MetricStorageRegistry,this.observableRegistry=new bJ.ObservableRegistry,this.meter=new gJ.Meter(this)}registerMetricStorage(r){let i=this._registerMetricStorage(r,UJ.SyncMetricStorage);return i.length===1?i[0]:new CJ.MultiMetricStorage(i)}registerAsyncMetricStorage(r){return this._registerMetricStorage(r,IJ.AsyncMetricStorage)}async collect(r,i,c){let a=await this.observableRegistry.observe(i,c?.timeoutMillis),u=this.metricStorageRegistry.getStorages(r);if(u.length===0)return null;let t=u.map(e=>e.collect(r,i)).filter(LJ.isNotNullish);return t.length===0?{errors:a}:{scopeMetrics:{scope:this._instrumentationScope,metrics:t},errors:a}}_registerMetricStorage(r,i){let a=this._meterProviderSharedState.viewRegistry.findViews(r,this._instrumentationScope).map(u=>{let t=(0,MJ.createInstrumentDescriptorWithView)(u,r),e=this.metricStorageRegistry.findOrUpdateCompatibleStorage(t);if(e!=null)return e;let n=u.aggregation.createAggregator(t),s=new i(t,n,u.attributesProcessor,this._meterProviderSharedState.metricCollectors,u.aggregationCardinalityLimit);return this.metricStorageRegistry.register(s),s});if(a.length===0){let t=this._meterProviderSharedState.selectAggregations(r.type).map(([e,n])=>{let s=this.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(e,r);if(s!=null)return s;let l=n.createAggregator(r),E=e.selectCardinalityLimit(r.type),O=new i(r,l,DJ.AttributesProcessor.Noop(),[e],E);return this.metricStorageRegistry.registerForCollector(e,O),O});a=a.concat(t)}return a}};Qo.MeterSharedState=ys});var JM=S(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.MeterProviderSharedState=void 0;var VJ=Ee(),wJ=xM(),BJ=zM(),Ps=class{constructor(r){this.resource=r,this.viewRegistry=new wJ.ViewRegistry,this.metricCollectors=[],this.meterSharedStates=new Map}getMeterSharedState(r){let i=(0,VJ.instrumentationScopeId)(r),c=this.meterSharedStates.get(i);return c==null&&(c=new BJ.MeterSharedState(this,r),this.meterSharedStates.set(i,c)),c}selectAggregations(r){let i=[];for(let c of this.metricCollectors)i.push([c,c.selectAggregation(r)]);return i}};Zo.MeterProviderSharedState=Ps});var XM=S(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.MetricCollector=void 0;var GJ=C(),Ms=class{constructor(r,i){this._sharedState=r,this._metricReader=i}async collect(r){let i=(0,GJ.millisToHrTime)(Date.now()),c=[],a=[],u=Array.from(this._sharedState.meterSharedStates.values()).map(async t=>{let e=await t.collect(this,i,r);e?.scopeMetrics!=null&&c.push(e.scopeMetrics),e?.errors!=null&&a.push(...e.errors)});return await Promise.all(u),{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:c},errors:a}}async forceFlush(r){await this._metricReader.forceFlush(r)}async shutdown(r){await this._metricReader.shutdown(r)}selectAggregationTemporality(r){return this._metricReader.selectAggregationTemporality(r)}selectAggregation(r){return this._metricReader.selectAggregation(r)}selectCardinalityLimit(r){var i,c,a;return(a=(c=(i=this._metricReader).selectCardinalityLimit)===null||c===void 0?void 0:c.call(i,r))!==null&&a!==void 0?a:2e3}};ei.MetricCollector=Ms});var QM=S(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});ri.MeterProvider=void 0;var ti=(m(),h(y)),$M=co(),HJ=JM(),kJ=XM();function YJ(o,r){let i=r??$M.Resource.empty();return o?$M.Resource.default().merge(i):i}var gs=class{constructor(r){var i;if(this._shutdown=!1,this._sharedState=new HJ.MeterProviderSharedState(YJ((i=r?.mergeResourceWithDefaults)!==null&&i!==void 0?i:!0,r?.resource)),r?.views!=null&&r.views.length>0)for(let c of r.views)this._sharedState.viewRegistry.addView(c);if(r?.readers!=null&&r.readers.length>0)for(let c of r.readers)this.addMetricReader(c)}getMeter(r,i="",c={}){return this._shutdown?(ti.diag.warn("A shutdown MeterProvider cannot provide a Meter"),(0,ti.createNoopMeter)()):this._sharedState.getMeterSharedState({name:r,version:i,schemaUrl:c.schemaUrl}).meter}addMetricReader(r){let i=new kJ.MetricCollector(this._sharedState,r);r.setMetricProducer(i),this._sharedState.metricCollectors.push(i)}async shutdown(r){if(this._shutdown){ti.diag.warn("shutdown may only be called once per MeterProvider");return}this._shutdown=!0,await Promise.all(this._sharedState.metricCollectors.map(i=>i.shutdown(r)))}async forceFlush(r){if(this._shutdown){ti.diag.warn("invalid attempt to force flush after MeterProvider shutdown");return}await Promise.all(this._sharedState.metricCollectors.map(i=>i.forceFlush(r)))}};ri.MeterProvider=gs});var ni=S(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.ExactPredicate=rr.PatternPredicate=void 0;var FJ=/[\^$\\.+?()[\]{}|]/g,Ls=class o{constructor(r){r==="*"?(this._matchAll=!0,this._regexp=/.*/):(this._matchAll=!1,this._regexp=new RegExp(o.escapePattern(r)))}match(r){return this._matchAll?!0:this._regexp.test(r)}static escapePattern(r){return`^${r.replace(FJ,"\\$&").replace("*",".*")}$`}static hasWildcard(r){return r.includes("*")}};rr.PatternPredicate=Ls;var Is=class{constructor(r){this._matchAll=r===void 0,this._pattern=r}match(r){return!!(this._matchAll||r===this._pattern)}};rr.ExactPredicate=Is});var eg=S(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.InstrumentSelector=void 0;var ZM=ni(),xs=class{constructor(r){var i;this._nameFilter=new ZM.PatternPredicate((i=r?.name)!==null&&i!==void 0?i:"*"),this._type=r?.type,this._unitFilter=new ZM.ExactPredicate(r?.unit)}getType(){return this._type}getNameFilter(){return this._nameFilter}getUnitFilter(){return this._unitFilter}};oi.InstrumentSelector=xs});var tg=S(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});ii.MeterSelector=void 0;var Cs=ni(),bs=class{constructor(r){this._nameFilter=new Cs.ExactPredicate(r?.name),this._versionFilter=new Cs.ExactPredicate(r?.version),this._schemaUrlFilter=new Cs.ExactPredicate(r?.schemaUrl)}getNameFilter(){return this._nameFilter}getVersionFilter(){return this._versionFilter}getSchemaUrlFilter(){return this._schemaUrlFilter}};ii.MeterSelector=bs});var ng=S(ai=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0});ai.View=void 0;var KJ=ni(),rg=Rs(),jJ=eg(),qJ=tg(),WJ=Co();function zJ(o){return o.instrumentName==null&&o.instrumentType==null&&o.instrumentUnit==null&&o.meterName==null&&o.meterVersion==null&&o.meterSchemaUrl==null}var Us=class{constructor(r){var i;if(zJ(r))throw new Error("Cannot create view with no selector arguments supplied");if(r.name!=null&&(r?.instrumentName==null||KJ.PatternPredicate.hasWildcard(r.instrumentName)))throw new Error("Views with a specified name must be declared with an instrument selector that selects at most one instrument per meter.");r.attributeKeys!=null?this.attributesProcessor=new rg.FilteringAttributesProcessor(r.attributeKeys):this.attributesProcessor=rg.AttributesProcessor.Noop(),this.name=r.name,this.description=r.description,this.aggregation=(i=r.aggregation)!==null&&i!==void 0?i:WJ.Aggregation.Default(),this.instrumentSelector=new jJ.InstrumentSelector({name:r.instrumentName,type:r.instrumentType,unit:r.instrumentUnit}),this.meterSelector=new qJ.MeterSelector({name:r.meterName,version:r.meterVersion,schemaUrl:r.meterSchemaUrl}),this.aggregationCardinalityLimit=r.aggregationCardinalityLimit}};ai.View=Us});var ui=S(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.TimeoutError=R.View=R.Aggregation=R.SumAggregation=R.LastValueAggregation=R.HistogramAggregation=R.DropAggregation=R.ExponentialHistogramAggregation=R.ExplicitBucketHistogramAggregation=R.DefaultAggregation=R.MeterProvider=R.InstrumentType=R.ConsoleMetricExporter=R.InMemoryMetricExporter=R.PeriodicExportingMetricReader=R.MetricReader=R.DataPointType=R.AggregationTemporality=void 0;var JJ=So();Object.defineProperty(R,"AggregationTemporality",{enumerable:!0,get:function(){return JJ.AggregationTemporality}});var XJ=Bt();Object.defineProperty(R,"DataPointType",{enumerable:!0,get:function(){return XJ.DataPointType}});var $J=zu();Object.defineProperty(R,"MetricReader",{enumerable:!0,get:function(){return $J.MetricReader}});var QJ=PM();Object.defineProperty(R,"PeriodicExportingMetricReader",{enumerable:!0,get:function(){return QJ.PeriodicExportingMetricReader}});var ZJ=gM();Object.defineProperty(R,"InMemoryMetricExporter",{enumerable:!0,get:function(){return ZJ.InMemoryMetricExporter}});var eX=IM();Object.defineProperty(R,"ConsoleMetricExporter",{enumerable:!0,get:function(){return eX.ConsoleMetricExporter}});var tX=Ce();Object.defineProperty(R,"InstrumentType",{enumerable:!0,get:function(){return tX.InstrumentType}});var rX=QM();Object.defineProperty(R,"MeterProvider",{enumerable:!0,get:function(){return rX.MeterProvider}});var je=Co();Object.defineProperty(R,"DefaultAggregation",{enumerable:!0,get:function(){return je.DefaultAggregation}});Object.defineProperty(R,"ExplicitBucketHistogramAggregation",{enumerable:!0,get:function(){return je.ExplicitBucketHistogramAggregation}});Object.defineProperty(R,"ExponentialHistogramAggregation",{enumerable:!0,get:function(){return je.ExponentialHistogramAggregation}});Object.defineProperty(R,"DropAggregation",{enumerable:!0,get:function(){return je.DropAggregation}});Object.defineProperty(R,"HistogramAggregation",{enumerable:!0,get:function(){return je.HistogramAggregation}});Object.defineProperty(R,"LastValueAggregation",{enumerable:!0,get:function(){return je.LastValueAggregation}});Object.defineProperty(R,"SumAggregation",{enumerable:!0,get:function(){return je.SumAggregation}});Object.defineProperty(R,"Aggregation",{enumerable:!0,get:function(){return je.Aggregation}});var nX=ng();Object.defineProperty(R,"View",{enumerable:!0,get:function(){return nX.View}});var oX=Ee();Object.defineProperty(R,"TimeoutError",{enumerable:!0,get:function(){return oX.TimeoutError}})});var og,ig=d(()=>{og=function(){function o(r){this._delegate=r}return o.prototype.export=function(r,i){this._delegate.export(r,i)},o.prototype.forceFlush=function(){return this._delegate.forceFlush()},o.prototype.shutdown=function(){return this._delegate.shutdown()},o}()});var iX,ct,si=d(()=>{iX=function(){var o=function(r,i){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,a){c.__proto__=a}||function(c,a){for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(c[u]=a[u])},o(r,i)};return function(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");o(r,i);function c(){this.constructor=r}r.prototype=i===null?Object.create(i):(c.prototype=i.prototype,new c)}}(),ct=function(o){iX(r,o);function r(i,c,a){var u=o.call(this,i)||this;return u.name="OTLPExporterError",u.data=a,u.code=c,u}return r}(Error)});function aX(o){if(!Number.isNaN(o)&&Number.isFinite(o)&&o>0)return o;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+o+"')")}function ci(o){if(o!=null)return function(){return o}}function li(o,r,i){var c,a,u,t,e,n;return{timeoutMillis:aX((a=(c=o.timeoutMillis)!==null&&c!==void 0?c:r.timeoutMillis)!==null&&a!==void 0?a:i.timeoutMillis),concurrencyLimit:(t=(u=o.concurrencyLimit)!==null&&u!==void 0?u:r.concurrencyLimit)!==null&&t!==void 0?t:i.concurrencyLimit,compression:(n=(e=o.compression)!==null&&e!==void 0?e:r.compression)!==null&&n!==void 0?n:i.compression}}function pi(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var Vr=d(()=>{});var _i,ag=d(()=>{(function(o){o.NONE="none",o.GZIP="gzip"})(_i||(_i={}))});function Ei(o){return new cX(o.concurrencyLimit)}var uX,sX,cX,Ds=d(()=>{uX=function(o,r,i,c){function a(u){return u instanceof i?u:new i(function(t){t(u)})}return new(i||(i=Promise))(function(u,t){function e(l){try{s(c.next(l))}catch(E){t(E)}}function n(l){try{s(c.throw(l))}catch(E){t(E)}}function s(l){l.done?u(l.value):a(l.value).then(e,n)}s((c=c.apply(o,r||[])).next())})},sX=function(o,r){var i={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},c,a,u,t;return t={next:e(0),throw:e(1),return:e(2)},typeof Symbol=="function"&&(t[Symbol.iterator]=function(){return this}),t;function e(s){return function(l){return n([s,l])}}function n(s){if(c)throw new TypeError("Generator is already executing.");for(;i;)try{if(c=1,a&&(u=s[0]&2?a.return:s[0]?a.throw||((u=a.return)&&u.call(a),0):a.next)&&!(u=u.call(a,s[1])).done)return u;switch(a=0,u&&(s=[s[0]&2,u.value]),s[0]){case 0:case 1:u=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,a=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(u=i.trys,!(u=u.length>0&&u[u.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!u||s[1]>u[0]&&s[1]<u[3])){i.label=s[1];break}if(s[0]===6&&i.label<u[1]){i.label=u[1],u=s;break}if(u&&i.label<u[2]){i.label=u[2],i.ops.push(s);break}u[2]&&i.ops.pop(),i.trys.pop();continue}s=r.call(o,i)}catch(l){s=[6,l],a=0}finally{c=u=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},cX=function(){function o(r){this._sendingPromises=[],this._concurrencyLimit=r}return o.prototype.pushPromise=function(r){var i=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(r);var c=function(){var a=i._sendingPromises.indexOf(r);i._sendingPromises.splice(a,1)};r.then(c,c)},o.prototype.hasReachedLimit=function(){return this._sendingPromises.length>=this._concurrencyLimit},o.prototype.awaitAll=function(){return uX(this,void 0,void 0,function(){return sX(this,function(r){switch(r.label){case 0:return[4,Promise.all(this._sendingPromises)];case 1:return r.sent(),[2]}})})},o}()});function lX(o){return Object.prototype.hasOwnProperty.call(o,"partialSuccess")}function ug(){return{handleResponse:function(o){o==null||!lX(o)||o.partialSuccess==null||Object.keys(o.partialSuccess).length===0||H.warn("Received Partial Success response:",JSON.stringify(o.partialSuccess))}}}var sg=d(()=>{m()});function Ti(o,r){return new EX(o.transport,o.serializer,ug(),o.promiseHandler,r.timeout)}var qe,pX,_X,EX,Vs=d(()=>{qe=Ae(C());si();sg();m();pX=function(o,r,i,c){function a(u){return u instanceof i?u:new i(function(t){t(u)})}return new(i||(i=Promise))(function(u,t){function e(l){try{s(c.next(l))}catch(E){t(E)}}function n(l){try{s(c.throw(l))}catch(E){t(E)}}function s(l){l.done?u(l.value):a(l.value).then(e,n)}s((c=c.apply(o,r||[])).next())})},_X=function(o,r){var i={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},c,a,u,t;return t={next:e(0),throw:e(1),return:e(2)},typeof Symbol=="function"&&(t[Symbol.iterator]=function(){return this}),t;function e(s){return function(l){return n([s,l])}}function n(s){if(c)throw new TypeError("Generator is already executing.");for(;i;)try{if(c=1,a&&(u=s[0]&2?a.return:s[0]?a.throw||((u=a.return)&&u.call(a),0):a.next)&&!(u=u.call(a,s[1])).done)return u;switch(a=0,u&&(s=[s[0]&2,u.value]),s[0]){case 0:case 1:u=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,a=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(u=i.trys,!(u=u.length>0&&u[u.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!u||s[1]>u[0]&&s[1]<u[3])){i.label=s[1];break}if(s[0]===6&&i.label<u[1]){i.label=u[1],u=s;break}if(u&&i.label<u[2]){i.label=u[2],i.ops.push(s);break}u[2]&&i.ops.pop(),i.trys.pop();continue}s=r.call(o,i)}catch(l){s=[6,l],a=0}finally{c=u=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},EX=function(){function o(r,i,c,a,u){this._transport=r,this._serializer=i,this._responseHandler=c,this._promiseQueue=a,this._timeout=u,this._diagLogger=H.createComponentLogger({namespace:"OTLPExportDelegate"})}return o.prototype.export=function(r,i){var c=this;if(this._diagLogger.debug("items to be sent",r),this._promiseQueue.hasReachedLimit()){i({code:qe.ExportResultCode.FAILED,error:new Error("Concurrent export limit reached")});return}var a=this._serializer.serializeRequest(r);if(a==null){i({code:qe.ExportResultCode.FAILED,error:new Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(a,this._timeout).then(function(u){if(u.status==="success"){if(u.data!=null)try{c._responseHandler.handleResponse(c._serializer.deserializeResponse(u.data))}catch(t){c._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",t,u.data)}i({code:qe.ExportResultCode.SUCCESS});return}else if(u.status==="failure"&&u.error){i({code:qe.ExportResultCode.FAILED,error:u.error});return}else u.status==="retryable"?i({code:qe.ExportResultCode.FAILED,error:new ct("Export failed with retryable status")}):i({code:qe.ExportResultCode.FAILED,error:new ct("Export failed with unknown error")})},function(u){return i({code:qe.ExportResultCode.FAILED,error:u})}))},o.prototype.forceFlush=function(){return this._promiseQueue.awaitAll()},o.prototype.shutdown=function(){return pX(this,void 0,void 0,function(){return _X(this,function(r){switch(r.label){case 0:return this._diagLogger.debug("shutdown started"),[4,this.forceFlush()];case 1:return r.sent(),this._transport.shutdown(),[2]}})})},o}()});function cg(o,r,i){return Ti({transport:i,serializer:r,promiseHandler:Ei(o)},{timeout:o.timeoutMillis})}var lg=d(()=>{Ds();Vs()});var ws={};ft(ws,{CompressionAlgorithm:()=>_i,OTLPExporterBase:()=>og,OTLPExporterError:()=>ct,createOtlpNetworkExportDelegate:()=>cg,getSharedConfigurationDefaults:()=>pi,mergeOtlpSharedConfigurationWithDefaults:()=>li});var Bs=d(()=>{ig();si();Vr();ag();lg()});var pg=S(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.VERSION=void 0;Si.VERSION="0.57.2"});var Eg=S((Uee,_g)=>{"use strict";_g.exports=TX;function TX(o,r){for(var i=new Array(arguments.length-1),c=0,a=2,u=!0;a<arguments.length;)i[c++]=arguments[a++];return new Promise(function(e,n){i[c]=function(l){if(u)if(u=!1,l)n(l);else{for(var E=new Array(arguments.length-1),O=0;O<E.length;)E[O++]=arguments[O];e.apply(null,E)}};try{o.apply(r||null,i)}catch(s){u&&(u=!1,n(s))}})}});var dg=S(fg=>{"use strict";var fi=fg;fi.length=function(r){var i=r.length;if(!i)return 0;for(var c=0;--i%4>1&&r.charAt(i)==="=";)++c;return Math.ceil(r.length*3)/4-c};var nr=new Array(64),Sg=new Array(123);for(Te=0;Te<64;)Sg[nr[Te]=Te<26?Te+65:Te<52?Te+71:Te<62?Te-4:Te-59|43]=Te++;var Te;fi.encode=function(r,i,c){for(var a=null,u=[],t=0,e=0,n;i<c;){var s=r[i++];switch(e){case 0:u[t++]=nr[s>>2],n=(s&3)<<4,e=1;break;case 1:u[t++]=nr[n|s>>4],n=(s&15)<<2,e=2;break;case 2:u[t++]=nr[n|s>>6],u[t++]=nr[s&63],e=0;break}t>8191&&((a||(a=[])).push(String.fromCharCode.apply(String,u)),t=0)}return e&&(u[t++]=nr[n],u[t++]=61,e===1&&(u[t++]=61)),a?(t&&a.push(String.fromCharCode.apply(String,u.slice(0,t))),a.join("")):String.fromCharCode.apply(String,u.slice(0,t))};var Tg="invalid encoding";fi.decode=function(r,i,c){for(var a=c,u=0,t,e=0;e<r.length;){var n=r.charCodeAt(e++);if(n===61&&u>1)break;if((n=Sg[n])===void 0)throw Error(Tg);switch(u){case 0:t=n,u=1;break;case 1:i[c++]=t<<2|(n&48)>>4,t=n,u=2;break;case 2:i[c++]=(t&15)<<4|(n&60)>>2,t=n,u=3;break;case 3:i[c++]=(t&3)<<6|n,u=0;break}}if(u===1)throw Error(Tg);return c-a};fi.test=function(r){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r)}});var vg=S((Vee,Ag)=>{"use strict";Ag.exports=di;function di(){this._listeners={}}di.prototype.on=function(r,i,c){return(this._listeners[r]||(this._listeners[r]=[])).push({fn:i,ctx:c||this}),this};di.prototype.off=function(r,i){if(r===void 0)this._listeners={};else if(i===void 0)this._listeners[r]=[];else for(var c=this._listeners[r],a=0;a<c.length;)c[a].fn===i?c.splice(a,1):++a;return this};di.prototype.emit=function(r){var i=this._listeners[r];if(i){for(var c=[],a=1;a<arguments.length;)c.push(arguments[a++]);for(a=0;a<i.length;)i[a].fn.apply(i[a++].ctx,c)}return this}});var Pg=S((wee,yg)=>{"use strict";yg.exports=Og(Og);function Og(o){return typeof Float32Array<"u"?function(){var r=new Float32Array([-0]),i=new Uint8Array(r.buffer),c=i[3]===128;function a(n,s,l){r[0]=n,s[l]=i[0],s[l+1]=i[1],s[l+2]=i[2],s[l+3]=i[3]}function u(n,s,l){r[0]=n,s[l]=i[3],s[l+1]=i[2],s[l+2]=i[1],s[l+3]=i[0]}o.writeFloatLE=c?a:u,o.writeFloatBE=c?u:a;function t(n,s){return i[0]=n[s],i[1]=n[s+1],i[2]=n[s+2],i[3]=n[s+3],r[0]}function e(n,s){return i[3]=n[s],i[2]=n[s+1],i[1]=n[s+2],i[0]=n[s+3],r[0]}o.readFloatLE=c?t:e,o.readFloatBE=c?e:t}():function(){function r(c,a,u,t){var e=a<0?1:0;if(e&&(a=-a),a===0)c(1/a>0?0:2147483648,u,t);else if(isNaN(a))c(2143289344,u,t);else if(a>34028234663852886e22)c((e<<31|2139095040)>>>0,u,t);else if(a<11754943508222875e-54)c((e<<31|Math.round(a/1401298464324817e-60))>>>0,u,t);else{var n=Math.floor(Math.log(a)/Math.LN2),s=Math.round(a*Math.pow(2,-n)*8388608)&8388607;c((e<<31|n+127<<23|s)>>>0,u,t)}}o.writeFloatLE=r.bind(null,mg),o.writeFloatBE=r.bind(null,Ng);function i(c,a,u){var t=c(a,u),e=(t>>31)*2+1,n=t>>>23&255,s=t&8388607;return n===255?s?NaN:e*(1/0):n===0?e*1401298464324817e-60*s:e*Math.pow(2,n-150)*(s+8388608)}o.readFloatLE=i.bind(null,hg),o.readFloatBE=i.bind(null,Rg)}(),typeof Float64Array<"u"?function(){var r=new Float64Array([-0]),i=new Uint8Array(r.buffer),c=i[7]===128;function a(n,s,l){r[0]=n,s[l]=i[0],s[l+1]=i[1],s[l+2]=i[2],s[l+3]=i[3],s[l+4]=i[4],s[l+5]=i[5],s[l+6]=i[6],s[l+7]=i[7]}function u(n,s,l){r[0]=n,s[l]=i[7],s[l+1]=i[6],s[l+2]=i[5],s[l+3]=i[4],s[l+4]=i[3],s[l+5]=i[2],s[l+6]=i[1],s[l+7]=i[0]}o.writeDoubleLE=c?a:u,o.writeDoubleBE=c?u:a;function t(n,s){return i[0]=n[s],i[1]=n[s+1],i[2]=n[s+2],i[3]=n[s+3],i[4]=n[s+4],i[5]=n[s+5],i[6]=n[s+6],i[7]=n[s+7],r[0]}function e(n,s){return i[7]=n[s],i[6]=n[s+1],i[5]=n[s+2],i[4]=n[s+3],i[3]=n[s+4],i[2]=n[s+5],i[1]=n[s+6],i[0]=n[s+7],r[0]}o.readDoubleLE=c?t:e,o.readDoubleBE=c?e:t}():function(){function r(c,a,u,t,e,n){var s=t<0?1:0;if(s&&(t=-t),t===0)c(0,e,n+a),c(1/t>0?0:2147483648,e,n+u);else if(isNaN(t))c(0,e,n+a),c(2146959360,e,n+u);else if(t>17976931348623157e292)c(0,e,n+a),c((s<<31|2146435072)>>>0,e,n+u);else{var l;if(t<22250738585072014e-324)l=t/5e-324,c(l>>>0,e,n+a),c((s<<31|l/4294967296)>>>0,e,n+u);else{var E=Math.floor(Math.log(t)/Math.LN2);E===1024&&(E=1023),l=t*Math.pow(2,-E),c(l*4503599627370496>>>0,e,n+a),c((s<<31|E+1023<<20|l*1048576&1048575)>>>0,e,n+u)}}}o.writeDoubleLE=r.bind(null,mg,0,4),o.writeDoubleBE=r.bind(null,Ng,4,0);function i(c,a,u,t,e){var n=c(t,e+a),s=c(t,e+u),l=(s>>31)*2+1,E=s>>>20&2047,O=4294967296*(s&1048575)+n;return E===2047?O?NaN:l*(1/0):E===0?l*5e-324*O:l*Math.pow(2,E-1075)*(O+4503599627370496)}o.readDoubleLE=i.bind(null,hg,0,4),o.readDoubleBE=i.bind(null,Rg,4,0)}(),o}function mg(o,r,i){r[i]=o&255,r[i+1]=o>>>8&255,r[i+2]=o>>>16&255,r[i+3]=o>>>24}function Ng(o,r,i){r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=o&255}function hg(o,r){return(o[r]|o[r+1]<<8|o[r+2]<<16|o[r+3]<<24)>>>0}function Rg(o,r){return(o[r]<<24|o[r+1]<<16|o[r+2]<<8|o[r+3])>>>0}});var gg=S((Bee,Mg)=>{"use strict";Mg.exports=function(){return null}});var Ig=S(Lg=>{"use strict";var Gs=Lg;Gs.length=function(r){for(var i=0,c=0,a=0;a<r.length;++a)c=r.charCodeAt(a),c<128?i+=1:c<2048?i+=2:(c&64512)===55296&&(r.charCodeAt(a+1)&64512)===56320?(++a,i+=4):i+=3;return i};Gs.read=function(r,i,c){var a=c-i;if(a<1)return"";for(var u=null,t=[],e=0,n;i<c;)n=r[i++],n<128?t[e++]=n:n>191&&n<224?t[e++]=(n&31)<<6|r[i++]&63:n>239&&n<365?(n=((n&7)<<18|(r[i++]&63)<<12|(r[i++]&63)<<6|r[i++]&63)-65536,t[e++]=55296+(n>>10),t[e++]=56320+(n&1023)):t[e++]=(n&15)<<12|(r[i++]&63)<<6|r[i++]&63,e>8191&&((u||(u=[])).push(String.fromCharCode.apply(String,t)),e=0);return u?(e&&u.push(String.fromCharCode.apply(String,t.slice(0,e))),u.join("")):String.fromCharCode.apply(String,t.slice(0,e))};Gs.write=function(r,i,c){for(var a=c,u,t,e=0;e<r.length;++e)u=r.charCodeAt(e),u<128?i[c++]=u:u<2048?(i[c++]=u>>6|192,i[c++]=u&63|128):(u&64512)===55296&&((t=r.charCodeAt(e+1))&64512)===56320?(u=65536+((u&1023)<<10)+(t&1023),++e,i[c++]=u>>18|240,i[c++]=u>>12&63|128,i[c++]=u>>6&63|128,i[c++]=u&63|128):(i[c++]=u>>12|224,i[c++]=u>>6&63|128,i[c++]=u&63|128);return c-a}});var Cg=S((Hee,xg)=>{"use strict";xg.exports=SX;function SX(o,r,i){var c=i||8192,a=c>>>1,u=null,t=c;return function(n){if(n<1||n>a)return o(n);t+n>c&&(u=o(c),t=0);var s=r.call(u,t,t+=n);return t&7&&(t=(t|7)+1),s}}});var Ug=S((kee,bg)=>{"use strict";bg.exports=K;var wr=ze();function K(o,r){this.lo=o>>>0,this.hi=r>>>0}var lt=K.zero=new K(0,0);lt.toNumber=function(){return 0};lt.zzEncode=lt.zzDecode=function(){return this};lt.length=function(){return 1};var fX=K.zeroHash="\0\0\0\0\0\0\0\0";K.fromNumber=function(r){if(r===0)return lt;var i=r<0;i&&(r=-r);var c=r>>>0,a=(r-c)/4294967296>>>0;return i&&(a=~a>>>0,c=~c>>>0,++c>4294967295&&(c=0,++a>4294967295&&(a=0))),new K(c,a)};K.from=function(r){if(typeof r=="number")return K.fromNumber(r);if(wr.isString(r))if(wr.Long)r=wr.Long.fromString(r);else return K.fromNumber(parseInt(r,10));return r.low||r.high?new K(r.low>>>0,r.high>>>0):lt};K.prototype.toNumber=function(r){if(!r&&this.hi>>>31){var i=~this.lo+1>>>0,c=~this.hi>>>0;return i||(c=c+1>>>0),-(i+c*4294967296)}return this.lo+this.hi*4294967296};K.prototype.toLong=function(r){return wr.Long?new wr.Long(this.lo|0,this.hi|0,!!r):{low:this.lo|0,high:this.hi|0,unsigned:!!r}};var We=String.prototype.charCodeAt;K.fromHash=function(r){return r===fX?lt:new K((We.call(r,0)|We.call(r,1)<<8|We.call(r,2)<<16|We.call(r,3)<<24)>>>0,(We.call(r,4)|We.call(r,5)<<8|We.call(r,6)<<16|We.call(r,7)<<24)>>>0)};K.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)};K.prototype.zzEncode=function(){var r=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^r)>>>0,this.lo=(this.lo<<1^r)>>>0,this};K.prototype.zzDecode=function(){var r=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^r)>>>0,this.hi=(this.hi>>>1^r)>>>0,this};K.prototype.length=function(){var r=this.lo,i=(this.lo>>>28|this.hi<<4)>>>0,c=this.hi>>>24;return c===0?i===0?r<16384?r<128?1:2:r<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:c<128?9:10}});var ze=S(Hs=>{"use strict";var A=Hs;A.asPromise=Eg();A.base64=dg();A.EventEmitter=vg();A.float=Pg();A.inquire=gg();A.utf8=Ig();A.pool=Cg();A.LongBits=Ug();A.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);A.global=A.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||Hs;A.emptyArray=Object.freeze?Object.freeze([]):[];A.emptyObject=Object.freeze?Object.freeze({}):{};A.isInteger=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r};A.isString=function(r){return typeof r=="string"||r instanceof String};A.isObject=function(r){return r&&typeof r=="object"};A.isset=A.isSet=function(r,i){var c=r[i];return c!=null&&r.hasOwnProperty(i)?typeof c!="object"||(Array.isArray(c)?c.length:Object.keys(c).length)>0:!1};A.Buffer=function(){try{var o=A.inquire("buffer").Buffer;return o.prototype.utf8Write?o:null}catch{return null}}();A._Buffer_from=null;A._Buffer_allocUnsafe=null;A.newBuffer=function(r){return typeof r=="number"?A.Buffer?A._Buffer_allocUnsafe(r):new A.Array(r):A.Buffer?A._Buffer_from(r):typeof Uint8Array>"u"?r:new Uint8Array(r)};A.Array=typeof Uint8Array<"u"?Uint8Array:Array;A.Long=A.global.dcodeIO&&A.global.dcodeIO.Long||A.global.Long||A.inquire("long");A.key2Re=/^true|false|0|1$/;A.key32Re=/^-?(?:0|[1-9][0-9]*)$/;A.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;A.longToHash=function(r){return r?A.LongBits.from(r).toHash():A.LongBits.zeroHash};A.longFromHash=function(r,i){var c=A.LongBits.fromHash(r);return A.Long?A.Long.fromBits(c.lo,c.hi,i):c.toNumber(!!i)};function Dg(o,r,i){for(var c=Object.keys(r),a=0;a<c.length;++a)(o[c[a]]===void 0||!i)&&(o[c[a]]=r[c[a]]);return o}A.merge=Dg;A.lcFirst=function(r){return r.charAt(0).toLowerCase()+r.substring(1)};function Vg(o){function r(i,c){if(!(this instanceof r))return new r(i,c);Object.defineProperty(this,"message",{get:function(){return i}}),Error.captureStackTrace?Error.captureStackTrace(this,r):Object.defineProperty(this,"stack",{value:new Error().stack||""}),c&&Dg(this,c)}return r.prototype=Object.create(Error.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return o},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),r}A.newError=Vg;A.ProtocolError=Vg("ProtocolError");A.oneOfGetter=function(r){for(var i={},c=0;c<r.length;++c)i[r[c]]=1;return function(){for(var a=Object.keys(this),u=a.length-1;u>-1;--u)if(i[a[u]]===1&&this[a[u]]!==void 0&&this[a[u]]!==null)return a[u]}};A.oneOfSetter=function(r){return function(i){for(var c=0;c<r.length;++c)r[c]!==i&&delete this[r[c]]}};A.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};A._configure=function(){var o=A.Buffer;if(!o){A._Buffer_from=A._Buffer_allocUnsafe=null;return}A._Buffer_from=o.from!==Uint8Array.from&&o.from||function(i,c){return new o(i,c)},A._Buffer_allocUnsafe=o.allocUnsafe||function(i){return new o(i)}}});var Ws=S((Fee,Hg)=>{"use strict";Hg.exports=P;var se=ze(),ks,Ai=se.LongBits,wg=se.base64,Bg=se.utf8;function Br(o,r,i){this.fn=o,this.len=r,this.next=void 0,this.val=i}function Fs(){}function dX(o){this.head=o.head,this.tail=o.tail,this.len=o.len,this.next=o.states}function P(){this.len=0,this.head=new Br(Fs,0,0),this.tail=this.head,this.states=null}var Gg=function(){return se.Buffer?function(){return(P.create=function(){return new ks})()}:function(){return new P}};P.create=Gg();P.alloc=function(r){return new se.Array(r)};se.Array!==Array&&(P.alloc=se.pool(P.alloc,se.Array.prototype.subarray));P.prototype._push=function(r,i,c){return this.tail=this.tail.next=new Br(r,i,c),this.len+=i,this};function Ks(o,r,i){r[i]=o&255}function AX(o,r,i){for(;o>127;)r[i++]=o&127|128,o>>>=7;r[i]=o}function js(o,r){this.len=o,this.next=void 0,this.val=r}js.prototype=Object.create(Br.prototype);js.prototype.fn=AX;P.prototype.uint32=function(r){return this.len+=(this.tail=this.tail.next=new js((r=r>>>0)<128?1:r<16384?2:r<2097152?3:r<268435456?4:5,r)).len,this};P.prototype.int32=function(r){return r<0?this._push(qs,10,Ai.fromNumber(r)):this.uint32(r)};P.prototype.sint32=function(r){return this.uint32((r<<1^r>>31)>>>0)};function qs(o,r,i){for(;o.hi;)r[i++]=o.lo&127|128,o.lo=(o.lo>>>7|o.hi<<25)>>>0,o.hi>>>=7;for(;o.lo>127;)r[i++]=o.lo&127|128,o.lo=o.lo>>>7;r[i++]=o.lo}P.prototype.uint64=function(r){var i=Ai.from(r);return this._push(qs,i.length(),i)};P.prototype.int64=P.prototype.uint64;P.prototype.sint64=function(r){var i=Ai.from(r).zzEncode();return this._push(qs,i.length(),i)};P.prototype.bool=function(r){return this._push(Ks,1,r?1:0)};function Ys(o,r,i){r[i]=o&255,r[i+1]=o>>>8&255,r[i+2]=o>>>16&255,r[i+3]=o>>>24}P.prototype.fixed32=function(r){return this._push(Ys,4,r>>>0)};P.prototype.sfixed32=P.prototype.fixed32;P.prototype.fixed64=function(r){var i=Ai.from(r);return this._push(Ys,4,i.lo)._push(Ys,4,i.hi)};P.prototype.sfixed64=P.prototype.fixed64;P.prototype.float=function(r){return this._push(se.float.writeFloatLE,4,r)};P.prototype.double=function(r){return this._push(se.float.writeDoubleLE,8,r)};var vX=se.Array.prototype.set?function(r,i,c){i.set(r,c)}:function(r,i,c){for(var a=0;a<r.length;++a)i[c+a]=r[a]};P.prototype.bytes=function(r){var i=r.length>>>0;if(!i)return this._push(Ks,1,0);if(se.isString(r)){var c=P.alloc(i=wg.length(r));wg.decode(r,c,0),r=c}return this.uint32(i)._push(vX,i,r)};P.prototype.string=function(r){var i=Bg.length(r);return i?this.uint32(i)._push(Bg.write,i,r):this._push(Ks,1,0)};P.prototype.fork=function(){return this.states=new dX(this),this.head=this.tail=new Br(Fs,0,0),this.len=0,this};P.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 Br(Fs,0,0),this.len=0),this};P.prototype.ldelim=function(){var r=this.head,i=this.tail,c=this.len;return this.reset().uint32(c),c&&(this.tail.next=r.next,this.tail=i,this.len+=c),this};P.prototype.finish=function(){for(var r=this.head.next,i=this.constructor.alloc(this.len),c=0;r;)r.fn(r.val,i,c),c+=r.len,r=r.next;return i};P._configure=function(o){ks=o,P.create=Gg(),ks._configure()}});var Fg=S((Kee,Yg)=>{"use strict";Yg.exports=ye;var kg=Ws();(ye.prototype=Object.create(kg.prototype)).constructor=ye;var Je=ze();function ye(){kg.call(this)}ye._configure=function(){ye.alloc=Je._Buffer_allocUnsafe,ye.writeBytesBuffer=Je.Buffer&&Je.Buffer.prototype instanceof Uint8Array&&Je.Buffer.prototype.set.name==="set"?function(r,i,c){i.set(r,c)}:function(r,i,c){if(r.copy)r.copy(i,c,0,r.length);else for(var a=0;a<r.length;)i[c++]=r[a++]}};ye.prototype.bytes=function(r){Je.isString(r)&&(r=Je._Buffer_from(r,"base64"));var i=r.length>>>0;return this.uint32(i),i&&this._push(ye.writeBytesBuffer,i,r),this};function OX(o,r,i){o.length<40?Je.utf8.write(o,r,i):r.utf8Write?r.utf8Write(o,i):r.write(o,i)}ye.prototype.string=function(r){var i=Je.Buffer.byteLength(r);return this.uint32(i),i&&this._push(OX,i,r),this};ye._configure()});var Xs=S((jee,zg)=>{"use strict";zg.exports=V;var Se=ze(),Js,qg=Se.LongBits,mX=Se.utf8;function fe(o,r){return RangeError("index out of range: "+o.pos+" + "+(r||1)+" > "+o.len)}function V(o){this.buf=o,this.pos=0,this.len=o.length}var Kg=typeof Uint8Array<"u"?function(r){if(r instanceof Uint8Array||Array.isArray(r))return new V(r);throw Error("illegal buffer")}:function(r){if(Array.isArray(r))return new V(r);throw Error("illegal buffer")},Wg=function(){return Se.Buffer?function(i){return(V.create=function(a){return Se.Buffer.isBuffer(a)?new Js(a):Kg(a)})(i)}:Kg};V.create=Wg();V.prototype._slice=Se.Array.prototype.subarray||Se.Array.prototype.slice;V.prototype.uint32=function(){var r=4294967295;return function(){if(r=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(r=(r|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return r;if((this.pos+=5)>this.len)throw this.pos=this.len,fe(this,10);return r}}();V.prototype.int32=function(){return this.uint32()|0};V.prototype.sint32=function(){var r=this.uint32();return r>>>1^-(r&1)|0};function zs(){var o=new qg(0,0),r=0;if(this.len-this.pos>4){for(;r<4;++r)if(o.lo=(o.lo|(this.buf[this.pos]&127)<<r*7)>>>0,this.buf[this.pos++]<128)return o;if(o.lo=(o.lo|(this.buf[this.pos]&127)<<28)>>>0,o.hi=(o.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return o;r=0}else{for(;r<3;++r){if(this.pos>=this.len)throw fe(this);if(o.lo=(o.lo|(this.buf[this.pos]&127)<<r*7)>>>0,this.buf[this.pos++]<128)return o}return o.lo=(o.lo|(this.buf[this.pos++]&127)<<r*7)>>>0,o}if(this.len-this.pos>4){for(;r<5;++r)if(o.hi=(o.hi|(this.buf[this.pos]&127)<<r*7+3)>>>0,this.buf[this.pos++]<128)return o}else for(;r<5;++r){if(this.pos>=this.len)throw fe(this);if(o.hi=(o.hi|(this.buf[this.pos]&127)<<r*7+3)>>>0,this.buf[this.pos++]<128)return o}throw Error("invalid varint encoding")}V.prototype.bool=function(){return this.uint32()!==0};function vi(o,r){return(o[r-4]|o[r-3]<<8|o[r-2]<<16|o[r-1]<<24)>>>0}V.prototype.fixed32=function(){if(this.pos+4>this.len)throw fe(this,4);return vi(this.buf,this.pos+=4)};V.prototype.sfixed32=function(){if(this.pos+4>this.len)throw fe(this,4);return vi(this.buf,this.pos+=4)|0};function jg(){if(this.pos+8>this.len)throw fe(this,8);return new qg(vi(this.buf,this.pos+=4),vi(this.buf,this.pos+=4))}V.prototype.float=function(){if(this.pos+4>this.len)throw fe(this,4);var r=Se.float.readFloatLE(this.buf,this.pos);return this.pos+=4,r};V.prototype.double=function(){if(this.pos+8>this.len)throw fe(this,4);var r=Se.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,r};V.prototype.bytes=function(){var r=this.uint32(),i=this.pos,c=this.pos+r;if(c>this.len)throw fe(this,r);if(this.pos+=r,Array.isArray(this.buf))return this.buf.slice(i,c);if(i===c){var a=Se.Buffer;return a?a.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,i,c)};V.prototype.string=function(){var r=this.bytes();return mX.read(r,0,r.length)};V.prototype.skip=function(r){if(typeof r=="number"){if(this.pos+r>this.len)throw fe(this,r);this.pos+=r}else do if(this.pos>=this.len)throw fe(this);while(this.buf[this.pos++]&128);return this};V.prototype.skipType=function(o){switch(o){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(o=this.uint32()&7)!==4;)this.skipType(o);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+o+" at offset "+this.pos)}return this};V._configure=function(o){Js=o,V.create=Wg(),Js._configure();var r=Se.Long?"toLong":"toNumber";Se.merge(V.prototype,{int64:function(){return zs.call(this)[r](!1)},uint64:function(){return zs.call(this)[r](!0)},sint64:function(){return zs.call(this).zzDecode()[r](!1)},fixed64:function(){return jg.call(this)[r](!0)},sfixed64:function(){return jg.call(this)[r](!1)}})}});var Qg=S((qee,$g)=>{"use strict";$g.exports=pt;var Xg=Xs();(pt.prototype=Object.create(Xg.prototype)).constructor=pt;var Jg=ze();function pt(o){Xg.call(this,o)}pt._configure=function(){Jg.Buffer&&(pt.prototype._slice=Jg.Buffer.prototype.slice)};pt.prototype.string=function(){var r=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+r,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+r,this.len))};pt._configure()});var eL=S((Wee,Zg)=>{"use strict";Zg.exports=Gr;var $s=ze();(Gr.prototype=Object.create($s.EventEmitter.prototype)).constructor=Gr;function Gr(o,r,i){if(typeof o!="function")throw TypeError("rpcImpl must be a function");$s.EventEmitter.call(this),this.rpcImpl=o,this.requestDelimited=!!r,this.responseDelimited=!!i}Gr.prototype.rpcCall=function o(r,i,c,a,u){if(!a)throw TypeError("request must be specified");var t=this;if(!u)return $s.asPromise(o,t,r,i,c,a);if(!t.rpcImpl){setTimeout(function(){u(Error("already ended"))},0);return}try{return t.rpcImpl(r,i[t.requestDelimited?"encodeDelimited":"encode"](a).finish(),function(n,s){if(n)return t.emit("error",n,r),u(n);if(s===null){t.end(!0);return}if(!(s instanceof c))try{s=c[t.responseDelimited?"decodeDelimited":"decode"](s)}catch(l){return t.emit("error",l,r),u(l)}return t.emit("data",s,r),u(null,s)})}catch(e){t.emit("error",e,r),setTimeout(function(){u(e)},0);return}};Gr.prototype.end=function(r){return this.rpcImpl&&(r||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var rL=S(tL=>{"use strict";var NX=tL;NX.Service=eL()});var oL=S((Jee,nL)=>{"use strict";nL.exports={}});var uL=S(aL=>{"use strict";var te=aL;te.build="minimal";te.Writer=Ws();te.BufferWriter=Fg();te.Reader=Xs();te.BufferReader=Qg();te.util=ze();te.rpc=rL();te.roots=oL();te.configure=iL;function iL(){te.util._configure(),te.Writer._configure(te.BufferWriter),te.Reader._configure(te.BufferReader)}iL()});var cL=S(($ee,sL)=>{"use strict";sL.exports=uL()});var Oi=S((Qee,lL)=>{"use strict";var v=cL(),T=v.Reader,N=v.Writer,_=v.util,p=v.roots.default||(v.roots.default={});p.opentelemetry=function(){var o={};return o.proto=function(){var r={};return r.common=function(){var i={};return i.v1=function(){var c={};return c.AnyValue=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}a.prototype.stringValue=null,a.prototype.boolValue=null,a.prototype.intValue=null,a.prototype.doubleValue=null,a.prototype.arrayValue=null,a.prototype.kvlistValue=null,a.prototype.bytesValue=null;var u;return Object.defineProperty(a.prototype,"value",{get:_.oneOfGetter(u=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"]),set:_.oneOfSetter(u)}),a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=N.create()),e.stringValue!=null&&Object.hasOwnProperty.call(e,"stringValue")&&n.uint32(10).string(e.stringValue),e.boolValue!=null&&Object.hasOwnProperty.call(e,"boolValue")&&n.uint32(16).bool(e.boolValue),e.intValue!=null&&Object.hasOwnProperty.call(e,"intValue")&&n.uint32(24).int64(e.intValue),e.doubleValue!=null&&Object.hasOwnProperty.call(e,"doubleValue")&&n.uint32(33).double(e.doubleValue),e.arrayValue!=null&&Object.hasOwnProperty.call(e,"arrayValue")&&p.opentelemetry.proto.common.v1.ArrayValue.encode(e.arrayValue,n.uint32(42).fork()).ldelim(),e.kvlistValue!=null&&Object.hasOwnProperty.call(e,"kvlistValue")&&p.opentelemetry.proto.common.v1.KeyValueList.encode(e.kvlistValue,n.uint32(50).fork()).ldelim(),e.bytesValue!=null&&Object.hasOwnProperty.call(e,"bytesValue")&&n.uint32(58).bytes(e.bytesValue),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.common.v1.AnyValue;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.stringValue=e.string();break}case 2:{l.boolValue=e.bool();break}case 3:{l.intValue=e.int64();break}case 4:{l.doubleValue=e.double();break}case 5:{l.arrayValue=p.opentelemetry.proto.common.v1.ArrayValue.decode(e,e.uint32());break}case 6:{l.kvlistValue=p.opentelemetry.proto.common.v1.KeyValueList.decode(e,e.uint32());break}case 7:{l.bytesValue=e.bytes();break}default:e.skipType(E&7);break}}return l},a.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.stringValue!=null&&e.hasOwnProperty("stringValue")&&(n.value=1,!_.isString(e.stringValue)))return"stringValue: string expected";if(e.boolValue!=null&&e.hasOwnProperty("boolValue")){if(n.value===1)return"value: multiple values";if(n.value=1,typeof e.boolValue!="boolean")return"boolValue: boolean expected"}if(e.intValue!=null&&e.hasOwnProperty("intValue")){if(n.value===1)return"value: multiple values";if(n.value=1,!_.isInteger(e.intValue)&&!(e.intValue&&_.isInteger(e.intValue.low)&&_.isInteger(e.intValue.high)))return"intValue: integer|Long expected"}if(e.doubleValue!=null&&e.hasOwnProperty("doubleValue")){if(n.value===1)return"value: multiple values";if(n.value=1,typeof e.doubleValue!="number")return"doubleValue: number expected"}if(e.arrayValue!=null&&e.hasOwnProperty("arrayValue")){if(n.value===1)return"value: multiple values";n.value=1;{var s=p.opentelemetry.proto.common.v1.ArrayValue.verify(e.arrayValue);if(s)return"arrayValue."+s}}if(e.kvlistValue!=null&&e.hasOwnProperty("kvlistValue")){if(n.value===1)return"value: multiple values";n.value=1;{var s=p.opentelemetry.proto.common.v1.KeyValueList.verify(e.kvlistValue);if(s)return"kvlistValue."+s}}if(e.bytesValue!=null&&e.hasOwnProperty("bytesValue")){if(n.value===1)return"value: multiple values";if(n.value=1,!(e.bytesValue&&typeof e.bytesValue.length=="number"||_.isString(e.bytesValue)))return"bytesValue: buffer expected"}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.common.v1.AnyValue)return e;var n=new p.opentelemetry.proto.common.v1.AnyValue;if(e.stringValue!=null&&(n.stringValue=String(e.stringValue)),e.boolValue!=null&&(n.boolValue=!!e.boolValue),e.intValue!=null&&(_.Long?(n.intValue=_.Long.fromValue(e.intValue)).unsigned=!1:typeof e.intValue=="string"?n.intValue=parseInt(e.intValue,10):typeof e.intValue=="number"?n.intValue=e.intValue:typeof e.intValue=="object"&&(n.intValue=new _.LongBits(e.intValue.low>>>0,e.intValue.high>>>0).toNumber())),e.doubleValue!=null&&(n.doubleValue=Number(e.doubleValue)),e.arrayValue!=null){if(typeof e.arrayValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected");n.arrayValue=p.opentelemetry.proto.common.v1.ArrayValue.fromObject(e.arrayValue)}if(e.kvlistValue!=null){if(typeof e.kvlistValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected");n.kvlistValue=p.opentelemetry.proto.common.v1.KeyValueList.fromObject(e.kvlistValue)}return e.bytesValue!=null&&(typeof e.bytesValue=="string"?_.base64.decode(e.bytesValue,n.bytesValue=_.newBuffer(_.base64.length(e.bytesValue)),0):e.bytesValue.length>=0&&(n.bytesValue=e.bytesValue)),n},a.toObject=function(e,n){n||(n={});var s={};return e.stringValue!=null&&e.hasOwnProperty("stringValue")&&(s.stringValue=e.stringValue,n.oneofs&&(s.value="stringValue")),e.boolValue!=null&&e.hasOwnProperty("boolValue")&&(s.boolValue=e.boolValue,n.oneofs&&(s.value="boolValue")),e.intValue!=null&&e.hasOwnProperty("intValue")&&(typeof e.intValue=="number"?s.intValue=n.longs===String?String(e.intValue):e.intValue:s.intValue=n.longs===String?_.Long.prototype.toString.call(e.intValue):n.longs===Number?new _.LongBits(e.intValue.low>>>0,e.intValue.high>>>0).toNumber():e.intValue,n.oneofs&&(s.value="intValue")),e.doubleValue!=null&&e.hasOwnProperty("doubleValue")&&(s.doubleValue=n.json&&!isFinite(e.doubleValue)?String(e.doubleValue):e.doubleValue,n.oneofs&&(s.value="doubleValue")),e.arrayValue!=null&&e.hasOwnProperty("arrayValue")&&(s.arrayValue=p.opentelemetry.proto.common.v1.ArrayValue.toObject(e.arrayValue,n),n.oneofs&&(s.value="arrayValue")),e.kvlistValue!=null&&e.hasOwnProperty("kvlistValue")&&(s.kvlistValue=p.opentelemetry.proto.common.v1.KeyValueList.toObject(e.kvlistValue,n),n.oneofs&&(s.value="kvlistValue")),e.bytesValue!=null&&e.hasOwnProperty("bytesValue")&&(s.bytesValue=n.bytes===String?_.base64.encode(e.bytesValue,0,e.bytesValue.length):n.bytes===Array?Array.prototype.slice.call(e.bytesValue):e.bytesValue,n.oneofs&&(s.value="bytesValue")),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.AnyValue"},a}(),c.ArrayValue=function(){function a(u){if(this.values=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.values=_.emptyArray,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.values!=null&&t.values.length)for(var n=0;n<t.values.length;++n)p.opentelemetry.proto.common.v1.AnyValue.encode(t.values[n],e.uint32(10).fork()).ldelim();return e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.ArrayValue;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.values&&s.values.length||(s.values=[]),s.values.push(p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.values!=null&&t.hasOwnProperty("values")){if(!Array.isArray(t.values))return"values: array expected";for(var e=0;e<t.values.length;++e){var n=p.opentelemetry.proto.common.v1.AnyValue.verify(t.values[e]);if(n)return"values."+n}}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.common.v1.ArrayValue)return t;var e=new p.opentelemetry.proto.common.v1.ArrayValue;if(t.values){if(!Array.isArray(t.values))throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: array expected");e.values=[];for(var n=0;n<t.values.length;++n){if(typeof t.values[n]!="object")throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: object expected");e.values[n]=p.opentelemetry.proto.common.v1.AnyValue.fromObject(t.values[n])}}return e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.values=[]),t.values&&t.values.length){n.values=[];for(var s=0;s<t.values.length;++s)n.values[s]=p.opentelemetry.proto.common.v1.AnyValue.toObject(t.values[s],e)}return n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.ArrayValue"},a}(),c.KeyValueList=function(){function a(u){if(this.values=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.values=_.emptyArray,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.values!=null&&t.values.length)for(var n=0;n<t.values.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.values[n],e.uint32(10).fork()).ldelim();return e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.KeyValueList;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.values&&s.values.length||(s.values=[]),s.values.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.values!=null&&t.hasOwnProperty("values")){if(!Array.isArray(t.values))return"values: array expected";for(var e=0;e<t.values.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.values[e]);if(n)return"values."+n}}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.common.v1.KeyValueList)return t;var e=new p.opentelemetry.proto.common.v1.KeyValueList;if(t.values){if(!Array.isArray(t.values))throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: array expected");e.values=[];for(var n=0;n<t.values.length;++n){if(typeof t.values[n]!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: object expected");e.values[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.values[n])}}return e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.values=[]),t.values&&t.values.length){n.values=[];for(var s=0;s<t.values.length;++s)n.values[s]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.values[s],e)}return n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.KeyValueList"},a}(),c.KeyValue=function(){function a(u){if(u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.key=null,a.prototype.value=null,a.create=function(t){return new a(t)},a.encode=function(t,e){return e||(e=N.create()),t.key!=null&&Object.hasOwnProperty.call(t,"key")&&e.uint32(10).string(t.key),t.value!=null&&Object.hasOwnProperty.call(t,"value")&&p.opentelemetry.proto.common.v1.AnyValue.encode(t.value,e.uint32(18).fork()).ldelim(),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.KeyValue;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.key=t.string();break}case 2:{s.value=p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32());break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.key!=null&&t.hasOwnProperty("key")&&!_.isString(t.key))return"key: string expected";if(t.value!=null&&t.hasOwnProperty("value")){var e=p.opentelemetry.proto.common.v1.AnyValue.verify(t.value);if(e)return"value."+e}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.common.v1.KeyValue)return t;var e=new p.opentelemetry.proto.common.v1.KeyValue;if(t.key!=null&&(e.key=String(t.key)),t.value!=null){if(typeof t.value!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected");e.value=p.opentelemetry.proto.common.v1.AnyValue.fromObject(t.value)}return e},a.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.key="",n.value=null),t.key!=null&&t.hasOwnProperty("key")&&(n.key=t.key),t.value!=null&&t.hasOwnProperty("value")&&(n.value=p.opentelemetry.proto.common.v1.AnyValue.toObject(t.value,e)),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.KeyValue"},a}(),c.InstrumentationScope=function(){function a(u){if(this.attributes=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.name=null,a.prototype.version=null,a.prototype.attributes=_.emptyArray,a.prototype.droppedAttributesCount=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.name!=null&&Object.hasOwnProperty.call(t,"name")&&e.uint32(10).string(t.name),t.version!=null&&Object.hasOwnProperty.call(t,"version")&&e.uint32(18).string(t.version),t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(26).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&e.uint32(32).uint32(t.droppedAttributesCount),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.common.v1.InstrumentationScope;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.name=t.string();break}case 2:{s.version=t.string();break}case 3:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 4:{s.droppedAttributesCount=t.uint32();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.name!=null&&t.hasOwnProperty("name")&&!_.isString(t.name))return"name: string expected";if(t.version!=null&&t.hasOwnProperty("version")&&!_.isString(t.version))return"version: string expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(n)return"attributes."+n}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!_.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.common.v1.InstrumentationScope)return t;var e=new p.opentelemetry.proto.common.v1.InstrumentationScope;if(t.name!=null&&(e.name=String(t.name)),t.version!=null&&(e.version=String(t.version)),t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}return t.droppedAttributesCount!=null&&(e.droppedAttributesCount=t.droppedAttributesCount>>>0),e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),e.defaults&&(n.name="",n.version="",n.droppedAttributesCount=0),t.name!=null&&t.hasOwnProperty("name")&&(n.name=t.name),t.version!=null&&t.hasOwnProperty("version")&&(n.version=t.version),t.attributes&&t.attributes.length){n.attributes=[];for(var s=0;s<t.attributes.length;++s)n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[s],e)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.InstrumentationScope"},a}(),c}(),i}(),r.resource=function(){var i={};return i.v1=function(){var c={};return c.Resource=function(){function a(u){if(this.attributes=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.attributes=_.emptyArray,a.prototype.droppedAttributesCount=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(10).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&e.uint32(16).uint32(t.droppedAttributesCount),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.resource.v1.Resource;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{s.droppedAttributesCount=t.uint32();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(n)return"attributes."+n}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!_.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.resource.v1.Resource)return t;var e=new p.opentelemetry.proto.resource.v1.Resource;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}return t.droppedAttributesCount!=null&&(e.droppedAttributesCount=t.droppedAttributesCount>>>0),e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),e.defaults&&(n.droppedAttributesCount=0),t.attributes&&t.attributes.length){n.attributes=[];for(var s=0;s<t.attributes.length;++s)n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[s],e)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.resource.v1.Resource"},a}(),c}(),i}(),r.trace=function(){var i={};return i.v1=function(){var c={};return c.TracesData=function(){function a(u){if(this.resourceSpans=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.resourceSpans=_.emptyArray,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.resourceSpans!=null&&t.resourceSpans.length)for(var n=0;n<t.resourceSpans.length;++n)p.opentelemetry.proto.trace.v1.ResourceSpans.encode(t.resourceSpans[n],e.uint32(10).fork()).ldelim();return e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.TracesData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resourceSpans&&s.resourceSpans.length||(s.resourceSpans=[]),s.resourceSpans.push(p.opentelemetry.proto.trace.v1.ResourceSpans.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resourceSpans!=null&&t.hasOwnProperty("resourceSpans")){if(!Array.isArray(t.resourceSpans))return"resourceSpans: array expected";for(var e=0;e<t.resourceSpans.length;++e){var n=p.opentelemetry.proto.trace.v1.ResourceSpans.verify(t.resourceSpans[e]);if(n)return"resourceSpans."+n}}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.TracesData)return t;var e=new p.opentelemetry.proto.trace.v1.TracesData;if(t.resourceSpans){if(!Array.isArray(t.resourceSpans))throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: array expected");e.resourceSpans=[];for(var n=0;n<t.resourceSpans.length;++n){if(typeof t.resourceSpans[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: object expected");e.resourceSpans[n]=p.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(t.resourceSpans[n])}}return e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.resourceSpans=[]),t.resourceSpans&&t.resourceSpans.length){n.resourceSpans=[];for(var s=0;s<t.resourceSpans.length;++s)n.resourceSpans[s]=p.opentelemetry.proto.trace.v1.ResourceSpans.toObject(t.resourceSpans[s],e)}return n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.TracesData"},a}(),c.ResourceSpans=function(){function a(u){if(this.scopeSpans=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.resource=null,a.prototype.scopeSpans=_.emptyArray,a.prototype.schemaUrl=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.resource!=null&&Object.hasOwnProperty.call(t,"resource")&&p.opentelemetry.proto.resource.v1.Resource.encode(t.resource,e.uint32(10).fork()).ldelim(),t.scopeSpans!=null&&t.scopeSpans.length)for(var n=0;n<t.scopeSpans.length;++n)p.opentelemetry.proto.trace.v1.ScopeSpans.encode(t.scopeSpans[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.ResourceSpans;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{s.scopeSpans&&s.scopeSpans.length||(s.scopeSpans=[]),s.scopeSpans.push(p.opentelemetry.proto.trace.v1.ScopeSpans.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resource!=null&&t.hasOwnProperty("resource")){var e=p.opentelemetry.proto.resource.v1.Resource.verify(t.resource);if(e)return"resource."+e}if(t.scopeSpans!=null&&t.hasOwnProperty("scopeSpans")){if(!Array.isArray(t.scopeSpans))return"scopeSpans: array expected";for(var n=0;n<t.scopeSpans.length;++n){var e=p.opentelemetry.proto.trace.v1.ScopeSpans.verify(t.scopeSpans[n]);if(e)return"scopeSpans."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!_.isString(t.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.ResourceSpans)return t;var e=new p.opentelemetry.proto.trace.v1.ResourceSpans;if(t.resource!=null){if(typeof t.resource!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.resource: object expected");e.resource=p.opentelemetry.proto.resource.v1.Resource.fromObject(t.resource)}if(t.scopeSpans){if(!Array.isArray(t.scopeSpans))throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: array expected");e.scopeSpans=[];for(var n=0;n<t.scopeSpans.length;++n){if(typeof t.scopeSpans[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: object expected");e.scopeSpans[n]=p.opentelemetry.proto.trace.v1.ScopeSpans.fromObject(t.scopeSpans[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.scopeSpans=[]),e.defaults&&(n.resource=null,n.schemaUrl=""),t.resource!=null&&t.hasOwnProperty("resource")&&(n.resource=p.opentelemetry.proto.resource.v1.Resource.toObject(t.resource,e)),t.scopeSpans&&t.scopeSpans.length){n.scopeSpans=[];for(var s=0;s<t.scopeSpans.length;++s)n.scopeSpans[s]=p.opentelemetry.proto.trace.v1.ScopeSpans.toObject(t.scopeSpans[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.ResourceSpans"},a}(),c.ScopeSpans=function(){function a(u){if(this.spans=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.scope=null,a.prototype.spans=_.emptyArray,a.prototype.schemaUrl=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.scope!=null&&Object.hasOwnProperty.call(t,"scope")&&p.opentelemetry.proto.common.v1.InstrumentationScope.encode(t.scope,e.uint32(10).fork()).ldelim(),t.spans!=null&&t.spans.length)for(var n=0;n<t.spans.length;++n)p.opentelemetry.proto.trace.v1.Span.encode(t.spans[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.ScopeSpans;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{s.spans&&s.spans.length||(s.spans=[]),s.spans.push(p.opentelemetry.proto.trace.v1.Span.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.scope!=null&&t.hasOwnProperty("scope")){var e=p.opentelemetry.proto.common.v1.InstrumentationScope.verify(t.scope);if(e)return"scope."+e}if(t.spans!=null&&t.hasOwnProperty("spans")){if(!Array.isArray(t.spans))return"spans: array expected";for(var n=0;n<t.spans.length;++n){var e=p.opentelemetry.proto.trace.v1.Span.verify(t.spans[n]);if(e)return"spans."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!_.isString(t.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.ScopeSpans)return t;var e=new p.opentelemetry.proto.trace.v1.ScopeSpans;if(t.scope!=null){if(typeof t.scope!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.scope: object expected");e.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(t.scope)}if(t.spans){if(!Array.isArray(t.spans))throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: array expected");e.spans=[];for(var n=0;n<t.spans.length;++n){if(typeof t.spans[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: object expected");e.spans[n]=p.opentelemetry.proto.trace.v1.Span.fromObject(t.spans[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.spans=[]),e.defaults&&(n.scope=null,n.schemaUrl=""),t.scope!=null&&t.hasOwnProperty("scope")&&(n.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.toObject(t.scope,e)),t.spans&&t.spans.length){n.spans=[];for(var s=0;s<t.spans.length;++s)n.spans[s]=p.opentelemetry.proto.trace.v1.Span.toObject(t.spans[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.ScopeSpans"},a}(),c.Span=function(){function a(u){if(this.attributes=[],this.events=[],this.links=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.traceId=null,a.prototype.spanId=null,a.prototype.traceState=null,a.prototype.parentSpanId=null,a.prototype.name=null,a.prototype.kind=null,a.prototype.startTimeUnixNano=null,a.prototype.endTimeUnixNano=null,a.prototype.attributes=_.emptyArray,a.prototype.droppedAttributesCount=null,a.prototype.events=_.emptyArray,a.prototype.droppedEventsCount=null,a.prototype.links=_.emptyArray,a.prototype.droppedLinksCount=null,a.prototype.status=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId")&&e.uint32(10).bytes(t.traceId),t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId")&&e.uint32(18).bytes(t.spanId),t.traceState!=null&&Object.hasOwnProperty.call(t,"traceState")&&e.uint32(26).string(t.traceState),t.parentSpanId!=null&&Object.hasOwnProperty.call(t,"parentSpanId")&&e.uint32(34).bytes(t.parentSpanId),t.name!=null&&Object.hasOwnProperty.call(t,"name")&&e.uint32(42).string(t.name),t.kind!=null&&Object.hasOwnProperty.call(t,"kind")&&e.uint32(48).int32(t.kind),t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&e.uint32(57).fixed64(t.startTimeUnixNano),t.endTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"endTimeUnixNano")&&e.uint32(65).fixed64(t.endTimeUnixNano),t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(74).fork()).ldelim();if(t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&e.uint32(80).uint32(t.droppedAttributesCount),t.events!=null&&t.events.length)for(var n=0;n<t.events.length;++n)p.opentelemetry.proto.trace.v1.Span.Event.encode(t.events[n],e.uint32(90).fork()).ldelim();if(t.droppedEventsCount!=null&&Object.hasOwnProperty.call(t,"droppedEventsCount")&&e.uint32(96).uint32(t.droppedEventsCount),t.links!=null&&t.links.length)for(var n=0;n<t.links.length;++n)p.opentelemetry.proto.trace.v1.Span.Link.encode(t.links[n],e.uint32(106).fork()).ldelim();return t.droppedLinksCount!=null&&Object.hasOwnProperty.call(t,"droppedLinksCount")&&e.uint32(112).uint32(t.droppedLinksCount),t.status!=null&&Object.hasOwnProperty.call(t,"status")&&p.opentelemetry.proto.trace.v1.Status.encode(t.status,e.uint32(122).fork()).ldelim(),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.Span;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.traceId=t.bytes();break}case 2:{s.spanId=t.bytes();break}case 3:{s.traceState=t.string();break}case 4:{s.parentSpanId=t.bytes();break}case 5:{s.name=t.string();break}case 6:{s.kind=t.int32();break}case 7:{s.startTimeUnixNano=t.fixed64();break}case 8:{s.endTimeUnixNano=t.fixed64();break}case 9:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 10:{s.droppedAttributesCount=t.uint32();break}case 11:{s.events&&s.events.length||(s.events=[]),s.events.push(p.opentelemetry.proto.trace.v1.Span.Event.decode(t,t.uint32()));break}case 12:{s.droppedEventsCount=t.uint32();break}case 13:{s.links&&s.links.length||(s.links=[]),s.links.push(p.opentelemetry.proto.trace.v1.Span.Link.decode(t,t.uint32()));break}case 14:{s.droppedLinksCount=t.uint32();break}case 15:{s.status=p.opentelemetry.proto.trace.v1.Status.decode(t,t.uint32());break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.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"||_.isString(t.traceId)))return"traceId: buffer expected";if(t.spanId!=null&&t.hasOwnProperty("spanId")&&!(t.spanId&&typeof t.spanId.length=="number"||_.isString(t.spanId)))return"spanId: buffer expected";if(t.traceState!=null&&t.hasOwnProperty("traceState")&&!_.isString(t.traceState))return"traceState: string expected";if(t.parentSpanId!=null&&t.hasOwnProperty("parentSpanId")&&!(t.parentSpanId&&typeof t.parentSpanId.length=="number"||_.isString(t.parentSpanId)))return"parentSpanId: buffer expected";if(t.name!=null&&t.hasOwnProperty("name")&&!_.isString(t.name))return"name: string expected";if(t.kind!=null&&t.hasOwnProperty("kind"))switch(t.kind){default:return"kind: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!_.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&_.isInteger(t.startTimeUnixNano.low)&&_.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.endTimeUnixNano!=null&&t.hasOwnProperty("endTimeUnixNano")&&!_.isInteger(t.endTimeUnixNano)&&!(t.endTimeUnixNano&&_.isInteger(t.endTimeUnixNano.low)&&_.isInteger(t.endTimeUnixNano.high)))return"endTimeUnixNano: integer|Long expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(n)return"attributes."+n}}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!_.isInteger(t.droppedAttributesCount))return"droppedAttributesCount: integer expected";if(t.events!=null&&t.hasOwnProperty("events")){if(!Array.isArray(t.events))return"events: array expected";for(var e=0;e<t.events.length;++e){var n=p.opentelemetry.proto.trace.v1.Span.Event.verify(t.events[e]);if(n)return"events."+n}}if(t.droppedEventsCount!=null&&t.hasOwnProperty("droppedEventsCount")&&!_.isInteger(t.droppedEventsCount))return"droppedEventsCount: integer expected";if(t.links!=null&&t.hasOwnProperty("links")){if(!Array.isArray(t.links))return"links: array expected";for(var e=0;e<t.links.length;++e){var n=p.opentelemetry.proto.trace.v1.Span.Link.verify(t.links[e]);if(n)return"links."+n}}if(t.droppedLinksCount!=null&&t.hasOwnProperty("droppedLinksCount")&&!_.isInteger(t.droppedLinksCount))return"droppedLinksCount: integer expected";if(t.status!=null&&t.hasOwnProperty("status")){var n=p.opentelemetry.proto.trace.v1.Status.verify(t.status);if(n)return"status."+n}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.Span)return t;var e=new p.opentelemetry.proto.trace.v1.Span;switch(t.traceId!=null&&(typeof t.traceId=="string"?_.base64.decode(t.traceId,e.traceId=_.newBuffer(_.base64.length(t.traceId)),0):t.traceId.length>=0&&(e.traceId=t.traceId)),t.spanId!=null&&(typeof t.spanId=="string"?_.base64.decode(t.spanId,e.spanId=_.newBuffer(_.base64.length(t.spanId)),0):t.spanId.length>=0&&(e.spanId=t.spanId)),t.traceState!=null&&(e.traceState=String(t.traceState)),t.parentSpanId!=null&&(typeof t.parentSpanId=="string"?_.base64.decode(t.parentSpanId,e.parentSpanId=_.newBuffer(_.base64.length(t.parentSpanId)),0):t.parentSpanId.length>=0&&(e.parentSpanId=t.parentSpanId)),t.name!=null&&(e.name=String(t.name)),t.kind){default:if(typeof t.kind=="number"){e.kind=t.kind;break}break;case"SPAN_KIND_UNSPECIFIED":case 0:e.kind=0;break;case"SPAN_KIND_INTERNAL":case 1:e.kind=1;break;case"SPAN_KIND_SERVER":case 2:e.kind=2;break;case"SPAN_KIND_CLIENT":case 3:e.kind=3;break;case"SPAN_KIND_PRODUCER":case 4:e.kind=4;break;case"SPAN_KIND_CONSUMER":case 5:e.kind=5;break}if(t.startTimeUnixNano!=null&&(_.Long?(e.startTimeUnixNano=_.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?e.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?e.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(e.startTimeUnixNano=new _.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.endTimeUnixNano!=null&&(_.Long?(e.endTimeUnixNano=_.Long.fromValue(t.endTimeUnixNano)).unsigned=!1:typeof t.endTimeUnixNano=="string"?e.endTimeUnixNano=parseInt(t.endTimeUnixNano,10):typeof t.endTimeUnixNano=="number"?e.endTimeUnixNano=t.endTimeUnixNano:typeof t.endTimeUnixNano=="object"&&(e.endTimeUnixNano=new _.LongBits(t.endTimeUnixNano.low>>>0,t.endTimeUnixNano.high>>>0).toNumber())),t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}if(t.droppedAttributesCount!=null&&(e.droppedAttributesCount=t.droppedAttributesCount>>>0),t.events){if(!Array.isArray(t.events))throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected");e.events=[];for(var n=0;n<t.events.length;++n){if(typeof t.events[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.events: object expected");e.events[n]=p.opentelemetry.proto.trace.v1.Span.Event.fromObject(t.events[n])}}if(t.droppedEventsCount!=null&&(e.droppedEventsCount=t.droppedEventsCount>>>0),t.links){if(!Array.isArray(t.links))throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected");e.links=[];for(var n=0;n<t.links.length;++n){if(typeof t.links[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.links: object expected");e.links[n]=p.opentelemetry.proto.trace.v1.Span.Link.fromObject(t.links[n])}}if(t.droppedLinksCount!=null&&(e.droppedLinksCount=t.droppedLinksCount>>>0),t.status!=null){if(typeof t.status!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected");e.status=p.opentelemetry.proto.trace.v1.Status.fromObject(t.status)}return e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[],n.events=[],n.links=[]),e.defaults){if(e.bytes===String?n.traceId="":(n.traceId=[],e.bytes!==Array&&(n.traceId=_.newBuffer(n.traceId))),e.bytes===String?n.spanId="":(n.spanId=[],e.bytes!==Array&&(n.spanId=_.newBuffer(n.spanId))),n.traceState="",e.bytes===String?n.parentSpanId="":(n.parentSpanId=[],e.bytes!==Array&&(n.parentSpanId=_.newBuffer(n.parentSpanId))),n.name="",n.kind=e.enums===String?"SPAN_KIND_UNSPECIFIED":0,_.Long){var s=new _.Long(0,0,!1);n.startTimeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}else n.startTimeUnixNano=e.longs===String?"0":0;if(_.Long){var s=new _.Long(0,0,!1);n.endTimeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}else n.endTimeUnixNano=e.longs===String?"0":0;n.droppedAttributesCount=0,n.droppedEventsCount=0,n.droppedLinksCount=0,n.status=null}if(t.traceId!=null&&t.hasOwnProperty("traceId")&&(n.traceId=e.bytes===String?_.base64.encode(t.traceId,0,t.traceId.length):e.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId),t.spanId!=null&&t.hasOwnProperty("spanId")&&(n.spanId=e.bytes===String?_.base64.encode(t.spanId,0,t.spanId.length):e.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId),t.traceState!=null&&t.hasOwnProperty("traceState")&&(n.traceState=t.traceState),t.parentSpanId!=null&&t.hasOwnProperty("parentSpanId")&&(n.parentSpanId=e.bytes===String?_.base64.encode(t.parentSpanId,0,t.parentSpanId.length):e.bytes===Array?Array.prototype.slice.call(t.parentSpanId):t.parentSpanId),t.name!=null&&t.hasOwnProperty("name")&&(n.name=t.name),t.kind!=null&&t.hasOwnProperty("kind")&&(n.kind=e.enums===String?p.opentelemetry.proto.trace.v1.Span.SpanKind[t.kind]===void 0?t.kind:p.opentelemetry.proto.trace.v1.Span.SpanKind[t.kind]:t.kind),t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?n.startTimeUnixNano=e.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:n.startTimeUnixNano=e.longs===String?_.Long.prototype.toString.call(t.startTimeUnixNano):e.longs===Number?new _.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.endTimeUnixNano!=null&&t.hasOwnProperty("endTimeUnixNano")&&(typeof t.endTimeUnixNano=="number"?n.endTimeUnixNano=e.longs===String?String(t.endTimeUnixNano):t.endTimeUnixNano:n.endTimeUnixNano=e.longs===String?_.Long.prototype.toString.call(t.endTimeUnixNano):e.longs===Number?new _.LongBits(t.endTimeUnixNano.low>>>0,t.endTimeUnixNano.high>>>0).toNumber():t.endTimeUnixNano),t.attributes&&t.attributes.length){n.attributes=[];for(var l=0;l<t.attributes.length;++l)n.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[l],e)}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),t.events&&t.events.length){n.events=[];for(var l=0;l<t.events.length;++l)n.events[l]=p.opentelemetry.proto.trace.v1.Span.Event.toObject(t.events[l],e)}if(t.droppedEventsCount!=null&&t.hasOwnProperty("droppedEventsCount")&&(n.droppedEventsCount=t.droppedEventsCount),t.links&&t.links.length){n.links=[];for(var l=0;l<t.links.length;++l)n.links[l]=p.opentelemetry.proto.trace.v1.Span.Link.toObject(t.links[l],e)}return t.droppedLinksCount!=null&&t.hasOwnProperty("droppedLinksCount")&&(n.droppedLinksCount=t.droppedLinksCount),t.status!=null&&t.hasOwnProperty("status")&&(n.status=p.opentelemetry.proto.trace.v1.Status.toObject(t.status,e)),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Span"},a.SpanKind=function(){var u={},t=Object.create(u);return t[u[0]="SPAN_KIND_UNSPECIFIED"]=0,t[u[1]="SPAN_KIND_INTERNAL"]=1,t[u[2]="SPAN_KIND_SERVER"]=2,t[u[3]="SPAN_KIND_CLIENT"]=3,t[u[4]="SPAN_KIND_PRODUCER"]=4,t[u[5]="SPAN_KIND_CONSUMER"]=5,t}(),a.Event=function(){function u(t){if(this.attributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.timeUnixNano=null,u.prototype.name=null,u.prototype.attributes=_.emptyArray,u.prototype.droppedAttributesCount=null,u.create=function(e){return new u(e)},u.encode=function(e,n){if(n||(n=N.create()),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(9).fixed64(e.timeUnixNano),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&n.uint32(18).string(e.name),e.attributes!=null&&e.attributes.length)for(var s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],n.uint32(26).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&n.uint32(32).uint32(e.droppedAttributesCount),n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.trace.v1.Span.Event;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.timeUnixNano=e.fixed64();break}case 2:{l.name=e.string();break}case 3:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 4:{l.droppedAttributesCount=e.uint32();break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!_.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&_.isInteger(e.timeUnixNano.low)&&_.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.name!=null&&e.hasOwnProperty("name")&&!_.isString(e.name))return"name: string expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var n=0;n<e.attributes.length;++n){var s=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[n]);if(s)return"attributes."+s}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!_.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.trace.v1.Span.Event)return e;var n=new p.opentelemetry.proto.trace.v1.Span.Event;if(e.timeUnixNano!=null&&(_.Long?(n.timeUnixNano=_.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new _.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.name!=null&&(n.name=String(e.name)),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");n.attributes=[];for(var s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}return e.droppedAttributesCount!=null&&(n.droppedAttributesCount=e.droppedAttributesCount>>>0),n},u.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.attributes=[]),n.defaults){if(_.Long){var l=new _.Long(0,0,!1);s.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.timeUnixNano=n.longs===String?"0":0;s.name="",s.droppedAttributesCount=0}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?s.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:s.timeUnixNano=n.longs===String?_.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new _.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.name!=null&&e.hasOwnProperty("name")&&(s.name=e.name),e.attributes&&e.attributes.length){s.attributes=[];for(var E=0;E<e.attributes.length;++E)s.attributes[E]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[E],n)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(s.droppedAttributesCount=e.droppedAttributesCount),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span.Event"},u}(),a.Link=function(){function u(t){if(this.attributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.traceId=null,u.prototype.spanId=null,u.prototype.traceState=null,u.prototype.attributes=_.emptyArray,u.prototype.droppedAttributesCount=null,u.create=function(e){return new u(e)},u.encode=function(e,n){if(n||(n=N.create()),e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId")&&n.uint32(10).bytes(e.traceId),e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId")&&n.uint32(18).bytes(e.spanId),e.traceState!=null&&Object.hasOwnProperty.call(e,"traceState")&&n.uint32(26).string(e.traceState),e.attributes!=null&&e.attributes.length)for(var s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],n.uint32(34).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&n.uint32(40).uint32(e.droppedAttributesCount),n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.trace.v1.Span.Link;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.traceId=e.bytes();break}case 2:{l.spanId=e.bytes();break}case 3:{l.traceState=e.string();break}case 4:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 5:{l.droppedAttributesCount=e.uint32();break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.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"||_.isString(e.traceId)))return"traceId: buffer expected";if(e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||_.isString(e.spanId)))return"spanId: buffer expected";if(e.traceState!=null&&e.hasOwnProperty("traceState")&&!_.isString(e.traceState))return"traceState: string expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var n=0;n<e.attributes.length;++n){var s=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[n]);if(s)return"attributes."+s}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!_.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.trace.v1.Span.Link)return e;var n=new p.opentelemetry.proto.trace.v1.Span.Link;if(e.traceId!=null&&(typeof e.traceId=="string"?_.base64.decode(e.traceId,n.traceId=_.newBuffer(_.base64.length(e.traceId)),0):e.traceId.length>=0&&(n.traceId=e.traceId)),e.spanId!=null&&(typeof e.spanId=="string"?_.base64.decode(e.spanId,n.spanId=_.newBuffer(_.base64.length(e.spanId)),0):e.spanId.length>=0&&(n.spanId=e.spanId)),e.traceState!=null&&(n.traceState=String(e.traceState)),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");n.attributes=[];for(var s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}return e.droppedAttributesCount!=null&&(n.droppedAttributesCount=e.droppedAttributesCount>>>0),n},u.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.attributes=[]),n.defaults&&(n.bytes===String?s.traceId="":(s.traceId=[],n.bytes!==Array&&(s.traceId=_.newBuffer(s.traceId))),n.bytes===String?s.spanId="":(s.spanId=[],n.bytes!==Array&&(s.spanId=_.newBuffer(s.spanId))),s.traceState="",s.droppedAttributesCount=0),e.traceId!=null&&e.hasOwnProperty("traceId")&&(s.traceId=n.bytes===String?_.base64.encode(e.traceId,0,e.traceId.length):n.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),e.spanId!=null&&e.hasOwnProperty("spanId")&&(s.spanId=n.bytes===String?_.base64.encode(e.spanId,0,e.spanId.length):n.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),e.traceState!=null&&e.hasOwnProperty("traceState")&&(s.traceState=e.traceState),e.attributes&&e.attributes.length){s.attributes=[];for(var l=0;l<e.attributes.length;++l)s.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[l],n)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(s.droppedAttributesCount=e.droppedAttributesCount),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span.Link"},u}(),a}(),c.Status=function(){function a(u){if(u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.message=null,a.prototype.code=null,a.create=function(t){return new a(t)},a.encode=function(t,e){return e||(e=N.create()),t.message!=null&&Object.hasOwnProperty.call(t,"message")&&e.uint32(18).string(t.message),t.code!=null&&Object.hasOwnProperty.call(t,"code")&&e.uint32(24).int32(t.code),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.trace.v1.Status;t.pos<n;){var l=t.uint32();switch(l>>>3){case 2:{s.message=t.string();break}case 3:{s.code=t.int32();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.message!=null&&t.hasOwnProperty("message")&&!_.isString(t.message))return"message: string expected";if(t.code!=null&&t.hasOwnProperty("code"))switch(t.code){default:return"code: enum value expected";case 0:case 1:case 2:break}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.Status)return t;var e=new p.opentelemetry.proto.trace.v1.Status;switch(t.message!=null&&(e.message=String(t.message)),t.code){default:if(typeof t.code=="number"){e.code=t.code;break}break;case"STATUS_CODE_UNSET":case 0:e.code=0;break;case"STATUS_CODE_OK":case 1:e.code=1;break;case"STATUS_CODE_ERROR":case 2:e.code=2;break}return e},a.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.message="",n.code=e.enums===String?"STATUS_CODE_UNSET":0),t.message!=null&&t.hasOwnProperty("message")&&(n.message=t.message),t.code!=null&&t.hasOwnProperty("code")&&(n.code=e.enums===String?p.opentelemetry.proto.trace.v1.Status.StatusCode[t.code]===void 0?t.code:p.opentelemetry.proto.trace.v1.Status.StatusCode[t.code]:t.code),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Status"},a.StatusCode=function(){var u={},t=Object.create(u);return t[u[0]="STATUS_CODE_UNSET"]=0,t[u[1]="STATUS_CODE_OK"]=1,t[u[2]="STATUS_CODE_ERROR"]=2,t}(),a}(),c}(),i}(),r.collector=function(){var i={};return i.trace=function(){var c={};return c.v1=function(){var a={};return a.TraceService=function(){function u(t,e,n){v.rpc.Service.call(this,t,e,n)}return(u.prototype=Object.create(v.rpc.Service.prototype)).constructor=u,u.create=function(e,n,s){return new this(e,n,s)},Object.defineProperty(u.prototype.export=function t(e,n){return this.rpcCall(t,p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,e,n)},"name",{value:"Export"}),u}(),a.ExportTraceServiceRequest=function(){function u(t){if(this.resourceSpans=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.resourceSpans=_.emptyArray,u.create=function(e){return new u(e)},u.encode=function(e,n){if(n||(n=N.create()),e.resourceSpans!=null&&e.resourceSpans.length)for(var s=0;s<e.resourceSpans.length;++s)p.opentelemetry.proto.trace.v1.ResourceSpans.encode(e.resourceSpans[s],n.uint32(10).fork()).ldelim();return n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.resourceSpans&&l.resourceSpans.length||(l.resourceSpans=[]),l.resourceSpans.push(p.opentelemetry.proto.trace.v1.ResourceSpans.decode(e,e.uint32()));break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceSpans!=null&&e.hasOwnProperty("resourceSpans")){if(!Array.isArray(e.resourceSpans))return"resourceSpans: array expected";for(var n=0;n<e.resourceSpans.length;++n){var s=p.opentelemetry.proto.trace.v1.ResourceSpans.verify(e.resourceSpans[n]);if(s)return"resourceSpans."+s}}return null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;if(e.resourceSpans){if(!Array.isArray(e.resourceSpans))throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected");n.resourceSpans=[];for(var s=0;s<e.resourceSpans.length;++s){if(typeof e.resourceSpans[s]!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected");n.resourceSpans[s]=p.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(e.resourceSpans[s])}}return n},u.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.resourceSpans=[]),e.resourceSpans&&e.resourceSpans.length){s.resourceSpans=[];for(var l=0;l<e.resourceSpans.length;++l)s.resourceSpans[l]=p.opentelemetry.proto.trace.v1.ResourceSpans.toObject(e.resourceSpans[l],n)}return s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"},u}(),a.ExportTraceServiceResponse=function(){function u(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.partialSuccess=null,u.create=function(e){return new u(e)},u.encode=function(e,n){return n||(n=N.create()),e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess")&&p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(e.partialSuccess,n.uint32(10).fork()).ldelim(),n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(e,e.uint32());break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(e.partialSuccess)}return n},u.toObject=function(e,n){n||(n={});var s={};return n.defaults&&(s.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(s.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(e.partialSuccess,n)),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},u}(),a.ExportTracePartialSuccess=function(){function u(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.rejectedSpans=null,u.prototype.errorMessage=null,u.create=function(e){return new u(e)},u.encode=function(e,n){return n||(n=N.create()),e.rejectedSpans!=null&&Object.hasOwnProperty.call(e,"rejectedSpans")&&n.uint32(8).int64(e.rejectedSpans),e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage")&&n.uint32(18).string(e.errorMessage),n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.rejectedSpans=e.int64();break}case 2:{l.errorMessage=e.string();break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedSpans!=null&&e.hasOwnProperty("rejectedSpans")&&!_.isInteger(e.rejectedSpans)&&!(e.rejectedSpans&&_.isInteger(e.rejectedSpans.low)&&_.isInteger(e.rejectedSpans.high))?"rejectedSpans: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!_.isString(e.errorMessage)?"errorMessage: string expected":null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;return e.rejectedSpans!=null&&(_.Long?(n.rejectedSpans=_.Long.fromValue(e.rejectedSpans)).unsigned=!1:typeof e.rejectedSpans=="string"?n.rejectedSpans=parseInt(e.rejectedSpans,10):typeof e.rejectedSpans=="number"?n.rejectedSpans=e.rejectedSpans:typeof e.rejectedSpans=="object"&&(n.rejectedSpans=new _.LongBits(e.rejectedSpans.low>>>0,e.rejectedSpans.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},u.toObject=function(e,n){n||(n={});var s={};if(n.defaults){if(_.Long){var l=new _.Long(0,0,!1);s.rejectedSpans=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.rejectedSpans=n.longs===String?"0":0;s.errorMessage=""}return e.rejectedSpans!=null&&e.hasOwnProperty("rejectedSpans")&&(typeof e.rejectedSpans=="number"?s.rejectedSpans=n.longs===String?String(e.rejectedSpans):e.rejectedSpans:s.rejectedSpans=n.longs===String?_.Long.prototype.toString.call(e.rejectedSpans):n.longs===Number?new _.LongBits(e.rejectedSpans.low>>>0,e.rejectedSpans.high>>>0).toNumber():e.rejectedSpans),e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&(s.errorMessage=e.errorMessage),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},u}(),a}(),c}(),i.metrics=function(){var c={};return c.v1=function(){var a={};return a.MetricsService=function(){function u(t,e,n){v.rpc.Service.call(this,t,e,n)}return(u.prototype=Object.create(v.rpc.Service.prototype)).constructor=u,u.create=function(e,n,s){return new this(e,n,s)},Object.defineProperty(u.prototype.export=function t(e,n){return this.rpcCall(t,p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,e,n)},"name",{value:"Export"}),u}(),a.ExportMetricsServiceRequest=function(){function u(t){if(this.resourceMetrics=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.resourceMetrics=_.emptyArray,u.create=function(e){return new u(e)},u.encode=function(e,n){if(n||(n=N.create()),e.resourceMetrics!=null&&e.resourceMetrics.length)for(var s=0;s<e.resourceMetrics.length;++s)p.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(e.resourceMetrics[s],n.uint32(10).fork()).ldelim();return n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.resourceMetrics&&l.resourceMetrics.length||(l.resourceMetrics=[]),l.resourceMetrics.push(p.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(e,e.uint32()));break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceMetrics!=null&&e.hasOwnProperty("resourceMetrics")){if(!Array.isArray(e.resourceMetrics))return"resourceMetrics: array expected";for(var n=0;n<e.resourceMetrics.length;++n){var s=p.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(e.resourceMetrics[n]);if(s)return"resourceMetrics."+s}}return null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;if(e.resourceMetrics){if(!Array.isArray(e.resourceMetrics))throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected");n.resourceMetrics=[];for(var s=0;s<e.resourceMetrics.length;++s){if(typeof e.resourceMetrics[s]!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected");n.resourceMetrics[s]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(e.resourceMetrics[s])}}return n},u.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.resourceMetrics=[]),e.resourceMetrics&&e.resourceMetrics.length){s.resourceMetrics=[];for(var l=0;l<e.resourceMetrics.length;++l)s.resourceMetrics[l]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(e.resourceMetrics[l],n)}return s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"},u}(),a.ExportMetricsServiceResponse=function(){function u(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.partialSuccess=null,u.create=function(e){return new u(e)},u.encode=function(e,n){return n||(n=N.create()),e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess")&&p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(e.partialSuccess,n.uint32(10).fork()).ldelim(),n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(e,e.uint32());break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(e.partialSuccess)}return n},u.toObject=function(e,n){n||(n={});var s={};return n.defaults&&(s.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(s.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(e.partialSuccess,n)),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},u}(),a.ExportMetricsPartialSuccess=function(){function u(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.rejectedDataPoints=null,u.prototype.errorMessage=null,u.create=function(e){return new u(e)},u.encode=function(e,n){return n||(n=N.create()),e.rejectedDataPoints!=null&&Object.hasOwnProperty.call(e,"rejectedDataPoints")&&n.uint32(8).int64(e.rejectedDataPoints),e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage")&&n.uint32(18).string(e.errorMessage),n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.rejectedDataPoints=e.int64();break}case 2:{l.errorMessage=e.string();break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedDataPoints!=null&&e.hasOwnProperty("rejectedDataPoints")&&!_.isInteger(e.rejectedDataPoints)&&!(e.rejectedDataPoints&&_.isInteger(e.rejectedDataPoints.low)&&_.isInteger(e.rejectedDataPoints.high))?"rejectedDataPoints: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!_.isString(e.errorMessage)?"errorMessage: string expected":null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;return e.rejectedDataPoints!=null&&(_.Long?(n.rejectedDataPoints=_.Long.fromValue(e.rejectedDataPoints)).unsigned=!1:typeof e.rejectedDataPoints=="string"?n.rejectedDataPoints=parseInt(e.rejectedDataPoints,10):typeof e.rejectedDataPoints=="number"?n.rejectedDataPoints=e.rejectedDataPoints:typeof e.rejectedDataPoints=="object"&&(n.rejectedDataPoints=new _.LongBits(e.rejectedDataPoints.low>>>0,e.rejectedDataPoints.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},u.toObject=function(e,n){n||(n={});var s={};if(n.defaults){if(_.Long){var l=new _.Long(0,0,!1);s.rejectedDataPoints=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.rejectedDataPoints=n.longs===String?"0":0;s.errorMessage=""}return e.rejectedDataPoints!=null&&e.hasOwnProperty("rejectedDataPoints")&&(typeof e.rejectedDataPoints=="number"?s.rejectedDataPoints=n.longs===String?String(e.rejectedDataPoints):e.rejectedDataPoints:s.rejectedDataPoints=n.longs===String?_.Long.prototype.toString.call(e.rejectedDataPoints):n.longs===Number?new _.LongBits(e.rejectedDataPoints.low>>>0,e.rejectedDataPoints.high>>>0).toNumber():e.rejectedDataPoints),e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&(s.errorMessage=e.errorMessage),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},u}(),a}(),c}(),i.logs=function(){var c={};return c.v1=function(){var a={};return a.LogsService=function(){function u(t,e,n){v.rpc.Service.call(this,t,e,n)}return(u.prototype=Object.create(v.rpc.Service.prototype)).constructor=u,u.create=function(e,n,s){return new this(e,n,s)},Object.defineProperty(u.prototype.export=function t(e,n){return this.rpcCall(t,p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,e,n)},"name",{value:"Export"}),u}(),a.ExportLogsServiceRequest=function(){function u(t){if(this.resourceLogs=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.resourceLogs=_.emptyArray,u.create=function(e){return new u(e)},u.encode=function(e,n){if(n||(n=N.create()),e.resourceLogs!=null&&e.resourceLogs.length)for(var s=0;s<e.resourceLogs.length;++s)p.opentelemetry.proto.logs.v1.ResourceLogs.encode(e.resourceLogs[s],n.uint32(10).fork()).ldelim();return n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.resourceLogs&&l.resourceLogs.length||(l.resourceLogs=[]),l.resourceLogs.push(p.opentelemetry.proto.logs.v1.ResourceLogs.decode(e,e.uint32()));break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceLogs!=null&&e.hasOwnProperty("resourceLogs")){if(!Array.isArray(e.resourceLogs))return"resourceLogs: array expected";for(var n=0;n<e.resourceLogs.length;++n){var s=p.opentelemetry.proto.logs.v1.ResourceLogs.verify(e.resourceLogs[n]);if(s)return"resourceLogs."+s}}return null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;if(e.resourceLogs){if(!Array.isArray(e.resourceLogs))throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected");n.resourceLogs=[];for(var s=0;s<e.resourceLogs.length;++s){if(typeof e.resourceLogs[s]!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected");n.resourceLogs[s]=p.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(e.resourceLogs[s])}}return n},u.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.resourceLogs=[]),e.resourceLogs&&e.resourceLogs.length){s.resourceLogs=[];for(var l=0;l<e.resourceLogs.length;++l)s.resourceLogs[l]=p.opentelemetry.proto.logs.v1.ResourceLogs.toObject(e.resourceLogs[l],n)}return s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"},u}(),a.ExportLogsServiceResponse=function(){function u(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.partialSuccess=null,u.create=function(e){return new u(e)},u.encode=function(e,n){return n||(n=N.create()),e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess")&&p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(e.partialSuccess,n.uint32(10).fork()).ldelim(),n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(e,e.uint32());break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(e.partialSuccess)}return n},u.toObject=function(e,n){n||(n={});var s={};return n.defaults&&(s.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(s.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(e.partialSuccess,n)),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},u}(),a.ExportLogsPartialSuccess=function(){function u(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.rejectedLogRecords=null,u.prototype.errorMessage=null,u.create=function(e){return new u(e)},u.encode=function(e,n){return n||(n=N.create()),e.rejectedLogRecords!=null&&Object.hasOwnProperty.call(e,"rejectedLogRecords")&&n.uint32(8).int64(e.rejectedLogRecords),e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage")&&n.uint32(18).string(e.errorMessage),n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.rejectedLogRecords=e.int64();break}case 2:{l.errorMessage=e.string();break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedLogRecords!=null&&e.hasOwnProperty("rejectedLogRecords")&&!_.isInteger(e.rejectedLogRecords)&&!(e.rejectedLogRecords&&_.isInteger(e.rejectedLogRecords.low)&&_.isInteger(e.rejectedLogRecords.high))?"rejectedLogRecords: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!_.isString(e.errorMessage)?"errorMessage: string expected":null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;return e.rejectedLogRecords!=null&&(_.Long?(n.rejectedLogRecords=_.Long.fromValue(e.rejectedLogRecords)).unsigned=!1:typeof e.rejectedLogRecords=="string"?n.rejectedLogRecords=parseInt(e.rejectedLogRecords,10):typeof e.rejectedLogRecords=="number"?n.rejectedLogRecords=e.rejectedLogRecords:typeof e.rejectedLogRecords=="object"&&(n.rejectedLogRecords=new _.LongBits(e.rejectedLogRecords.low>>>0,e.rejectedLogRecords.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},u.toObject=function(e,n){n||(n={});var s={};if(n.defaults){if(_.Long){var l=new _.Long(0,0,!1);s.rejectedLogRecords=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.rejectedLogRecords=n.longs===String?"0":0;s.errorMessage=""}return e.rejectedLogRecords!=null&&e.hasOwnProperty("rejectedLogRecords")&&(typeof e.rejectedLogRecords=="number"?s.rejectedLogRecords=n.longs===String?String(e.rejectedLogRecords):e.rejectedLogRecords:s.rejectedLogRecords=n.longs===String?_.Long.prototype.toString.call(e.rejectedLogRecords):n.longs===Number?new _.LongBits(e.rejectedLogRecords.low>>>0,e.rejectedLogRecords.high>>>0).toNumber():e.rejectedLogRecords),e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&(s.errorMessage=e.errorMessage),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},u}(),a}(),c}(),i}(),r.metrics=function(){var i={};return i.v1=function(){var c={};return c.MetricsData=function(){function a(u){if(this.resourceMetrics=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.resourceMetrics=_.emptyArray,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.resourceMetrics!=null&&t.resourceMetrics.length)for(var n=0;n<t.resourceMetrics.length;++n)p.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(t.resourceMetrics[n],e.uint32(10).fork()).ldelim();return e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.MetricsData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resourceMetrics&&s.resourceMetrics.length||(s.resourceMetrics=[]),s.resourceMetrics.push(p.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resourceMetrics!=null&&t.hasOwnProperty("resourceMetrics")){if(!Array.isArray(t.resourceMetrics))return"resourceMetrics: array expected";for(var e=0;e<t.resourceMetrics.length;++e){var n=p.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(t.resourceMetrics[e]);if(n)return"resourceMetrics."+n}}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.MetricsData)return t;var e=new p.opentelemetry.proto.metrics.v1.MetricsData;if(t.resourceMetrics){if(!Array.isArray(t.resourceMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: array expected");e.resourceMetrics=[];for(var n=0;n<t.resourceMetrics.length;++n){if(typeof t.resourceMetrics[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: object expected");e.resourceMetrics[n]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(t.resourceMetrics[n])}}return e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.resourceMetrics=[]),t.resourceMetrics&&t.resourceMetrics.length){n.resourceMetrics=[];for(var s=0;s<t.resourceMetrics.length;++s)n.resourceMetrics[s]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(t.resourceMetrics[s],e)}return n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.MetricsData"},a}(),c.ResourceMetrics=function(){function a(u){if(this.scopeMetrics=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.resource=null,a.prototype.scopeMetrics=_.emptyArray,a.prototype.schemaUrl=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.resource!=null&&Object.hasOwnProperty.call(t,"resource")&&p.opentelemetry.proto.resource.v1.Resource.encode(t.resource,e.uint32(10).fork()).ldelim(),t.scopeMetrics!=null&&t.scopeMetrics.length)for(var n=0;n<t.scopeMetrics.length;++n)p.opentelemetry.proto.metrics.v1.ScopeMetrics.encode(t.scopeMetrics[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.ResourceMetrics;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{s.scopeMetrics&&s.scopeMetrics.length||(s.scopeMetrics=[]),s.scopeMetrics.push(p.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resource!=null&&t.hasOwnProperty("resource")){var e=p.opentelemetry.proto.resource.v1.Resource.verify(t.resource);if(e)return"resource."+e}if(t.scopeMetrics!=null&&t.hasOwnProperty("scopeMetrics")){if(!Array.isArray(t.scopeMetrics))return"scopeMetrics: array expected";for(var n=0;n<t.scopeMetrics.length;++n){var e=p.opentelemetry.proto.metrics.v1.ScopeMetrics.verify(t.scopeMetrics[n]);if(e)return"scopeMetrics."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!_.isString(t.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.ResourceMetrics)return t;var e=new p.opentelemetry.proto.metrics.v1.ResourceMetrics;if(t.resource!=null){if(typeof t.resource!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.resource: object expected");e.resource=p.opentelemetry.proto.resource.v1.Resource.fromObject(t.resource)}if(t.scopeMetrics){if(!Array.isArray(t.scopeMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: array expected");e.scopeMetrics=[];for(var n=0;n<t.scopeMetrics.length;++n){if(typeof t.scopeMetrics[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: object expected");e.scopeMetrics[n]=p.opentelemetry.proto.metrics.v1.ScopeMetrics.fromObject(t.scopeMetrics[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.scopeMetrics=[]),e.defaults&&(n.resource=null,n.schemaUrl=""),t.resource!=null&&t.hasOwnProperty("resource")&&(n.resource=p.opentelemetry.proto.resource.v1.Resource.toObject(t.resource,e)),t.scopeMetrics&&t.scopeMetrics.length){n.scopeMetrics=[];for(var s=0;s<t.scopeMetrics.length;++s)n.scopeMetrics[s]=p.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(t.scopeMetrics[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ResourceMetrics"},a}(),c.ScopeMetrics=function(){function a(u){if(this.metrics=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.scope=null,a.prototype.metrics=_.emptyArray,a.prototype.schemaUrl=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.scope!=null&&Object.hasOwnProperty.call(t,"scope")&&p.opentelemetry.proto.common.v1.InstrumentationScope.encode(t.scope,e.uint32(10).fork()).ldelim(),t.metrics!=null&&t.metrics.length)for(var n=0;n<t.metrics.length;++n)p.opentelemetry.proto.metrics.v1.Metric.encode(t.metrics[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.ScopeMetrics;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{s.metrics&&s.metrics.length||(s.metrics=[]),s.metrics.push(p.opentelemetry.proto.metrics.v1.Metric.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.scope!=null&&t.hasOwnProperty("scope")){var e=p.opentelemetry.proto.common.v1.InstrumentationScope.verify(t.scope);if(e)return"scope."+e}if(t.metrics!=null&&t.hasOwnProperty("metrics")){if(!Array.isArray(t.metrics))return"metrics: array expected";for(var n=0;n<t.metrics.length;++n){var e=p.opentelemetry.proto.metrics.v1.Metric.verify(t.metrics[n]);if(e)return"metrics."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!_.isString(t.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.ScopeMetrics)return t;var e=new p.opentelemetry.proto.metrics.v1.ScopeMetrics;if(t.scope!=null){if(typeof t.scope!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.scope: object expected");e.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(t.scope)}if(t.metrics){if(!Array.isArray(t.metrics))throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: array expected");e.metrics=[];for(var n=0;n<t.metrics.length;++n){if(typeof t.metrics[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: object expected");e.metrics[n]=p.opentelemetry.proto.metrics.v1.Metric.fromObject(t.metrics[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.metrics=[]),e.defaults&&(n.scope=null,n.schemaUrl=""),t.scope!=null&&t.hasOwnProperty("scope")&&(n.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.toObject(t.scope,e)),t.metrics&&t.metrics.length){n.metrics=[];for(var s=0;s<t.metrics.length;++s)n.metrics[s]=p.opentelemetry.proto.metrics.v1.Metric.toObject(t.metrics[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ScopeMetrics"},a}(),c.Metric=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}a.prototype.name=null,a.prototype.description=null,a.prototype.unit=null,a.prototype.gauge=null,a.prototype.sum=null,a.prototype.histogram=null,a.prototype.exponentialHistogram=null,a.prototype.summary=null;var u;return Object.defineProperty(a.prototype,"data",{get:_.oneOfGetter(u=["gauge","sum","histogram","exponentialHistogram","summary"]),set:_.oneOfSetter(u)}),a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=N.create()),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&n.uint32(10).string(e.name),e.description!=null&&Object.hasOwnProperty.call(e,"description")&&n.uint32(18).string(e.description),e.unit!=null&&Object.hasOwnProperty.call(e,"unit")&&n.uint32(26).string(e.unit),e.gauge!=null&&Object.hasOwnProperty.call(e,"gauge")&&p.opentelemetry.proto.metrics.v1.Gauge.encode(e.gauge,n.uint32(42).fork()).ldelim(),e.sum!=null&&Object.hasOwnProperty.call(e,"sum")&&p.opentelemetry.proto.metrics.v1.Sum.encode(e.sum,n.uint32(58).fork()).ldelim(),e.histogram!=null&&Object.hasOwnProperty.call(e,"histogram")&&p.opentelemetry.proto.metrics.v1.Histogram.encode(e.histogram,n.uint32(74).fork()).ldelim(),e.exponentialHistogram!=null&&Object.hasOwnProperty.call(e,"exponentialHistogram")&&p.opentelemetry.proto.metrics.v1.ExponentialHistogram.encode(e.exponentialHistogram,n.uint32(82).fork()).ldelim(),e.summary!=null&&Object.hasOwnProperty.call(e,"summary")&&p.opentelemetry.proto.metrics.v1.Summary.encode(e.summary,n.uint32(90).fork()).ldelim(),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.Metric;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.name=e.string();break}case 2:{l.description=e.string();break}case 3:{l.unit=e.string();break}case 5:{l.gauge=p.opentelemetry.proto.metrics.v1.Gauge.decode(e,e.uint32());break}case 7:{l.sum=p.opentelemetry.proto.metrics.v1.Sum.decode(e,e.uint32());break}case 9:{l.histogram=p.opentelemetry.proto.metrics.v1.Histogram.decode(e,e.uint32());break}case 10:{l.exponentialHistogram=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(e,e.uint32());break}case 11:{l.summary=p.opentelemetry.proto.metrics.v1.Summary.decode(e,e.uint32());break}default:e.skipType(E&7);break}}return l},a.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.name!=null&&e.hasOwnProperty("name")&&!_.isString(e.name))return"name: string expected";if(e.description!=null&&e.hasOwnProperty("description")&&!_.isString(e.description))return"description: string expected";if(e.unit!=null&&e.hasOwnProperty("unit")&&!_.isString(e.unit))return"unit: string expected";if(e.gauge!=null&&e.hasOwnProperty("gauge")){n.data=1;{var s=p.opentelemetry.proto.metrics.v1.Gauge.verify(e.gauge);if(s)return"gauge."+s}}if(e.sum!=null&&e.hasOwnProperty("sum")){if(n.data===1)return"data: multiple values";n.data=1;{var s=p.opentelemetry.proto.metrics.v1.Sum.verify(e.sum);if(s)return"sum."+s}}if(e.histogram!=null&&e.hasOwnProperty("histogram")){if(n.data===1)return"data: multiple values";n.data=1;{var s=p.opentelemetry.proto.metrics.v1.Histogram.verify(e.histogram);if(s)return"histogram."+s}}if(e.exponentialHistogram!=null&&e.hasOwnProperty("exponentialHistogram")){if(n.data===1)return"data: multiple values";n.data=1;{var s=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(e.exponentialHistogram);if(s)return"exponentialHistogram."+s}}if(e.summary!=null&&e.hasOwnProperty("summary")){if(n.data===1)return"data: multiple values";n.data=1;{var s=p.opentelemetry.proto.metrics.v1.Summary.verify(e.summary);if(s)return"summary."+s}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.Metric)return e;var n=new p.opentelemetry.proto.metrics.v1.Metric;if(e.name!=null&&(n.name=String(e.name)),e.description!=null&&(n.description=String(e.description)),e.unit!=null&&(n.unit=String(e.unit)),e.gauge!=null){if(typeof e.gauge!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected");n.gauge=p.opentelemetry.proto.metrics.v1.Gauge.fromObject(e.gauge)}if(e.sum!=null){if(typeof e.sum!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.sum: object expected");n.sum=p.opentelemetry.proto.metrics.v1.Sum.fromObject(e.sum)}if(e.histogram!=null){if(typeof e.histogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.histogram: object expected");n.histogram=p.opentelemetry.proto.metrics.v1.Histogram.fromObject(e.histogram)}if(e.exponentialHistogram!=null){if(typeof e.exponentialHistogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected");n.exponentialHistogram=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(e.exponentialHistogram)}if(e.summary!=null){if(typeof e.summary!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.summary: object expected");n.summary=p.opentelemetry.proto.metrics.v1.Summary.fromObject(e.summary)}return n},a.toObject=function(e,n){n||(n={});var s={};return n.defaults&&(s.name="",s.description="",s.unit=""),e.name!=null&&e.hasOwnProperty("name")&&(s.name=e.name),e.description!=null&&e.hasOwnProperty("description")&&(s.description=e.description),e.unit!=null&&e.hasOwnProperty("unit")&&(s.unit=e.unit),e.gauge!=null&&e.hasOwnProperty("gauge")&&(s.gauge=p.opentelemetry.proto.metrics.v1.Gauge.toObject(e.gauge,n),n.oneofs&&(s.data="gauge")),e.sum!=null&&e.hasOwnProperty("sum")&&(s.sum=p.opentelemetry.proto.metrics.v1.Sum.toObject(e.sum,n),n.oneofs&&(s.data="sum")),e.histogram!=null&&e.hasOwnProperty("histogram")&&(s.histogram=p.opentelemetry.proto.metrics.v1.Histogram.toObject(e.histogram,n),n.oneofs&&(s.data="histogram")),e.exponentialHistogram!=null&&e.hasOwnProperty("exponentialHistogram")&&(s.exponentialHistogram=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(e.exponentialHistogram,n),n.oneofs&&(s.data="exponentialHistogram")),e.summary!=null&&e.hasOwnProperty("summary")&&(s.summary=p.opentelemetry.proto.metrics.v1.Summary.toObject(e.summary,n),n.oneofs&&(s.data="summary")),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Metric"},a}(),c.Gauge=function(){function a(u){if(this.dataPoints=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.dataPoints=_.emptyArray,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Gauge;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.Gauge)return t;var e=new p.opentelemetry.proto.metrics.v1.Gauge;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(t.dataPoints[n])}}return e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var s=0;s<t.dataPoints.length;++s)n.dataPoints[s]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(t.dataPoints[s],e)}return n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Gauge"},a}(),c.Sum=function(){function a(u){if(this.dataPoints=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.dataPoints=_.emptyArray,a.prototype.aggregationTemporality=null,a.prototype.isMonotonic=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return t.aggregationTemporality!=null&&Object.hasOwnProperty.call(t,"aggregationTemporality")&&e.uint32(16).int32(t.aggregationTemporality),t.isMonotonic!=null&&Object.hasOwnProperty.call(t,"isMonotonic")&&e.uint32(24).bool(t.isMonotonic),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Sum;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(t,t.uint32()));break}case 2:{s.aggregationTemporality=t.int32();break}case 3:{s.isMonotonic=t.bool();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))switch(t.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return t.isMonotonic!=null&&t.hasOwnProperty("isMonotonic")&&typeof t.isMonotonic!="boolean"?"isMonotonic: boolean expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.Sum)return t;var e=new p.opentelemetry.proto.metrics.v1.Sum;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(t.dataPoints[n])}}switch(t.aggregationTemporality){default:if(typeof t.aggregationTemporality=="number"){e.aggregationTemporality=t.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:e.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:e.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:e.aggregationTemporality=2;break}return t.isMonotonic!=null&&(e.isMonotonic=!!t.isMonotonic),e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),e.defaults&&(n.aggregationTemporality=e.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0,n.isMonotonic=!1),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var s=0;s<t.dataPoints.length;++s)n.dataPoints[s]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(t.dataPoints[s],e)}return t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality")&&(n.aggregationTemporality=e.enums===String?p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]===void 0?t.aggregationTemporality:p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]:t.aggregationTemporality),t.isMonotonic!=null&&t.hasOwnProperty("isMonotonic")&&(n.isMonotonic=t.isMonotonic),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Sum"},a}(),c.Histogram=function(){function a(u){if(this.dataPoints=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.dataPoints=_.emptyArray,a.prototype.aggregationTemporality=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.HistogramDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return t.aggregationTemporality!=null&&Object.hasOwnProperty.call(t,"aggregationTemporality")&&e.uint32(16).int32(t.aggregationTemporality),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Histogram;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(t,t.uint32()));break}case 2:{s.aggregationTemporality=t.int32();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.HistogramDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))switch(t.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.Histogram)return t;var e=new p.opentelemetry.proto.metrics.v1.Histogram;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.HistogramDataPoint.fromObject(t.dataPoints[n])}}switch(t.aggregationTemporality){default:if(typeof t.aggregationTemporality=="number"){e.aggregationTemporality=t.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:e.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:e.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:e.aggregationTemporality=2;break}return e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),e.defaults&&(n.aggregationTemporality=e.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var s=0;s<t.dataPoints.length;++s)n.dataPoints[s]=p.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(t.dataPoints[s],e)}return t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality")&&(n.aggregationTemporality=e.enums===String?p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]===void 0?t.aggregationTemporality:p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]:t.aggregationTemporality),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Histogram"},a}(),c.ExponentialHistogram=function(){function a(u){if(this.dataPoints=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.dataPoints=_.emptyArray,a.prototype.aggregationTemporality=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return t.aggregationTemporality!=null&&Object.hasOwnProperty.call(t,"aggregationTemporality")&&e.uint32(16).int32(t.aggregationTemporality),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.ExponentialHistogram;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(t,t.uint32()));break}case 2:{s.aggregationTemporality=t.int32();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))switch(t.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.ExponentialHistogram)return t;var e=new p.opentelemetry.proto.metrics.v1.ExponentialHistogram;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.fromObject(t.dataPoints[n])}}switch(t.aggregationTemporality){default:if(typeof t.aggregationTemporality=="number"){e.aggregationTemporality=t.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:e.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:e.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:e.aggregationTemporality=2;break}return e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),e.defaults&&(n.aggregationTemporality=e.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var s=0;s<t.dataPoints.length;++s)n.dataPoints[s]=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(t.dataPoints[s],e)}return t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality")&&(n.aggregationTemporality=e.enums===String?p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]===void 0?t.aggregationTemporality:p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]:t.aggregationTemporality),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ExponentialHistogram"},a}(),c.Summary=function(){function a(u){if(this.dataPoints=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.dataPoints=_.emptyArray,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.SummaryDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.Summary;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.dataPoints&&s.dataPoints.length||(s.dataPoints=[]),s.dataPoints.push(p.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.Summary)return t;var e=new p.opentelemetry.proto.metrics.v1.Summary;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.fromObject(t.dataPoints[n])}}return e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var s=0;s<t.dataPoints.length;++s)n.dataPoints[s]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(t.dataPoints[s],e)}return n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Summary"},a}(),c.AggregationTemporality=function(){var a={},u=Object.create(a);return u[a[0]="AGGREGATION_TEMPORALITY_UNSPECIFIED"]=0,u[a[1]="AGGREGATION_TEMPORALITY_DELTA"]=1,u[a[2]="AGGREGATION_TEMPORALITY_CUMULATIVE"]=2,u}(),c.DataPointFlags=function(){var a={},u=Object.create(a);return u[a[0]="DATA_POINT_FLAGS_DO_NOT_USE"]=0,u[a[1]="DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"]=1,u}(),c.NumberDataPoint=function(){function a(t){if(this.attributes=[],this.exemplars=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}a.prototype.attributes=_.emptyArray,a.prototype.startTimeUnixNano=null,a.prototype.timeUnixNano=null,a.prototype.asDouble=null,a.prototype.asInt=null,a.prototype.exemplars=_.emptyArray,a.prototype.flags=null;var u;return Object.defineProperty(a.prototype,"value",{get:_.oneOfGetter(u=["asDouble","asInt"]),set:_.oneOfSetter(u)}),a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=N.create()),e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&n.uint32(17).fixed64(e.startTimeUnixNano),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(25).fixed64(e.timeUnixNano),e.asDouble!=null&&Object.hasOwnProperty.call(e,"asDouble")&&n.uint32(33).double(e.asDouble),e.exemplars!=null&&e.exemplars.length)for(var s=0;s<e.exemplars.length;++s)p.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[s],n.uint32(42).fork()).ldelim();if(e.asInt!=null&&Object.hasOwnProperty.call(e,"asInt")&&n.uint32(49).sfixed64(e.asInt),e.attributes!=null&&e.attributes.length)for(var s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],n.uint32(58).fork()).ldelim();return e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&n.uint32(64).uint32(e.flags),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.NumberDataPoint;e.pos<s;){var E=e.uint32();switch(E>>>3){case 7:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.startTimeUnixNano=e.fixed64();break}case 3:{l.timeUnixNano=e.fixed64();break}case 4:{l.asDouble=e.double();break}case 6:{l.asInt=e.sfixed64();break}case 5:{l.exemplars&&l.exemplars.length||(l.exemplars=[]),l.exemplars.push(p.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 8:{l.flags=e.uint32();break}default:e.skipType(E&7);break}}return l},a.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var s=0;s<e.attributes.length;++s){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[s]);if(l)return"attributes."+l}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!_.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&_.isInteger(e.startTimeUnixNano.low)&&_.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!_.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&_.isInteger(e.timeUnixNano.low)&&_.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.asDouble!=null&&e.hasOwnProperty("asDouble")&&(n.value=1,typeof e.asDouble!="number"))return"asDouble: number expected";if(e.asInt!=null&&e.hasOwnProperty("asInt")){if(n.value===1)return"value: multiple values";if(n.value=1,!_.isInteger(e.asInt)&&!(e.asInt&&_.isInteger(e.asInt.low)&&_.isInteger(e.asInt.high)))return"asInt: integer|Long expected"}if(e.exemplars!=null&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(var s=0;s<e.exemplars.length;++s){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[s]);if(l)return"exemplars."+l}}return e.flags!=null&&e.hasOwnProperty("flags")&&!_.isInteger(e.flags)?"flags: integer expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.NumberDataPoint)return e;var n=new p.opentelemetry.proto.metrics.v1.NumberDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: array expected");n.attributes=[];for(var s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}if(e.startTimeUnixNano!=null&&(_.Long?(n.startTimeUnixNano=_.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?n.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?n.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(n.startTimeUnixNano=new _.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.timeUnixNano!=null&&(_.Long?(n.timeUnixNano=_.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new _.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.asDouble!=null&&(n.asDouble=Number(e.asDouble)),e.asInt!=null&&(_.Long?(n.asInt=_.Long.fromValue(e.asInt)).unsigned=!1:typeof e.asInt=="string"?n.asInt=parseInt(e.asInt,10):typeof e.asInt=="number"?n.asInt=e.asInt:typeof e.asInt=="object"&&(n.asInt=new _.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber())),e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected");n.exemplars=[];for(var s=0;s<e.exemplars.length;++s){if(typeof e.exemplars[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected");n.exemplars[s]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[s])}}return e.flags!=null&&(n.flags=e.flags>>>0),n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.exemplars=[],s.attributes=[]),n.defaults){if(_.Long){var l=new _.Long(0,0,!1);s.startTimeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.startTimeUnixNano=n.longs===String?"0":0;if(_.Long){var l=new _.Long(0,0,!1);s.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.timeUnixNano=n.longs===String?"0":0;s.flags=0}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?s.startTimeUnixNano=n.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:s.startTimeUnixNano=n.longs===String?_.Long.prototype.toString.call(e.startTimeUnixNano):n.longs===Number?new _.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?s.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:s.timeUnixNano=n.longs===String?_.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new _.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.asDouble!=null&&e.hasOwnProperty("asDouble")&&(s.asDouble=n.json&&!isFinite(e.asDouble)?String(e.asDouble):e.asDouble,n.oneofs&&(s.value="asDouble")),e.exemplars&&e.exemplars.length){s.exemplars=[];for(var E=0;E<e.exemplars.length;++E)s.exemplars[E]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[E],n)}if(e.asInt!=null&&e.hasOwnProperty("asInt")&&(typeof e.asInt=="number"?s.asInt=n.longs===String?String(e.asInt):e.asInt:s.asInt=n.longs===String?_.Long.prototype.toString.call(e.asInt):n.longs===Number?new _.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber():e.asInt,n.oneofs&&(s.value="asInt")),e.attributes&&e.attributes.length){s.attributes=[];for(var E=0;E<e.attributes.length;++E)s.attributes[E]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[E],n)}return e.flags!=null&&e.hasOwnProperty("flags")&&(s.flags=e.flags),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.NumberDataPoint"},a}(),c.HistogramDataPoint=function(){function a(t){if(this.attributes=[],this.bucketCounts=[],this.explicitBounds=[],this.exemplars=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}a.prototype.attributes=_.emptyArray,a.prototype.startTimeUnixNano=null,a.prototype.timeUnixNano=null,a.prototype.count=null,a.prototype.sum=null,a.prototype.bucketCounts=_.emptyArray,a.prototype.explicitBounds=_.emptyArray,a.prototype.exemplars=_.emptyArray,a.prototype.flags=null,a.prototype.min=null,a.prototype.max=null;var u;return Object.defineProperty(a.prototype,"_sum",{get:_.oneOfGetter(u=["sum"]),set:_.oneOfSetter(u)}),Object.defineProperty(a.prototype,"_min",{get:_.oneOfGetter(u=["min"]),set:_.oneOfSetter(u)}),Object.defineProperty(a.prototype,"_max",{get:_.oneOfGetter(u=["max"]),set:_.oneOfSetter(u)}),a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=N.create()),e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&n.uint32(17).fixed64(e.startTimeUnixNano),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(25).fixed64(e.timeUnixNano),e.count!=null&&Object.hasOwnProperty.call(e,"count")&&n.uint32(33).fixed64(e.count),e.sum!=null&&Object.hasOwnProperty.call(e,"sum")&&n.uint32(41).double(e.sum),e.bucketCounts!=null&&e.bucketCounts.length){n.uint32(50).fork();for(var s=0;s<e.bucketCounts.length;++s)n.fixed64(e.bucketCounts[s]);n.ldelim()}if(e.explicitBounds!=null&&e.explicitBounds.length){n.uint32(58).fork();for(var s=0;s<e.explicitBounds.length;++s)n.double(e.explicitBounds[s]);n.ldelim()}if(e.exemplars!=null&&e.exemplars.length)for(var s=0;s<e.exemplars.length;++s)p.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[s],n.uint32(66).fork()).ldelim();if(e.attributes!=null&&e.attributes.length)for(var s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],n.uint32(74).fork()).ldelim();return e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&n.uint32(80).uint32(e.flags),e.min!=null&&Object.hasOwnProperty.call(e,"min")&&n.uint32(89).double(e.min),e.max!=null&&Object.hasOwnProperty.call(e,"max")&&n.uint32(97).double(e.max),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.HistogramDataPoint;e.pos<s;){var E=e.uint32();switch(E>>>3){case 9:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.startTimeUnixNano=e.fixed64();break}case 3:{l.timeUnixNano=e.fixed64();break}case 4:{l.count=e.fixed64();break}case 5:{l.sum=e.double();break}case 6:{if(l.bucketCounts&&l.bucketCounts.length||(l.bucketCounts=[]),(E&7)===2)for(var O=e.uint32()+e.pos;e.pos<O;)l.bucketCounts.push(e.fixed64());else l.bucketCounts.push(e.fixed64());break}case 7:{if(l.explicitBounds&&l.explicitBounds.length||(l.explicitBounds=[]),(E&7)===2)for(var O=e.uint32()+e.pos;e.pos<O;)l.explicitBounds.push(e.double());else l.explicitBounds.push(e.double());break}case 8:{l.exemplars&&l.exemplars.length||(l.exemplars=[]),l.exemplars.push(p.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 10:{l.flags=e.uint32();break}case 11:{l.min=e.double();break}case 12:{l.max=e.double();break}default:e.skipType(E&7);break}}return l},a.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var s=0;s<e.attributes.length;++s){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[s]);if(l)return"attributes."+l}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!_.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&_.isInteger(e.startTimeUnixNano.low)&&_.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!_.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&_.isInteger(e.timeUnixNano.low)&&_.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.count!=null&&e.hasOwnProperty("count")&&!_.isInteger(e.count)&&!(e.count&&_.isInteger(e.count.low)&&_.isInteger(e.count.high)))return"count: integer|Long expected";if(e.sum!=null&&e.hasOwnProperty("sum")&&(n._sum=1,typeof e.sum!="number"))return"sum: number expected";if(e.bucketCounts!=null&&e.hasOwnProperty("bucketCounts")){if(!Array.isArray(e.bucketCounts))return"bucketCounts: array expected";for(var s=0;s<e.bucketCounts.length;++s)if(!_.isInteger(e.bucketCounts[s])&&!(e.bucketCounts[s]&&_.isInteger(e.bucketCounts[s].low)&&_.isInteger(e.bucketCounts[s].high)))return"bucketCounts: integer|Long[] expected"}if(e.explicitBounds!=null&&e.hasOwnProperty("explicitBounds")){if(!Array.isArray(e.explicitBounds))return"explicitBounds: array expected";for(var s=0;s<e.explicitBounds.length;++s)if(typeof e.explicitBounds[s]!="number")return"explicitBounds: number[] expected"}if(e.exemplars!=null&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(var s=0;s<e.exemplars.length;++s){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[s]);if(l)return"exemplars."+l}}return e.flags!=null&&e.hasOwnProperty("flags")&&!_.isInteger(e.flags)?"flags: integer expected":e.min!=null&&e.hasOwnProperty("min")&&(n._min=1,typeof e.min!="number")?"min: number expected":e.max!=null&&e.hasOwnProperty("max")&&(n._max=1,typeof e.max!="number")?"max: number expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.HistogramDataPoint)return e;var n=new p.opentelemetry.proto.metrics.v1.HistogramDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: array expected");n.attributes=[];for(var s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}if(e.startTimeUnixNano!=null&&(_.Long?(n.startTimeUnixNano=_.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?n.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?n.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(n.startTimeUnixNano=new _.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.timeUnixNano!=null&&(_.Long?(n.timeUnixNano=_.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new _.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.count!=null&&(_.Long?(n.count=_.Long.fromValue(e.count)).unsigned=!1:typeof e.count=="string"?n.count=parseInt(e.count,10):typeof e.count=="number"?n.count=e.count:typeof e.count=="object"&&(n.count=new _.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber())),e.sum!=null&&(n.sum=Number(e.sum)),e.bucketCounts){if(!Array.isArray(e.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected");n.bucketCounts=[];for(var s=0;s<e.bucketCounts.length;++s)_.Long?(n.bucketCounts[s]=_.Long.fromValue(e.bucketCounts[s])).unsigned=!1:typeof e.bucketCounts[s]=="string"?n.bucketCounts[s]=parseInt(e.bucketCounts[s],10):typeof e.bucketCounts[s]=="number"?n.bucketCounts[s]=e.bucketCounts[s]:typeof e.bucketCounts[s]=="object"&&(n.bucketCounts[s]=new _.LongBits(e.bucketCounts[s].low>>>0,e.bucketCounts[s].high>>>0).toNumber())}if(e.explicitBounds){if(!Array.isArray(e.explicitBounds))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected");n.explicitBounds=[];for(var s=0;s<e.explicitBounds.length;++s)n.explicitBounds[s]=Number(e.explicitBounds[s])}if(e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected");n.exemplars=[];for(var s=0;s<e.exemplars.length;++s){if(typeof e.exemplars[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected");n.exemplars[s]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[s])}}return e.flags!=null&&(n.flags=e.flags>>>0),e.min!=null&&(n.min=Number(e.min)),e.max!=null&&(n.max=Number(e.max)),n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.bucketCounts=[],s.explicitBounds=[],s.exemplars=[],s.attributes=[]),n.defaults){if(_.Long){var l=new _.Long(0,0,!1);s.startTimeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.startTimeUnixNano=n.longs===String?"0":0;if(_.Long){var l=new _.Long(0,0,!1);s.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.timeUnixNano=n.longs===String?"0":0;if(_.Long){var l=new _.Long(0,0,!1);s.count=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.count=n.longs===String?"0":0;s.flags=0}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?s.startTimeUnixNano=n.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:s.startTimeUnixNano=n.longs===String?_.Long.prototype.toString.call(e.startTimeUnixNano):n.longs===Number?new _.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?s.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:s.timeUnixNano=n.longs===String?_.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new _.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.count!=null&&e.hasOwnProperty("count")&&(typeof e.count=="number"?s.count=n.longs===String?String(e.count):e.count:s.count=n.longs===String?_.Long.prototype.toString.call(e.count):n.longs===Number?new _.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count),e.sum!=null&&e.hasOwnProperty("sum")&&(s.sum=n.json&&!isFinite(e.sum)?String(e.sum):e.sum,n.oneofs&&(s._sum="sum")),e.bucketCounts&&e.bucketCounts.length){s.bucketCounts=[];for(var E=0;E<e.bucketCounts.length;++E)typeof e.bucketCounts[E]=="number"?s.bucketCounts[E]=n.longs===String?String(e.bucketCounts[E]):e.bucketCounts[E]:s.bucketCounts[E]=n.longs===String?_.Long.prototype.toString.call(e.bucketCounts[E]):n.longs===Number?new _.LongBits(e.bucketCounts[E].low>>>0,e.bucketCounts[E].high>>>0).toNumber():e.bucketCounts[E]}if(e.explicitBounds&&e.explicitBounds.length){s.explicitBounds=[];for(var E=0;E<e.explicitBounds.length;++E)s.explicitBounds[E]=n.json&&!isFinite(e.explicitBounds[E])?String(e.explicitBounds[E]):e.explicitBounds[E]}if(e.exemplars&&e.exemplars.length){s.exemplars=[];for(var E=0;E<e.exemplars.length;++E)s.exemplars[E]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[E],n)}if(e.attributes&&e.attributes.length){s.attributes=[];for(var E=0;E<e.attributes.length;++E)s.attributes[E]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[E],n)}return e.flags!=null&&e.hasOwnProperty("flags")&&(s.flags=e.flags),e.min!=null&&e.hasOwnProperty("min")&&(s.min=n.json&&!isFinite(e.min)?String(e.min):e.min,n.oneofs&&(s._min="min")),e.max!=null&&e.hasOwnProperty("max")&&(s.max=n.json&&!isFinite(e.max)?String(e.max):e.max,n.oneofs&&(s._max="max")),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.HistogramDataPoint"},a}(),c.ExponentialHistogramDataPoint=function(){function a(t){if(this.attributes=[],this.exemplars=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}a.prototype.attributes=_.emptyArray,a.prototype.startTimeUnixNano=null,a.prototype.timeUnixNano=null,a.prototype.count=null,a.prototype.sum=null,a.prototype.scale=null,a.prototype.zeroCount=null,a.prototype.positive=null,a.prototype.negative=null,a.prototype.flags=null,a.prototype.exemplars=_.emptyArray,a.prototype.min=null,a.prototype.max=null,a.prototype.zeroThreshold=null;var u;return Object.defineProperty(a.prototype,"_sum",{get:_.oneOfGetter(u=["sum"]),set:_.oneOfSetter(u)}),Object.defineProperty(a.prototype,"_min",{get:_.oneOfGetter(u=["min"]),set:_.oneOfSetter(u)}),Object.defineProperty(a.prototype,"_max",{get:_.oneOfGetter(u=["max"]),set:_.oneOfSetter(u)}),a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=N.create()),e.attributes!=null&&e.attributes.length)for(var s=0;s<e.attributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[s],n.uint32(10).fork()).ldelim();if(e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&n.uint32(17).fixed64(e.startTimeUnixNano),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(25).fixed64(e.timeUnixNano),e.count!=null&&Object.hasOwnProperty.call(e,"count")&&n.uint32(33).fixed64(e.count),e.sum!=null&&Object.hasOwnProperty.call(e,"sum")&&n.uint32(41).double(e.sum),e.scale!=null&&Object.hasOwnProperty.call(e,"scale")&&n.uint32(48).sint32(e.scale),e.zeroCount!=null&&Object.hasOwnProperty.call(e,"zeroCount")&&n.uint32(57).fixed64(e.zeroCount),e.positive!=null&&Object.hasOwnProperty.call(e,"positive")&&p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(e.positive,n.uint32(66).fork()).ldelim(),e.negative!=null&&Object.hasOwnProperty.call(e,"negative")&&p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(e.negative,n.uint32(74).fork()).ldelim(),e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&n.uint32(80).uint32(e.flags),e.exemplars!=null&&e.exemplars.length)for(var s=0;s<e.exemplars.length;++s)p.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[s],n.uint32(90).fork()).ldelim();return e.min!=null&&Object.hasOwnProperty.call(e,"min")&&n.uint32(97).double(e.min),e.max!=null&&Object.hasOwnProperty.call(e,"max")&&n.uint32(105).double(e.max),e.zeroThreshold!=null&&Object.hasOwnProperty.call(e,"zeroThreshold")&&n.uint32(113).double(e.zeroThreshold),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.startTimeUnixNano=e.fixed64();break}case 3:{l.timeUnixNano=e.fixed64();break}case 4:{l.count=e.fixed64();break}case 5:{l.sum=e.double();break}case 6:{l.scale=e.sint32();break}case 7:{l.zeroCount=e.fixed64();break}case 8:{l.positive=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(e,e.uint32());break}case 9:{l.negative=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(e,e.uint32());break}case 10:{l.flags=e.uint32();break}case 11:{l.exemplars&&l.exemplars.length||(l.exemplars=[]),l.exemplars.push(p.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 12:{l.min=e.double();break}case 13:{l.max=e.double();break}case 14:{l.zeroThreshold=e.double();break}default:e.skipType(E&7);break}}return l},a.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var s=0;s<e.attributes.length;++s){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[s]);if(l)return"attributes."+l}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!_.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&_.isInteger(e.startTimeUnixNano.low)&&_.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!_.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&_.isInteger(e.timeUnixNano.low)&&_.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.count!=null&&e.hasOwnProperty("count")&&!_.isInteger(e.count)&&!(e.count&&_.isInteger(e.count.low)&&_.isInteger(e.count.high)))return"count: integer|Long expected";if(e.sum!=null&&e.hasOwnProperty("sum")&&(n._sum=1,typeof e.sum!="number"))return"sum: number expected";if(e.scale!=null&&e.hasOwnProperty("scale")&&!_.isInteger(e.scale))return"scale: integer expected";if(e.zeroCount!=null&&e.hasOwnProperty("zeroCount")&&!_.isInteger(e.zeroCount)&&!(e.zeroCount&&_.isInteger(e.zeroCount.low)&&_.isInteger(e.zeroCount.high)))return"zeroCount: integer|Long expected";if(e.positive!=null&&e.hasOwnProperty("positive")){var l=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(e.positive);if(l)return"positive."+l}if(e.negative!=null&&e.hasOwnProperty("negative")){var l=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(e.negative);if(l)return"negative."+l}if(e.flags!=null&&e.hasOwnProperty("flags")&&!_.isInteger(e.flags))return"flags: integer expected";if(e.exemplars!=null&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(var s=0;s<e.exemplars.length;++s){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[s]);if(l)return"exemplars."+l}}return e.min!=null&&e.hasOwnProperty("min")&&(n._min=1,typeof e.min!="number")?"min: number expected":e.max!=null&&e.hasOwnProperty("max")&&(n._max=1,typeof e.max!="number")?"max: number expected":e.zeroThreshold!=null&&e.hasOwnProperty("zeroThreshold")&&typeof e.zeroThreshold!="number"?"zeroThreshold: number expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint)return e;var n=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: array expected");n.attributes=[];for(var s=0;s<e.attributes.length;++s){if(typeof e.attributes[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected");n.attributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[s])}}if(e.startTimeUnixNano!=null&&(_.Long?(n.startTimeUnixNano=_.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?n.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?n.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(n.startTimeUnixNano=new _.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.timeUnixNano!=null&&(_.Long?(n.timeUnixNano=_.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new _.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.count!=null&&(_.Long?(n.count=_.Long.fromValue(e.count)).unsigned=!1:typeof e.count=="string"?n.count=parseInt(e.count,10):typeof e.count=="number"?n.count=e.count:typeof e.count=="object"&&(n.count=new _.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber())),e.sum!=null&&(n.sum=Number(e.sum)),e.scale!=null&&(n.scale=e.scale|0),e.zeroCount!=null&&(_.Long?(n.zeroCount=_.Long.fromValue(e.zeroCount)).unsigned=!1:typeof e.zeroCount=="string"?n.zeroCount=parseInt(e.zeroCount,10):typeof e.zeroCount=="number"?n.zeroCount=e.zeroCount:typeof e.zeroCount=="object"&&(n.zeroCount=new _.LongBits(e.zeroCount.low>>>0,e.zeroCount.high>>>0).toNumber())),e.positive!=null){if(typeof e.positive!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected");n.positive=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(e.positive)}if(e.negative!=null){if(typeof e.negative!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected");n.negative=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(e.negative)}if(e.flags!=null&&(n.flags=e.flags>>>0),e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected");n.exemplars=[];for(var s=0;s<e.exemplars.length;++s){if(typeof e.exemplars[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected");n.exemplars[s]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[s])}}return e.min!=null&&(n.min=Number(e.min)),e.max!=null&&(n.max=Number(e.max)),e.zeroThreshold!=null&&(n.zeroThreshold=Number(e.zeroThreshold)),n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.attributes=[],s.exemplars=[]),n.defaults){if(_.Long){var l=new _.Long(0,0,!1);s.startTimeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.startTimeUnixNano=n.longs===String?"0":0;if(_.Long){var l=new _.Long(0,0,!1);s.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.timeUnixNano=n.longs===String?"0":0;if(_.Long){var l=new _.Long(0,0,!1);s.count=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.count=n.longs===String?"0":0;if(s.scale=0,_.Long){var l=new _.Long(0,0,!1);s.zeroCount=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.zeroCount=n.longs===String?"0":0;s.positive=null,s.negative=null,s.flags=0,s.zeroThreshold=0}if(e.attributes&&e.attributes.length){s.attributes=[];for(var E=0;E<e.attributes.length;++E)s.attributes[E]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[E],n)}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?s.startTimeUnixNano=n.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:s.startTimeUnixNano=n.longs===String?_.Long.prototype.toString.call(e.startTimeUnixNano):n.longs===Number?new _.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?s.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:s.timeUnixNano=n.longs===String?_.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new _.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.count!=null&&e.hasOwnProperty("count")&&(typeof e.count=="number"?s.count=n.longs===String?String(e.count):e.count:s.count=n.longs===String?_.Long.prototype.toString.call(e.count):n.longs===Number?new _.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count),e.sum!=null&&e.hasOwnProperty("sum")&&(s.sum=n.json&&!isFinite(e.sum)?String(e.sum):e.sum,n.oneofs&&(s._sum="sum")),e.scale!=null&&e.hasOwnProperty("scale")&&(s.scale=e.scale),e.zeroCount!=null&&e.hasOwnProperty("zeroCount")&&(typeof e.zeroCount=="number"?s.zeroCount=n.longs===String?String(e.zeroCount):e.zeroCount:s.zeroCount=n.longs===String?_.Long.prototype.toString.call(e.zeroCount):n.longs===Number?new _.LongBits(e.zeroCount.low>>>0,e.zeroCount.high>>>0).toNumber():e.zeroCount),e.positive!=null&&e.hasOwnProperty("positive")&&(s.positive=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(e.positive,n)),e.negative!=null&&e.hasOwnProperty("negative")&&(s.negative=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(e.negative,n)),e.flags!=null&&e.hasOwnProperty("flags")&&(s.flags=e.flags),e.exemplars&&e.exemplars.length){s.exemplars=[];for(var E=0;E<e.exemplars.length;++E)s.exemplars[E]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[E],n)}return e.min!=null&&e.hasOwnProperty("min")&&(s.min=n.json&&!isFinite(e.min)?String(e.min):e.min,n.oneofs&&(s._min="min")),e.max!=null&&e.hasOwnProperty("max")&&(s.max=n.json&&!isFinite(e.max)?String(e.max):e.max,n.oneofs&&(s._max="max")),e.zeroThreshold!=null&&e.hasOwnProperty("zeroThreshold")&&(s.zeroThreshold=n.json&&!isFinite(e.zeroThreshold)?String(e.zeroThreshold):e.zeroThreshold),s},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"},a.Buckets=function(){function t(e){if(this.bucketCounts=[],e)for(var n=Object.keys(e),s=0;s<n.length;++s)e[n[s]]!=null&&(this[n[s]]=e[n[s]])}return t.prototype.offset=null,t.prototype.bucketCounts=_.emptyArray,t.create=function(n){return new t(n)},t.encode=function(n,s){if(s||(s=N.create()),n.offset!=null&&Object.hasOwnProperty.call(n,"offset")&&s.uint32(8).sint32(n.offset),n.bucketCounts!=null&&n.bucketCounts.length){s.uint32(18).fork();for(var l=0;l<n.bucketCounts.length;++l)s.uint64(n.bucketCounts[l]);s.ldelim()}return s},t.encodeDelimited=function(n,s){return this.encode(n,s).ldelim()},t.decode=function(n,s){n instanceof T||(n=T.create(n));for(var l=s===void 0?n.len:n.pos+s,E=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;n.pos<l;){var O=n.uint32();switch(O>>>3){case 1:{E.offset=n.sint32();break}case 2:{if(E.bucketCounts&&E.bucketCounts.length||(E.bucketCounts=[]),(O&7)===2)for(var x=n.uint32()+n.pos;n.pos<x;)E.bucketCounts.push(n.uint64());else E.bucketCounts.push(n.uint64());break}default:n.skipType(O&7);break}}return E},t.decodeDelimited=function(n){return n instanceof T||(n=new T(n)),this.decode(n,n.uint32())},t.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.offset!=null&&n.hasOwnProperty("offset")&&!_.isInteger(n.offset))return"offset: integer expected";if(n.bucketCounts!=null&&n.hasOwnProperty("bucketCounts")){if(!Array.isArray(n.bucketCounts))return"bucketCounts: array expected";for(var s=0;s<n.bucketCounts.length;++s)if(!_.isInteger(n.bucketCounts[s])&&!(n.bucketCounts[s]&&_.isInteger(n.bucketCounts[s].low)&&_.isInteger(n.bucketCounts[s].high)))return"bucketCounts: integer|Long[] expected"}return null},t.fromObject=function(n){if(n instanceof p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets)return n;var s=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;if(n.offset!=null&&(s.offset=n.offset|0),n.bucketCounts){if(!Array.isArray(n.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected");s.bucketCounts=[];for(var l=0;l<n.bucketCounts.length;++l)_.Long?(s.bucketCounts[l]=_.Long.fromValue(n.bucketCounts[l])).unsigned=!0:typeof n.bucketCounts[l]=="string"?s.bucketCounts[l]=parseInt(n.bucketCounts[l],10):typeof n.bucketCounts[l]=="number"?s.bucketCounts[l]=n.bucketCounts[l]:typeof n.bucketCounts[l]=="object"&&(s.bucketCounts[l]=new _.LongBits(n.bucketCounts[l].low>>>0,n.bucketCounts[l].high>>>0).toNumber(!0))}return s},t.toObject=function(n,s){s||(s={});var l={};if((s.arrays||s.defaults)&&(l.bucketCounts=[]),s.defaults&&(l.offset=0),n.offset!=null&&n.hasOwnProperty("offset")&&(l.offset=n.offset),n.bucketCounts&&n.bucketCounts.length){l.bucketCounts=[];for(var E=0;E<n.bucketCounts.length;++E)typeof n.bucketCounts[E]=="number"?l.bucketCounts[E]=s.longs===String?String(n.bucketCounts[E]):n.bucketCounts[E]:l.bucketCounts[E]=s.longs===String?_.Long.prototype.toString.call(n.bucketCounts[E]):s.longs===Number?new _.LongBits(n.bucketCounts[E].low>>>0,n.bucketCounts[E].high>>>0).toNumber(!0):n.bucketCounts[E]}return l},t.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},t.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},t}(),a}(),c.SummaryDataPoint=function(){function a(u){if(this.attributes=[],this.quantileValues=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.attributes=_.emptyArray,a.prototype.startTimeUnixNano=null,a.prototype.timeUnixNano=null,a.prototype.count=null,a.prototype.sum=null,a.prototype.quantileValues=_.emptyArray,a.prototype.flags=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&e.uint32(17).fixed64(t.startTimeUnixNano),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&e.uint32(25).fixed64(t.timeUnixNano),t.count!=null&&Object.hasOwnProperty.call(t,"count")&&e.uint32(33).fixed64(t.count),t.sum!=null&&Object.hasOwnProperty.call(t,"sum")&&e.uint32(41).double(t.sum),t.quantileValues!=null&&t.quantileValues.length)for(var n=0;n<t.quantileValues.length;++n)p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.encode(t.quantileValues[n],e.uint32(50).fork()).ldelim();if(t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(58).fork()).ldelim();return t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&e.uint32(64).uint32(t.flags),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint;t.pos<n;){var l=t.uint32();switch(l>>>3){case 7:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{s.startTimeUnixNano=t.fixed64();break}case 3:{s.timeUnixNano=t.fixed64();break}case 4:{s.count=t.fixed64();break}case 5:{s.sum=t.double();break}case 6:{s.quantileValues&&s.quantileValues.length||(s.quantileValues=[]),s.quantileValues.push(p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(t,t.uint32()));break}case 8:{s.flags=t.uint32();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(n)return"attributes."+n}}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!_.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&_.isInteger(t.startTimeUnixNano.low)&&_.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!_.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&_.isInteger(t.timeUnixNano.low)&&_.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.count!=null&&t.hasOwnProperty("count")&&!_.isInteger(t.count)&&!(t.count&&_.isInteger(t.count.low)&&_.isInteger(t.count.high)))return"count: integer|Long expected";if(t.sum!=null&&t.hasOwnProperty("sum")&&typeof t.sum!="number")return"sum: number expected";if(t.quantileValues!=null&&t.hasOwnProperty("quantileValues")){if(!Array.isArray(t.quantileValues))return"quantileValues: array expected";for(var e=0;e<t.quantileValues.length;++e){var n=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify(t.quantileValues[e]);if(n)return"quantileValues."+n}}return t.flags!=null&&t.hasOwnProperty("flags")&&!_.isInteger(t.flags)?"flags: integer expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.SummaryDataPoint)return t;var e=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}if(t.startTimeUnixNano!=null&&(_.Long?(e.startTimeUnixNano=_.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?e.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?e.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(e.startTimeUnixNano=new _.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.timeUnixNano!=null&&(_.Long?(e.timeUnixNano=_.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?e.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?e.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(e.timeUnixNano=new _.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.count!=null&&(_.Long?(e.count=_.Long.fromValue(t.count)).unsigned=!1:typeof t.count=="string"?e.count=parseInt(t.count,10):typeof t.count=="number"?e.count=t.count:typeof t.count=="object"&&(e.count=new _.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber())),t.sum!=null&&(e.sum=Number(t.sum)),t.quantileValues){if(!Array.isArray(t.quantileValues))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected");e.quantileValues=[];for(var n=0;n<t.quantileValues.length;++n){if(typeof t.quantileValues[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: object expected");e.quantileValues[n]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.fromObject(t.quantileValues[n])}}return t.flags!=null&&(e.flags=t.flags>>>0),e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.quantileValues=[],n.attributes=[]),e.defaults){if(_.Long){var s=new _.Long(0,0,!1);n.startTimeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}else n.startTimeUnixNano=e.longs===String?"0":0;if(_.Long){var s=new _.Long(0,0,!1);n.timeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}else n.timeUnixNano=e.longs===String?"0":0;if(_.Long){var s=new _.Long(0,0,!1);n.count=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}else n.count=e.longs===String?"0":0;n.sum=0,n.flags=0}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?n.startTimeUnixNano=e.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:n.startTimeUnixNano=e.longs===String?_.Long.prototype.toString.call(t.startTimeUnixNano):e.longs===Number?new _.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?n.timeUnixNano=e.longs===String?String(t.timeUnixNano):t.timeUnixNano:n.timeUnixNano=e.longs===String?_.Long.prototype.toString.call(t.timeUnixNano):e.longs===Number?new _.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.count!=null&&t.hasOwnProperty("count")&&(typeof t.count=="number"?n.count=e.longs===String?String(t.count):t.count:n.count=e.longs===String?_.Long.prototype.toString.call(t.count):e.longs===Number?new _.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber():t.count),t.sum!=null&&t.hasOwnProperty("sum")&&(n.sum=e.json&&!isFinite(t.sum)?String(t.sum):t.sum),t.quantileValues&&t.quantileValues.length){n.quantileValues=[];for(var l=0;l<t.quantileValues.length;++l)n.quantileValues[l]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(t.quantileValues[l],e)}if(t.attributes&&t.attributes.length){n.attributes=[];for(var l=0;l<t.attributes.length;++l)n.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[l],e)}return t.flags!=null&&t.hasOwnProperty("flags")&&(n.flags=t.flags),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.SummaryDataPoint"},a.ValueAtQuantile=function(){function u(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return u.prototype.quantile=null,u.prototype.value=null,u.create=function(e){return new u(e)},u.encode=function(e,n){return n||(n=N.create()),e.quantile!=null&&Object.hasOwnProperty.call(e,"quantile")&&n.uint32(9).double(e.quantile),e.value!=null&&Object.hasOwnProperty.call(e,"value")&&n.uint32(17).double(e.value),n},u.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},u.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;e.pos<s;){var E=e.uint32();switch(E>>>3){case 1:{l.quantile=e.double();break}case 2:{l.value=e.double();break}default:e.skipType(E&7);break}}return l},u.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},u.verify=function(e){return typeof e!="object"||e===null?"object expected":e.quantile!=null&&e.hasOwnProperty("quantile")&&typeof e.quantile!="number"?"quantile: number expected":e.value!=null&&e.hasOwnProperty("value")&&typeof e.value!="number"?"value: number expected":null},u.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return e;var n=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;return e.quantile!=null&&(n.quantile=Number(e.quantile)),e.value!=null&&(n.value=Number(e.value)),n},u.toObject=function(e,n){n||(n={});var s={};return n.defaults&&(s.quantile=0,s.value=0),e.quantile!=null&&e.hasOwnProperty("quantile")&&(s.quantile=n.json&&!isFinite(e.quantile)?String(e.quantile):e.quantile),e.value!=null&&e.hasOwnProperty("value")&&(s.value=n.json&&!isFinite(e.value)?String(e.value):e.value),s},u.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},u.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},u}(),a}(),c.Exemplar=function(){function a(t){if(this.filteredAttributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}a.prototype.filteredAttributes=_.emptyArray,a.prototype.timeUnixNano=null,a.prototype.asDouble=null,a.prototype.asInt=null,a.prototype.spanId=null,a.prototype.traceId=null;var u;return Object.defineProperty(a.prototype,"value",{get:_.oneOfGetter(u=["asDouble","asInt"]),set:_.oneOfSetter(u)}),a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=N.create()),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(17).fixed64(e.timeUnixNano),e.asDouble!=null&&Object.hasOwnProperty.call(e,"asDouble")&&n.uint32(25).double(e.asDouble),e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId")&&n.uint32(34).bytes(e.spanId),e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId")&&n.uint32(42).bytes(e.traceId),e.asInt!=null&&Object.hasOwnProperty.call(e,"asInt")&&n.uint32(49).sfixed64(e.asInt),e.filteredAttributes!=null&&e.filteredAttributes.length)for(var s=0;s<e.filteredAttributes.length;++s)p.opentelemetry.proto.common.v1.KeyValue.encode(e.filteredAttributes[s],n.uint32(58).fork()).ldelim();return n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof T||(e=T.create(e));for(var s=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.Exemplar;e.pos<s;){var E=e.uint32();switch(E>>>3){case 7:{l.filteredAttributes&&l.filteredAttributes.length||(l.filteredAttributes=[]),l.filteredAttributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.timeUnixNano=e.fixed64();break}case 3:{l.asDouble=e.double();break}case 6:{l.asInt=e.sfixed64();break}case 4:{l.spanId=e.bytes();break}case 5:{l.traceId=e.bytes();break}default:e.skipType(E&7);break}}return l},a.decodeDelimited=function(e){return e instanceof T||(e=new T(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.filteredAttributes!=null&&e.hasOwnProperty("filteredAttributes")){if(!Array.isArray(e.filteredAttributes))return"filteredAttributes: array expected";for(var s=0;s<e.filteredAttributes.length;++s){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.filteredAttributes[s]);if(l)return"filteredAttributes."+l}}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!_.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&_.isInteger(e.timeUnixNano.low)&&_.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.asDouble!=null&&e.hasOwnProperty("asDouble")&&(n.value=1,typeof e.asDouble!="number"))return"asDouble: number expected";if(e.asInt!=null&&e.hasOwnProperty("asInt")){if(n.value===1)return"value: multiple values";if(n.value=1,!_.isInteger(e.asInt)&&!(e.asInt&&_.isInteger(e.asInt.low)&&_.isInteger(e.asInt.high)))return"asInt: integer|Long expected"}return e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||_.isString(e.spanId))?"spanId: buffer expected":e.traceId!=null&&e.hasOwnProperty("traceId")&&!(e.traceId&&typeof e.traceId.length=="number"||_.isString(e.traceId))?"traceId: buffer expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.Exemplar)return e;var n=new p.opentelemetry.proto.metrics.v1.Exemplar;if(e.filteredAttributes){if(!Array.isArray(e.filteredAttributes))throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: array expected");n.filteredAttributes=[];for(var s=0;s<e.filteredAttributes.length;++s){if(typeof e.filteredAttributes[s]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected");n.filteredAttributes[s]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.filteredAttributes[s])}}return e.timeUnixNano!=null&&(_.Long?(n.timeUnixNano=_.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new _.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.asDouble!=null&&(n.asDouble=Number(e.asDouble)),e.asInt!=null&&(_.Long?(n.asInt=_.Long.fromValue(e.asInt)).unsigned=!1:typeof e.asInt=="string"?n.asInt=parseInt(e.asInt,10):typeof e.asInt=="number"?n.asInt=e.asInt:typeof e.asInt=="object"&&(n.asInt=new _.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber())),e.spanId!=null&&(typeof e.spanId=="string"?_.base64.decode(e.spanId,n.spanId=_.newBuffer(_.base64.length(e.spanId)),0):e.spanId.length>=0&&(n.spanId=e.spanId)),e.traceId!=null&&(typeof e.traceId=="string"?_.base64.decode(e.traceId,n.traceId=_.newBuffer(_.base64.length(e.traceId)),0):e.traceId.length>=0&&(n.traceId=e.traceId)),n},a.toObject=function(e,n){n||(n={});var s={};if((n.arrays||n.defaults)&&(s.filteredAttributes=[]),n.defaults){if(_.Long){var l=new _.Long(0,0,!1);s.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else s.timeUnixNano=n.longs===String?"0":0;n.bytes===String?s.spanId="":(s.spanId=[],n.bytes!==Array&&(s.spanId=_.newBuffer(s.spanId))),n.bytes===String?s.traceId="":(s.traceId=[],n.bytes!==Array&&(s.traceId=_.newBuffer(s.traceId)))}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?s.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:s.timeUnixNano=n.longs===String?_.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new _.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.asDouble!=null&&e.hasOwnProperty("asDouble")&&(s.asDouble=n.json&&!isFinite(e.asDouble)?String(e.asDouble):e.asDouble,n.oneofs&&(s.value="asDouble")),e.spanId!=null&&e.hasOwnProperty("spanId")&&(s.spanId=n.bytes===String?_.base64.encode(e.spanId,0,e.spanId.length):n.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),e.traceId!=null&&e.hasOwnProperty("traceId")&&(s.traceId=n.bytes===String?_.base64.encode(e.traceId,0,e.traceId.length):n.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),e.asInt!=null&&e.hasOwnProperty("asInt")&&(typeof e.asInt=="number"?s.asInt=n.longs===String?String(e.asInt):e.asInt:s.asInt=n.longs===String?_.Long.prototype.toString.call(e.asInt):n.longs===Number?new _.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber():e.asInt,n.oneofs&&(s.value="asInt")),e.filteredAttributes&&e.filteredAttributes.length){s.filteredAttributes=[];for(var E=0;E<e.filteredAttributes.length;++E)s.filteredAttributes[E]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.filteredAttributes[E],n)}return s},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Exemplar"},a}(),c}(),i}(),r.logs=function(){var i={};return i.v1=function(){var c={};return c.LogsData=function(){function a(u){if(this.resourceLogs=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.resourceLogs=_.emptyArray,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.resourceLogs!=null&&t.resourceLogs.length)for(var n=0;n<t.resourceLogs.length;++n)p.opentelemetry.proto.logs.v1.ResourceLogs.encode(t.resourceLogs[n],e.uint32(10).fork()).ldelim();return e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.LogsData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resourceLogs&&s.resourceLogs.length||(s.resourceLogs=[]),s.resourceLogs.push(p.opentelemetry.proto.logs.v1.ResourceLogs.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resourceLogs!=null&&t.hasOwnProperty("resourceLogs")){if(!Array.isArray(t.resourceLogs))return"resourceLogs: array expected";for(var e=0;e<t.resourceLogs.length;++e){var n=p.opentelemetry.proto.logs.v1.ResourceLogs.verify(t.resourceLogs[e]);if(n)return"resourceLogs."+n}}return null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.logs.v1.LogsData)return t;var e=new p.opentelemetry.proto.logs.v1.LogsData;if(t.resourceLogs){if(!Array.isArray(t.resourceLogs))throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: array expected");e.resourceLogs=[];for(var n=0;n<t.resourceLogs.length;++n){if(typeof t.resourceLogs[n]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: object expected");e.resourceLogs[n]=p.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(t.resourceLogs[n])}}return e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.resourceLogs=[]),t.resourceLogs&&t.resourceLogs.length){n.resourceLogs=[];for(var s=0;s<t.resourceLogs.length;++s)n.resourceLogs[s]=p.opentelemetry.proto.logs.v1.ResourceLogs.toObject(t.resourceLogs[s],e)}return n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.LogsData"},a}(),c.ResourceLogs=function(){function a(u){if(this.scopeLogs=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.resource=null,a.prototype.scopeLogs=_.emptyArray,a.prototype.schemaUrl=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.resource!=null&&Object.hasOwnProperty.call(t,"resource")&&p.opentelemetry.proto.resource.v1.Resource.encode(t.resource,e.uint32(10).fork()).ldelim(),t.scopeLogs!=null&&t.scopeLogs.length)for(var n=0;n<t.scopeLogs.length;++n)p.opentelemetry.proto.logs.v1.ScopeLogs.encode(t.scopeLogs[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.ResourceLogs;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{s.scopeLogs&&s.scopeLogs.length||(s.scopeLogs=[]),s.scopeLogs.push(p.opentelemetry.proto.logs.v1.ScopeLogs.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resource!=null&&t.hasOwnProperty("resource")){var e=p.opentelemetry.proto.resource.v1.Resource.verify(t.resource);if(e)return"resource."+e}if(t.scopeLogs!=null&&t.hasOwnProperty("scopeLogs")){if(!Array.isArray(t.scopeLogs))return"scopeLogs: array expected";for(var n=0;n<t.scopeLogs.length;++n){var e=p.opentelemetry.proto.logs.v1.ScopeLogs.verify(t.scopeLogs[n]);if(e)return"scopeLogs."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!_.isString(t.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.logs.v1.ResourceLogs)return t;var e=new p.opentelemetry.proto.logs.v1.ResourceLogs;if(t.resource!=null){if(typeof t.resource!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.resource: object expected");e.resource=p.opentelemetry.proto.resource.v1.Resource.fromObject(t.resource)}if(t.scopeLogs){if(!Array.isArray(t.scopeLogs))throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: array expected");e.scopeLogs=[];for(var n=0;n<t.scopeLogs.length;++n){if(typeof t.scopeLogs[n]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: object expected");e.scopeLogs[n]=p.opentelemetry.proto.logs.v1.ScopeLogs.fromObject(t.scopeLogs[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.scopeLogs=[]),e.defaults&&(n.resource=null,n.schemaUrl=""),t.resource!=null&&t.hasOwnProperty("resource")&&(n.resource=p.opentelemetry.proto.resource.v1.Resource.toObject(t.resource,e)),t.scopeLogs&&t.scopeLogs.length){n.scopeLogs=[];for(var s=0;s<t.scopeLogs.length;++s)n.scopeLogs[s]=p.opentelemetry.proto.logs.v1.ScopeLogs.toObject(t.scopeLogs[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.ResourceLogs"},a}(),c.ScopeLogs=function(){function a(u){if(this.logRecords=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.scope=null,a.prototype.logRecords=_.emptyArray,a.prototype.schemaUrl=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.scope!=null&&Object.hasOwnProperty.call(t,"scope")&&p.opentelemetry.proto.common.v1.InstrumentationScope.encode(t.scope,e.uint32(10).fork()).ldelim(),t.logRecords!=null&&t.logRecords.length)for(var n=0;n<t.logRecords.length;++n)p.opentelemetry.proto.logs.v1.LogRecord.encode(t.logRecords[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.ScopeLogs;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{s.logRecords&&s.logRecords.length||(s.logRecords=[]),s.logRecords.push(p.opentelemetry.proto.logs.v1.LogRecord.decode(t,t.uint32()));break}case 3:{s.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.scope!=null&&t.hasOwnProperty("scope")){var e=p.opentelemetry.proto.common.v1.InstrumentationScope.verify(t.scope);if(e)return"scope."+e}if(t.logRecords!=null&&t.hasOwnProperty("logRecords")){if(!Array.isArray(t.logRecords))return"logRecords: array expected";for(var n=0;n<t.logRecords.length;++n){var e=p.opentelemetry.proto.logs.v1.LogRecord.verify(t.logRecords[n]);if(e)return"logRecords."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!_.isString(t.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.logs.v1.ScopeLogs)return t;var e=new p.opentelemetry.proto.logs.v1.ScopeLogs;if(t.scope!=null){if(typeof t.scope!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.scope: object expected");e.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(t.scope)}if(t.logRecords){if(!Array.isArray(t.logRecords))throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: array expected");e.logRecords=[];for(var n=0;n<t.logRecords.length;++n){if(typeof t.logRecords[n]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: object expected");e.logRecords[n]=p.opentelemetry.proto.logs.v1.LogRecord.fromObject(t.logRecords[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.logRecords=[]),e.defaults&&(n.scope=null,n.schemaUrl=""),t.scope!=null&&t.hasOwnProperty("scope")&&(n.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.toObject(t.scope,e)),t.logRecords&&t.logRecords.length){n.logRecords=[];for(var s=0;s<t.logRecords.length;++s)n.logRecords[s]=p.opentelemetry.proto.logs.v1.LogRecord.toObject(t.logRecords[s],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.ScopeLogs"},a}(),c.SeverityNumber=function(){var a={},u=Object.create(a);return u[a[0]="SEVERITY_NUMBER_UNSPECIFIED"]=0,u[a[1]="SEVERITY_NUMBER_TRACE"]=1,u[a[2]="SEVERITY_NUMBER_TRACE2"]=2,u[a[3]="SEVERITY_NUMBER_TRACE3"]=3,u[a[4]="SEVERITY_NUMBER_TRACE4"]=4,u[a[5]="SEVERITY_NUMBER_DEBUG"]=5,u[a[6]="SEVERITY_NUMBER_DEBUG2"]=6,u[a[7]="SEVERITY_NUMBER_DEBUG3"]=7,u[a[8]="SEVERITY_NUMBER_DEBUG4"]=8,u[a[9]="SEVERITY_NUMBER_INFO"]=9,u[a[10]="SEVERITY_NUMBER_INFO2"]=10,u[a[11]="SEVERITY_NUMBER_INFO3"]=11,u[a[12]="SEVERITY_NUMBER_INFO4"]=12,u[a[13]="SEVERITY_NUMBER_WARN"]=13,u[a[14]="SEVERITY_NUMBER_WARN2"]=14,u[a[15]="SEVERITY_NUMBER_WARN3"]=15,u[a[16]="SEVERITY_NUMBER_WARN4"]=16,u[a[17]="SEVERITY_NUMBER_ERROR"]=17,u[a[18]="SEVERITY_NUMBER_ERROR2"]=18,u[a[19]="SEVERITY_NUMBER_ERROR3"]=19,u[a[20]="SEVERITY_NUMBER_ERROR4"]=20,u[a[21]="SEVERITY_NUMBER_FATAL"]=21,u[a[22]="SEVERITY_NUMBER_FATAL2"]=22,u[a[23]="SEVERITY_NUMBER_FATAL3"]=23,u[a[24]="SEVERITY_NUMBER_FATAL4"]=24,u}(),c.LogRecordFlags=function(){var a={},u=Object.create(a);return u[a[0]="LOG_RECORD_FLAGS_DO_NOT_USE"]=0,u[a[255]="LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"]=255,u}(),c.LogRecord=function(){function a(u){if(this.attributes=[],u)for(var t=Object.keys(u),e=0;e<t.length;++e)u[t[e]]!=null&&(this[t[e]]=u[t[e]])}return a.prototype.timeUnixNano=null,a.prototype.observedTimeUnixNano=null,a.prototype.severityNumber=null,a.prototype.severityText=null,a.prototype.body=null,a.prototype.attributes=_.emptyArray,a.prototype.droppedAttributesCount=null,a.prototype.flags=null,a.prototype.traceId=null,a.prototype.spanId=null,a.create=function(t){return new a(t)},a.encode=function(t,e){if(e||(e=N.create()),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&e.uint32(9).fixed64(t.timeUnixNano),t.severityNumber!=null&&Object.hasOwnProperty.call(t,"severityNumber")&&e.uint32(16).int32(t.severityNumber),t.severityText!=null&&Object.hasOwnProperty.call(t,"severityText")&&e.uint32(26).string(t.severityText),t.body!=null&&Object.hasOwnProperty.call(t,"body")&&p.opentelemetry.proto.common.v1.AnyValue.encode(t.body,e.uint32(42).fork()).ldelim(),t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(50).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&e.uint32(56).uint32(t.droppedAttributesCount),t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&e.uint32(69).fixed32(t.flags),t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId")&&e.uint32(74).bytes(t.traceId),t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId")&&e.uint32(82).bytes(t.spanId),t.observedTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"observedTimeUnixNano")&&e.uint32(89).fixed64(t.observedTimeUnixNano),e},a.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},a.decode=function(t,e){t instanceof T||(t=T.create(t));for(var n=e===void 0?t.len:t.pos+e,s=new p.opentelemetry.proto.logs.v1.LogRecord;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{s.timeUnixNano=t.fixed64();break}case 11:{s.observedTimeUnixNano=t.fixed64();break}case 2:{s.severityNumber=t.int32();break}case 3:{s.severityText=t.string();break}case 5:{s.body=p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32());break}case 6:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 7:{s.droppedAttributesCount=t.uint32();break}case 8:{s.flags=t.fixed32();break}case 9:{s.traceId=t.bytes();break}case 10:{s.spanId=t.bytes();break}default:t.skipType(l&7);break}}return s},a.decodeDelimited=function(t){return t instanceof T||(t=new T(t)),this.decode(t,t.uint32())},a.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!_.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&_.isInteger(t.timeUnixNano.low)&&_.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.observedTimeUnixNano!=null&&t.hasOwnProperty("observedTimeUnixNano")&&!_.isInteger(t.observedTimeUnixNano)&&!(t.observedTimeUnixNano&&_.isInteger(t.observedTimeUnixNano.low)&&_.isInteger(t.observedTimeUnixNano.high)))return"observedTimeUnixNano: integer|Long expected";if(t.severityNumber!=null&&t.hasOwnProperty("severityNumber"))switch(t.severityNumber){default:return"severityNumber: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:break}if(t.severityText!=null&&t.hasOwnProperty("severityText")&&!_.isString(t.severityText))return"severityText: string expected";if(t.body!=null&&t.hasOwnProperty("body")){var e=p.opentelemetry.proto.common.v1.AnyValue.verify(t.body);if(e)return"body."+e}if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var n=0;n<t.attributes.length;++n){var e=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[n]);if(e)return"attributes."+e}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!_.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":t.flags!=null&&t.hasOwnProperty("flags")&&!_.isInteger(t.flags)?"flags: integer expected":t.traceId!=null&&t.hasOwnProperty("traceId")&&!(t.traceId&&typeof t.traceId.length=="number"||_.isString(t.traceId))?"traceId: buffer expected":t.spanId!=null&&t.hasOwnProperty("spanId")&&!(t.spanId&&typeof t.spanId.length=="number"||_.isString(t.spanId))?"spanId: buffer expected":null},a.fromObject=function(t){if(t instanceof p.opentelemetry.proto.logs.v1.LogRecord)return t;var e=new p.opentelemetry.proto.logs.v1.LogRecord;switch(t.timeUnixNano!=null&&(_.Long?(e.timeUnixNano=_.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?e.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?e.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(e.timeUnixNano=new _.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.observedTimeUnixNano!=null&&(_.Long?(e.observedTimeUnixNano=_.Long.fromValue(t.observedTimeUnixNano)).unsigned=!1:typeof t.observedTimeUnixNano=="string"?e.observedTimeUnixNano=parseInt(t.observedTimeUnixNano,10):typeof t.observedTimeUnixNano=="number"?e.observedTimeUnixNano=t.observedTimeUnixNano:typeof t.observedTimeUnixNano=="object"&&(e.observedTimeUnixNano=new _.LongBits(t.observedTimeUnixNano.low>>>0,t.observedTimeUnixNano.high>>>0).toNumber())),t.severityNumber){default:if(typeof t.severityNumber=="number"){e.severityNumber=t.severityNumber;break}break;case"SEVERITY_NUMBER_UNSPECIFIED":case 0:e.severityNumber=0;break;case"SEVERITY_NUMBER_TRACE":case 1:e.severityNumber=1;break;case"SEVERITY_NUMBER_TRACE2":case 2:e.severityNumber=2;break;case"SEVERITY_NUMBER_TRACE3":case 3:e.severityNumber=3;break;case"SEVERITY_NUMBER_TRACE4":case 4:e.severityNumber=4;break;case"SEVERITY_NUMBER_DEBUG":case 5:e.severityNumber=5;break;case"SEVERITY_NUMBER_DEBUG2":case 6:e.severityNumber=6;break;case"SEVERITY_NUMBER_DEBUG3":case 7:e.severityNumber=7;break;case"SEVERITY_NUMBER_DEBUG4":case 8:e.severityNumber=8;break;case"SEVERITY_NUMBER_INFO":case 9:e.severityNumber=9;break;case"SEVERITY_NUMBER_INFO2":case 10:e.severityNumber=10;break;case"SEVERITY_NUMBER_INFO3":case 11:e.severityNumber=11;break;case"SEVERITY_NUMBER_INFO4":case 12:e.severityNumber=12;break;case"SEVERITY_NUMBER_WARN":case 13:e.severityNumber=13;break;case"SEVERITY_NUMBER_WARN2":case 14:e.severityNumber=14;break;case"SEVERITY_NUMBER_WARN3":case 15:e.severityNumber=15;break;case"SEVERITY_NUMBER_WARN4":case 16:e.severityNumber=16;break;case"SEVERITY_NUMBER_ERROR":case 17:e.severityNumber=17;break;case"SEVERITY_NUMBER_ERROR2":case 18:e.severityNumber=18;break;case"SEVERITY_NUMBER_ERROR3":case 19:e.severityNumber=19;break;case"SEVERITY_NUMBER_ERROR4":case 20:e.severityNumber=20;break;case"SEVERITY_NUMBER_FATAL":case 21:e.severityNumber=21;break;case"SEVERITY_NUMBER_FATAL2":case 22:e.severityNumber=22;break;case"SEVERITY_NUMBER_FATAL3":case 23:e.severityNumber=23;break;case"SEVERITY_NUMBER_FATAL4":case 24:e.severityNumber=24;break}if(t.severityText!=null&&(e.severityText=String(t.severityText)),t.body!=null){if(typeof t.body!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected");e.body=p.opentelemetry.proto.common.v1.AnyValue.fromObject(t.body)}if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}return t.droppedAttributesCount!=null&&(e.droppedAttributesCount=t.droppedAttributesCount>>>0),t.flags!=null&&(e.flags=t.flags>>>0),t.traceId!=null&&(typeof t.traceId=="string"?_.base64.decode(t.traceId,e.traceId=_.newBuffer(_.base64.length(t.traceId)),0):t.traceId.length>=0&&(e.traceId=t.traceId)),t.spanId!=null&&(typeof t.spanId=="string"?_.base64.decode(t.spanId,e.spanId=_.newBuffer(_.base64.length(t.spanId)),0):t.spanId.length>=0&&(e.spanId=t.spanId)),e},a.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),e.defaults){if(_.Long){var s=new _.Long(0,0,!1);n.timeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}else n.timeUnixNano=e.longs===String?"0":0;if(n.severityNumber=e.enums===String?"SEVERITY_NUMBER_UNSPECIFIED":0,n.severityText="",n.body=null,n.droppedAttributesCount=0,n.flags=0,e.bytes===String?n.traceId="":(n.traceId=[],e.bytes!==Array&&(n.traceId=_.newBuffer(n.traceId))),e.bytes===String?n.spanId="":(n.spanId=[],e.bytes!==Array&&(n.spanId=_.newBuffer(n.spanId))),_.Long){var s=new _.Long(0,0,!1);n.observedTimeUnixNano=e.longs===String?s.toString():e.longs===Number?s.toNumber():s}else n.observedTimeUnixNano=e.longs===String?"0":0}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?n.timeUnixNano=e.longs===String?String(t.timeUnixNano):t.timeUnixNano:n.timeUnixNano=e.longs===String?_.Long.prototype.toString.call(t.timeUnixNano):e.longs===Number?new _.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.severityNumber!=null&&t.hasOwnProperty("severityNumber")&&(n.severityNumber=e.enums===String?p.opentelemetry.proto.logs.v1.SeverityNumber[t.severityNumber]===void 0?t.severityNumber:p.opentelemetry.proto.logs.v1.SeverityNumber[t.severityNumber]:t.severityNumber),t.severityText!=null&&t.hasOwnProperty("severityText")&&(n.severityText=t.severityText),t.body!=null&&t.hasOwnProperty("body")&&(n.body=p.opentelemetry.proto.common.v1.AnyValue.toObject(t.body,e)),t.attributes&&t.attributes.length){n.attributes=[];for(var l=0;l<t.attributes.length;++l)n.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[l],e)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),t.flags!=null&&t.hasOwnProperty("flags")&&(n.flags=t.flags),t.traceId!=null&&t.hasOwnProperty("traceId")&&(n.traceId=e.bytes===String?_.base64.encode(t.traceId,0,t.traceId.length):e.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId),t.spanId!=null&&t.hasOwnProperty("spanId")&&(n.spanId=e.bytes===String?_.base64.encode(t.spanId,0,t.spanId.length):e.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId),t.observedTimeUnixNano!=null&&t.hasOwnProperty("observedTimeUnixNano")&&(typeof t.observedTimeUnixNano=="number"?n.observedTimeUnixNano=e.longs===String?String(t.observedTimeUnixNano):t.observedTimeUnixNano:n.observedTimeUnixNano=e.longs===String?_.Long.prototype.toString.call(t.observedTimeUnixNano):e.longs===Number?new _.LongBits(t.observedTimeUnixNano.low>>>0,t.observedTimeUnixNano.high>>>0).toNumber():t.observedTimeUnixNano),n},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.LogRecord"},a}(),c}(),i}(),r}(),o}();lL.exports=p});var Ni=S(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.getOtlpEncoder=ce.encodeAsString=ce.encodeAsLongBits=ce.toLongBits=ce.hrTimeToNanos=void 0;var mi=C();function Qs(o){let r=BigInt(1e9);return BigInt(o[0])*r+BigInt(o[1])}ce.hrTimeToNanos=Qs;function _L(o){let r=Number(BigInt.asUintN(32,o)),i=Number(BigInt.asUintN(32,o>>BigInt(32)));return{low:r,high:i}}ce.toLongBits=_L;function Zs(o){let r=Qs(o);return _L(r)}ce.encodeAsLongBits=Zs;function EL(o){return Qs(o).toString()}ce.encodeAsString=EL;var hX=typeof BigInt<"u"?EL:mi.hrTimeToNanoseconds;function pL(o){return o}function TL(o){if(o!==void 0)return(0,mi.hexToBinary)(o)}var RX={encodeHrTime:Zs,encodeSpanContext:mi.hexToBinary,encodeOptionalSpanContext:TL};function yX(o){var r,i;if(o===void 0)return RX;let c=(r=o.useLongBits)!==null&&r!==void 0?r:!0,a=(i=o.useHex)!==null&&i!==void 0?i:!1;return{encodeHrTime:c?Zs:hX,encodeSpanContext:a?pL:mi.hexToBinary,encodeOptionalSpanContext:a?pL:TL}}ce.getOtlpEncoder=yX});var hi=S(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.toAnyValue=le.toKeyValue=le.toAttributes=le.createInstrumentationScope=le.createResource=void 0;function PX(o){return{attributes:SL(o.attributes),droppedAttributesCount:0}}le.createResource=PX;function MX(o){return{name:o.name,version:o.version}}le.createInstrumentationScope=MX;function SL(o){return Object.keys(o).map(r=>ec(r,o[r]))}le.toAttributes=SL;function ec(o,r){return{key:o,value:tc(r)}}le.toKeyValue=ec;function tc(o){let r=typeof o;return r==="string"?{stringValue:o}:r==="number"?Number.isInteger(o)?{intValue:o}:{doubleValue:o}:r==="boolean"?{boolValue:o}:o instanceof Uint8Array?{bytesValue:o}:Array.isArray(o)?{arrayValue:{values:o.map(tc)}}:r==="object"&&o!=null?{kvlistValue:{values:Object.entries(o).map(([i,c])=>ec(i,c))}}:{}}le.toAnyValue=tc});var rc=S(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.toLogAttributes=or.createExportLogsServiceRequest=void 0;var gX=Ni(),Ri=hi();function LX(o,r){let i=(0,gX.getOtlpEncoder)(r);return{resourceLogs:xX(o,i)}}or.createExportLogsServiceRequest=LX;function IX(o){let r=new Map;for(let i of o){let{resource:c,instrumentationScope:{name:a,version:u="",schemaUrl:t=""}}=i,e=r.get(c);e||(e=new Map,r.set(c,e));let n=`${a}@${u}:${t}`,s=e.get(n);s||(s=[],e.set(n,s)),s.push(i)}return r}function xX(o,r){let i=IX(o);return Array.from(i,([c,a])=>({resource:(0,Ri.createResource)(c),scopeLogs:Array.from(a,([,u])=>({scope:(0,Ri.createInstrumentationScope)(u[0].instrumentationScope),logRecords:u.map(t=>CX(t,r)),schemaUrl:u[0].instrumentationScope.schemaUrl})),schemaUrl:void 0}))}function CX(o,r){var i,c,a;return{timeUnixNano:r.encodeHrTime(o.hrTime),observedTimeUnixNano:r.encodeHrTime(o.hrTimeObserved),severityNumber:o.severityNumber,severityText:o.severityText,body:(0,Ri.toAnyValue)(o.body),attributes:fL(o.attributes),droppedAttributesCount:o.droppedAttributesCount,flags:(i=o.spanContext)===null||i===void 0?void 0:i.traceFlags,traceId:r.encodeOptionalSpanContext((c=o.spanContext)===null||c===void 0?void 0:c.traceId),spanId:r.encodeOptionalSpanContext((a=o.spanContext)===null||a===void 0?void 0:a.spanId)}}function fL(o){return Object.keys(o).map(r=>(0,Ri.toKeyValue)(r,o[r]))}or.toLogAttributes=fL});var AL=S(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.ProtobufLogsSerializer=void 0;var dL=Oi(),bX=rc(),UX=dL.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,DX=dL.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;yi.ProtobufLogsSerializer={serializeRequest:o=>{let r=(0,bX.createExportLogsServiceRequest)(o);return DX.encode(r).finish()},deserializeResponse:o=>UX.decode(o)}});var vL=S(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.ProtobufLogsSerializer=void 0;var VX=AL();Object.defineProperty(Pi,"ProtobufLogsSerializer",{enumerable:!0,get:function(){return VX.ProtobufLogsSerializer}})});var nc=S(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.createExportMetricsServiceRequest=Pe.toMetric=Pe.toScopeMetrics=Pe.toResourceMetrics=void 0;var OL=(m(),h(y)),ir=ui(),wX=Ni(),Hr=hi();function NL(o,r){let i=(0,wX.getOtlpEncoder)(r);return{resource:(0,Hr.createResource)(o.resource),schemaUrl:void 0,scopeMetrics:hL(o.scopeMetrics,i)}}Pe.toResourceMetrics=NL;function hL(o,r){return Array.from(o.map(i=>({scope:(0,Hr.createInstrumentationScope)(i.scope),metrics:i.metrics.map(c=>RL(c,r)),schemaUrl:i.scope.schemaUrl})))}Pe.toScopeMetrics=hL;function RL(o,r){let i={name:o.descriptor.name,description:o.descriptor.description,unit:o.descriptor.unit},c=kX(o.aggregationTemporality);switch(o.dataPointType){case ir.DataPointType.SUM:i.sum={aggregationTemporality:c,isMonotonic:o.isMonotonic,dataPoints:mL(o,r)};break;case ir.DataPointType.GAUGE:i.gauge={dataPoints:mL(o,r)};break;case ir.DataPointType.HISTOGRAM:i.histogram={aggregationTemporality:c,dataPoints:GX(o,r)};break;case ir.DataPointType.EXPONENTIAL_HISTOGRAM:i.exponentialHistogram={aggregationTemporality:c,dataPoints:HX(o,r)};break}return i}Pe.toMetric=RL;function BX(o,r,i){let c={attributes:(0,Hr.toAttributes)(o.attributes),startTimeUnixNano:i.encodeHrTime(o.startTime),timeUnixNano:i.encodeHrTime(o.endTime)};switch(r){case OL.ValueType.INT:c.asInt=o.value;break;case OL.ValueType.DOUBLE:c.asDouble=o.value;break}return c}function mL(o,r){return o.dataPoints.map(i=>BX(i,o.descriptor.valueType,r))}function GX(o,r){return o.dataPoints.map(i=>{let c=i.value;return{attributes:(0,Hr.toAttributes)(i.attributes),bucketCounts:c.buckets.counts,explicitBounds:c.buckets.boundaries,count:c.count,sum:c.sum,min:c.min,max:c.max,startTimeUnixNano:r.encodeHrTime(i.startTime),timeUnixNano:r.encodeHrTime(i.endTime)}})}function HX(o,r){return o.dataPoints.map(i=>{let c=i.value;return{attributes:(0,Hr.toAttributes)(i.attributes),count:c.count,min:c.min,max:c.max,sum:c.sum,positive:{offset:c.positive.offset,bucketCounts:c.positive.bucketCounts},negative:{offset:c.negative.offset,bucketCounts:c.negative.bucketCounts},scale:c.scale,zeroCount:c.zeroCount,startTimeUnixNano:r.encodeHrTime(i.startTime),timeUnixNano:r.encodeHrTime(i.endTime)}})}function kX(o){switch(o){case ir.AggregationTemporality.DELTA:return 1;case ir.AggregationTemporality.CUMULATIVE:return 2}}function YX(o,r){return{resourceMetrics:o.map(i=>NL(i,r))}}Pe.createExportMetricsServiceRequest=YX});var PL=S(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});Mi.ProtobufMetricsSerializer=void 0;var yL=Oi(),FX=nc(),KX=yL.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,jX=yL.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;Mi.ProtobufMetricsSerializer={serializeRequest:o=>{let r=(0,FX.createExportMetricsServiceRequest)([o]);return jX.encode(r).finish()},deserializeResponse:o=>KX.decode(o)}});var ML=S(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.ProtobufMetricsSerializer=void 0;var qX=PL();Object.defineProperty(gi,"ProtobufMetricsSerializer",{enumerable:!0,get:function(){return qX.ProtobufMetricsSerializer}})});var oc=S(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.createExportTraceServiceRequest=Me.toOtlpSpanEvent=Me.toOtlpLink=Me.sdkSpanToOtlpSpan=void 0;var kr=hi(),WX=Ni();function gL(o,r){var i;let c=o.spanContext(),a=o.status;return{traceId:r.encodeSpanContext(c.traceId),spanId:r.encodeSpanContext(c.spanId),parentSpanId:r.encodeOptionalSpanContext(o.parentSpanId),traceState:(i=c.traceState)===null||i===void 0?void 0:i.serialize(),name:o.name,kind:o.kind==null?0:o.kind+1,startTimeUnixNano:r.encodeHrTime(o.startTime),endTimeUnixNano:r.encodeHrTime(o.endTime),attributes:(0,kr.toAttributes)(o.attributes),droppedAttributesCount:o.droppedAttributesCount,events:o.events.map(u=>IL(u,r)),droppedEventsCount:o.droppedEventsCount,status:{code:a.code,message:a.message},links:o.links.map(u=>LL(u,r)),droppedLinksCount:o.droppedLinksCount}}Me.sdkSpanToOtlpSpan=gL;function LL(o,r){var i;return{attributes:o.attributes?(0,kr.toAttributes)(o.attributes):[],spanId:r.encodeSpanContext(o.context.spanId),traceId:r.encodeSpanContext(o.context.traceId),traceState:(i=o.context.traceState)===null||i===void 0?void 0:i.serialize(),droppedAttributesCount:o.droppedAttributesCount||0}}Me.toOtlpLink=LL;function IL(o,r){return{attributes:o.attributes?(0,kr.toAttributes)(o.attributes):[],name:o.name,timeUnixNano:r.encodeHrTime(o.time),droppedAttributesCount:o.droppedAttributesCount||0}}Me.toOtlpSpanEvent=IL;function zX(o,r){let i=(0,WX.getOtlpEncoder)(r);return{resourceSpans:XX(o,i)}}Me.createExportTraceServiceRequest=zX;function JX(o){let r=new Map;for(let i of o){let c=r.get(i.resource);c||(c=new Map,r.set(i.resource,c));let a=`${i.instrumentationLibrary.name}@${i.instrumentationLibrary.version||""}:${i.instrumentationLibrary.schemaUrl||""}`,u=c.get(a);u||(u=[],c.set(a,u)),u.push(i)}return r}function XX(o,r){let i=JX(o),c=[],a=i.entries(),u=a.next();for(;!u.done;){let[t,e]=u.value,n=[],s=e.values(),l=s.next();for(;!l.done;){let O=l.value;if(O.length>0){let x=O.map(pe=>gL(pe,r));n.push({scope:(0,kr.createInstrumentationScope)(O[0].instrumentationLibrary),spans:x,schemaUrl:O[0].instrumentationLibrary.schemaUrl})}l=s.next()}let E={resource:(0,kr.createResource)(t),scopeSpans:n,schemaUrl:void 0};c.push(E),u=a.next()}return c}});var CL=S(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.ProtobufTraceSerializer=void 0;var xL=Oi(),$X=oc(),QX=xL.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,ZX=xL.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;Li.ProtobufTraceSerializer={serializeRequest:o=>{let r=(0,$X.createExportTraceServiceRequest)(o);return ZX.encode(r).finish()},deserializeResponse:o=>QX.decode(o)}});var bL=S(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.ProtobufTraceSerializer=void 0;var e5=CL();Object.defineProperty(Ii,"ProtobufTraceSerializer",{enumerable:!0,get:function(){return e5.ProtobufTraceSerializer}})});var UL=S(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});xi.JsonLogsSerializer=void 0;var t5=rc();xi.JsonLogsSerializer={serializeRequest:o=>{let r=(0,t5.createExportLogsServiceRequest)(o,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(r))},deserializeResponse:o=>{let r=new TextDecoder;return JSON.parse(r.decode(o))}}});var DL=S(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.JsonLogsSerializer=void 0;var r5=UL();Object.defineProperty(Ci,"JsonLogsSerializer",{enumerable:!0,get:function(){return r5.JsonLogsSerializer}})});var VL=S(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.JsonMetricsSerializer=void 0;var n5=nc();bi.JsonMetricsSerializer={serializeRequest:o=>{let r=(0,n5.createExportMetricsServiceRequest)([o],{useLongBits:!1});return new TextEncoder().encode(JSON.stringify(r))},deserializeResponse:o=>{let r=new TextDecoder;return JSON.parse(r.decode(o))}}});var wL=S(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.JsonMetricsSerializer=void 0;var o5=VL();Object.defineProperty(Ui,"JsonMetricsSerializer",{enumerable:!0,get:function(){return o5.JsonMetricsSerializer}})});var BL=S(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.JsonTraceSerializer=void 0;var i5=oc();Di.JsonTraceSerializer={serializeRequest:o=>{let r=(0,i5.createExportTraceServiceRequest)(o,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(r))},deserializeResponse:o=>{let r=new TextDecoder;return JSON.parse(r.decode(o))}}});var GL=S(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});Vi.JsonTraceSerializer=void 0;var a5=BL();Object.defineProperty(Vi,"JsonTraceSerializer",{enumerable:!0,get:function(){return a5.JsonTraceSerializer}})});var ic=S(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.JsonTraceSerializer=re.JsonMetricsSerializer=re.JsonLogsSerializer=re.ProtobufTraceSerializer=re.ProtobufMetricsSerializer=re.ProtobufLogsSerializer=void 0;var u5=vL();Object.defineProperty(re,"ProtobufLogsSerializer",{enumerable:!0,get:function(){return u5.ProtobufLogsSerializer}});var s5=ML();Object.defineProperty(re,"ProtobufMetricsSerializer",{enumerable:!0,get:function(){return s5.ProtobufMetricsSerializer}});var c5=bL();Object.defineProperty(re,"ProtobufTraceSerializer",{enumerable:!0,get:function(){return c5.ProtobufTraceSerializer}});var l5=DL();Object.defineProperty(re,"JsonLogsSerializer",{enumerable:!0,get:function(){return l5.JsonLogsSerializer}});var p5=wL();Object.defineProperty(re,"JsonMetricsSerializer",{enumerable:!0,get:function(){return p5.JsonMetricsSerializer}});var _5=GL();Object.defineProperty(re,"JsonTraceSerializer",{enumerable:!0,get:function(){return _5.JsonTraceSerializer}})});function HL(o){var r=[429,502,503,504];return r.includes(o)}function kL(o){if(o!=null){var r=Number.parseInt(o,10);if(Number.isInteger(r))return r>0?r*1e3:-1;var i=new Date(o).getTime()-Date.now();return i>=0?i:0}}var YL=d(()=>{});var qL={};ft(qL,{compressAndSend:()=>jL,createHttpAgent:()=>S5,sendWithHttp:()=>E5});function E5(o,r,i,c,a){var u=new URL(o.url),t=Number(process.versions.node.split(".")[0]),e={hostname:u.hostname,port:u.port,path:u.pathname,method:"POST",headers:ac({},o.headers()),agent:r},n=u.protocol==="http:"?wi.request:Bi.request,s=n(e,function(E){var O=[];E.on("data",function(x){return O.push(x)}),E.on("end",function(){if(E.statusCode&&E.statusCode<299)c({status:"success",data:Buffer.concat(O)});else if(E.statusCode&&HL(E.statusCode))c({status:"retryable",retryInMillis:kL(E.headers["retry-after"])});else{var x=new ct(E.statusMessage,E.statusCode,Buffer.concat(O).toString());c({status:"failure",error:x})}})});s.setTimeout(a,function(){s.destroy(),c({status:"failure",error:new Error("Request Timeout")})}),s.on("error",function(E){c({status:"failure",error:E})});var l=t>=14?"close":"abort";s.on(l,function(){c({status:"failure",error:new Error("Request timed out")})}),jL(s,o.compression,i,function(E){c({status:"failure",error:E})})}function jL(o,r,i,c){var a=T5(i);r==="gzip"&&(o.setHeader("Content-Encoding","gzip"),a=a.on("error",c).pipe(FL.createGzip()).on("error",c)),a.pipe(o).on("error",c)}function T5(o){var r=new KL.Readable;return r.push(o),r.push(null),r}function S5(o,r){var i=new URL(o),c=i.protocol==="http:"?wi.Agent:Bi.Agent;return new c(r)}var wi,Bi,FL,KL,ac,WL=d(()=>{wi=Ae(require("http")),Bi=Ae(require("https")),FL=Ae(require("zlib")),KL=require("stream");YL();si();ac=function(){return ac=Object.assign||function(o){for(var r,i=1,c=arguments.length;i<c;i++){r=arguments[i];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(o[a]=r[a])}return o},ac.apply(this,arguments)}});function zL(o){return new A5(o)}var f5,d5,A5,JL=d(()=>{f5=function(o,r,i,c){function a(u){return u instanceof i?u:new i(function(t){t(u)})}return new(i||(i=Promise))(function(u,t){function e(l){try{s(c.next(l))}catch(E){t(E)}}function n(l){try{s(c.throw(l))}catch(E){t(E)}}function s(l){l.done?u(l.value):a(l.value).then(e,n)}s((c=c.apply(o,r||[])).next())})},d5=function(o,r){var i={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},c,a,u,t;return t={next:e(0),throw:e(1),return:e(2)},typeof Symbol=="function"&&(t[Symbol.iterator]=function(){return this}),t;function e(s){return function(l){return n([s,l])}}function n(s){if(c)throw new TypeError("Generator is already executing.");for(;i;)try{if(c=1,a&&(u=s[0]&2?a.return:s[0]?a.throw||((u=a.return)&&u.call(a),0):a.next)&&!(u=u.call(a,s[1])).done)return u;switch(a=0,u&&(s=[s[0]&2,u.value]),s[0]){case 0:case 1:u=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,a=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(u=i.trys,!(u=u.length>0&&u[u.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!u||s[1]>u[0]&&s[1]<u[3])){i.label=s[1];break}if(s[0]===6&&i.label<u[1]){i.label=u[1],u=s;break}if(u&&i.label<u[2]){i.label=u[2],i.ops.push(s);break}u[2]&&i.ops.pop(),i.trys.pop();continue}s=r.call(o,i)}catch(l){s=[6,l],a=0}finally{c=u=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},A5=function(){function o(r){this._parameters=r,this._send=null,this._agent=null}return o.prototype.send=function(r,i){return f5(this,void 0,void 0,function(){var c,a,u,t=this;return d5(this,function(e){return this._send==null&&(c=(WL(),h(qL)),a=c.sendWithHttp,u=c.createHttpAgent,this._agent=u(this._parameters.url,this._parameters.agentOptions),this._send=a),[2,new Promise(function(n){var s;(s=t._send)===null||s===void 0||s.call(t,t._parameters,t._agent,r,function(l){n(l)},i)})]})})},o.prototype.shutdown=function(){},o}()});function y5(){return Math.random()*(2*XL)-XL}function $L(o){return new P5(o.transport)}var v5,O5,m5,N5,h5,R5,XL,P5,QL=d(()=>{v5=function(o,r,i,c){function a(u){return u instanceof i?u:new i(function(t){t(u)})}return new(i||(i=Promise))(function(u,t){function e(l){try{s(c.next(l))}catch(E){t(E)}}function n(l){try{s(c.throw(l))}catch(E){t(E)}}function s(l){l.done?u(l.value):a(l.value).then(e,n)}s((c=c.apply(o,r||[])).next())})},O5=function(o,r){var i={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},c,a,u,t;return t={next:e(0),throw:e(1),return:e(2)},typeof Symbol=="function"&&(t[Symbol.iterator]=function(){return this}),t;function e(s){return function(l){return n([s,l])}}function n(s){if(c)throw new TypeError("Generator is already executing.");for(;i;)try{if(c=1,a&&(u=s[0]&2?a.return:s[0]?a.throw||((u=a.return)&&u.call(a),0):a.next)&&!(u=u.call(a,s[1])).done)return u;switch(a=0,u&&(s=[s[0]&2,u.value]),s[0]){case 0:case 1:u=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,a=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(u=i.trys,!(u=u.length>0&&u[u.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!u||s[1]>u[0]&&s[1]<u[3])){i.label=s[1];break}if(s[0]===6&&i.label<u[1]){i.label=u[1],u=s;break}if(u&&i.label<u[2]){i.label=u[2],i.ops.push(s);break}u[2]&&i.ops.pop(),i.trys.pop();continue}s=r.call(o,i)}catch(l){s=[6,l],a=0}finally{c=u=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},m5=5,N5=1e3,h5=5e3,R5=1.5,XL=.2;P5=function(){function o(r){this._transport=r}return o.prototype.retry=function(r,i,c){var a=this;return new Promise(function(u,t){setTimeout(function(){a._transport.send(r,i).then(u,t)},c)})},o.prototype.send=function(r,i){var c;return v5(this,void 0,void 0,function(){var a,u,t,e,n,s,l;return O5(this,function(E){switch(E.label){case 0:return a=Date.now()+i,[4,this._transport.send(r,i)];case 1:u=E.sent(),t=m5,e=N5,E.label=2;case 2:return u.status==="retryable"&&t>0?(t--,n=Math.max(Math.min(e,h5)+y5(),0),e=e*R5,s=(c=u.retryInMillis)!==null&&c!==void 0?c:n,l=a-Date.now(),s>l?[2,u]:[4,this.retry(r,l,s)]):[3,4];case 3:return u=E.sent(),[3,2];case 4:return[2,u]}})})},o.prototype.shutdown=function(){return this._transport.shutdown()},o}()});function ZL(o,r){return Ti({transport:$L({transport:zL(o)}),serializer:r,promiseHandler:Ei(o)},{timeout:o.timeoutMillis})}var eI=d(()=>{Vs();JL();Ds();QL()});function tI(o){var r,i=(r=__fromEnv[o])===null||r===void 0?void 0:r.trim();if(i!=null&&i!==""){var c=Number(i);if(!Number.isNaN(c)&&Number.isFinite(c)&&c>0)return c;H.warn("Configuration: "+o+" is invalid, expected number greater than 0 (actual: "+i+")")}}function M5(o){var r=tI("OTEL_EXPORTER_OTLP_"+o+"_TIMEOUT"),i=tI("OTEL_EXPORTER_OTLP_TIMEOUT");return r??i}function rI(o){var r,i=(r=__fromEnv[o])===null||r===void 0?void 0:r.trim();if(i!==""){if(i==null||i==="none"||i==="gzip")return i;H.warn("Configuration: "+o+" is invalid, expected 'none' or 'gzip' (actual: '"+i+"')")}}function g5(o){var r=rI("OTEL_EXPORTER_OTLP_"+o+"_COMPRESSION"),i=rI("OTEL_EXPORTER_OTLP_COMPRESSION");return r??i}function Gi(o){return{timeoutMillis:M5(o),compression:g5(o)}}var uc=d(()=>{m()});function nI(o){return function(){var r,i={};return Object.entries((r=o?.())!==null&&r!==void 0?r:{}).forEach(function(c){var a=L5(c,2),u=a[0],t=a[1];typeof t<"u"?i[u]=String(t):H.warn('Header "'+u+'" has invalid value ('+t+") and will be ignored")}),i}}var L5,oI=d(()=>{m();L5=function(o,r){var i=typeof Symbol=="function"&&o[Symbol.iterator];if(!i)return o;var c=i.call(o),a,u=[],t;try{for(;(r===void 0||r-- >0)&&!(a=c.next()).done;)u.push(a.value)}catch(e){t={error:e}}finally{try{a&&!a.done&&(i=c.return)&&i.call(c)}finally{if(t)throw t.error}}return u}});function I5(o,r,i){var c=_t({},i()),a={};return function(){return r!=null&&Object.assign(a,r()),o!=null&&Object.assign(a,o()),Object.assign(a,c)}}function x5(o){if(o!=null)try{return new URL(o),o}catch{throw new Error("Configuration: Could not parse user-provided export URL: '"+o+"'")}}function iI(o,r,i){var c,a,u,t;return _t(_t({},li(o,r,i)),{headers:I5(nI(o.headers),r.headers,i.headers),url:(a=(c=x5(o.url))!==null&&c!==void 0?c:r.url)!==null&&a!==void 0?a:i.url,agentOptions:(t=(u=o.agentOptions)!==null&&u!==void 0?u:r.agentOptions)!==null&&t!==void 0?t:i.agentOptions})}function aI(o,r){return _t(_t({},pi()),{headers:function(){return o},url:"http://localhost:4318/"+r,agentOptions:{keepAlive:!0}})}var _t,uI=d(()=>{Vr();oI();_t=function(){return _t=Object.assign||function(o){for(var r,i=1,c=arguments.length;i<c;i++){r=arguments[i];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(o[a]=r[a])}return o},_t.apply(this,arguments)}});function C5(o){var r,i,c=(r=__fromEnv["OTEL_EXPORTER_OTLP_"+o+"_HEADERS"])===null||r===void 0?void 0:r.trim(),a=(i=__fromEnv.OTEL_EXPORTER_OTLP_HEADERS)===null||i===void 0?void 0:i.trim(),u=Yr.baggageUtils.parseKeyPairsIntoRecord(c),t=Yr.baggageUtils.parseKeyPairsIntoRecord(a);if(!(Object.keys(u).length===0&&Object.keys(t).length===0))return Object.assign({},Yr.baggageUtils.parseKeyPairsIntoRecord(a),Yr.baggageUtils.parseKeyPairsIntoRecord(c))}function b5(o){try{var r=new URL(o);return r.toString()}catch{H.warn("Configuration: Could not parse environment-provided export URL: '"+o+"', falling back to undefined");return}}function U5(o,r){try{new URL(o)}catch{H.warn("Configuration: Could not parse environment-provided export URL: '"+o+"', falling back to undefined");return}o.endsWith("/")||(o=o+"/"),o+=r;try{new URL(o)}catch{H.warn("Configuration: Provided URL appended with '"+r+"' is not a valid URL, using 'undefined' instead of '"+o+"'");return}return o}function D5(o){var r,i=(r=__fromEnv.OTEL_EXPORTER_OTLP_ENDPOINT)===null||r===void 0?void 0:r.trim();if(!(i==null||i===""))return U5(i,o)}function V5(o){var r,i=(r=__fromEnv["OTEL_EXPORTER_OTLP_"+o+"_ENDPOINT"])===null||r===void 0?void 0:r.trim();if(!(i==null||i===""))return b5(i)}function sI(o,r){var i;return Hi(Hi({},Gi(o)),{url:(i=V5(o))!==null&&i!==void 0?i:D5(r),headers:ci(C5(o))})}var Yr,Hi,cI=d(()=>{Yr=Ae(C());m();uc();Vr();Hi=function(){return Hi=Object.assign||function(o){for(var r,i=1,c=arguments.length;i<c;i++){r=arguments[i];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(o[a]=r[a])}return o},Hi.apply(this,arguments)}});function w5(o){return o?.keepAlive!=null&&(o.httpAgentOptions!=null?o.httpAgentOptions.keepAlive==null&&(o.httpAgentOptions.keepAlive=o.keepAlive):o.httpAgentOptions={keepAlive:o.keepAlive}),o.httpAgentOptions}function lI(o,r,i,c){return o.metadata&&H.warn("Metadata cannot be set when using http"),iI({url:o.url,headers:ci(o.headers),concurrencyLimit:o.concurrencyLimit,timeoutMillis:o.timeoutMillis,compression:o.compression,agentOptions:w5(o)},sI(r,i),aI(c,i))}var pI=d(()=>{uI();cI();m();Vr()});var sc={};ft(sc,{convertLegacyHttpOptions:()=>lI,createOtlpHttpExportDelegate:()=>ZL,getSharedConfigurationFromEnvironment:()=>Gi});var cc=d(()=>{eI();uc();pI()});var EI=S(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.OTLPTraceExporter=void 0;var B5=(Bs(),h(ws)),G5=pg(),H5=ic(),_I=(cc(),h(sc)),lc=class extends B5.OTLPExporterBase{constructor(r={}){super((0,_I.createOtlpHttpExportDelegate)((0,_I.convertLegacyHttpOptions)(r,"TRACES","v1/traces",{"User-Agent":`OTel-OTLP-Exporter-JavaScript/${G5.VERSION}`,"Content-Type":"application/json"}),H5.JsonTraceSerializer))}};ki.OTLPTraceExporter=lc});var TI=S(Et=>{"use strict";var k5=Et&&Et.__createBinding||(Object.create?function(o,r,i,c){c===void 0&&(c=i),Object.defineProperty(o,c,{enumerable:!0,get:function(){return r[i]}})}:function(o,r,i,c){c===void 0&&(c=i),o[c]=r[i]}),Y5=Et&&Et.__exportStar||function(o,r){for(var i in o)i!=="default"&&!Object.prototype.hasOwnProperty.call(r,i)&&k5(r,o,i)};Object.defineProperty(Et,"__esModule",{value:!0});Y5(EI(),Et)});var SI=S(Tt=>{"use strict";var F5=Tt&&Tt.__createBinding||(Object.create?function(o,r,i,c){c===void 0&&(c=i),Object.defineProperty(o,c,{enumerable:!0,get:function(){return r[i]}})}:function(o,r,i,c){c===void 0&&(c=i),o[c]=r[i]}),K5=Tt&&Tt.__exportStar||function(o,r){for(var i in o)i!=="default"&&!Object.prototype.hasOwnProperty.call(r,i)&&F5(r,o,i)};Object.defineProperty(Tt,"__esModule",{value:!0});K5(TI(),Tt)});var fI=S(St=>{"use strict";var j5=St&&St.__createBinding||(Object.create?function(o,r,i,c){c===void 0&&(c=i),Object.defineProperty(o,c,{enumerable:!0,get:function(){return r[i]}})}:function(o,r,i,c){c===void 0&&(c=i),o[c]=r[i]}),q5=St&&St.__exportStar||function(o,r){for(var i in o)i!=="default"&&!Object.prototype.hasOwnProperty.call(r,i)&&j5(r,o,i)};Object.defineProperty(St,"__esModule",{value:!0});q5(SI(),St)});var pc=S(Fr=>{"use strict";Object.defineProperty(Fr,"__esModule",{value:!0});Fr.AggregationTemporalityPreference=void 0;var W5;(function(o){o[o.DELTA=0]="DELTA",o[o.CUMULATIVE=1]="CUMULATIVE",o[o.LOWMEMORY=2]="LOWMEMORY"})(W5=Fr.AggregationTemporalityPreference||(Fr.AggregationTemporalityPreference={}))});var Ec=S(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.OTLPMetricExporterBase=W.LowMemoryTemporalitySelector=W.DeltaTemporalitySelector=W.CumulativeTemporalitySelector=void 0;var z5=C(),G=ui(),dI=pc(),J5=(Bs(),h(ws)),X5=(m(),h(y)),$5=()=>G.AggregationTemporality.CUMULATIVE;W.CumulativeTemporalitySelector=$5;var Q5=o=>{switch(o){case G.InstrumentType.COUNTER:case G.InstrumentType.OBSERVABLE_COUNTER:case G.InstrumentType.GAUGE:case G.InstrumentType.HISTOGRAM:case G.InstrumentType.OBSERVABLE_GAUGE:return G.AggregationTemporality.DELTA;case G.InstrumentType.UP_DOWN_COUNTER:case G.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:return G.AggregationTemporality.CUMULATIVE}};W.DeltaTemporalitySelector=Q5;var Z5=o=>{switch(o){case G.InstrumentType.COUNTER:case G.InstrumentType.HISTOGRAM:return G.AggregationTemporality.DELTA;case G.InstrumentType.GAUGE:case G.InstrumentType.UP_DOWN_COUNTER:case G.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:case G.InstrumentType.OBSERVABLE_COUNTER:case G.InstrumentType.OBSERVABLE_GAUGE:return G.AggregationTemporality.CUMULATIVE}};W.LowMemoryTemporalitySelector=Z5;function e$(){let o=(0,z5.getEnv)(),r=o.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return r==="cumulative"?W.CumulativeTemporalitySelector:r==="delta"?W.DeltaTemporalitySelector:r==="lowmemory"?W.LowMemoryTemporalitySelector:(X5.diag.warn(`OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '${o.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE}', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead.`),W.CumulativeTemporalitySelector)}function t$(o){return o!=null?o===dI.AggregationTemporalityPreference.DELTA?W.DeltaTemporalitySelector:o===dI.AggregationTemporalityPreference.LOWMEMORY?W.LowMemoryTemporalitySelector:W.CumulativeTemporalitySelector:e$()}function r$(o){return o?.aggregationPreference?o.aggregationPreference:r=>G.Aggregation.Default()}var _c=class extends J5.OTLPExporterBase{constructor(r,i){super(r),this._aggregationSelector=r$(i),this._aggregationTemporalitySelector=t$(i?.temporalityPreference)}selectAggregation(r){return this._aggregationSelector(r)}selectAggregationTemporality(r){return this._aggregationTemporalitySelector(r)}};W.OTLPMetricExporterBase=_c});var AI=S(Yi=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.VERSION=void 0;Yi.VERSION="0.57.2"});var OI=S(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.OTLPMetricExporter=void 0;var n$=Ec(),o$=ic(),i$=AI(),vI=(cc(),h(sc)),a$={"User-Agent":`OTel-OTLP-Exporter-JavaScript/${i$.VERSION}`},Tc=class extends n$.OTLPMetricExporterBase{constructor(r){super((0,vI.createOtlpHttpExportDelegate)((0,vI.convertLegacyHttpOptions)(r??{},"METRICS","v1/metrics",Object.assign(Object.assign({},a$),{"Content-Type":"application/json"})),o$.JsonMetricsSerializer),r)}};Fi.OTLPMetricExporter=Tc});var mI=S(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.OTLPMetricExporter=void 0;var u$=OI();Object.defineProperty(Ki,"OTLPMetricExporter",{enumerable:!0,get:function(){return u$.OTLPMetricExporter}})});var NI=S(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.OTLPMetricExporter=void 0;var s$=mI();Object.defineProperty(ji,"OTLPMetricExporter",{enumerable:!0,get:function(){return s$.OTLPMetricExporter}})});var hI=S(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.OTLPMetricExporterBase=ne.LowMemoryTemporalitySelector=ne.DeltaTemporalitySelector=ne.CumulativeTemporalitySelector=ne.AggregationTemporalityPreference=ne.OTLPMetricExporter=void 0;var c$=NI();Object.defineProperty(ne,"OTLPMetricExporter",{enumerable:!0,get:function(){return c$.OTLPMetricExporter}});var l$=pc();Object.defineProperty(ne,"AggregationTemporalityPreference",{enumerable:!0,get:function(){return l$.AggregationTemporalityPreference}});var qi=Ec();Object.defineProperty(ne,"CumulativeTemporalitySelector",{enumerable:!0,get:function(){return qi.CumulativeTemporalitySelector}});Object.defineProperty(ne,"DeltaTemporalitySelector",{enumerable:!0,get:function(){return qi.DeltaTemporalitySelector}});Object.defineProperty(ne,"LowMemoryTemporalitySelector",{enumerable:!0,get:function(){return qi.LowMemoryTemporalitySelector}});Object.defineProperty(ne,"OTLPMetricExporterBase",{enumerable:!0,get:function(){return qi.OTLPMetricExporterBase}})});var Jr={REQUEST:"openclaw.request",AGENT_TURN:"openclaw.agent.turn",TOOL_PREFIX:"tool.",MESSAGE_RECEIVED:"openclaw.message.received"},ve={LLM_REQUESTS:"openclaw.llm.requests",LLM_TOKENS_INPUT:"openclaw.llm.tokens.input",LLM_TOKENS_OUTPUT:"openclaw.llm.tokens.output",LLM_TOKENS_CACHE_READ:"openclaw.llm.tokens.cache_read",LLM_DURATION:"openclaw.llm.duration",TOOL_CALLS:"openclaw.tool.calls",TOOL_ERRORS:"openclaw.tool.errors",TOOL_DURATION:"openclaw.tool.duration",MESSAGES_RECEIVED:"openclaw.messages.received",ESTIMATED_COST_USD:"openclaw.estimated_cost.usd"},w={SESSION_KEY:"openclaw.session.key",CHANNEL:"openclaw.message.channel",MODEL:"gen_ai.request.model",PROVIDER:"gen_ai.system",INPUT_TOKENS:"gen_ai.usage.input_tokens",OUTPUT_TOKENS:"gen_ai.usage.output_tokens",CACHE_READ_TOKENS:"gen_ai.usage.cache_read.input_tokens",CACHE_WRITE_TOKENS:"gen_ai.usage.cache_write.input_tokens",TOOL_NAME:"tool.name",TOOL_SUCCESS:"tool.success",AGENT_NAME:"openclaw.agent.name"},Xi={API_KEY:"MANIFEST_API_KEY",ENDPOINT:"MANIFEST_ENDPOINT"},Xr={ENDPOINT:"https://app.manifest.build/otlp",SERVICE_NAME:"openclaw-gateway",METRICS_INTERVAL_MS:3e4};function vc(o){let r=o&&typeof o=="object"&&!Array.isArray(o)?o:{};r.config&&typeof r.config=="object"&&!Array.isArray(r.config)&&(r=r.config);let i=typeof r.apiKey=="string"&&r.apiKey.length>0?r.apiKey:__fromEnv[Xi.API_KEY]||"",c=__fromEnv[Xi.ENDPOINT],a=typeof r.endpoint=="string"&&r.endpoint.length>0?r.endpoint:c&&c.length>0?c:Xr.ENDPOINT,u=typeof r.serviceName=="string"&&r.serviceName.length>0?r.serviceName:Xr.SERVICE_NAME,t=typeof r.captureContent=="boolean"?r.captureContent:!1,e=typeof r.metricsIntervalMs=="number"&&r.metricsIntervalMs>=5e3?r.metricsIntervalMs:Xr.METRICS_INTERVAL_MS;return{apiKey:i,endpoint:a,serviceName:u,captureContent:t,metricsIntervalMs:e}}function Oc(o){return o.apiKey?o.apiKey.startsWith("osk_")?o.endpoint.startsWith("http")?null:`Invalid endpoint URL '${o.endpoint}'. Must start with http:// or https://. Fix it via:
16
+ openclaw config set plugins.entries.manifest.config.endpoint https://app.manifest.build/otlp`:`Invalid apiKey format '${o.apiKey.slice(0,8)}\u2026'. Keys must start with 'osk_'. Fix it via:
17
17
  openclaw config set manifest.apiKey osk_YOUR_KEY`:`Missing apiKey. Set it via:
18
18
  openclaw config set manifest.apiKey osk_YOUR_KEY
19
- or export MANIFEST_API_KEY=osk_YOUR_KEY`}var Wi=Ae(JP()),zi=Ae(ui()),RI=Ae(fI()),yI=Ae(hI()),PI=Ae(co());m();var Kr=null,jr=null,Sc=null,fc=null;function MI(o,r){let i=new PI.Resource({"service.name":o.serviceName,"service.version":"5.1.3","manifest.plugin":"true"}),c={Authorization:`Bearer ${o.apiKey}`},a=new RI.OTLPTraceExporter({url:`${o.endpoint}/v1/traces`,headers:c});Kr=new Wi.BasicTracerProvider({resource:i,spanProcessors:[new Wi.BatchSpanProcessor(a,{scheduledDelayMillis:5e3,maxQueueSize:2048,maxExportBatchSize:512})]}),Kr.register(),r.info(`[manifest] Trace exporter -> ${o.endpoint}/v1/traces`);let u=new yI.OTLPMetricExporter({url:`${o.endpoint}/v1/metrics`,headers:c});return jr=new zi.MeterProvider({resource:i,readers:[new zi.PeriodicExportingMetricReader({exporter:u,exportIntervalMillis:o.metricsIntervalMs})]}),mt.setGlobalMeterProvider(jr),r.info(`[manifest] Metrics exporter -> ${o.endpoint}/v1/metrics (interval=${o.metricsIntervalMs}ms)`),Sc=we.getTracer("manifest-plugin","5.1.3"),fc=mt.getMeter("manifest-plugin","5.1.3"),{tracer:Sc,meter:fc}}async function gI(o){o.info("[manifest] Shutting down telemetry..."),Kr&&(await Kr.shutdown(),Kr=null),jr&&(await jr.shutdown(),jr=null),Sc=null,fc=null,o.info("[manifest] Telemetry shut down")}m();var ar=new Map,LI,II,xI,CI,p$,bI,UI,DI,VI;function wI(o){LI=o.createCounter(ve.LLM_REQUESTS,{description:"Total LLM inference requests"}),II=o.createCounter(ve.LLM_TOKENS_INPUT,{description:"Total input tokens sent to LLM"}),xI=o.createCounter(ve.LLM_TOKENS_OUTPUT,{description:"Total output tokens from LLM"}),CI=o.createCounter(ve.LLM_TOKENS_CACHE_READ,{description:"Total cache-read tokens"}),p$=o.createHistogram(ve.LLM_DURATION,{description:"LLM request duration in ms",unit:"ms"}),bI=o.createCounter(ve.TOOL_CALLS,{description:"Total tool invocations"}),UI=o.createCounter(ve.TOOL_ERRORS,{description:"Total tool errors"}),DI=o.createHistogram(ve.TOOL_DURATION,{description:"Tool execution duration in ms",unit:"ms"}),VI=o.createCounter(ve.MESSAGES_RECEIVED,{description:"Total messages received from users"})}function BI(o,r,i,c){o.on("message_received",a=>{let u=a.sessionKey||a.session?.key||`agent:${a.agent||"main"}:main`,t=a.channel||"unknown",e=r.startSpan(Jr.REQUEST,{kind:De.SERVER,attributes:{[w.SESSION_KEY]:u,[w.CHANNEL]:t}});ar.set(u,{root:e}),VI.add(1,{[w.CHANNEL]:t}),c.debug(`[manifest] Root span started for session=${u}`)}),o.on("before_agent_start",a=>{let u=a.sessionKey||a.session?.key||`agent:${a.agent||"main"}:main`,t=a.agent||"main",e=ar.get(u),n=e?.root?we.setSpan(Ve.active(),e.root):Ve.active(),s=r.startSpan(Jr.AGENT_TURN,{kind:De.INTERNAL,attributes:{[w.AGENT_NAME]:t,[w.SESSION_KEY]:u}},n);e?e.turn=s:ar.set(u,{root:s,turn:s}),c.debug(`[manifest] Agent turn started: agent=${t}, session=${u}`)}),o.on("tool_result_persist",a=>{let u=a.toolName||a.tool||"unknown",t=a.durationMs||0,e=a.error==null,n=a.sessionKey||"unknown",s=ar.get(n),l=s?.turn?we.setSpan(Ve.active(),s.turn):Ve.active(),E=r.startSpan(`${Jr.TOOL_PREFIX}${u}`,{kind:De.INTERNAL,attributes:{[w.TOOL_NAME]:u,[w.TOOL_SUCCESS]:String(e),[w.SESSION_KEY]:n}},l);e||(E.setStatus({code:Ot.ERROR,message:a.error?.message||"Tool execution failed"}),UI.add(1,{[w.TOOL_NAME]:u})),E.end(),bI.add(1,{[w.TOOL_NAME]:u}),DI.record(t,{[w.TOOL_NAME]:u})}),o.on("agent_end",a=>{let u=a.sessionKey||a.session?.key||`agent:${a.agent||"main"}:main`,e=[...a.messages||[]].reverse().find(qr=>qr.role==="assistant"&&qr.usage),n=e?.model||a.model||"unknown",s=e?.provider||a.provider||"unknown",l=e?.usage||a.usage||{},E=l.input||l.inputTokens||0,O=l.output||l.outputTokens||0,x=l.cacheRead||l.cacheReadTokens||0,pe=l.cacheWrite||l.cacheWriteTokens||0,de=ar.get(u);de?.turn&&(de.turn.setAttributes({[w.MODEL]:n,[w.PROVIDER]:s,[w.INPUT_TOKENS]:E,[w.OUTPUT_TOKENS]:O,[w.CACHE_READ_TOKENS]:x,[w.CACHE_WRITE_TOKENS]:pe}),de.turn.end()),de?.root&&de.root!==de.turn&&de.root.end(),ar.delete(u);let ge={[w.MODEL]:n,[w.PROVIDER]:s};LI.add(1,ge),II.add(E,ge),xI.add(O,ge),x>0&&CI.add(x,ge),c.debug(`[manifest] agent_end tokens: in=${E}, out=${O}, cache=${x}`),c.debug(`[manifest] Trace completed for session=${u}`)}),c.info("[manifest] All hooks registered")}async function Ji(o){let r=o.endpoint.replace(/\/otlp(\/v1)?\/?$/,""),i={endpointReachable:!1,authValid:!1,agentName:null,error:null};try{let c=await fetch(`${r}/api/v1/health`,{signal:AbortSignal.timeout(5e3)});if(!c.ok)return i.error=`Health endpoint returned ${c.status}`,i;i.endpointReachable=!0}catch(c){let a=c instanceof Error?c.message:String(c);return i.error=`Cannot reach endpoint: ${a}`,i}try{let c=await fetch(`${r}/api/v1/agent/usage?range=24h`,{headers:{Authorization:`Bearer ${o.apiKey}`},signal:AbortSignal.timeout(5e3)});if(c.status===401||c.status===403)return i.error="API key rejected \u2014 check your osk_ key is correct",i;if(!c.ok)return i.error=`Usage endpoint returned ${c.status}`,i;i.authValid=!0;let a=await c.json();a&&typeof a.agentName=="string"&&(i.agentName=a.agentName)}catch(c){let a=c instanceof Error?c.message:String(c);return i.error=`Auth check failed: ${a}`,i}return i}var GI={today:"24h",week:"7d",month:"30d"};async function HI(o,r,i,c){let a=`${o}${r}`;try{let u=await fetch(a,{headers:{Authorization:`Bearer ${i}`}});return u.ok?{result:await u.json()}:{error:`API returned ${u.status}`}}catch(u){let t=u instanceof Error?u.message:String(u);return c.error(`[manifest] API call failed: ${t}`),{error:t}}}function kI(o,r,i){let c=r.endpoint.replace(/\/otlp(\/v1)?\/?$/,"");o.registerTool({name:"manifest_usage",description:"Get token consumption for this agent: total, input, output, cache-read tokens, and action count. Use when the user asks about token usage or consumption.",parameters:{type:"object",properties:{period:{type:"string",enum:["today","week","month"],default:"today",description:"Time period"}}},handler:async a=>{let u=GI[a.period||"today"]||"24h";return HI(c,`/api/v1/agent/usage?range=${u}`,r.apiKey,i)}}),o.registerTool({name:"manifest_costs",description:"Get cost breakdown for this agent in USD, grouped by model. Use when the user asks about costs, spending, or money burned.",parameters:{type:"object",properties:{period:{type:"string",enum:["today","week","month"],default:"week",description:"Time period"}}},handler:async a=>{let u=GI[a.period||"week"]||"7d";return HI(c,`/api/v1/agent/costs?range=${u}`,r.apiKey,i)}}),o.registerTool({name:"manifest_health",description:"Check whether Manifest observability is connected and working. Use when the user asks if monitoring is set up or wants a connectivity test.",parameters:{type:"object",properties:{}},handler:async()=>{let a=await Ji(r);return a.error?{error:a.error}:{result:{endpointReachable:a.endpointReachable,authValid:a.authValid,agentName:a.agentName,status:"ok"}}}}),i.info("[manifest] Registered agent tools: manifest_usage, manifest_costs, manifest_health")}module.exports={id:"manifest",name:"Manifest \u2014 Agent Observability",register(o){let r=o.logger||{info:(...e)=>console.log(...e),debug:()=>{},error:(...e)=>console.error(...e),warn:(...e)=>console.warn(...e)},i=vc(o.pluginConfig),c=Oc(i);if(c){i.apiKey?r.error(`[manifest] Configuration error:
19
+ or export MANIFEST_API_KEY=osk_YOUR_KEY`}var Wi=Ae(JP()),zi=Ae(ui()),RI=Ae(fI()),yI=Ae(hI()),PI=Ae(co());m();var Kr=null,jr=null,Sc=null,fc=null;function MI(o,r){let i=new PI.Resource({"service.name":o.serviceName,"service.version":"5.1.4","manifest.plugin":"true"}),c={Authorization:`Bearer ${o.apiKey}`},a=new RI.OTLPTraceExporter({url:`${o.endpoint}/v1/traces`,headers:c});Kr=new Wi.BasicTracerProvider({resource:i,spanProcessors:[new Wi.BatchSpanProcessor(a,{scheduledDelayMillis:5e3,maxQueueSize:2048,maxExportBatchSize:512})]}),Kr.register(),r.info(`[manifest] Trace exporter -> ${o.endpoint}/v1/traces`);let u=new yI.OTLPMetricExporter({url:`${o.endpoint}/v1/metrics`,headers:c});return jr=new zi.MeterProvider({resource:i,readers:[new zi.PeriodicExportingMetricReader({exporter:u,exportIntervalMillis:o.metricsIntervalMs})]}),mt.setGlobalMeterProvider(jr),r.info(`[manifest] Metrics exporter -> ${o.endpoint}/v1/metrics (interval=${o.metricsIntervalMs}ms)`),Sc=we.getTracer("manifest-plugin","5.1.4"),fc=mt.getMeter("manifest-plugin","5.1.4"),{tracer:Sc,meter:fc}}async function gI(o){o.info("[manifest] Shutting down telemetry..."),Kr&&(await Kr.shutdown(),Kr=null),jr&&(await jr.shutdown(),jr=null),Sc=null,fc=null,o.info("[manifest] Telemetry shut down")}m();var ar=new Map,LI,II,xI,CI,p$,bI,UI,DI,VI;function wI(o){LI=o.createCounter(ve.LLM_REQUESTS,{description:"Total LLM inference requests"}),II=o.createCounter(ve.LLM_TOKENS_INPUT,{description:"Total input tokens sent to LLM"}),xI=o.createCounter(ve.LLM_TOKENS_OUTPUT,{description:"Total output tokens from LLM"}),CI=o.createCounter(ve.LLM_TOKENS_CACHE_READ,{description:"Total cache-read tokens"}),p$=o.createHistogram(ve.LLM_DURATION,{description:"LLM request duration in ms",unit:"ms"}),bI=o.createCounter(ve.TOOL_CALLS,{description:"Total tool invocations"}),UI=o.createCounter(ve.TOOL_ERRORS,{description:"Total tool errors"}),DI=o.createHistogram(ve.TOOL_DURATION,{description:"Tool execution duration in ms",unit:"ms"}),VI=o.createCounter(ve.MESSAGES_RECEIVED,{description:"Total messages received from users"})}function BI(o,r,i,c){o.on("message_received",a=>{let u=a.sessionKey||a.session?.key||`agent:${a.agent||"main"}:main`,t=a.channel||"unknown",e=r.startSpan(Jr.REQUEST,{kind:De.SERVER,attributes:{[w.SESSION_KEY]:u,[w.CHANNEL]:t}});ar.set(u,{root:e}),VI.add(1,{[w.CHANNEL]:t}),c.debug(`[manifest] Root span started for session=${u}`)}),o.on("before_agent_start",a=>{let u=a.sessionKey||a.session?.key||`agent:${a.agent||"main"}:main`,t=a.agent||"main",e=ar.get(u),n=e?.root?we.setSpan(Ve.active(),e.root):Ve.active(),s=r.startSpan(Jr.AGENT_TURN,{kind:De.INTERNAL,attributes:{[w.AGENT_NAME]:t,[w.SESSION_KEY]:u}},n);e?e.turn=s:ar.set(u,{root:s,turn:s}),c.debug(`[manifest] Agent turn started: agent=${t}, session=${u}`)}),o.on("tool_result_persist",a=>{let u=a.toolName||a.tool||"unknown",t=a.durationMs||0,e=a.error==null,n=a.sessionKey||"unknown",s=ar.get(n),l=s?.turn?we.setSpan(Ve.active(),s.turn):Ve.active(),E=r.startSpan(`${Jr.TOOL_PREFIX}${u}`,{kind:De.INTERNAL,attributes:{[w.TOOL_NAME]:u,[w.TOOL_SUCCESS]:String(e),[w.SESSION_KEY]:n}},l);e||(E.setStatus({code:Ot.ERROR,message:a.error?.message||"Tool execution failed"}),UI.add(1,{[w.TOOL_NAME]:u})),E.end(),bI.add(1,{[w.TOOL_NAME]:u}),DI.record(t,{[w.TOOL_NAME]:u})}),o.on("agent_end",a=>{let u=a.sessionKey||a.session?.key||`agent:${a.agent||"main"}:main`,e=[...a.messages||[]].reverse().find(qr=>qr.role==="assistant"&&qr.usage),n=e?.model||a.model||"unknown",s=e?.provider||a.provider||"unknown",l=e?.usage||a.usage||{},E=l.input||l.inputTokens||0,O=l.output||l.outputTokens||0,x=l.cacheRead||l.cacheReadTokens||0,pe=l.cacheWrite||l.cacheWriteTokens||0,de=ar.get(u);de?.turn&&(de.turn.setAttributes({[w.MODEL]:n,[w.PROVIDER]:s,[w.INPUT_TOKENS]:E,[w.OUTPUT_TOKENS]:O,[w.CACHE_READ_TOKENS]:x,[w.CACHE_WRITE_TOKENS]:pe}),de.turn.end()),de?.root&&de.root!==de.turn&&de.root.end(),ar.delete(u);let ge={[w.MODEL]:n,[w.PROVIDER]:s};LI.add(1,ge),II.add(E,ge),xI.add(O,ge),x>0&&CI.add(x,ge),c.debug(`[manifest] agent_end tokens: in=${E}, out=${O}, cache=${x}`),c.debug(`[manifest] Trace completed for session=${u}`)}),c.info("[manifest] All hooks registered")}async function Ji(o){let r=o.endpoint.replace(/\/otlp(\/v1)?\/?$/,""),i={endpointReachable:!1,authValid:!1,agentName:null,error:null};try{let c=await fetch(`${r}/api/v1/health`,{signal:AbortSignal.timeout(5e3)});if(!c.ok)return i.error=`Health endpoint returned ${c.status}`,i;i.endpointReachable=!0}catch(c){let a=c instanceof Error?c.message:String(c);return i.error=`Cannot reach endpoint: ${a}`,i}try{let c=await fetch(`${r}/api/v1/agent/usage?range=24h`,{headers:{Authorization:`Bearer ${o.apiKey}`},signal:AbortSignal.timeout(5e3)});if(c.status===401||c.status===403)return i.error="API key rejected \u2014 check your osk_ key is correct",i;if(!c.ok)return i.error=`Usage endpoint returned ${c.status}`,i;i.authValid=!0;let a=await c.json();a&&typeof a.agentName=="string"&&(i.agentName=a.agentName)}catch(c){let a=c instanceof Error?c.message:String(c);return i.error=`Auth check failed: ${a}`,i}return i}var GI={today:"24h",week:"7d",month:"30d"};async function HI(o,r,i,c){let a=`${o}${r}`;try{let u=await fetch(a,{headers:{Authorization:`Bearer ${i}`}});return u.ok?{result:await u.json()}:{error:`API returned ${u.status}`}}catch(u){let t=u instanceof Error?u.message:String(u);return c.error(`[manifest] API call failed: ${t}`),{error:t}}}function kI(o,r,i){let c=r.endpoint.replace(/\/otlp(\/v1)?\/?$/,"");o.registerTool({name:"manifest_usage",description:"Get token consumption for this agent: total, input, output, cache-read tokens, and action count. Use when the user asks about token usage or consumption.",parameters:{type:"object",properties:{period:{type:"string",enum:["today","week","month"],default:"today",description:"Time period"}}},handler:async a=>{let u=GI[a.period||"today"]||"24h";return HI(c,`/api/v1/agent/usage?range=${u}`,r.apiKey,i)}}),o.registerTool({name:"manifest_costs",description:"Get cost breakdown for this agent in USD, grouped by model. Use when the user asks about costs, spending, or money burned.",parameters:{type:"object",properties:{period:{type:"string",enum:["today","week","month"],default:"week",description:"Time period"}}},handler:async a=>{let u=GI[a.period||"week"]||"7d";return HI(c,`/api/v1/agent/costs?range=${u}`,r.apiKey,i)}}),o.registerTool({name:"manifest_health",description:"Check whether Manifest observability is connected and working. Use when the user asks if monitoring is set up or wants a connectivity test.",parameters:{type:"object",properties:{}},handler:async()=>{let a=await Ji(r);return a.error?{error:a.error}:{result:{endpointReachable:a.endpointReachable,authValid:a.authValid,agentName:a.agentName,status:"ok"}}}}),i.info("[manifest] Registered agent tools: manifest_usage, manifest_costs, manifest_health")}module.exports={id:"manifest",name:"Manifest \u2014 Agent Observability",register(o){let r=o.logger||{info:(...e)=>console.log(...e),debug:()=>{},error:(...e)=>console.error(...e),warn:(...e)=>console.warn(...e)},i=vc(o.pluginConfig),c=Oc(i);if(c){i.apiKey?r.error(`[manifest] Configuration error:
20
20
  ${c}`):r.info(`[manifest] Installed! Complete setup:
21
21
  1. openclaw config set plugins.entries.manifest.config.apiKey osk_YOUR_KEY
22
22
  2. openclaw gateway restart`);return}if((o.config?.plugins?.entries||{})["diagnostics-otel"]?.enabled){r.error(`[manifest] ERROR: Built-in 'diagnostics-otel' is also enabled. This causes duplicate OTel registration errors. Disable it now: