@sentio/runtime 2.62.0-rc.7 → 2.62.0-rc.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/processor-runner.js +681 -689
- package/lib/processor-runner.js.map +1 -1
- package/package.json +2 -2
- package/src/processor-runner.ts +140 -148
package/lib/processor-runner.js
CHANGED
@@ -628,8 +628,8 @@ var require_help = __commonJS({
|
|
628
628
|
helper.visibleOptions(cmd),
|
629
629
|
(option) => option.helpGroupHeading ?? "Options:"
|
630
630
|
);
|
631
|
-
optionGroups.forEach((
|
632
|
-
const optionList =
|
631
|
+
optionGroups.forEach((options2, group) => {
|
632
|
+
const optionList = options2.map((option) => {
|
633
633
|
return callFormatItem(
|
634
634
|
helper.styleOptionTerm(helper.optionTerm(option)),
|
635
635
|
helper.styleOptionDescription(helper.optionDescription(option))
|
@@ -1071,11 +1071,11 @@ var require_option = __commonJS({
|
|
1071
1071
|
/**
|
1072
1072
|
* @param {Option[]} options
|
1073
1073
|
*/
|
1074
|
-
constructor(
|
1074
|
+
constructor(options2) {
|
1075
1075
|
this.positiveOptions = /* @__PURE__ */ new Map();
|
1076
1076
|
this.negativeOptions = /* @__PURE__ */ new Map();
|
1077
1077
|
this.dualOptions = /* @__PURE__ */ new Set();
|
1078
|
-
|
1078
|
+
options2.forEach((option) => {
|
1079
1079
|
if (option.negate) {
|
1080
1080
|
this.negativeOptions.set(option.attributeName(), option);
|
1081
1081
|
} else {
|
@@ -6495,18 +6495,18 @@ var require_client = __commonJS({
|
|
6495
6495
|
var traces_1 = require_traces();
|
6496
6496
|
var bindAsyncGenerator_1 = require_bindAsyncGenerator();
|
6497
6497
|
function openTelemetryClientMiddleware() {
|
6498
|
-
return (call,
|
6498
|
+
return (call, options2) => traces_1.tracer.startActiveSpan((0, traces_1.getSpanName)(call.method.path), {
|
6499
6499
|
kind: api_1.SpanKind.CLIENT
|
6500
6500
|
}, (span) => {
|
6501
|
-
const metadata = (0, nice_grpc_common_1.Metadata)(
|
6501
|
+
const metadata = (0, nice_grpc_common_1.Metadata)(options2.metadata);
|
6502
6502
|
api_1.propagation.inject(api_1.context.active(), metadata, propagation_1.metadataSetter);
|
6503
6503
|
return (0, bindAsyncGenerator_1.bindAsyncGenerator)(api_1.context.active(), openTelemetryClientMiddlewareGenerator(span, call, {
|
6504
|
-
...
|
6504
|
+
...options2,
|
6505
6505
|
metadata
|
6506
6506
|
}));
|
6507
6507
|
});
|
6508
6508
|
}
|
6509
|
-
async function* openTelemetryClientMiddlewareGenerator(span, call,
|
6509
|
+
async function* openTelemetryClientMiddlewareGenerator(span, call, options2) {
|
6510
6510
|
const attributes = (0, attributes_1.getMethodAttributes)(call.method.path);
|
6511
6511
|
span.setAttributes(attributes);
|
6512
6512
|
let settled = false;
|
@@ -6520,11 +6520,11 @@ var require_client = __commonJS({
|
|
6520
6520
|
request = (0, traces_1.emitSpanEvents)(call.request, span, semantic_conventions_1.MESSAGETYPEVALUES_SENT);
|
6521
6521
|
}
|
6522
6522
|
if (!call.responseStream) {
|
6523
|
-
const response = yield* call.next(request,
|
6523
|
+
const response = yield* call.next(request, options2);
|
6524
6524
|
settled = true;
|
6525
6525
|
return response;
|
6526
6526
|
} else {
|
6527
|
-
yield* (0, traces_1.emitSpanEvents)(call.next(request,
|
6527
|
+
yield* (0, traces_1.emitSpanEvents)(call.next(request, options2), span, semantic_conventions_1.MESSAGETYPEVALUES_RECEIVED);
|
6528
6528
|
settled = true;
|
6529
6529
|
return;
|
6530
6530
|
}
|
@@ -7874,11 +7874,11 @@ var init_utils3 = __esm({
|
|
7874
7874
|
});
|
7875
7875
|
|
7876
7876
|
// ../../node_modules/.pnpm/@opentelemetry+resources@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/ResourceImpl.js
|
7877
|
-
function resourceFromAttributes(attributes,
|
7878
|
-
return ResourceImpl.FromAttributeList(Object.entries(attributes),
|
7877
|
+
function resourceFromAttributes(attributes, options2) {
|
7878
|
+
return ResourceImpl.FromAttributeList(Object.entries(attributes), options2);
|
7879
7879
|
}
|
7880
|
-
function resourceFromDetectedResource(detectedResource,
|
7881
|
-
return new ResourceImpl(detectedResource,
|
7880
|
+
function resourceFromDetectedResource(detectedResource, options2) {
|
7881
|
+
return new ResourceImpl(detectedResource, options2);
|
7882
7882
|
}
|
7883
7883
|
function emptyResource() {
|
7884
7884
|
return resourceFromAttributes({});
|
@@ -7943,13 +7943,13 @@ var init_ResourceImpl = __esm({
|
|
7943
7943
|
_asyncAttributesPending = false;
|
7944
7944
|
_schemaUrl;
|
7945
7945
|
_memoizedAttributes;
|
7946
|
-
static FromAttributeList(attributes,
|
7947
|
-
const res = new _ResourceImpl({},
|
7946
|
+
static FromAttributeList(attributes, options2) {
|
7947
|
+
const res = new _ResourceImpl({}, options2);
|
7948
7948
|
res._rawAttributes = guardedRawAttributes(attributes);
|
7949
7949
|
res._asyncAttributesPending = attributes.filter(([_, val]) => isPromiseLike(val)).length > 0;
|
7950
7950
|
return res;
|
7951
7951
|
}
|
7952
|
-
constructor(resource,
|
7952
|
+
constructor(resource, options2) {
|
7953
7953
|
const attributes = resource.attributes ?? {};
|
7954
7954
|
this._rawAttributes = Object.entries(attributes).map(([k, v]) => {
|
7955
7955
|
if (isPromiseLike(v)) {
|
@@ -7958,7 +7958,7 @@ var init_ResourceImpl = __esm({
|
|
7958
7958
|
return [k, v];
|
7959
7959
|
});
|
7960
7960
|
this._rawAttributes = guardedRawAttributes(this._rawAttributes);
|
7961
|
-
this._schemaUrl = validateSchemaUrl(
|
7961
|
+
this._schemaUrl = validateSchemaUrl(options2?.schemaUrl);
|
7962
7962
|
}
|
7963
7963
|
get asyncAttributesPending() {
|
7964
7964
|
return this._asyncAttributesPending;
|
@@ -9665,11 +9665,11 @@ var init_MetricReader = __esm({
|
|
9665
9665
|
_aggregationTemporalitySelector;
|
9666
9666
|
_aggregationSelector;
|
9667
9667
|
_cardinalitySelector;
|
9668
|
-
constructor(
|
9669
|
-
this._aggregationSelector =
|
9670
|
-
this._aggregationTemporalitySelector =
|
9671
|
-
this._metricProducers =
|
9672
|
-
this._cardinalitySelector =
|
9668
|
+
constructor(options2) {
|
9669
|
+
this._aggregationSelector = options2?.aggregationSelector ?? DEFAULT_AGGREGATION_SELECTOR;
|
9670
|
+
this._aggregationTemporalitySelector = options2?.aggregationTemporalitySelector ?? DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR;
|
9671
|
+
this._metricProducers = options2?.metricProducers ?? [];
|
9672
|
+
this._cardinalitySelector = options2?.cardinalitySelector;
|
9673
9673
|
}
|
9674
9674
|
setMetricProducer(metricProducer) {
|
9675
9675
|
if (this._sdkMetricProducer) {
|
@@ -9693,7 +9693,7 @@ var init_MetricReader = __esm({
|
|
9693
9693
|
*/
|
9694
9694
|
onInitialized() {
|
9695
9695
|
}
|
9696
|
-
async collect(
|
9696
|
+
async collect(options2) {
|
9697
9697
|
if (this._sdkMetricProducer === void 0) {
|
9698
9698
|
throw new Error("MetricReader is not bound to a MetricProducer");
|
9699
9699
|
}
|
@@ -9702,10 +9702,10 @@ var init_MetricReader = __esm({
|
|
9702
9702
|
}
|
9703
9703
|
const [sdkCollectionResults, ...additionalCollectionResults] = await Promise.all([
|
9704
9704
|
this._sdkMetricProducer.collect({
|
9705
|
-
timeoutMillis:
|
9705
|
+
timeoutMillis: options2?.timeoutMillis
|
9706
9706
|
}),
|
9707
9707
|
...this._metricProducers.map((producer) => producer.collect({
|
9708
|
-
timeoutMillis:
|
9708
|
+
timeoutMillis: options2?.timeoutMillis
|
9709
9709
|
}))
|
9710
9710
|
]);
|
9711
9711
|
const errors = sdkCollectionResults.errors.concat(FlatMap(additionalCollectionResults, (result) => result.errors));
|
@@ -9719,28 +9719,28 @@ var init_MetricReader = __esm({
|
|
9719
9719
|
errors
|
9720
9720
|
};
|
9721
9721
|
}
|
9722
|
-
async shutdown(
|
9722
|
+
async shutdown(options2) {
|
9723
9723
|
if (this._shutdown) {
|
9724
9724
|
diag.error("Cannot call shutdown twice.");
|
9725
9725
|
return;
|
9726
9726
|
}
|
9727
|
-
if (
|
9727
|
+
if (options2?.timeoutMillis == null) {
|
9728
9728
|
await this.onShutdown();
|
9729
9729
|
} else {
|
9730
|
-
await callWithTimeout2(this.onShutdown(),
|
9730
|
+
await callWithTimeout2(this.onShutdown(), options2.timeoutMillis);
|
9731
9731
|
}
|
9732
9732
|
this._shutdown = true;
|
9733
9733
|
}
|
9734
|
-
async forceFlush(
|
9734
|
+
async forceFlush(options2) {
|
9735
9735
|
if (this._shutdown) {
|
9736
9736
|
diag.warn("Cannot forceFlush on already shutdown MetricReader.");
|
9737
9737
|
return;
|
9738
9738
|
}
|
9739
|
-
if (
|
9739
|
+
if (options2?.timeoutMillis == null) {
|
9740
9740
|
await this.onForceFlush();
|
9741
9741
|
return;
|
9742
9742
|
}
|
9743
|
-
await callWithTimeout2(this.onForceFlush(),
|
9743
|
+
await callWithTimeout2(this.onForceFlush(), options2.timeoutMillis);
|
9744
9744
|
}
|
9745
9745
|
};
|
9746
9746
|
}
|
@@ -9760,24 +9760,24 @@ var init_PeriodicExportingMetricReader = __esm({
|
|
9760
9760
|
_exporter;
|
9761
9761
|
_exportInterval;
|
9762
9762
|
_exportTimeout;
|
9763
|
-
constructor(
|
9763
|
+
constructor(options2) {
|
9764
9764
|
super({
|
9765
|
-
aggregationSelector:
|
9766
|
-
aggregationTemporalitySelector:
|
9767
|
-
metricProducers:
|
9765
|
+
aggregationSelector: options2.exporter.selectAggregation?.bind(options2.exporter),
|
9766
|
+
aggregationTemporalitySelector: options2.exporter.selectAggregationTemporality?.bind(options2.exporter),
|
9767
|
+
metricProducers: options2.metricProducers
|
9768
9768
|
});
|
9769
|
-
if (
|
9769
|
+
if (options2.exportIntervalMillis !== void 0 && options2.exportIntervalMillis <= 0) {
|
9770
9770
|
throw Error("exportIntervalMillis must be greater than 0");
|
9771
9771
|
}
|
9772
|
-
if (
|
9772
|
+
if (options2.exportTimeoutMillis !== void 0 && options2.exportTimeoutMillis <= 0) {
|
9773
9773
|
throw Error("exportTimeoutMillis must be greater than 0");
|
9774
9774
|
}
|
9775
|
-
if (
|
9775
|
+
if (options2.exportTimeoutMillis !== void 0 && options2.exportIntervalMillis !== void 0 && options2.exportIntervalMillis < options2.exportTimeoutMillis) {
|
9776
9776
|
throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");
|
9777
9777
|
}
|
9778
|
-
this._exportInterval =
|
9779
|
-
this._exportTimeout =
|
9780
|
-
this._exporter =
|
9778
|
+
this._exportInterval = options2.exportIntervalMillis ?? 6e4;
|
9779
|
+
this._exportTimeout = options2.exportTimeoutMillis ?? 3e4;
|
9780
|
+
this._exporter = options2.exporter;
|
9781
9781
|
}
|
9782
9782
|
async _runOnce() {
|
9783
9783
|
try {
|
@@ -9892,8 +9892,8 @@ var init_ConsoleMetricExporter = __esm({
|
|
9892
9892
|
ConsoleMetricExporter = class _ConsoleMetricExporter {
|
9893
9893
|
_shutdown = false;
|
9894
9894
|
_temporalitySelector;
|
9895
|
-
constructor(
|
9896
|
-
this._temporalitySelector =
|
9895
|
+
constructor(options2) {
|
9896
|
+
this._temporalitySelector = options2?.temporalitySelector ?? DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR;
|
9897
9897
|
}
|
9898
9898
|
export(metrics2, resultCallback) {
|
9899
9899
|
if (this._shutdown) {
|
@@ -9955,17 +9955,17 @@ var init_ViewRegistry = __esm({
|
|
9955
9955
|
});
|
9956
9956
|
|
9957
9957
|
// ../../node_modules/.pnpm/@opentelemetry+sdk-metrics@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-metrics/build/esm/InstrumentDescriptor.js
|
9958
|
-
function createInstrumentDescriptor(name, type,
|
9958
|
+
function createInstrumentDescriptor(name, type, options2) {
|
9959
9959
|
if (!isValidName(name)) {
|
9960
9960
|
diag.warn(`Invalid metric name: "${name}". The metric name should be a ASCII string with a length no greater than 255 characters.`);
|
9961
9961
|
}
|
9962
9962
|
return {
|
9963
9963
|
name,
|
9964
9964
|
type,
|
9965
|
-
description:
|
9966
|
-
unit:
|
9967
|
-
valueType:
|
9968
|
-
advice:
|
9965
|
+
description: options2?.description ?? "",
|
9966
|
+
unit: options2?.unit ?? "",
|
9967
|
+
valueType: options2?.valueType ?? ValueType.DOUBLE,
|
9968
|
+
advice: options2?.advice ?? {}
|
9969
9969
|
};
|
9970
9970
|
}
|
9971
9971
|
function createInstrumentDescriptorWithView(view, instrument) {
|
@@ -10115,56 +10115,56 @@ var init_Meter = __esm({
|
|
10115
10115
|
/**
|
10116
10116
|
* Create a {@link Gauge} instrument.
|
10117
10117
|
*/
|
10118
|
-
createGauge(name,
|
10119
|
-
const descriptor = createInstrumentDescriptor(name, InstrumentType.GAUGE,
|
10118
|
+
createGauge(name, options2) {
|
10119
|
+
const descriptor = createInstrumentDescriptor(name, InstrumentType.GAUGE, options2);
|
10120
10120
|
const storage = this._meterSharedState.registerMetricStorage(descriptor);
|
10121
10121
|
return new GaugeInstrument(storage, descriptor);
|
10122
10122
|
}
|
10123
10123
|
/**
|
10124
10124
|
* Create a {@link Histogram} instrument.
|
10125
10125
|
*/
|
10126
|
-
createHistogram(name,
|
10127
|
-
const descriptor = createInstrumentDescriptor(name, InstrumentType.HISTOGRAM,
|
10126
|
+
createHistogram(name, options2) {
|
10127
|
+
const descriptor = createInstrumentDescriptor(name, InstrumentType.HISTOGRAM, options2);
|
10128
10128
|
const storage = this._meterSharedState.registerMetricStorage(descriptor);
|
10129
10129
|
return new HistogramInstrument(storage, descriptor);
|
10130
10130
|
}
|
10131
10131
|
/**
|
10132
10132
|
* Create a {@link Counter} instrument.
|
10133
10133
|
*/
|
10134
|
-
createCounter(name,
|
10135
|
-
const descriptor = createInstrumentDescriptor(name, InstrumentType.COUNTER,
|
10134
|
+
createCounter(name, options2) {
|
10135
|
+
const descriptor = createInstrumentDescriptor(name, InstrumentType.COUNTER, options2);
|
10136
10136
|
const storage = this._meterSharedState.registerMetricStorage(descriptor);
|
10137
10137
|
return new CounterInstrument(storage, descriptor);
|
10138
10138
|
}
|
10139
10139
|
/**
|
10140
10140
|
* Create a {@link UpDownCounter} instrument.
|
10141
10141
|
*/
|
10142
|
-
createUpDownCounter(name,
|
10143
|
-
const descriptor = createInstrumentDescriptor(name, InstrumentType.UP_DOWN_COUNTER,
|
10142
|
+
createUpDownCounter(name, options2) {
|
10143
|
+
const descriptor = createInstrumentDescriptor(name, InstrumentType.UP_DOWN_COUNTER, options2);
|
10144
10144
|
const storage = this._meterSharedState.registerMetricStorage(descriptor);
|
10145
10145
|
return new UpDownCounterInstrument(storage, descriptor);
|
10146
10146
|
}
|
10147
10147
|
/**
|
10148
10148
|
* Create a {@link ObservableGauge} instrument.
|
10149
10149
|
*/
|
10150
|
-
createObservableGauge(name,
|
10151
|
-
const descriptor = createInstrumentDescriptor(name, InstrumentType.OBSERVABLE_GAUGE,
|
10150
|
+
createObservableGauge(name, options2) {
|
10151
|
+
const descriptor = createInstrumentDescriptor(name, InstrumentType.OBSERVABLE_GAUGE, options2);
|
10152
10152
|
const storages = this._meterSharedState.registerAsyncMetricStorage(descriptor);
|
10153
10153
|
return new ObservableGaugeInstrument(descriptor, storages, this._meterSharedState.observableRegistry);
|
10154
10154
|
}
|
10155
10155
|
/**
|
10156
10156
|
* Create a {@link ObservableCounter} instrument.
|
10157
10157
|
*/
|
10158
|
-
createObservableCounter(name,
|
10159
|
-
const descriptor = createInstrumentDescriptor(name, InstrumentType.OBSERVABLE_COUNTER,
|
10158
|
+
createObservableCounter(name, options2) {
|
10159
|
+
const descriptor = createInstrumentDescriptor(name, InstrumentType.OBSERVABLE_COUNTER, options2);
|
10160
10160
|
const storages = this._meterSharedState.registerAsyncMetricStorage(descriptor);
|
10161
10161
|
return new ObservableCounterInstrument(descriptor, storages, this._meterSharedState.observableRegistry);
|
10162
10162
|
}
|
10163
10163
|
/**
|
10164
10164
|
* Create a {@link ObservableUpDownCounter} instrument.
|
10165
10165
|
*/
|
10166
|
-
createObservableUpDownCounter(name,
|
10167
|
-
const descriptor = createInstrumentDescriptor(name, InstrumentType.OBSERVABLE_UP_DOWN_COUNTER,
|
10166
|
+
createObservableUpDownCounter(name, options2) {
|
10167
|
+
const descriptor = createInstrumentDescriptor(name, InstrumentType.OBSERVABLE_UP_DOWN_COUNTER, options2);
|
10168
10168
|
const storages = this._meterSharedState.registerAsyncMetricStorage(descriptor);
|
10169
10169
|
return new ObservableUpDownCounterInstrument(descriptor, storages, this._meterSharedState.observableRegistry);
|
10170
10170
|
}
|
@@ -11003,8 +11003,8 @@ var init_MeterSharedState = __esm({
|
|
11003
11003
|
* @param options options for collection.
|
11004
11004
|
* @returns the list of metric data collected.
|
11005
11005
|
*/
|
11006
|
-
async collect(collector, collectionTime,
|
11007
|
-
const errors = await this.observableRegistry.observe(collectionTime,
|
11006
|
+
async collect(collector, collectionTime, options2) {
|
11007
|
+
const errors = await this.observableRegistry.observe(collectionTime, options2?.timeoutMillis);
|
11008
11008
|
const storages = this.metricStorageRegistry.getStorages(collector);
|
11009
11009
|
if (storages.length === 0) {
|
11010
11010
|
return null;
|
@@ -11110,12 +11110,12 @@ var init_MetricCollector = __esm({
|
|
11110
11110
|
this._sharedState = _sharedState;
|
11111
11111
|
this._metricReader = _metricReader;
|
11112
11112
|
}
|
11113
|
-
async collect(
|
11113
|
+
async collect(options2) {
|
11114
11114
|
const collectionTime = millisToHrTime(Date.now());
|
11115
11115
|
const scopeMetrics = [];
|
11116
11116
|
const errors = [];
|
11117
11117
|
const meterCollectionPromises = Array.from(this._sharedState.meterSharedStates.values()).map(async (meterSharedState) => {
|
11118
|
-
const current = await meterSharedState.collect(this, collectionTime,
|
11118
|
+
const current = await meterSharedState.collect(this, collectionTime, options2);
|
11119
11119
|
if (current?.scopeMetrics != null) {
|
11120
11120
|
scopeMetrics.push(current.scopeMetrics);
|
11121
11121
|
}
|
@@ -11135,14 +11135,14 @@ var init_MetricCollector = __esm({
|
|
11135
11135
|
/**
|
11136
11136
|
* Delegates for MetricReader.forceFlush.
|
11137
11137
|
*/
|
11138
|
-
async forceFlush(
|
11139
|
-
await this._metricReader.forceFlush(
|
11138
|
+
async forceFlush(options2) {
|
11139
|
+
await this._metricReader.forceFlush(options2);
|
11140
11140
|
}
|
11141
11141
|
/**
|
11142
11142
|
* Delegates for MetricReader.shutdown.
|
11143
11143
|
*/
|
11144
|
-
async shutdown(
|
11145
|
-
await this._metricReader.shutdown(
|
11144
|
+
async shutdown(options2) {
|
11145
|
+
await this._metricReader.shutdown(options2);
|
11146
11146
|
}
|
11147
11147
|
selectAggregationTemporality(instrumentType) {
|
11148
11148
|
return this._metricReader.selectAggregationTemporality(instrumentType);
|
@@ -11272,8 +11272,8 @@ var init_MeterSelector = __esm({
|
|
11272
11272
|
});
|
11273
11273
|
|
11274
11274
|
// ../../node_modules/.pnpm/@opentelemetry+sdk-metrics@2.1.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-metrics/build/esm/view/View.js
|
11275
|
-
function isSelectorNotProvided(
|
11276
|
-
return
|
11275
|
+
function isSelectorNotProvided(options2) {
|
11276
|
+
return options2.instrumentName == null && options2.instrumentType == null && options2.instrumentUnit == null && options2.meterName == null && options2.meterVersion == null && options2.meterSchemaUrl == null;
|
11277
11277
|
}
|
11278
11278
|
function validateViewOptions(viewOptions) {
|
11279
11279
|
if (isSelectorNotProvided(viewOptions)) {
|
@@ -11395,15 +11395,15 @@ var init_MeterProvider = __esm({
|
|
11395
11395
|
MeterProvider = class {
|
11396
11396
|
_sharedState;
|
11397
11397
|
_shutdown = false;
|
11398
|
-
constructor(
|
11399
|
-
this._sharedState = new MeterProviderSharedState(
|
11400
|
-
if (
|
11401
|
-
for (const viewOption of
|
11398
|
+
constructor(options2) {
|
11399
|
+
this._sharedState = new MeterProviderSharedState(options2?.resource ?? defaultResource());
|
11400
|
+
if (options2?.views != null && options2.views.length > 0) {
|
11401
|
+
for (const viewOption of options2.views) {
|
11402
11402
|
this._sharedState.viewRegistry.addView(new View(viewOption));
|
11403
11403
|
}
|
11404
11404
|
}
|
11405
|
-
if (
|
11406
|
-
for (const metricReader of
|
11405
|
+
if (options2?.readers != null && options2.readers.length > 0) {
|
11406
|
+
for (const metricReader of options2.readers) {
|
11407
11407
|
const collector = new MetricCollector(this._sharedState, metricReader);
|
11408
11408
|
metricReader.setMetricProducer(collector);
|
11409
11409
|
this._sharedState.metricCollectors.push(collector);
|
@@ -11413,7 +11413,7 @@ var init_MeterProvider = __esm({
|
|
11413
11413
|
/**
|
11414
11414
|
* Get a meter with the configuration of the MeterProvider.
|
11415
11415
|
*/
|
11416
|
-
getMeter(name, version = "",
|
11416
|
+
getMeter(name, version = "", options2 = {}) {
|
11417
11417
|
if (this._shutdown) {
|
11418
11418
|
diag.warn("A shutdown MeterProvider cannot provide a Meter");
|
11419
11419
|
return createNoopMeter();
|
@@ -11421,7 +11421,7 @@ var init_MeterProvider = __esm({
|
|
11421
11421
|
return this._sharedState.getMeterSharedState({
|
11422
11422
|
name,
|
11423
11423
|
version,
|
11424
|
-
schemaUrl:
|
11424
|
+
schemaUrl: options2.schemaUrl
|
11425
11425
|
}).meter;
|
11426
11426
|
}
|
11427
11427
|
/**
|
@@ -11430,14 +11430,14 @@ var init_MeterProvider = __esm({
|
|
11430
11430
|
*
|
11431
11431
|
* Returns a promise which is resolved when all flushes are complete.
|
11432
11432
|
*/
|
11433
|
-
async shutdown(
|
11433
|
+
async shutdown(options2) {
|
11434
11434
|
if (this._shutdown) {
|
11435
11435
|
diag.warn("shutdown may only be called once per MeterProvider");
|
11436
11436
|
return;
|
11437
11437
|
}
|
11438
11438
|
this._shutdown = true;
|
11439
11439
|
await Promise.all(this._sharedState.metricCollectors.map((collector) => {
|
11440
|
-
return collector.shutdown(
|
11440
|
+
return collector.shutdown(options2);
|
11441
11441
|
}));
|
11442
11442
|
}
|
11443
11443
|
/**
|
@@ -11445,13 +11445,13 @@ var init_MeterProvider = __esm({
|
|
11445
11445
|
*
|
11446
11446
|
* Returns a promise which is resolved when all flushes are complete.
|
11447
11447
|
*/
|
11448
|
-
async forceFlush(
|
11448
|
+
async forceFlush(options2) {
|
11449
11449
|
if (this._shutdown) {
|
11450
11450
|
diag.warn("invalid attempt to force flush after MeterProvider shutdown");
|
11451
11451
|
return;
|
11452
11452
|
}
|
11453
11453
|
await Promise.all(this._sharedState.metricCollectors.map((collector) => {
|
11454
|
-
return collector.forceFlush(
|
11454
|
+
return collector.forceFlush(options2);
|
11455
11455
|
}));
|
11456
11456
|
}
|
11457
11457
|
};
|
@@ -11595,8 +11595,8 @@ var init_legacy_node_configuration = __esm({
|
|
11595
11595
|
});
|
11596
11596
|
|
11597
11597
|
// ../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.204.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/build/esm/bounded-queue-export-promise-handler.js
|
11598
|
-
function createBoundedQueueExportPromiseHandler(
|
11599
|
-
return new BoundedQueueExportPromiseHandler(
|
11598
|
+
function createBoundedQueueExportPromiseHandler(options2) {
|
11599
|
+
return new BoundedQueueExportPromiseHandler(options2.concurrencyLimit);
|
11600
11600
|
}
|
11601
11601
|
var BoundedQueueExportPromiseHandler;
|
11602
11602
|
var init_bounded_queue_export_promise_handler = __esm({
|
@@ -11747,12 +11747,12 @@ var init_otlp_export_delegate = __esm({
|
|
11747
11747
|
});
|
11748
11748
|
|
11749
11749
|
// ../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.204.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/build/esm/otlp-network-export-delegate.js
|
11750
|
-
function createOtlpNetworkExportDelegate(
|
11750
|
+
function createOtlpNetworkExportDelegate(options2, serializer, transport) {
|
11751
11751
|
return createOtlpExportDelegate({
|
11752
11752
|
transport,
|
11753
11753
|
serializer,
|
11754
|
-
promiseHandler: createBoundedQueueExportPromiseHandler(
|
11755
|
-
}, { timeout:
|
11754
|
+
promiseHandler: createBoundedQueueExportPromiseHandler(options2)
|
11755
|
+
}, { timeout: options2.timeoutMillis });
|
11756
11756
|
}
|
11757
11757
|
var init_otlp_network_export_delegate = __esm({
|
11758
11758
|
"../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.204.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/build/esm/otlp-network-export-delegate.js"() {
|
@@ -12098,46 +12098,46 @@ var require_root = __commonJS({
|
|
12098
12098
|
}
|
12099
12099
|
return message;
|
12100
12100
|
};
|
12101
|
-
AnyValue.toObject = function toObject(message,
|
12102
|
-
if (!
|
12103
|
-
|
12101
|
+
AnyValue.toObject = function toObject(message, options2) {
|
12102
|
+
if (!options2)
|
12103
|
+
options2 = {};
|
12104
12104
|
var object = {};
|
12105
12105
|
if (message.stringValue != null && message.hasOwnProperty("stringValue")) {
|
12106
12106
|
object.stringValue = message.stringValue;
|
12107
|
-
if (
|
12107
|
+
if (options2.oneofs)
|
12108
12108
|
object.value = "stringValue";
|
12109
12109
|
}
|
12110
12110
|
if (message.boolValue != null && message.hasOwnProperty("boolValue")) {
|
12111
12111
|
object.boolValue = message.boolValue;
|
12112
|
-
if (
|
12112
|
+
if (options2.oneofs)
|
12113
12113
|
object.value = "boolValue";
|
12114
12114
|
}
|
12115
12115
|
if (message.intValue != null && message.hasOwnProperty("intValue")) {
|
12116
12116
|
if (typeof message.intValue === "number")
|
12117
|
-
object.intValue =
|
12117
|
+
object.intValue = options2.longs === String ? String(message.intValue) : message.intValue;
|
12118
12118
|
else
|
12119
|
-
object.intValue =
|
12120
|
-
if (
|
12119
|
+
object.intValue = options2.longs === String ? $util.Long.prototype.toString.call(message.intValue) : options2.longs === Number ? new $util.LongBits(message.intValue.low >>> 0, message.intValue.high >>> 0).toNumber() : message.intValue;
|
12120
|
+
if (options2.oneofs)
|
12121
12121
|
object.value = "intValue";
|
12122
12122
|
}
|
12123
12123
|
if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) {
|
12124
|
-
object.doubleValue =
|
12125
|
-
if (
|
12124
|
+
object.doubleValue = options2.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue;
|
12125
|
+
if (options2.oneofs)
|
12126
12126
|
object.value = "doubleValue";
|
12127
12127
|
}
|
12128
12128
|
if (message.arrayValue != null && message.hasOwnProperty("arrayValue")) {
|
12129
|
-
object.arrayValue = $root.opentelemetry.proto.common.v1.ArrayValue.toObject(message.arrayValue,
|
12130
|
-
if (
|
12129
|
+
object.arrayValue = $root.opentelemetry.proto.common.v1.ArrayValue.toObject(message.arrayValue, options2);
|
12130
|
+
if (options2.oneofs)
|
12131
12131
|
object.value = "arrayValue";
|
12132
12132
|
}
|
12133
12133
|
if (message.kvlistValue != null && message.hasOwnProperty("kvlistValue")) {
|
12134
|
-
object.kvlistValue = $root.opentelemetry.proto.common.v1.KeyValueList.toObject(message.kvlistValue,
|
12135
|
-
if (
|
12134
|
+
object.kvlistValue = $root.opentelemetry.proto.common.v1.KeyValueList.toObject(message.kvlistValue, options2);
|
12135
|
+
if (options2.oneofs)
|
12136
12136
|
object.value = "kvlistValue";
|
12137
12137
|
}
|
12138
12138
|
if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) {
|
12139
|
-
object.bytesValue =
|
12140
|
-
if (
|
12139
|
+
object.bytesValue = options2.bytes === String ? $util.base64.encode(message.bytesValue, 0, message.bytesValue.length) : options2.bytes === Array ? Array.prototype.slice.call(message.bytesValue) : message.bytesValue;
|
12140
|
+
if (options2.oneofs)
|
12141
12141
|
object.value = "bytesValue";
|
12142
12142
|
}
|
12143
12143
|
return object;
|
@@ -12237,16 +12237,16 @@ var require_root = __commonJS({
|
|
12237
12237
|
}
|
12238
12238
|
return message;
|
12239
12239
|
};
|
12240
|
-
ArrayValue.toObject = function toObject(message,
|
12241
|
-
if (!
|
12242
|
-
|
12240
|
+
ArrayValue.toObject = function toObject(message, options2) {
|
12241
|
+
if (!options2)
|
12242
|
+
options2 = {};
|
12243
12243
|
var object = {};
|
12244
|
-
if (
|
12244
|
+
if (options2.arrays || options2.defaults)
|
12245
12245
|
object.values = [];
|
12246
12246
|
if (message.values && message.values.length) {
|
12247
12247
|
object.values = [];
|
12248
12248
|
for (var j = 0; j < message.values.length; ++j)
|
12249
|
-
object.values[j] = $root.opentelemetry.proto.common.v1.AnyValue.toObject(message.values[j],
|
12249
|
+
object.values[j] = $root.opentelemetry.proto.common.v1.AnyValue.toObject(message.values[j], options2);
|
12250
12250
|
}
|
12251
12251
|
return object;
|
12252
12252
|
};
|
@@ -12345,16 +12345,16 @@ var require_root = __commonJS({
|
|
12345
12345
|
}
|
12346
12346
|
return message;
|
12347
12347
|
};
|
12348
|
-
KeyValueList.toObject = function toObject(message,
|
12349
|
-
if (!
|
12350
|
-
|
12348
|
+
KeyValueList.toObject = function toObject(message, options2) {
|
12349
|
+
if (!options2)
|
12350
|
+
options2 = {};
|
12351
12351
|
var object = {};
|
12352
|
-
if (
|
12352
|
+
if (options2.arrays || options2.defaults)
|
12353
12353
|
object.values = [];
|
12354
12354
|
if (message.values && message.values.length) {
|
12355
12355
|
object.values = [];
|
12356
12356
|
for (var j = 0; j < message.values.length; ++j)
|
12357
|
-
object.values[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.values[j],
|
12357
|
+
object.values[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.values[j], options2);
|
12358
12358
|
}
|
12359
12359
|
return object;
|
12360
12360
|
};
|
@@ -12456,18 +12456,18 @@ var require_root = __commonJS({
|
|
12456
12456
|
}
|
12457
12457
|
return message;
|
12458
12458
|
};
|
12459
|
-
KeyValue.toObject = function toObject(message,
|
12460
|
-
if (!
|
12461
|
-
|
12459
|
+
KeyValue.toObject = function toObject(message, options2) {
|
12460
|
+
if (!options2)
|
12461
|
+
options2 = {};
|
12462
12462
|
var object = {};
|
12463
|
-
if (
|
12463
|
+
if (options2.defaults) {
|
12464
12464
|
object.key = "";
|
12465
12465
|
object.value = null;
|
12466
12466
|
}
|
12467
12467
|
if (message.key != null && message.hasOwnProperty("key"))
|
12468
12468
|
object.key = message.key;
|
12469
12469
|
if (message.value != null && message.hasOwnProperty("value"))
|
12470
|
-
object.value = $root.opentelemetry.proto.common.v1.AnyValue.toObject(message.value,
|
12470
|
+
object.value = $root.opentelemetry.proto.common.v1.AnyValue.toObject(message.value, options2);
|
12471
12471
|
return object;
|
12472
12472
|
};
|
12473
12473
|
KeyValue.prototype.toJSON = function toJSON() {
|
@@ -12613,13 +12613,13 @@ var require_root = __commonJS({
|
|
12613
12613
|
message.droppedAttributesCount = object.droppedAttributesCount >>> 0;
|
12614
12614
|
return message;
|
12615
12615
|
};
|
12616
|
-
InstrumentationScope.toObject = function toObject(message,
|
12617
|
-
if (!
|
12618
|
-
|
12616
|
+
InstrumentationScope.toObject = function toObject(message, options2) {
|
12617
|
+
if (!options2)
|
12618
|
+
options2 = {};
|
12619
12619
|
var object = {};
|
12620
|
-
if (
|
12620
|
+
if (options2.arrays || options2.defaults)
|
12621
12621
|
object.attributes = [];
|
12622
|
-
if (
|
12622
|
+
if (options2.defaults) {
|
12623
12623
|
object.name = "";
|
12624
12624
|
object.version = "";
|
12625
12625
|
object.droppedAttributesCount = 0;
|
@@ -12631,7 +12631,7 @@ var require_root = __commonJS({
|
|
12631
12631
|
if (message.attributes && message.attributes.length) {
|
12632
12632
|
object.attributes = [];
|
12633
12633
|
for (var j = 0; j < message.attributes.length; ++j)
|
12634
|
-
object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j],
|
12634
|
+
object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options2);
|
12635
12635
|
}
|
12636
12636
|
if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount"))
|
12637
12637
|
object.droppedAttributesCount = message.droppedAttributesCount;
|
@@ -12787,15 +12787,15 @@ var require_root = __commonJS({
|
|
12787
12787
|
}
|
12788
12788
|
return message;
|
12789
12789
|
};
|
12790
|
-
EntityRef.toObject = function toObject(message,
|
12791
|
-
if (!
|
12792
|
-
|
12790
|
+
EntityRef.toObject = function toObject(message, options2) {
|
12791
|
+
if (!options2)
|
12792
|
+
options2 = {};
|
12793
12793
|
var object = {};
|
12794
|
-
if (
|
12794
|
+
if (options2.arrays || options2.defaults) {
|
12795
12795
|
object.idKeys = [];
|
12796
12796
|
object.descriptionKeys = [];
|
12797
12797
|
}
|
12798
|
-
if (
|
12798
|
+
if (options2.defaults) {
|
12799
12799
|
object.schemaUrl = "";
|
12800
12800
|
object.type = "";
|
12801
12801
|
}
|
@@ -12967,27 +12967,27 @@ var require_root = __commonJS({
|
|
12967
12967
|
}
|
12968
12968
|
return message;
|
12969
12969
|
};
|
12970
|
-
Resource.toObject = function toObject(message,
|
12971
|
-
if (!
|
12972
|
-
|
12970
|
+
Resource.toObject = function toObject(message, options2) {
|
12971
|
+
if (!options2)
|
12972
|
+
options2 = {};
|
12973
12973
|
var object = {};
|
12974
|
-
if (
|
12974
|
+
if (options2.arrays || options2.defaults) {
|
12975
12975
|
object.attributes = [];
|
12976
12976
|
object.entityRefs = [];
|
12977
12977
|
}
|
12978
|
-
if (
|
12978
|
+
if (options2.defaults)
|
12979
12979
|
object.droppedAttributesCount = 0;
|
12980
12980
|
if (message.attributes && message.attributes.length) {
|
12981
12981
|
object.attributes = [];
|
12982
12982
|
for (var j = 0; j < message.attributes.length; ++j)
|
12983
|
-
object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j],
|
12983
|
+
object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options2);
|
12984
12984
|
}
|
12985
12985
|
if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount"))
|
12986
12986
|
object.droppedAttributesCount = message.droppedAttributesCount;
|
12987
12987
|
if (message.entityRefs && message.entityRefs.length) {
|
12988
12988
|
object.entityRefs = [];
|
12989
12989
|
for (var j = 0; j < message.entityRefs.length; ++j)
|
12990
|
-
object.entityRefs[j] = $root.opentelemetry.proto.common.v1.EntityRef.toObject(message.entityRefs[j],
|
12990
|
+
object.entityRefs[j] = $root.opentelemetry.proto.common.v1.EntityRef.toObject(message.entityRefs[j], options2);
|
12991
12991
|
}
|
12992
12992
|
return object;
|
12993
12993
|
};
|
@@ -13094,16 +13094,16 @@ var require_root = __commonJS({
|
|
13094
13094
|
}
|
13095
13095
|
return message;
|
13096
13096
|
};
|
13097
|
-
TracesData.toObject = function toObject(message,
|
13098
|
-
if (!
|
13099
|
-
|
13097
|
+
TracesData.toObject = function toObject(message, options2) {
|
13098
|
+
if (!options2)
|
13099
|
+
options2 = {};
|
13100
13100
|
var object = {};
|
13101
|
-
if (
|
13101
|
+
if (options2.arrays || options2.defaults)
|
13102
13102
|
object.resourceSpans = [];
|
13103
13103
|
if (message.resourceSpans && message.resourceSpans.length) {
|
13104
13104
|
object.resourceSpans = [];
|
13105
13105
|
for (var j = 0; j < message.resourceSpans.length; ++j)
|
13106
|
-
object.resourceSpans[j] = $root.opentelemetry.proto.trace.v1.ResourceSpans.toObject(message.resourceSpans[j],
|
13106
|
+
object.resourceSpans[j] = $root.opentelemetry.proto.trace.v1.ResourceSpans.toObject(message.resourceSpans[j], options2);
|
13107
13107
|
}
|
13108
13108
|
return object;
|
13109
13109
|
};
|
@@ -13238,22 +13238,22 @@ var require_root = __commonJS({
|
|
13238
13238
|
message.schemaUrl = String(object.schemaUrl);
|
13239
13239
|
return message;
|
13240
13240
|
};
|
13241
|
-
ResourceSpans.toObject = function toObject(message,
|
13242
|
-
if (!
|
13243
|
-
|
13241
|
+
ResourceSpans.toObject = function toObject(message, options2) {
|
13242
|
+
if (!options2)
|
13243
|
+
options2 = {};
|
13244
13244
|
var object = {};
|
13245
|
-
if (
|
13245
|
+
if (options2.arrays || options2.defaults)
|
13246
13246
|
object.scopeSpans = [];
|
13247
|
-
if (
|
13247
|
+
if (options2.defaults) {
|
13248
13248
|
object.resource = null;
|
13249
13249
|
object.schemaUrl = "";
|
13250
13250
|
}
|
13251
13251
|
if (message.resource != null && message.hasOwnProperty("resource"))
|
13252
|
-
object.resource = $root.opentelemetry.proto.resource.v1.Resource.toObject(message.resource,
|
13252
|
+
object.resource = $root.opentelemetry.proto.resource.v1.Resource.toObject(message.resource, options2);
|
13253
13253
|
if (message.scopeSpans && message.scopeSpans.length) {
|
13254
13254
|
object.scopeSpans = [];
|
13255
13255
|
for (var j = 0; j < message.scopeSpans.length; ++j)
|
13256
|
-
object.scopeSpans[j] = $root.opentelemetry.proto.trace.v1.ScopeSpans.toObject(message.scopeSpans[j],
|
13256
|
+
object.scopeSpans[j] = $root.opentelemetry.proto.trace.v1.ScopeSpans.toObject(message.scopeSpans[j], options2);
|
13257
13257
|
}
|
13258
13258
|
if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl"))
|
13259
13259
|
object.schemaUrl = message.schemaUrl;
|
@@ -13390,22 +13390,22 @@ var require_root = __commonJS({
|
|
13390
13390
|
message.schemaUrl = String(object.schemaUrl);
|
13391
13391
|
return message;
|
13392
13392
|
};
|
13393
|
-
ScopeSpans.toObject = function toObject(message,
|
13394
|
-
if (!
|
13395
|
-
|
13393
|
+
ScopeSpans.toObject = function toObject(message, options2) {
|
13394
|
+
if (!options2)
|
13395
|
+
options2 = {};
|
13396
13396
|
var object = {};
|
13397
|
-
if (
|
13397
|
+
if (options2.arrays || options2.defaults)
|
13398
13398
|
object.spans = [];
|
13399
|
-
if (
|
13399
|
+
if (options2.defaults) {
|
13400
13400
|
object.scope = null;
|
13401
13401
|
object.schemaUrl = "";
|
13402
13402
|
}
|
13403
13403
|
if (message.scope != null && message.hasOwnProperty("scope"))
|
13404
|
-
object.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.toObject(message.scope,
|
13404
|
+
object.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.toObject(message.scope, options2);
|
13405
13405
|
if (message.spans && message.spans.length) {
|
13406
13406
|
object.spans = [];
|
13407
13407
|
for (var j = 0; j < message.spans.length; ++j)
|
13408
|
-
object.spans[j] = $root.opentelemetry.proto.trace.v1.Span.toObject(message.spans[j],
|
13408
|
+
object.spans[j] = $root.opentelemetry.proto.trace.v1.Span.toObject(message.spans[j], options2);
|
13409
13409
|
}
|
13410
13410
|
if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl"))
|
13411
13411
|
object.schemaUrl = message.schemaUrl;
|
@@ -13850,50 +13850,50 @@ var require_root = __commonJS({
|
|
13850
13850
|
}
|
13851
13851
|
return message;
|
13852
13852
|
};
|
13853
|
-
Span.toObject = function toObject(message,
|
13854
|
-
if (!
|
13855
|
-
|
13853
|
+
Span.toObject = function toObject(message, options2) {
|
13854
|
+
if (!options2)
|
13855
|
+
options2 = {};
|
13856
13856
|
var object = {};
|
13857
|
-
if (
|
13857
|
+
if (options2.arrays || options2.defaults) {
|
13858
13858
|
object.attributes = [];
|
13859
13859
|
object.events = [];
|
13860
13860
|
object.links = [];
|
13861
13861
|
}
|
13862
|
-
if (
|
13863
|
-
if (
|
13862
|
+
if (options2.defaults) {
|
13863
|
+
if (options2.bytes === String)
|
13864
13864
|
object.traceId = "";
|
13865
13865
|
else {
|
13866
13866
|
object.traceId = [];
|
13867
|
-
if (
|
13867
|
+
if (options2.bytes !== Array)
|
13868
13868
|
object.traceId = $util.newBuffer(object.traceId);
|
13869
13869
|
}
|
13870
|
-
if (
|
13870
|
+
if (options2.bytes === String)
|
13871
13871
|
object.spanId = "";
|
13872
13872
|
else {
|
13873
13873
|
object.spanId = [];
|
13874
|
-
if (
|
13874
|
+
if (options2.bytes !== Array)
|
13875
13875
|
object.spanId = $util.newBuffer(object.spanId);
|
13876
13876
|
}
|
13877
13877
|
object.traceState = "";
|
13878
|
-
if (
|
13878
|
+
if (options2.bytes === String)
|
13879
13879
|
object.parentSpanId = "";
|
13880
13880
|
else {
|
13881
13881
|
object.parentSpanId = [];
|
13882
|
-
if (
|
13882
|
+
if (options2.bytes !== Array)
|
13883
13883
|
object.parentSpanId = $util.newBuffer(object.parentSpanId);
|
13884
13884
|
}
|
13885
13885
|
object.name = "";
|
13886
|
-
object.kind =
|
13886
|
+
object.kind = options2.enums === String ? "SPAN_KIND_UNSPECIFIED" : 0;
|
13887
13887
|
if ($util.Long) {
|
13888
13888
|
var long = new $util.Long(0, 0, false);
|
13889
|
-
object.startTimeUnixNano =
|
13889
|
+
object.startTimeUnixNano = options2.longs === String ? long.toString() : options2.longs === Number ? long.toNumber() : long;
|
13890
13890
|
} else
|
13891
|
-
object.startTimeUnixNano =
|
13891
|
+
object.startTimeUnixNano = options2.longs === String ? "0" : 0;
|
13892
13892
|
if ($util.Long) {
|
13893
13893
|
var long = new $util.Long(0, 0, false);
|
13894
|
-
object.endTimeUnixNano =
|
13894
|
+
object.endTimeUnixNano = options2.longs === String ? long.toString() : options2.longs === Number ? long.toNumber() : long;
|
13895
13895
|
} else
|
13896
|
-
object.endTimeUnixNano =
|
13896
|
+
object.endTimeUnixNano = options2.longs === String ? "0" : 0;
|
13897
13897
|
object.droppedAttributesCount = 0;
|
13898
13898
|
object.droppedEventsCount = 0;
|
13899
13899
|
object.droppedLinksCount = 0;
|
@@ -13901,50 +13901,50 @@ var require_root = __commonJS({
|
|
13901
13901
|
object.flags = 0;
|
13902
13902
|
}
|
13903
13903
|
if (message.traceId != null && message.hasOwnProperty("traceId"))
|
13904
|
-
object.traceId =
|
13904
|
+
object.traceId = options2.bytes === String ? $util.base64.encode(message.traceId, 0, message.traceId.length) : options2.bytes === Array ? Array.prototype.slice.call(message.traceId) : message.traceId;
|
13905
13905
|
if (message.spanId != null && message.hasOwnProperty("spanId"))
|
13906
|
-
object.spanId =
|
13906
|
+
object.spanId = options2.bytes === String ? $util.base64.encode(message.spanId, 0, message.spanId.length) : options2.bytes === Array ? Array.prototype.slice.call(message.spanId) : message.spanId;
|
13907
13907
|
if (message.traceState != null && message.hasOwnProperty("traceState"))
|
13908
13908
|
object.traceState = message.traceState;
|
13909
13909
|
if (message.parentSpanId != null && message.hasOwnProperty("parentSpanId"))
|
13910
|
-
object.parentSpanId =
|
13910
|
+
object.parentSpanId = options2.bytes === String ? $util.base64.encode(message.parentSpanId, 0, message.parentSpanId.length) : options2.bytes === Array ? Array.prototype.slice.call(message.parentSpanId) : message.parentSpanId;
|
13911
13911
|
if (message.name != null && message.hasOwnProperty("name"))
|
13912
13912
|
object.name = message.name;
|
13913
13913
|
if (message.kind != null && message.hasOwnProperty("kind"))
|
13914
|
-
object.kind =
|
13914
|
+
object.kind = options2.enums === String ? $root.opentelemetry.proto.trace.v1.Span.SpanKind[message.kind] === void 0 ? message.kind : $root.opentelemetry.proto.trace.v1.Span.SpanKind[message.kind] : message.kind;
|
13915
13915
|
if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano"))
|
13916
13916
|
if (typeof message.startTimeUnixNano === "number")
|
13917
|
-
object.startTimeUnixNano =
|
13917
|
+
object.startTimeUnixNano = options2.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano;
|
13918
13918
|
else
|
13919
|
-
object.startTimeUnixNano =
|
13919
|
+
object.startTimeUnixNano = options2.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options2.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano;
|
13920
13920
|
if (message.endTimeUnixNano != null && message.hasOwnProperty("endTimeUnixNano"))
|
13921
13921
|
if (typeof message.endTimeUnixNano === "number")
|
13922
|
-
object.endTimeUnixNano =
|
13922
|
+
object.endTimeUnixNano = options2.longs === String ? String(message.endTimeUnixNano) : message.endTimeUnixNano;
|
13923
13923
|
else
|
13924
|
-
object.endTimeUnixNano =
|
13924
|
+
object.endTimeUnixNano = options2.longs === String ? $util.Long.prototype.toString.call(message.endTimeUnixNano) : options2.longs === Number ? new $util.LongBits(message.endTimeUnixNano.low >>> 0, message.endTimeUnixNano.high >>> 0).toNumber() : message.endTimeUnixNano;
|
13925
13925
|
if (message.attributes && message.attributes.length) {
|
13926
13926
|
object.attributes = [];
|
13927
13927
|
for (var j = 0; j < message.attributes.length; ++j)
|
13928
|
-
object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j],
|
13928
|
+
object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options2);
|
13929
13929
|
}
|
13930
13930
|
if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount"))
|
13931
13931
|
object.droppedAttributesCount = message.droppedAttributesCount;
|
13932
13932
|
if (message.events && message.events.length) {
|
13933
13933
|
object.events = [];
|
13934
13934
|
for (var j = 0; j < message.events.length; ++j)
|
13935
|
-
object.events[j] = $root.opentelemetry.proto.trace.v1.Span.Event.toObject(message.events[j],
|
13935
|
+
object.events[j] = $root.opentelemetry.proto.trace.v1.Span.Event.toObject(message.events[j], options2);
|
13936
13936
|
}
|
13937
13937
|
if (message.droppedEventsCount != null && message.hasOwnProperty("droppedEventsCount"))
|
13938
13938
|
object.droppedEventsCount = message.droppedEventsCount;
|
13939
13939
|
if (message.links && message.links.length) {
|
13940
13940
|
object.links = [];
|
13941
13941
|
for (var j = 0; j < message.links.length; ++j)
|
13942
|
-
object.links[j] = $root.opentelemetry.proto.trace.v1.Span.Link.toObject(message.links[j],
|
13942
|
+
object.links[j] = $root.opentelemetry.proto.trace.v1.Span.Link.toObject(message.links[j], options2);
|
13943
13943
|
}
|
13944
13944
|
if (message.droppedLinksCount != null && message.hasOwnProperty("droppedLinksCount"))
|
13945
13945
|
object.droppedLinksCount = message.droppedLinksCount;
|
13946
13946
|
if (message.status != null && message.hasOwnProperty("status"))
|
13947
|
-
object.status = $root.opentelemetry.proto.trace.v1.Status.toObject(message.status,
|
13947
|
+
object.status = $root.opentelemetry.proto.trace.v1.Status.toObject(message.status, options2);
|
13948
13948
|
if (message.flags != null && message.hasOwnProperty("flags"))
|
13949
13949
|
object.flags = message.flags;
|
13950
13950
|
return object;
|
@@ -14108,32 +14108,32 @@ var require_root = __commonJS({
|
|
14108
14108
|
message.droppedAttributesCount = object.droppedAttributesCount >>> 0;
|
14109
14109
|
return message;
|
14110
14110
|
};
|
14111
|
-
Event.toObject = function toObject(message,
|
14112
|
-
if (!
|
14113
|
-
|
14111
|
+
Event.toObject = function toObject(message, options2) {
|
14112
|
+
if (!options2)
|
14113
|
+
options2 = {};
|
14114
14114
|
var object = {};
|
14115
|
-
if (
|
14115
|
+
if (options2.arrays || options2.defaults)
|
14116
14116
|
object.attributes = [];
|
14117
|
-
if (
|
14117
|
+
if (options2.defaults) {
|
14118
14118
|
if ($util.Long) {
|
14119
14119
|
var long = new $util.Long(0, 0, false);
|
14120
|
-
object.timeUnixNano =
|
14120
|
+
object.timeUnixNano = options2.longs === String ? long.toString() : options2.longs === Number ? long.toNumber() : long;
|
14121
14121
|
} else
|
14122
|
-
object.timeUnixNano =
|
14122
|
+
object.timeUnixNano = options2.longs === String ? "0" : 0;
|
14123
14123
|
object.name = "";
|
14124
14124
|
object.droppedAttributesCount = 0;
|
14125
14125
|
}
|
14126
14126
|
if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano"))
|
14127
14127
|
if (typeof message.timeUnixNano === "number")
|
14128
|
-
object.timeUnixNano =
|
14128
|
+
object.timeUnixNano = options2.longs === String ? String(message.timeUnixNano) : message.timeUnixNano;
|
14129
14129
|
else
|
14130
|
-
object.timeUnixNano =
|
14130
|
+
object.timeUnixNano = options2.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options2.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano;
|
14131
14131
|
if (message.name != null && message.hasOwnProperty("name"))
|
14132
14132
|
object.name = message.name;
|
14133
14133
|
if (message.attributes && message.attributes.length) {
|
14134
14134
|
object.attributes = [];
|
14135
14135
|
for (var j = 0; j < message.attributes.length; ++j)
|
14136
|
-
object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j],
|
14136
|
+
object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options2);
|
14137
14137
|
}
|
14138
14138
|
if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount"))
|
14139
14139
|
object.droppedAttributesCount = message.droppedAttributesCount;
|
@@ -14322,25 +14322,25 @@ var require_root = __commonJS({
|
|
14322
14322
|
message.flags = object.flags >>> 0;
|
14323
14323
|
return message;
|
14324
14324
|
};
|
14325
|
-
Link.toObject = function toObject(message,
|
14326
|
-
if (!
|
14327
|
-
|
14325
|
+
Link.toObject = function toObject(message, options2) {
|
14326
|
+
if (!options2)
|
14327
|
+
options2 = {};
|
14328
14328
|
var object = {};
|
14329
|
-
if (
|
14329
|
+
if (options2.arrays || options2.defaults)
|
14330
14330
|
object.attributes = [];
|
14331
|
-
if (
|
14332
|
-
if (
|
14331
|
+
if (options2.defaults) {
|
14332
|
+
if (options2.bytes === String)
|
14333
14333
|
object.traceId = "";
|
14334
14334
|
else {
|
14335
14335
|
object.traceId = [];
|
14336
|
-
if (
|
14336
|
+
if (options2.bytes !== Array)
|
14337
14337
|
object.traceId = $util.newBuffer(object.traceId);
|
14338
14338
|
}
|
14339
|
-
if (
|
14339
|
+
if (options2.bytes === String)
|
14340
14340
|
object.spanId = "";
|
14341
14341
|
else {
|
14342
14342
|
object.spanId = [];
|
14343
|
-
if (
|
14343
|
+
if (options2.bytes !== Array)
|
14344
14344
|
object.spanId = $util.newBuffer(object.spanId);
|
14345
14345
|
}
|
14346
14346
|
object.traceState = "";
|
@@ -14348,15 +14348,15 @@ var require_root = __commonJS({
|
|
14348
14348
|
object.flags = 0;
|
14349
14349
|
}
|
14350
14350
|
if (message.traceId != null && message.hasOwnProperty("traceId"))
|
14351
|
-
object.traceId =
|
14351
|
+
object.traceId = options2.bytes === String ? $util.base64.encode(message.traceId, 0, message.traceId.length) : options2.bytes === Array ? Array.prototype.slice.call(message.traceId) : message.traceId;
|
14352
14352
|
if (message.spanId != null && message.hasOwnProperty("spanId"))
|
14353
|
-
object.spanId =
|
14353
|
+
object.spanId = options2.bytes === String ? $util.base64.encode(message.spanId, 0, message.spanId.length) : options2.bytes === Array ? Array.prototype.slice.call(message.spanId) : message.spanId;
|
14354
14354
|
if (message.traceState != null && message.hasOwnProperty("traceState"))
|
14355
14355
|
object.traceState = message.traceState;
|
14356
14356
|
if (message.attributes && message.attributes.length) {
|
14357
14357
|
object.attributes = [];
|
14358
14358
|
for (var j = 0; j < message.attributes.length; ++j)
|
14359
|
-
object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j],
|
14359
|
+
object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options2);
|
14360
14360
|
}
|
14361
14361
|
if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount"))
|
14362
14362
|
object.droppedAttributesCount = message.droppedAttributesCount;
|
@@ -14483,18 +14483,18 @@ var require_root = __commonJS({
|
|
14483
14483
|
}
|
14484
14484
|
return message;
|
14485
14485
|
};
|
14486
|
-
Status2.toObject = function toObject(message,
|
14487
|
-
if (!
|
14488
|
-
|
14486
|
+
Status2.toObject = function toObject(message, options2) {
|
14487
|
+
if (!options2)
|
14488
|
+
options2 = {};
|
14489
14489
|
var object = {};
|
14490
|
-
if (
|
14490
|
+
if (options2.defaults) {
|
14491
14491
|
object.message = "";
|
14492
|
-
object.code =
|
14492
|
+
object.code = options2.enums === String ? "STATUS_CODE_UNSET" : 0;
|
14493
14493
|
}
|
14494
14494
|
if (message.message != null && message.hasOwnProperty("message"))
|
14495
14495
|
object.message = message.message;
|
14496
14496
|
if (message.code != null && message.hasOwnProperty("code"))
|
14497
|
-
object.code =
|
14497
|
+
object.code = options2.enums === String ? $root.opentelemetry.proto.trace.v1.Status.StatusCode[message.code] === void 0 ? message.code : $root.opentelemetry.proto.trace.v1.Status.StatusCode[message.code] : message.code;
|
14498
14498
|
return object;
|
14499
14499
|
};
|
14500
14500
|
Status2.prototype.toJSON = function toJSON() {
|
@@ -14630,16 +14630,16 @@ var require_root = __commonJS({
|
|
14630
14630
|
}
|
14631
14631
|
return message;
|
14632
14632
|
};
|
14633
|
-
ExportTraceServiceRequest.toObject = function toObject(message,
|
14634
|
-
if (!
|
14635
|
-
|
14633
|
+
ExportTraceServiceRequest.toObject = function toObject(message, options2) {
|
14634
|
+
if (!options2)
|
14635
|
+
options2 = {};
|
14636
14636
|
var object = {};
|
14637
|
-
if (
|
14637
|
+
if (options2.arrays || options2.defaults)
|
14638
14638
|
object.resourceSpans = [];
|
14639
14639
|
if (message.resourceSpans && message.resourceSpans.length) {
|
14640
14640
|
object.resourceSpans = [];
|
14641
14641
|
for (var j = 0; j < message.resourceSpans.length; ++j)
|
14642
|
-
object.resourceSpans[j] = $root.opentelemetry.proto.trace.v1.ResourceSpans.toObject(message.resourceSpans[j],
|
14642
|
+
object.resourceSpans[j] = $root.opentelemetry.proto.trace.v1.ResourceSpans.toObject(message.resourceSpans[j], options2);
|
14643
14643
|
}
|
14644
14644
|
return object;
|
14645
14645
|
};
|
@@ -14725,14 +14725,14 @@ var require_root = __commonJS({
|
|
14725
14725
|
}
|
14726
14726
|
return message;
|
14727
14727
|
};
|
14728
|
-
ExportTraceServiceResponse.toObject = function toObject(message,
|
14729
|
-
if (!
|
14730
|
-
|
14728
|
+
ExportTraceServiceResponse.toObject = function toObject(message, options2) {
|
14729
|
+
if (!options2)
|
14730
|
+
options2 = {};
|
14731
14731
|
var object = {};
|
14732
|
-
if (
|
14732
|
+
if (options2.defaults)
|
14733
14733
|
object.partialSuccess = null;
|
14734
14734
|
if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess"))
|
14735
|
-
object.partialSuccess = $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(message.partialSuccess,
|
14735
|
+
object.partialSuccess = $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(message.partialSuccess, options2);
|
14736
14736
|
return object;
|
14737
14737
|
};
|
14738
14738
|
ExportTraceServiceResponse.prototype.toJSON = function toJSON() {
|
@@ -14837,23 +14837,23 @@ var require_root = __commonJS({
|
|
14837
14837
|
message.errorMessage = String(object.errorMessage);
|
14838
14838
|
return message;
|
14839
14839
|
};
|
14840
|
-
ExportTracePartialSuccess.toObject = function toObject(message,
|
14841
|
-
if (!
|
14842
|
-
|
14840
|
+
ExportTracePartialSuccess.toObject = function toObject(message, options2) {
|
14841
|
+
if (!options2)
|
14842
|
+
options2 = {};
|
14843
14843
|
var object = {};
|
14844
|
-
if (
|
14844
|
+
if (options2.defaults) {
|
14845
14845
|
if ($util.Long) {
|
14846
14846
|
var long = new $util.Long(0, 0, false);
|
14847
|
-
object.rejectedSpans =
|
14847
|
+
object.rejectedSpans = options2.longs === String ? long.toString() : options2.longs === Number ? long.toNumber() : long;
|
14848
14848
|
} else
|
14849
|
-
object.rejectedSpans =
|
14849
|
+
object.rejectedSpans = options2.longs === String ? "0" : 0;
|
14850
14850
|
object.errorMessage = "";
|
14851
14851
|
}
|
14852
14852
|
if (message.rejectedSpans != null && message.hasOwnProperty("rejectedSpans"))
|
14853
14853
|
if (typeof message.rejectedSpans === "number")
|
14854
|
-
object.rejectedSpans =
|
14854
|
+
object.rejectedSpans = options2.longs === String ? String(message.rejectedSpans) : message.rejectedSpans;
|
14855
14855
|
else
|
14856
|
-
object.rejectedSpans =
|
14856
|
+
object.rejectedSpans = options2.longs === String ? $util.Long.prototype.toString.call(message.rejectedSpans) : options2.longs === Number ? new $util.LongBits(message.rejectedSpans.low >>> 0, message.rejectedSpans.high >>> 0).toNumber() : message.rejectedSpans;
|
14857
14857
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
14858
14858
|
object.errorMessage = message.errorMessage;
|
14859
14859
|
return object;
|
@@ -14974,16 +14974,16 @@ var require_root = __commonJS({
|
|
14974
14974
|
}
|
14975
14975
|
return message;
|
14976
14976
|
};
|
14977
|
-
ExportMetricsServiceRequest.toObject = function toObject(message,
|
14978
|
-
if (!
|
14979
|
-
|
14977
|
+
ExportMetricsServiceRequest.toObject = function toObject(message, options2) {
|
14978
|
+
if (!options2)
|
14979
|
+
options2 = {};
|
14980
14980
|
var object = {};
|
14981
|
-
if (
|
14981
|
+
if (options2.arrays || options2.defaults)
|
14982
14982
|
object.resourceMetrics = [];
|
14983
14983
|
if (message.resourceMetrics && message.resourceMetrics.length) {
|
14984
14984
|
object.resourceMetrics = [];
|
14985
14985
|
for (var j = 0; j < message.resourceMetrics.length; ++j)
|
14986
|
-
object.resourceMetrics[j] = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(message.resourceMetrics[j],
|
14986
|
+
object.resourceMetrics[j] = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(message.resourceMetrics[j], options2);
|
14987
14987
|
}
|
14988
14988
|
return object;
|
14989
14989
|
};
|
@@ -15069,14 +15069,14 @@ var require_root = __commonJS({
|
|
15069
15069
|
}
|
15070
15070
|
return message;
|
15071
15071
|
};
|
15072
|
-
ExportMetricsServiceResponse.toObject = function toObject(message,
|
15073
|
-
if (!
|
15074
|
-
|
15072
|
+
ExportMetricsServiceResponse.toObject = function toObject(message, options2) {
|
15073
|
+
if (!options2)
|
15074
|
+
options2 = {};
|
15075
15075
|
var object = {};
|
15076
|
-
if (
|
15076
|
+
if (options2.defaults)
|
15077
15077
|
object.partialSuccess = null;
|
15078
15078
|
if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess"))
|
15079
|
-
object.partialSuccess = $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(message.partialSuccess,
|
15079
|
+
object.partialSuccess = $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(message.partialSuccess, options2);
|
15080
15080
|
return object;
|
15081
15081
|
};
|
15082
15082
|
ExportMetricsServiceResponse.prototype.toJSON = function toJSON() {
|
@@ -15181,23 +15181,23 @@ var require_root = __commonJS({
|
|
15181
15181
|
message.errorMessage = String(object.errorMessage);
|
15182
15182
|
return message;
|
15183
15183
|
};
|
15184
|
-
ExportMetricsPartialSuccess.toObject = function toObject(message,
|
15185
|
-
if (!
|
15186
|
-
|
15184
|
+
ExportMetricsPartialSuccess.toObject = function toObject(message, options2) {
|
15185
|
+
if (!options2)
|
15186
|
+
options2 = {};
|
15187
15187
|
var object = {};
|
15188
|
-
if (
|
15188
|
+
if (options2.defaults) {
|
15189
15189
|
if ($util.Long) {
|
15190
15190
|
var long = new $util.Long(0, 0, false);
|
15191
|
-
object.rejectedDataPoints =
|
15191
|
+
object.rejectedDataPoints = options2.longs === String ? long.toString() : options2.longs === Number ? long.toNumber() : long;
|
15192
15192
|
} else
|
15193
|
-
object.rejectedDataPoints =
|
15193
|
+
object.rejectedDataPoints = options2.longs === String ? "0" : 0;
|
15194
15194
|
object.errorMessage = "";
|
15195
15195
|
}
|
15196
15196
|
if (message.rejectedDataPoints != null && message.hasOwnProperty("rejectedDataPoints"))
|
15197
15197
|
if (typeof message.rejectedDataPoints === "number")
|
15198
|
-
object.rejectedDataPoints =
|
15198
|
+
object.rejectedDataPoints = options2.longs === String ? String(message.rejectedDataPoints) : message.rejectedDataPoints;
|
15199
15199
|
else
|
15200
|
-
object.rejectedDataPoints =
|
15200
|
+
object.rejectedDataPoints = options2.longs === String ? $util.Long.prototype.toString.call(message.rejectedDataPoints) : options2.longs === Number ? new $util.LongBits(message.rejectedDataPoints.low >>> 0, message.rejectedDataPoints.high >>> 0).toNumber() : message.rejectedDataPoints;
|
15201
15201
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
15202
15202
|
object.errorMessage = message.errorMessage;
|
15203
15203
|
return object;
|
@@ -15318,16 +15318,16 @@ var require_root = __commonJS({
|
|
15318
15318
|
}
|
15319
15319
|
return message;
|
15320
15320
|
};
|
15321
|
-
ExportLogsServiceRequest.toObject = function toObject(message,
|
15322
|
-
if (!
|
15323
|
-
|
15321
|
+
ExportLogsServiceRequest.toObject = function toObject(message, options2) {
|
15322
|
+
if (!options2)
|
15323
|
+
options2 = {};
|
15324
15324
|
var object = {};
|
15325
|
-
if (
|
15325
|
+
if (options2.arrays || options2.defaults)
|
15326
15326
|
object.resourceLogs = [];
|
15327
15327
|
if (message.resourceLogs && message.resourceLogs.length) {
|
15328
15328
|
object.resourceLogs = [];
|
15329
15329
|
for (var j = 0; j < message.resourceLogs.length; ++j)
|
15330
|
-
object.resourceLogs[j] = $root.opentelemetry.proto.logs.v1.ResourceLogs.toObject(message.resourceLogs[j],
|
15330
|
+
object.resourceLogs[j] = $root.opentelemetry.proto.logs.v1.ResourceLogs.toObject(message.resourceLogs[j], options2);
|
15331
15331
|
}
|
15332
15332
|
return object;
|
15333
15333
|
};
|
@@ -15413,14 +15413,14 @@ var require_root = __commonJS({
|
|
15413
15413
|
}
|
15414
15414
|
return message;
|
15415
15415
|
};
|
15416
|
-
ExportLogsServiceResponse.toObject = function toObject(message,
|
15417
|
-
if (!
|
15418
|
-
|
15416
|
+
ExportLogsServiceResponse.toObject = function toObject(message, options2) {
|
15417
|
+
if (!options2)
|
15418
|
+
options2 = {};
|
15419
15419
|
var object = {};
|
15420
|
-
if (
|
15420
|
+
if (options2.defaults)
|
15421
15421
|
object.partialSuccess = null;
|
15422
15422
|
if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess"))
|
15423
|
-
object.partialSuccess = $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(message.partialSuccess,
|
15423
|
+
object.partialSuccess = $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(message.partialSuccess, options2);
|
15424
15424
|
return object;
|
15425
15425
|
};
|
15426
15426
|
ExportLogsServiceResponse.prototype.toJSON = function toJSON() {
|
@@ -15525,23 +15525,23 @@ var require_root = __commonJS({
|
|
15525
15525
|
message.errorMessage = String(object.errorMessage);
|
15526
15526
|
return message;
|
15527
15527
|
};
|
15528
|
-
ExportLogsPartialSuccess.toObject = function toObject(message,
|
15529
|
-
if (!
|
15530
|
-
|
15528
|
+
ExportLogsPartialSuccess.toObject = function toObject(message, options2) {
|
15529
|
+
if (!options2)
|
15530
|
+
options2 = {};
|
15531
15531
|
var object = {};
|
15532
|
-
if (
|
15532
|
+
if (options2.defaults) {
|
15533
15533
|
if ($util.Long) {
|
15534
15534
|
var long = new $util.Long(0, 0, false);
|
15535
|
-
object.rejectedLogRecords =
|
15535
|
+
object.rejectedLogRecords = options2.longs === String ? long.toString() : options2.longs === Number ? long.toNumber() : long;
|
15536
15536
|
} else
|
15537
|
-
object.rejectedLogRecords =
|
15537
|
+
object.rejectedLogRecords = options2.longs === String ? "0" : 0;
|
15538
15538
|
object.errorMessage = "";
|
15539
15539
|
}
|
15540
15540
|
if (message.rejectedLogRecords != null && message.hasOwnProperty("rejectedLogRecords"))
|
15541
15541
|
if (typeof message.rejectedLogRecords === "number")
|
15542
|
-
object.rejectedLogRecords =
|
15542
|
+
object.rejectedLogRecords = options2.longs === String ? String(message.rejectedLogRecords) : message.rejectedLogRecords;
|
15543
15543
|
else
|
15544
|
-
object.rejectedLogRecords =
|
15544
|
+
object.rejectedLogRecords = options2.longs === String ? $util.Long.prototype.toString.call(message.rejectedLogRecords) : options2.longs === Number ? new $util.LongBits(message.rejectedLogRecords.low >>> 0, message.rejectedLogRecords.high >>> 0).toNumber() : message.rejectedLogRecords;
|
15545
15545
|
if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
|
15546
15546
|
object.errorMessage = message.errorMessage;
|
15547
15547
|
return object;
|
@@ -15651,16 +15651,16 @@ var require_root = __commonJS({
|
|
15651
15651
|
}
|
15652
15652
|
return message;
|
15653
15653
|
};
|
15654
|
-
MetricsData.toObject = function toObject(message,
|
15655
|
-
if (!
|
15656
|
-
|
15654
|
+
MetricsData.toObject = function toObject(message, options2) {
|
15655
|
+
if (!options2)
|
15656
|
+
options2 = {};
|
15657
15657
|
var object = {};
|
15658
|
-
if (
|
15658
|
+
if (options2.arrays || options2.defaults)
|
15659
15659
|
object.resourceMetrics = [];
|
15660
15660
|
if (message.resourceMetrics && message.resourceMetrics.length) {
|
15661
15661
|
object.resourceMetrics = [];
|
15662
15662
|
for (var j = 0; j < message.resourceMetrics.length; ++j)
|
15663
|
-
object.resourceMetrics[j] = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(message.resourceMetrics[j],
|
15663
|
+
object.resourceMetrics[j] = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(message.resourceMetrics[j], options2);
|
15664
15664
|
}
|
15665
15665
|
return object;
|
15666
15666
|
};
|
@@ -15795,22 +15795,22 @@ var require_root = __commonJS({
|
|
15795
15795
|
message.schemaUrl = String(object.schemaUrl);
|
15796
15796
|
return message;
|
15797
15797
|
};
|
15798
|
-
ResourceMetrics.toObject = function toObject(message,
|
15799
|
-
if (!
|
15800
|
-
|
15798
|
+
ResourceMetrics.toObject = function toObject(message, options2) {
|
15799
|
+
if (!options2)
|
15800
|
+
options2 = {};
|
15801
15801
|
var object = {};
|
15802
|
-
if (
|
15802
|
+
if (options2.arrays || options2.defaults)
|
15803
15803
|
object.scopeMetrics = [];
|
15804
|
-
if (
|
15804
|
+
if (options2.defaults) {
|
15805
15805
|
object.resource = null;
|
15806
15806
|
object.schemaUrl = "";
|
15807
15807
|
}
|
15808
15808
|
if (message.resource != null && message.hasOwnProperty("resource"))
|
15809
|
-
object.resource = $root.opentelemetry.proto.resource.v1.Resource.toObject(message.resource,
|
15809
|
+
object.resource = $root.opentelemetry.proto.resource.v1.Resource.toObject(message.resource, options2);
|
15810
15810
|
if (message.scopeMetrics && message.scopeMetrics.length) {
|
15811
15811
|
object.scopeMetrics = [];
|
15812
15812
|
for (var j = 0; j < message.scopeMetrics.length; ++j)
|
15813
|
-
object.scopeMetrics[j] = $root.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(message.scopeMetrics[j],
|
15813
|
+
object.scopeMetrics[j] = $root.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(message.scopeMetrics[j], options2);
|
15814
15814
|
}
|
15815
15815
|
if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl"))
|
15816
15816
|
object.schemaUrl = message.schemaUrl;
|
@@ -15947,22 +15947,22 @@ var require_root = __commonJS({
|
|
15947
15947
|
message.schemaUrl = String(object.schemaUrl);
|
15948
15948
|
return message;
|
15949
15949
|
};
|
15950
|
-
ScopeMetrics.toObject = function toObject(message,
|
15951
|
-
if (!
|
15952
|
-
|
15950
|
+
ScopeMetrics.toObject = function toObject(message, options2) {
|
15951
|
+
if (!options2)
|
15952
|
+
options2 = {};
|
15953
15953
|
var object = {};
|
15954
|
-
if (
|
15954
|
+
if (options2.arrays || options2.defaults)
|
15955
15955
|
object.metrics = [];
|
15956
|
-
if (
|
15956
|
+
if (options2.defaults) {
|
15957
15957
|
object.scope = null;
|
15958
15958
|
object.schemaUrl = "";
|
15959
15959
|
}
|
15960
15960
|
if (message.scope != null && message.hasOwnProperty("scope"))
|
15961
|
-
object.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.toObject(message.scope,
|
15961
|
+
object.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.toObject(message.scope, options2);
|
15962
15962
|
if (message.metrics && message.metrics.length) {
|
15963
15963
|
object.metrics = [];
|
15964
15964
|
for (var j = 0; j < message.metrics.length; ++j)
|
15965
|
-
object.metrics[j] = $root.opentelemetry.proto.metrics.v1.Metric.toObject(message.metrics[j],
|
15965
|
+
object.metrics[j] = $root.opentelemetry.proto.metrics.v1.Metric.toObject(message.metrics[j], options2);
|
15966
15966
|
}
|
15967
15967
|
if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl"))
|
15968
15968
|
object.schemaUrl = message.schemaUrl;
|
@@ -16240,13 +16240,13 @@ var require_root = __commonJS({
|
|
16240
16240
|
}
|
16241
16241
|
return message;
|
16242
16242
|
};
|
16243
|
-
Metric.toObject = function toObject(message,
|
16244
|
-
if (!
|
16245
|
-
|
16243
|
+
Metric.toObject = function toObject(message, options2) {
|
16244
|
+
if (!options2)
|
16245
|
+
options2 = {};
|
16246
16246
|
var object = {};
|
16247
|
-
if (
|
16247
|
+
if (options2.arrays || options2.defaults)
|
16248
16248
|
object.metadata = [];
|
16249
|
-
if (
|
16249
|
+
if (options2.defaults) {
|
16250
16250
|
object.name = "";
|
16251
16251
|
object.description = "";
|
16252
16252
|
object.unit = "";
|
@@ -16258,34 +16258,34 @@ var require_root = __commonJS({
|
|
16258
16258
|
if (message.unit != null && message.hasOwnProperty("unit"))
|
16259
16259
|
object.unit = message.unit;
|
16260
16260
|
if (message.gauge != null && message.hasOwnProperty("gauge")) {
|
16261
|
-
object.gauge = $root.opentelemetry.proto.metrics.v1.Gauge.toObject(message.gauge,
|
16262
|
-
if (
|
16261
|
+
object.gauge = $root.opentelemetry.proto.metrics.v1.Gauge.toObject(message.gauge, options2);
|
16262
|
+
if (options2.oneofs)
|
16263
16263
|
object.data = "gauge";
|
16264
16264
|
}
|
16265
16265
|
if (message.sum != null && message.hasOwnProperty("sum")) {
|
16266
|
-
object.sum = $root.opentelemetry.proto.metrics.v1.Sum.toObject(message.sum,
|
16267
|
-
if (
|
16266
|
+
object.sum = $root.opentelemetry.proto.metrics.v1.Sum.toObject(message.sum, options2);
|
16267
|
+
if (options2.oneofs)
|
16268
16268
|
object.data = "sum";
|
16269
16269
|
}
|
16270
16270
|
if (message.histogram != null && message.hasOwnProperty("histogram")) {
|
16271
|
-
object.histogram = $root.opentelemetry.proto.metrics.v1.Histogram.toObject(message.histogram,
|
16272
|
-
if (
|
16271
|
+
object.histogram = $root.opentelemetry.proto.metrics.v1.Histogram.toObject(message.histogram, options2);
|
16272
|
+
if (options2.oneofs)
|
16273
16273
|
object.data = "histogram";
|
16274
16274
|
}
|
16275
16275
|
if (message.exponentialHistogram != null && message.hasOwnProperty("exponentialHistogram")) {
|
16276
|
-
object.exponentialHistogram = $root.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(message.exponentialHistogram,
|
16277
|
-
if (
|
16276
|
+
object.exponentialHistogram = $root.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(message.exponentialHistogram, options2);
|
16277
|
+
if (options2.oneofs)
|
16278
16278
|
object.data = "exponentialHistogram";
|
16279
16279
|
}
|
16280
16280
|
if (message.summary != null && message.hasOwnProperty("summary")) {
|
16281
|
-
object.summary = $root.opentelemetry.proto.metrics.v1.Summary.toObject(message.summary,
|
16282
|
-
if (
|
16281
|
+
object.summary = $root.opentelemetry.proto.metrics.v1.Summary.toObject(message.summary, options2);
|
16282
|
+
if (options2.oneofs)
|
16283
16283
|
object.data = "summary";
|
16284
16284
|
}
|
16285
16285
|
if (message.metadata && message.metadata.length) {
|
16286
16286
|
object.metadata = [];
|
16287
16287
|
for (var j = 0; j < message.metadata.length; ++j)
|
16288
|
-
object.metadata[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.metadata[j],
|
16288
|
+
object.metadata[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.metadata[j], options2);
|
16289
16289
|
}
|
16290
16290
|
return object;
|
16291
16291
|
};
|
@@ -16384,16 +16384,16 @@ var require_root = __commonJS({
|
|
16384
16384
|
}
|
16385
16385
|
return message;
|
16386
16386
|
};
|
16387
|
-
Gauge.toObject = function toObject(message,
|
16388
|
-
if (!
|
16389
|
-
|
16387
|
+
Gauge.toObject = function toObject(message, options2) {
|
16388
|
+
if (!options2)
|
16389
|
+
options2 = {};
|
16390
16390
|
var object = {};
|
16391
|
-
if (
|
16391
|
+
if (options2.arrays || options2.defaults)
|
16392
16392
|
object.dataPoints = [];
|
16393
16393
|
if (message.dataPoints && message.dataPoints.length) {
|
16394
16394
|
object.dataPoints = [];
|
16395
16395
|
for (var j = 0; j < message.dataPoints.length; ++j)
|
16396
|
-
object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(message.dataPoints[j],
|
16396
|
+
object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(message.dataPoints[j], options2);
|
16397
16397
|
}
|
16398
16398
|
return object;
|
16399
16399
|
};
|
@@ -16547,23 +16547,23 @@ var require_root = __commonJS({
|
|
16547
16547
|
message.isMonotonic = Boolean(object.isMonotonic);
|
16548
16548
|
return message;
|
16549
16549
|
};
|
16550
|
-
Sum.toObject = function toObject(message,
|
16551
|
-
if (!
|
16552
|
-
|
16550
|
+
Sum.toObject = function toObject(message, options2) {
|
16551
|
+
if (!options2)
|
16552
|
+
options2 = {};
|
16553
16553
|
var object = {};
|
16554
|
-
if (
|
16554
|
+
if (options2.arrays || options2.defaults)
|
16555
16555
|
object.dataPoints = [];
|
16556
|
-
if (
|
16557
|
-
object.aggregationTemporality =
|
16556
|
+
if (options2.defaults) {
|
16557
|
+
object.aggregationTemporality = options2.enums === String ? "AGGREGATION_TEMPORALITY_UNSPECIFIED" : 0;
|
16558
16558
|
object.isMonotonic = false;
|
16559
16559
|
}
|
16560
16560
|
if (message.dataPoints && message.dataPoints.length) {
|
16561
16561
|
object.dataPoints = [];
|
16562
16562
|
for (var j = 0; j < message.dataPoints.length; ++j)
|
16563
|
-
object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(message.dataPoints[j],
|
16563
|
+
object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(message.dataPoints[j], options2);
|
16564
16564
|
}
|
16565
16565
|
if (message.aggregationTemporality != null && message.hasOwnProperty("aggregationTemporality"))
|
16566
|
-
object.aggregationTemporality =
|
16566
|
+
object.aggregationTemporality = options2.enums === String ? $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] === void 0 ? message.aggregationTemporality : $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] : message.aggregationTemporality;
|
16567
16567
|
if (message.isMonotonic != null && message.hasOwnProperty("isMonotonic"))
|
16568
16568
|
object.isMonotonic = message.isMonotonic;
|
16569
16569
|
return object;
|
@@ -16702,21 +16702,21 @@ var require_root = __commonJS({
|
|
16702
16702
|
}
|
16703
16703
|
return message;
|
16704
16704
|
};
|
16705
|
-
Histogram.toObject = function toObject(message,
|
16706
|
-
if (!
|
16707
|
-
|
16705
|
+
Histogram.toObject = function toObject(message, options2) {
|
16706
|
+
if (!options2)
|
16707
|
+
options2 = {};
|
16708
16708
|
var object = {};
|
16709
|
-
if (
|
16709
|
+
if (options2.arrays || options2.defaults)
|
16710
16710
|
object.dataPoints = [];
|
16711
|
-
if (
|
16712
|
-
object.aggregationTemporality =
|
16711
|
+
if (options2.defaults)
|
16712
|
+
object.aggregationTemporality = options2.enums === String ? "AGGREGATION_TEMPORALITY_UNSPECIFIED" : 0;
|
16713
16713
|
if (message.dataPoints && message.dataPoints.length) {
|
16714
16714
|
object.dataPoints = [];
|
16715
16715
|
for (var j = 0; j < message.dataPoints.length; ++j)
|
16716
|
-
object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(message.dataPoints[j],
|
16716
|
+
object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(message.dataPoints[j], options2);
|
16717
16717
|
}
|
16718
16718
|
if (message.aggregationTemporality != null && message.hasOwnProperty("aggregationTemporality"))
|
16719
|
-
object.aggregationTemporality =
|
16719
|
+
object.aggregationTemporality = options2.enums === String ? $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] === void 0 ? message.aggregationTemporality : $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] : message.aggregationTemporality;
|
16720
16720
|
return object;
|
16721
16721
|
};
|
16722
16722
|
Histogram.prototype.toJSON = function toJSON() {
|
@@ -16853,21 +16853,21 @@ var require_root = __commonJS({
|
|
16853
16853
|
}
|
16854
16854
|
return message;
|
16855
16855
|
};
|
16856
|
-
ExponentialHistogram.toObject = function toObject(message,
|
16857
|
-
if (!
|
16858
|
-
|
16856
|
+
ExponentialHistogram.toObject = function toObject(message, options2) {
|
16857
|
+
if (!options2)
|
16858
|
+
options2 = {};
|
16859
16859
|
var object = {};
|
16860
|
-
if (
|
16860
|
+
if (options2.arrays || options2.defaults)
|
16861
16861
|
object.dataPoints = [];
|
16862
|
-
if (
|
16863
|
-
object.aggregationTemporality =
|
16862
|
+
if (options2.defaults)
|
16863
|
+
object.aggregationTemporality = options2.enums === String ? "AGGREGATION_TEMPORALITY_UNSPECIFIED" : 0;
|
16864
16864
|
if (message.dataPoints && message.dataPoints.length) {
|
16865
16865
|
object.dataPoints = [];
|
16866
16866
|
for (var j = 0; j < message.dataPoints.length; ++j)
|
16867
|
-
object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(message.dataPoints[j],
|
16867
|
+
object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(message.dataPoints[j], options2);
|
16868
16868
|
}
|
16869
16869
|
if (message.aggregationTemporality != null && message.hasOwnProperty("aggregationTemporality"))
|
16870
|
-
object.aggregationTemporality =
|
16870
|
+
object.aggregationTemporality = options2.enums === String ? $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] === void 0 ? message.aggregationTemporality : $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] : message.aggregationTemporality;
|
16871
16871
|
return object;
|
16872
16872
|
};
|
16873
16873
|
ExponentialHistogram.prototype.toJSON = function toJSON() {
|
@@ -16965,16 +16965,16 @@ var require_root = __commonJS({
|
|
16965
16965
|
}
|
16966
16966
|
return message;
|
16967
16967
|
};
|
16968
|
-
Summary.toObject = function toObject(message,
|
16969
|
-
if (!
|
16970
|
-
|
16968
|
+
Summary.toObject = function toObject(message, options2) {
|
16969
|
+
if (!options2)
|
16970
|
+
options2 = {};
|
16971
16971
|
var object = {};
|
16972
|
-
if (
|
16972
|
+
if (options2.arrays || options2.defaults)
|
16973
16973
|
object.dataPoints = [];
|
16974
16974
|
if (message.dataPoints && message.dataPoints.length) {
|
16975
16975
|
object.dataPoints = [];
|
16976
16976
|
for (var j = 0; j < message.dataPoints.length; ++j)
|
16977
|
-
object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(message.dataPoints[j],
|
16977
|
+
object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(message.dataPoints[j], options2);
|
16978
16978
|
}
|
16979
16979
|
return object;
|
16980
16980
|
};
|
@@ -17233,59 +17233,59 @@ var require_root = __commonJS({
|
|
17233
17233
|
message.flags = object.flags >>> 0;
|
17234
17234
|
return message;
|
17235
17235
|
};
|
17236
|
-
NumberDataPoint.toObject = function toObject(message,
|
17237
|
-
if (!
|
17238
|
-
|
17236
|
+
NumberDataPoint.toObject = function toObject(message, options2) {
|
17237
|
+
if (!options2)
|
17238
|
+
options2 = {};
|
17239
17239
|
var object = {};
|
17240
|
-
if (
|
17240
|
+
if (options2.arrays || options2.defaults) {
|
17241
17241
|
object.exemplars = [];
|
17242
17242
|
object.attributes = [];
|
17243
17243
|
}
|
17244
|
-
if (
|
17244
|
+
if (options2.defaults) {
|
17245
17245
|
if ($util.Long) {
|
17246
17246
|
var long = new $util.Long(0, 0, false);
|
17247
|
-
object.startTimeUnixNano =
|
17247
|
+
object.startTimeUnixNano = options2.longs === String ? long.toString() : options2.longs === Number ? long.toNumber() : long;
|
17248
17248
|
} else
|
17249
|
-
object.startTimeUnixNano =
|
17249
|
+
object.startTimeUnixNano = options2.longs === String ? "0" : 0;
|
17250
17250
|
if ($util.Long) {
|
17251
17251
|
var long = new $util.Long(0, 0, false);
|
17252
|
-
object.timeUnixNano =
|
17252
|
+
object.timeUnixNano = options2.longs === String ? long.toString() : options2.longs === Number ? long.toNumber() : long;
|
17253
17253
|
} else
|
17254
|
-
object.timeUnixNano =
|
17254
|
+
object.timeUnixNano = options2.longs === String ? "0" : 0;
|
17255
17255
|
object.flags = 0;
|
17256
17256
|
}
|
17257
17257
|
if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano"))
|
17258
17258
|
if (typeof message.startTimeUnixNano === "number")
|
17259
|
-
object.startTimeUnixNano =
|
17259
|
+
object.startTimeUnixNano = options2.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano;
|
17260
17260
|
else
|
17261
|
-
object.startTimeUnixNano =
|
17261
|
+
object.startTimeUnixNano = options2.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options2.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano;
|
17262
17262
|
if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano"))
|
17263
17263
|
if (typeof message.timeUnixNano === "number")
|
17264
|
-
object.timeUnixNano =
|
17264
|
+
object.timeUnixNano = options2.longs === String ? String(message.timeUnixNano) : message.timeUnixNano;
|
17265
17265
|
else
|
17266
|
-
object.timeUnixNano =
|
17266
|
+
object.timeUnixNano = options2.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options2.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano;
|
17267
17267
|
if (message.asDouble != null && message.hasOwnProperty("asDouble")) {
|
17268
|
-
object.asDouble =
|
17269
|
-
if (
|
17268
|
+
object.asDouble = options2.json && !isFinite(message.asDouble) ? String(message.asDouble) : message.asDouble;
|
17269
|
+
if (options2.oneofs)
|
17270
17270
|
object.value = "asDouble";
|
17271
17271
|
}
|
17272
17272
|
if (message.exemplars && message.exemplars.length) {
|
17273
17273
|
object.exemplars = [];
|
17274
17274
|
for (var j = 0; j < message.exemplars.length; ++j)
|
17275
|
-
object.exemplars[j] = $root.opentelemetry.proto.metrics.v1.Exemplar.toObject(message.exemplars[j],
|
17275
|
+
object.exemplars[j] = $root.opentelemetry.proto.metrics.v1.Exemplar.toObject(message.exemplars[j], options2);
|
17276
17276
|
}
|
17277
17277
|
if (message.asInt != null && message.hasOwnProperty("asInt")) {
|
17278
17278
|
if (typeof message.asInt === "number")
|
17279
|
-
object.asInt =
|
17279
|
+
object.asInt = options2.longs === String ? String(message.asInt) : message.asInt;
|
17280
17280
|
else
|
17281
|
-
object.asInt =
|
17282
|
-
if (
|
17281
|
+
object.asInt = options2.longs === String ? $util.Long.prototype.toString.call(message.asInt) : options2.longs === Number ? new $util.LongBits(message.asInt.low >>> 0, message.asInt.high >>> 0).toNumber() : message.asInt;
|
17282
|
+
if (options2.oneofs)
|
17283
17283
|
object.value = "asInt";
|
17284
17284
|
}
|
17285
17285
|
if (message.attributes && message.attributes.length) {
|
17286
17286
|
object.attributes = [];
|
17287
17287
|
for (var j = 0; j < message.attributes.length; ++j)
|
17288
|
-
object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j],
|
17288
|
+
object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options2);
|
17289
17289
|
}
|
17290
17290
|
if (message.flags != null && message.hasOwnProperty("flags"))
|
17291
17291
|
object.flags = message.flags;
|
@@ -17651,87 +17651,87 @@ var require_root = __commonJS({
|
|
17651
17651
|
message.max = Number(object.max);
|
17652
17652
|
return message;
|
17653
17653
|
};
|
17654
|
-
HistogramDataPoint.toObject = function toObject(message,
|
17655
|
-
if (!
|
17656
|
-
|
17654
|
+
HistogramDataPoint.toObject = function toObject(message, options2) {
|
17655
|
+
if (!options2)
|
17656
|
+
options2 = {};
|
17657
17657
|
var object = {};
|
17658
|
-
if (
|
17658
|
+
if (options2.arrays || options2.defaults) {
|
17659
17659
|
object.bucketCounts = [];
|
17660
17660
|
object.explicitBounds = [];
|
17661
17661
|
object.exemplars = [];
|
17662
17662
|
object.attributes = [];
|
17663
17663
|
}
|
17664
|
-
if (
|
17664
|
+
if (options2.defaults) {
|
17665
17665
|
if ($util.Long) {
|
17666
17666
|
var long = new $util.Long(0, 0, false);
|
17667
|
-
object.startTimeUnixNano =
|
17667
|
+
object.startTimeUnixNano = options2.longs === String ? long.toString() : options2.longs === Number ? long.toNumber() : long;
|
17668
17668
|
} else
|
17669
|
-
object.startTimeUnixNano =
|
17669
|
+
object.startTimeUnixNano = options2.longs === String ? "0" : 0;
|
17670
17670
|
if ($util.Long) {
|
17671
17671
|
var long = new $util.Long(0, 0, false);
|
17672
|
-
object.timeUnixNano =
|
17672
|
+
object.timeUnixNano = options2.longs === String ? long.toString() : options2.longs === Number ? long.toNumber() : long;
|
17673
17673
|
} else
|
17674
|
-
object.timeUnixNano =
|
17674
|
+
object.timeUnixNano = options2.longs === String ? "0" : 0;
|
17675
17675
|
if ($util.Long) {
|
17676
17676
|
var long = new $util.Long(0, 0, false);
|
17677
|
-
object.count =
|
17677
|
+
object.count = options2.longs === String ? long.toString() : options2.longs === Number ? long.toNumber() : long;
|
17678
17678
|
} else
|
17679
|
-
object.count =
|
17679
|
+
object.count = options2.longs === String ? "0" : 0;
|
17680
17680
|
object.flags = 0;
|
17681
17681
|
}
|
17682
17682
|
if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano"))
|
17683
17683
|
if (typeof message.startTimeUnixNano === "number")
|
17684
|
-
object.startTimeUnixNano =
|
17684
|
+
object.startTimeUnixNano = options2.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano;
|
17685
17685
|
else
|
17686
|
-
object.startTimeUnixNano =
|
17686
|
+
object.startTimeUnixNano = options2.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options2.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano;
|
17687
17687
|
if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano"))
|
17688
17688
|
if (typeof message.timeUnixNano === "number")
|
17689
|
-
object.timeUnixNano =
|
17689
|
+
object.timeUnixNano = options2.longs === String ? String(message.timeUnixNano) : message.timeUnixNano;
|
17690
17690
|
else
|
17691
|
-
object.timeUnixNano =
|
17691
|
+
object.timeUnixNano = options2.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options2.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano;
|
17692
17692
|
if (message.count != null && message.hasOwnProperty("count"))
|
17693
17693
|
if (typeof message.count === "number")
|
17694
|
-
object.count =
|
17694
|
+
object.count = options2.longs === String ? String(message.count) : message.count;
|
17695
17695
|
else
|
17696
|
-
object.count =
|
17696
|
+
object.count = options2.longs === String ? $util.Long.prototype.toString.call(message.count) : options2.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count;
|
17697
17697
|
if (message.sum != null && message.hasOwnProperty("sum")) {
|
17698
|
-
object.sum =
|
17699
|
-
if (
|
17698
|
+
object.sum = options2.json && !isFinite(message.sum) ? String(message.sum) : message.sum;
|
17699
|
+
if (options2.oneofs)
|
17700
17700
|
object._sum = "sum";
|
17701
17701
|
}
|
17702
17702
|
if (message.bucketCounts && message.bucketCounts.length) {
|
17703
17703
|
object.bucketCounts = [];
|
17704
17704
|
for (var j = 0; j < message.bucketCounts.length; ++j)
|
17705
17705
|
if (typeof message.bucketCounts[j] === "number")
|
17706
|
-
object.bucketCounts[j] =
|
17706
|
+
object.bucketCounts[j] = options2.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j];
|
17707
17707
|
else
|
17708
|
-
object.bucketCounts[j] =
|
17708
|
+
object.bucketCounts[j] = options2.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options2.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber() : message.bucketCounts[j];
|
17709
17709
|
}
|
17710
17710
|
if (message.explicitBounds && message.explicitBounds.length) {
|
17711
17711
|
object.explicitBounds = [];
|
17712
17712
|
for (var j = 0; j < message.explicitBounds.length; ++j)
|
17713
|
-
object.explicitBounds[j] =
|
17713
|
+
object.explicitBounds[j] = options2.json && !isFinite(message.explicitBounds[j]) ? String(message.explicitBounds[j]) : message.explicitBounds[j];
|
17714
17714
|
}
|
17715
17715
|
if (message.exemplars && message.exemplars.length) {
|
17716
17716
|
object.exemplars = [];
|
17717
17717
|
for (var j = 0; j < message.exemplars.length; ++j)
|
17718
|
-
object.exemplars[j] = $root.opentelemetry.proto.metrics.v1.Exemplar.toObject(message.exemplars[j],
|
17718
|
+
object.exemplars[j] = $root.opentelemetry.proto.metrics.v1.Exemplar.toObject(message.exemplars[j], options2);
|
17719
17719
|
}
|
17720
17720
|
if (message.attributes && message.attributes.length) {
|
17721
17721
|
object.attributes = [];
|
17722
17722
|
for (var j = 0; j < message.attributes.length; ++j)
|
17723
|
-
object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j],
|
17723
|
+
object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options2);
|
17724
17724
|
}
|
17725
17725
|
if (message.flags != null && message.hasOwnProperty("flags"))
|
17726
17726
|
object.flags = message.flags;
|
17727
17727
|
if (message.min != null && message.hasOwnProperty("min")) {
|
17728
|
-
object.min =
|
17729
|
-
if (
|
17728
|
+
object.min = options2.json && !isFinite(message.min) ? String(message.min) : message.min;
|
17729
|
+
if (options2.oneofs)
|
17730
17730
|
object._min = "min";
|
17731
17731
|
}
|
17732
17732
|
if (message.max != null && message.hasOwnProperty("max")) {
|
17733
|
-
object.max =
|
17734
|
-
if (
|
17733
|
+
object.max = options2.json && !isFinite(message.max) ? String(message.max) : message.max;
|
17734
|
+
if (options2.oneofs)
|
17735
17735
|
object._max = "max";
|
17736
17736
|
}
|
17737
17737
|
return object;
|
@@ -18113,36 +18113,36 @@ var require_root = __commonJS({
|
|
18113
18113
|
message.zeroThreshold = Number(object.zeroThreshold);
|
18114
18114
|
return message;
|
18115
18115
|
};
|
18116
|
-
ExponentialHistogramDataPoint.toObject = function toObject(message,
|
18117
|
-
if (!
|
18118
|
-
|
18116
|
+
ExponentialHistogramDataPoint.toObject = function toObject(message, options2) {
|
18117
|
+
if (!options2)
|
18118
|
+
options2 = {};
|
18119
18119
|
var object = {};
|
18120
|
-
if (
|
18120
|
+
if (options2.arrays || options2.defaults) {
|
18121
18121
|
object.attributes = [];
|
18122
18122
|
object.exemplars = [];
|
18123
18123
|
}
|
18124
|
-
if (
|
18124
|
+
if (options2.defaults) {
|
18125
18125
|
if ($util.Long) {
|
18126
18126
|
var long = new $util.Long(0, 0, false);
|
18127
|
-
object.startTimeUnixNano =
|
18127
|
+
object.startTimeUnixNano = options2.longs === String ? long.toString() : options2.longs === Number ? long.toNumber() : long;
|
18128
18128
|
} else
|
18129
|
-
object.startTimeUnixNano =
|
18129
|
+
object.startTimeUnixNano = options2.longs === String ? "0" : 0;
|
18130
18130
|
if ($util.Long) {
|
18131
18131
|
var long = new $util.Long(0, 0, false);
|
18132
|
-
object.timeUnixNano =
|
18132
|
+
object.timeUnixNano = options2.longs === String ? long.toString() : options2.longs === Number ? long.toNumber() : long;
|
18133
18133
|
} else
|
18134
|
-
object.timeUnixNano =
|
18134
|
+
object.timeUnixNano = options2.longs === String ? "0" : 0;
|
18135
18135
|
if ($util.Long) {
|
18136
18136
|
var long = new $util.Long(0, 0, false);
|
18137
|
-
object.count =
|
18137
|
+
object.count = options2.longs === String ? long.toString() : options2.longs === Number ? long.toNumber() : long;
|
18138
18138
|
} else
|
18139
|
-
object.count =
|
18139
|
+
object.count = options2.longs === String ? "0" : 0;
|
18140
18140
|
object.scale = 0;
|
18141
18141
|
if ($util.Long) {
|
18142
18142
|
var long = new $util.Long(0, 0, false);
|
18143
|
-
object.zeroCount =
|
18143
|
+
object.zeroCount = options2.longs === String ? long.toString() : options2.longs === Number ? long.toNumber() : long;
|
18144
18144
|
} else
|
18145
|
-
object.zeroCount =
|
18145
|
+
object.zeroCount = options2.longs === String ? "0" : 0;
|
18146
18146
|
object.positive = null;
|
18147
18147
|
object.negative = null;
|
18148
18148
|
object.flags = 0;
|
@@ -18151,58 +18151,58 @@ var require_root = __commonJS({
|
|
18151
18151
|
if (message.attributes && message.attributes.length) {
|
18152
18152
|
object.attributes = [];
|
18153
18153
|
for (var j = 0; j < message.attributes.length; ++j)
|
18154
|
-
object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j],
|
18154
|
+
object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options2);
|
18155
18155
|
}
|
18156
18156
|
if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano"))
|
18157
18157
|
if (typeof message.startTimeUnixNano === "number")
|
18158
|
-
object.startTimeUnixNano =
|
18158
|
+
object.startTimeUnixNano = options2.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano;
|
18159
18159
|
else
|
18160
|
-
object.startTimeUnixNano =
|
18160
|
+
object.startTimeUnixNano = options2.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options2.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano;
|
18161
18161
|
if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano"))
|
18162
18162
|
if (typeof message.timeUnixNano === "number")
|
18163
|
-
object.timeUnixNano =
|
18163
|
+
object.timeUnixNano = options2.longs === String ? String(message.timeUnixNano) : message.timeUnixNano;
|
18164
18164
|
else
|
18165
|
-
object.timeUnixNano =
|
18165
|
+
object.timeUnixNano = options2.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options2.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano;
|
18166
18166
|
if (message.count != null && message.hasOwnProperty("count"))
|
18167
18167
|
if (typeof message.count === "number")
|
18168
|
-
object.count =
|
18168
|
+
object.count = options2.longs === String ? String(message.count) : message.count;
|
18169
18169
|
else
|
18170
|
-
object.count =
|
18170
|
+
object.count = options2.longs === String ? $util.Long.prototype.toString.call(message.count) : options2.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count;
|
18171
18171
|
if (message.sum != null && message.hasOwnProperty("sum")) {
|
18172
|
-
object.sum =
|
18173
|
-
if (
|
18172
|
+
object.sum = options2.json && !isFinite(message.sum) ? String(message.sum) : message.sum;
|
18173
|
+
if (options2.oneofs)
|
18174
18174
|
object._sum = "sum";
|
18175
18175
|
}
|
18176
18176
|
if (message.scale != null && message.hasOwnProperty("scale"))
|
18177
18177
|
object.scale = message.scale;
|
18178
18178
|
if (message.zeroCount != null && message.hasOwnProperty("zeroCount"))
|
18179
18179
|
if (typeof message.zeroCount === "number")
|
18180
|
-
object.zeroCount =
|
18180
|
+
object.zeroCount = options2.longs === String ? String(message.zeroCount) : message.zeroCount;
|
18181
18181
|
else
|
18182
|
-
object.zeroCount =
|
18182
|
+
object.zeroCount = options2.longs === String ? $util.Long.prototype.toString.call(message.zeroCount) : options2.longs === Number ? new $util.LongBits(message.zeroCount.low >>> 0, message.zeroCount.high >>> 0).toNumber() : message.zeroCount;
|
18183
18183
|
if (message.positive != null && message.hasOwnProperty("positive"))
|
18184
|
-
object.positive = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(message.positive,
|
18184
|
+
object.positive = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(message.positive, options2);
|
18185
18185
|
if (message.negative != null && message.hasOwnProperty("negative"))
|
18186
|
-
object.negative = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(message.negative,
|
18186
|
+
object.negative = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(message.negative, options2);
|
18187
18187
|
if (message.flags != null && message.hasOwnProperty("flags"))
|
18188
18188
|
object.flags = message.flags;
|
18189
18189
|
if (message.exemplars && message.exemplars.length) {
|
18190
18190
|
object.exemplars = [];
|
18191
18191
|
for (var j = 0; j < message.exemplars.length; ++j)
|
18192
|
-
object.exemplars[j] = $root.opentelemetry.proto.metrics.v1.Exemplar.toObject(message.exemplars[j],
|
18192
|
+
object.exemplars[j] = $root.opentelemetry.proto.metrics.v1.Exemplar.toObject(message.exemplars[j], options2);
|
18193
18193
|
}
|
18194
18194
|
if (message.min != null && message.hasOwnProperty("min")) {
|
18195
|
-
object.min =
|
18196
|
-
if (
|
18195
|
+
object.min = options2.json && !isFinite(message.min) ? String(message.min) : message.min;
|
18196
|
+
if (options2.oneofs)
|
18197
18197
|
object._min = "min";
|
18198
18198
|
}
|
18199
18199
|
if (message.max != null && message.hasOwnProperty("max")) {
|
18200
|
-
object.max =
|
18201
|
-
if (
|
18200
|
+
object.max = options2.json && !isFinite(message.max) ? String(message.max) : message.max;
|
18201
|
+
if (options2.oneofs)
|
18202
18202
|
object._max = "max";
|
18203
18203
|
}
|
18204
18204
|
if (message.zeroThreshold != null && message.hasOwnProperty("zeroThreshold"))
|
18205
|
-
object.zeroThreshold =
|
18205
|
+
object.zeroThreshold = options2.json && !isFinite(message.zeroThreshold) ? String(message.zeroThreshold) : message.zeroThreshold;
|
18206
18206
|
return object;
|
18207
18207
|
};
|
18208
18208
|
ExponentialHistogramDataPoint.prototype.toJSON = function toJSON() {
|
@@ -18324,13 +18324,13 @@ var require_root = __commonJS({
|
|
18324
18324
|
}
|
18325
18325
|
return message;
|
18326
18326
|
};
|
18327
|
-
Buckets2.toObject = function toObject(message,
|
18328
|
-
if (!
|
18329
|
-
|
18327
|
+
Buckets2.toObject = function toObject(message, options2) {
|
18328
|
+
if (!options2)
|
18329
|
+
options2 = {};
|
18330
18330
|
var object = {};
|
18331
|
-
if (
|
18331
|
+
if (options2.arrays || options2.defaults)
|
18332
18332
|
object.bucketCounts = [];
|
18333
|
-
if (
|
18333
|
+
if (options2.defaults)
|
18334
18334
|
object.offset = 0;
|
18335
18335
|
if (message.offset != null && message.hasOwnProperty("offset"))
|
18336
18336
|
object.offset = message.offset;
|
@@ -18338,9 +18338,9 @@ var require_root = __commonJS({
|
|
18338
18338
|
object.bucketCounts = [];
|
18339
18339
|
for (var j = 0; j < message.bucketCounts.length; ++j)
|
18340
18340
|
if (typeof message.bucketCounts[j] === "number")
|
18341
|
-
object.bucketCounts[j] =
|
18341
|
+
object.bucketCounts[j] = options2.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j];
|
18342
18342
|
else
|
18343
|
-
object.bucketCounts[j] =
|
18343
|
+
object.bucketCounts[j] = options2.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options2.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber(true) : message.bucketCounts[j];
|
18344
18344
|
}
|
18345
18345
|
return object;
|
18346
18346
|
};
|
@@ -18578,59 +18578,59 @@ var require_root = __commonJS({
|
|
18578
18578
|
message.flags = object.flags >>> 0;
|
18579
18579
|
return message;
|
18580
18580
|
};
|
18581
|
-
SummaryDataPoint.toObject = function toObject(message,
|
18582
|
-
if (!
|
18583
|
-
|
18581
|
+
SummaryDataPoint.toObject = function toObject(message, options2) {
|
18582
|
+
if (!options2)
|
18583
|
+
options2 = {};
|
18584
18584
|
var object = {};
|
18585
|
-
if (
|
18585
|
+
if (options2.arrays || options2.defaults) {
|
18586
18586
|
object.quantileValues = [];
|
18587
18587
|
object.attributes = [];
|
18588
18588
|
}
|
18589
|
-
if (
|
18589
|
+
if (options2.defaults) {
|
18590
18590
|
if ($util.Long) {
|
18591
18591
|
var long = new $util.Long(0, 0, false);
|
18592
|
-
object.startTimeUnixNano =
|
18592
|
+
object.startTimeUnixNano = options2.longs === String ? long.toString() : options2.longs === Number ? long.toNumber() : long;
|
18593
18593
|
} else
|
18594
|
-
object.startTimeUnixNano =
|
18594
|
+
object.startTimeUnixNano = options2.longs === String ? "0" : 0;
|
18595
18595
|
if ($util.Long) {
|
18596
18596
|
var long = new $util.Long(0, 0, false);
|
18597
|
-
object.timeUnixNano =
|
18597
|
+
object.timeUnixNano = options2.longs === String ? long.toString() : options2.longs === Number ? long.toNumber() : long;
|
18598
18598
|
} else
|
18599
|
-
object.timeUnixNano =
|
18599
|
+
object.timeUnixNano = options2.longs === String ? "0" : 0;
|
18600
18600
|
if ($util.Long) {
|
18601
18601
|
var long = new $util.Long(0, 0, false);
|
18602
|
-
object.count =
|
18602
|
+
object.count = options2.longs === String ? long.toString() : options2.longs === Number ? long.toNumber() : long;
|
18603
18603
|
} else
|
18604
|
-
object.count =
|
18604
|
+
object.count = options2.longs === String ? "0" : 0;
|
18605
18605
|
object.sum = 0;
|
18606
18606
|
object.flags = 0;
|
18607
18607
|
}
|
18608
18608
|
if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano"))
|
18609
18609
|
if (typeof message.startTimeUnixNano === "number")
|
18610
|
-
object.startTimeUnixNano =
|
18610
|
+
object.startTimeUnixNano = options2.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano;
|
18611
18611
|
else
|
18612
|
-
object.startTimeUnixNano =
|
18612
|
+
object.startTimeUnixNano = options2.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options2.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano;
|
18613
18613
|
if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano"))
|
18614
18614
|
if (typeof message.timeUnixNano === "number")
|
18615
|
-
object.timeUnixNano =
|
18615
|
+
object.timeUnixNano = options2.longs === String ? String(message.timeUnixNano) : message.timeUnixNano;
|
18616
18616
|
else
|
18617
|
-
object.timeUnixNano =
|
18617
|
+
object.timeUnixNano = options2.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options2.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano;
|
18618
18618
|
if (message.count != null && message.hasOwnProperty("count"))
|
18619
18619
|
if (typeof message.count === "number")
|
18620
|
-
object.count =
|
18620
|
+
object.count = options2.longs === String ? String(message.count) : message.count;
|
18621
18621
|
else
|
18622
|
-
object.count =
|
18622
|
+
object.count = options2.longs === String ? $util.Long.prototype.toString.call(message.count) : options2.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count;
|
18623
18623
|
if (message.sum != null && message.hasOwnProperty("sum"))
|
18624
|
-
object.sum =
|
18624
|
+
object.sum = options2.json && !isFinite(message.sum) ? String(message.sum) : message.sum;
|
18625
18625
|
if (message.quantileValues && message.quantileValues.length) {
|
18626
18626
|
object.quantileValues = [];
|
18627
18627
|
for (var j = 0; j < message.quantileValues.length; ++j)
|
18628
|
-
object.quantileValues[j] = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(message.quantileValues[j],
|
18628
|
+
object.quantileValues[j] = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(message.quantileValues[j], options2);
|
18629
18629
|
}
|
18630
18630
|
if (message.attributes && message.attributes.length) {
|
18631
18631
|
object.attributes = [];
|
18632
18632
|
for (var j = 0; j < message.attributes.length; ++j)
|
18633
|
-
object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j],
|
18633
|
+
object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options2);
|
18634
18634
|
}
|
18635
18635
|
if (message.flags != null && message.hasOwnProperty("flags"))
|
18636
18636
|
object.flags = message.flags;
|
@@ -18728,18 +18728,18 @@ var require_root = __commonJS({
|
|
18728
18728
|
message.value = Number(object.value);
|
18729
18729
|
return message;
|
18730
18730
|
};
|
18731
|
-
ValueAtQuantile.toObject = function toObject(message,
|
18732
|
-
if (!
|
18733
|
-
|
18731
|
+
ValueAtQuantile.toObject = function toObject(message, options2) {
|
18732
|
+
if (!options2)
|
18733
|
+
options2 = {};
|
18734
18734
|
var object = {};
|
18735
|
-
if (
|
18735
|
+
if (options2.defaults) {
|
18736
18736
|
object.quantile = 0;
|
18737
18737
|
object.value = 0;
|
18738
18738
|
}
|
18739
18739
|
if (message.quantile != null && message.hasOwnProperty("quantile"))
|
18740
|
-
object.quantile =
|
18740
|
+
object.quantile = options2.json && !isFinite(message.quantile) ? String(message.quantile) : message.quantile;
|
18741
18741
|
if (message.value != null && message.hasOwnProperty("value"))
|
18742
|
-
object.value =
|
18742
|
+
object.value = options2.json && !isFinite(message.value) ? String(message.value) : message.value;
|
18743
18743
|
return object;
|
18744
18744
|
};
|
18745
18745
|
ValueAtQuantile.prototype.toJSON = function toJSON() {
|
@@ -18953,59 +18953,59 @@ var require_root = __commonJS({
|
|
18953
18953
|
}
|
18954
18954
|
return message;
|
18955
18955
|
};
|
18956
|
-
Exemplar.toObject = function toObject(message,
|
18957
|
-
if (!
|
18958
|
-
|
18956
|
+
Exemplar.toObject = function toObject(message, options2) {
|
18957
|
+
if (!options2)
|
18958
|
+
options2 = {};
|
18959
18959
|
var object = {};
|
18960
|
-
if (
|
18960
|
+
if (options2.arrays || options2.defaults)
|
18961
18961
|
object.filteredAttributes = [];
|
18962
|
-
if (
|
18962
|
+
if (options2.defaults) {
|
18963
18963
|
if ($util.Long) {
|
18964
18964
|
var long = new $util.Long(0, 0, false);
|
18965
|
-
object.timeUnixNano =
|
18965
|
+
object.timeUnixNano = options2.longs === String ? long.toString() : options2.longs === Number ? long.toNumber() : long;
|
18966
18966
|
} else
|
18967
|
-
object.timeUnixNano =
|
18968
|
-
if (
|
18967
|
+
object.timeUnixNano = options2.longs === String ? "0" : 0;
|
18968
|
+
if (options2.bytes === String)
|
18969
18969
|
object.spanId = "";
|
18970
18970
|
else {
|
18971
18971
|
object.spanId = [];
|
18972
|
-
if (
|
18972
|
+
if (options2.bytes !== Array)
|
18973
18973
|
object.spanId = $util.newBuffer(object.spanId);
|
18974
18974
|
}
|
18975
|
-
if (
|
18975
|
+
if (options2.bytes === String)
|
18976
18976
|
object.traceId = "";
|
18977
18977
|
else {
|
18978
18978
|
object.traceId = [];
|
18979
|
-
if (
|
18979
|
+
if (options2.bytes !== Array)
|
18980
18980
|
object.traceId = $util.newBuffer(object.traceId);
|
18981
18981
|
}
|
18982
18982
|
}
|
18983
18983
|
if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano"))
|
18984
18984
|
if (typeof message.timeUnixNano === "number")
|
18985
|
-
object.timeUnixNano =
|
18985
|
+
object.timeUnixNano = options2.longs === String ? String(message.timeUnixNano) : message.timeUnixNano;
|
18986
18986
|
else
|
18987
|
-
object.timeUnixNano =
|
18987
|
+
object.timeUnixNano = options2.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options2.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano;
|
18988
18988
|
if (message.asDouble != null && message.hasOwnProperty("asDouble")) {
|
18989
|
-
object.asDouble =
|
18990
|
-
if (
|
18989
|
+
object.asDouble = options2.json && !isFinite(message.asDouble) ? String(message.asDouble) : message.asDouble;
|
18990
|
+
if (options2.oneofs)
|
18991
18991
|
object.value = "asDouble";
|
18992
18992
|
}
|
18993
18993
|
if (message.spanId != null && message.hasOwnProperty("spanId"))
|
18994
|
-
object.spanId =
|
18994
|
+
object.spanId = options2.bytes === String ? $util.base64.encode(message.spanId, 0, message.spanId.length) : options2.bytes === Array ? Array.prototype.slice.call(message.spanId) : message.spanId;
|
18995
18995
|
if (message.traceId != null && message.hasOwnProperty("traceId"))
|
18996
|
-
object.traceId =
|
18996
|
+
object.traceId = options2.bytes === String ? $util.base64.encode(message.traceId, 0, message.traceId.length) : options2.bytes === Array ? Array.prototype.slice.call(message.traceId) : message.traceId;
|
18997
18997
|
if (message.asInt != null && message.hasOwnProperty("asInt")) {
|
18998
18998
|
if (typeof message.asInt === "number")
|
18999
|
-
object.asInt =
|
18999
|
+
object.asInt = options2.longs === String ? String(message.asInt) : message.asInt;
|
19000
19000
|
else
|
19001
|
-
object.asInt =
|
19002
|
-
if (
|
19001
|
+
object.asInt = options2.longs === String ? $util.Long.prototype.toString.call(message.asInt) : options2.longs === Number ? new $util.LongBits(message.asInt.low >>> 0, message.asInt.high >>> 0).toNumber() : message.asInt;
|
19002
|
+
if (options2.oneofs)
|
19003
19003
|
object.value = "asInt";
|
19004
19004
|
}
|
19005
19005
|
if (message.filteredAttributes && message.filteredAttributes.length) {
|
19006
19006
|
object.filteredAttributes = [];
|
19007
19007
|
for (var j = 0; j < message.filteredAttributes.length; ++j)
|
19008
|
-
object.filteredAttributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.filteredAttributes[j],
|
19008
|
+
object.filteredAttributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.filteredAttributes[j], options2);
|
19009
19009
|
}
|
19010
19010
|
return object;
|
19011
19011
|
};
|
@@ -19112,16 +19112,16 @@ var require_root = __commonJS({
|
|
19112
19112
|
}
|
19113
19113
|
return message;
|
19114
19114
|
};
|
19115
|
-
LogsData.toObject = function toObject(message,
|
19116
|
-
if (!
|
19117
|
-
|
19115
|
+
LogsData.toObject = function toObject(message, options2) {
|
19116
|
+
if (!options2)
|
19117
|
+
options2 = {};
|
19118
19118
|
var object = {};
|
19119
|
-
if (
|
19119
|
+
if (options2.arrays || options2.defaults)
|
19120
19120
|
object.resourceLogs = [];
|
19121
19121
|
if (message.resourceLogs && message.resourceLogs.length) {
|
19122
19122
|
object.resourceLogs = [];
|
19123
19123
|
for (var j = 0; j < message.resourceLogs.length; ++j)
|
19124
|
-
object.resourceLogs[j] = $root.opentelemetry.proto.logs.v1.ResourceLogs.toObject(message.resourceLogs[j],
|
19124
|
+
object.resourceLogs[j] = $root.opentelemetry.proto.logs.v1.ResourceLogs.toObject(message.resourceLogs[j], options2);
|
19125
19125
|
}
|
19126
19126
|
return object;
|
19127
19127
|
};
|
@@ -19256,22 +19256,22 @@ var require_root = __commonJS({
|
|
19256
19256
|
message.schemaUrl = String(object.schemaUrl);
|
19257
19257
|
return message;
|
19258
19258
|
};
|
19259
|
-
ResourceLogs.toObject = function toObject(message,
|
19260
|
-
if (!
|
19261
|
-
|
19259
|
+
ResourceLogs.toObject = function toObject(message, options2) {
|
19260
|
+
if (!options2)
|
19261
|
+
options2 = {};
|
19262
19262
|
var object = {};
|
19263
|
-
if (
|
19263
|
+
if (options2.arrays || options2.defaults)
|
19264
19264
|
object.scopeLogs = [];
|
19265
|
-
if (
|
19265
|
+
if (options2.defaults) {
|
19266
19266
|
object.resource = null;
|
19267
19267
|
object.schemaUrl = "";
|
19268
19268
|
}
|
19269
19269
|
if (message.resource != null && message.hasOwnProperty("resource"))
|
19270
|
-
object.resource = $root.opentelemetry.proto.resource.v1.Resource.toObject(message.resource,
|
19270
|
+
object.resource = $root.opentelemetry.proto.resource.v1.Resource.toObject(message.resource, options2);
|
19271
19271
|
if (message.scopeLogs && message.scopeLogs.length) {
|
19272
19272
|
object.scopeLogs = [];
|
19273
19273
|
for (var j = 0; j < message.scopeLogs.length; ++j)
|
19274
|
-
object.scopeLogs[j] = $root.opentelemetry.proto.logs.v1.ScopeLogs.toObject(message.scopeLogs[j],
|
19274
|
+
object.scopeLogs[j] = $root.opentelemetry.proto.logs.v1.ScopeLogs.toObject(message.scopeLogs[j], options2);
|
19275
19275
|
}
|
19276
19276
|
if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl"))
|
19277
19277
|
object.schemaUrl = message.schemaUrl;
|
@@ -19408,22 +19408,22 @@ var require_root = __commonJS({
|
|
19408
19408
|
message.schemaUrl = String(object.schemaUrl);
|
19409
19409
|
return message;
|
19410
19410
|
};
|
19411
|
-
ScopeLogs.toObject = function toObject(message,
|
19412
|
-
if (!
|
19413
|
-
|
19411
|
+
ScopeLogs.toObject = function toObject(message, options2) {
|
19412
|
+
if (!options2)
|
19413
|
+
options2 = {};
|
19414
19414
|
var object = {};
|
19415
|
-
if (
|
19415
|
+
if (options2.arrays || options2.defaults)
|
19416
19416
|
object.logRecords = [];
|
19417
|
-
if (
|
19417
|
+
if (options2.defaults) {
|
19418
19418
|
object.scope = null;
|
19419
19419
|
object.schemaUrl = "";
|
19420
19420
|
}
|
19421
19421
|
if (message.scope != null && message.hasOwnProperty("scope"))
|
19422
|
-
object.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.toObject(message.scope,
|
19422
|
+
object.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.toObject(message.scope, options2);
|
19423
19423
|
if (message.logRecords && message.logRecords.length) {
|
19424
19424
|
object.logRecords = [];
|
19425
19425
|
for (var j = 0; j < message.logRecords.length; ++j)
|
19426
|
-
object.logRecords[j] = $root.opentelemetry.proto.logs.v1.LogRecord.toObject(message.logRecords[j],
|
19426
|
+
object.logRecords[j] = $root.opentelemetry.proto.logs.v1.LogRecord.toObject(message.logRecords[j], options2);
|
19427
19427
|
}
|
19428
19428
|
if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl"))
|
19429
19429
|
object.schemaUrl = message.schemaUrl;
|
@@ -19880,73 +19880,73 @@ var require_root = __commonJS({
|
|
19880
19880
|
message.eventName = String(object.eventName);
|
19881
19881
|
return message;
|
19882
19882
|
};
|
19883
|
-
LogRecord.toObject = function toObject(message,
|
19884
|
-
if (!
|
19885
|
-
|
19883
|
+
LogRecord.toObject = function toObject(message, options2) {
|
19884
|
+
if (!options2)
|
19885
|
+
options2 = {};
|
19886
19886
|
var object = {};
|
19887
|
-
if (
|
19887
|
+
if (options2.arrays || options2.defaults)
|
19888
19888
|
object.attributes = [];
|
19889
|
-
if (
|
19889
|
+
if (options2.defaults) {
|
19890
19890
|
if ($util.Long) {
|
19891
19891
|
var long = new $util.Long(0, 0, false);
|
19892
|
-
object.timeUnixNano =
|
19892
|
+
object.timeUnixNano = options2.longs === String ? long.toString() : options2.longs === Number ? long.toNumber() : long;
|
19893
19893
|
} else
|
19894
|
-
object.timeUnixNano =
|
19895
|
-
object.severityNumber =
|
19894
|
+
object.timeUnixNano = options2.longs === String ? "0" : 0;
|
19895
|
+
object.severityNumber = options2.enums === String ? "SEVERITY_NUMBER_UNSPECIFIED" : 0;
|
19896
19896
|
object.severityText = "";
|
19897
19897
|
object.body = null;
|
19898
19898
|
object.droppedAttributesCount = 0;
|
19899
19899
|
object.flags = 0;
|
19900
|
-
if (
|
19900
|
+
if (options2.bytes === String)
|
19901
19901
|
object.traceId = "";
|
19902
19902
|
else {
|
19903
19903
|
object.traceId = [];
|
19904
|
-
if (
|
19904
|
+
if (options2.bytes !== Array)
|
19905
19905
|
object.traceId = $util.newBuffer(object.traceId);
|
19906
19906
|
}
|
19907
|
-
if (
|
19907
|
+
if (options2.bytes === String)
|
19908
19908
|
object.spanId = "";
|
19909
19909
|
else {
|
19910
19910
|
object.spanId = [];
|
19911
|
-
if (
|
19911
|
+
if (options2.bytes !== Array)
|
19912
19912
|
object.spanId = $util.newBuffer(object.spanId);
|
19913
19913
|
}
|
19914
19914
|
if ($util.Long) {
|
19915
19915
|
var long = new $util.Long(0, 0, false);
|
19916
|
-
object.observedTimeUnixNano =
|
19916
|
+
object.observedTimeUnixNano = options2.longs === String ? long.toString() : options2.longs === Number ? long.toNumber() : long;
|
19917
19917
|
} else
|
19918
|
-
object.observedTimeUnixNano =
|
19918
|
+
object.observedTimeUnixNano = options2.longs === String ? "0" : 0;
|
19919
19919
|
object.eventName = "";
|
19920
19920
|
}
|
19921
19921
|
if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano"))
|
19922
19922
|
if (typeof message.timeUnixNano === "number")
|
19923
|
-
object.timeUnixNano =
|
19923
|
+
object.timeUnixNano = options2.longs === String ? String(message.timeUnixNano) : message.timeUnixNano;
|
19924
19924
|
else
|
19925
|
-
object.timeUnixNano =
|
19925
|
+
object.timeUnixNano = options2.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options2.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano;
|
19926
19926
|
if (message.severityNumber != null && message.hasOwnProperty("severityNumber"))
|
19927
|
-
object.severityNumber =
|
19927
|
+
object.severityNumber = options2.enums === String ? $root.opentelemetry.proto.logs.v1.SeverityNumber[message.severityNumber] === void 0 ? message.severityNumber : $root.opentelemetry.proto.logs.v1.SeverityNumber[message.severityNumber] : message.severityNumber;
|
19928
19928
|
if (message.severityText != null && message.hasOwnProperty("severityText"))
|
19929
19929
|
object.severityText = message.severityText;
|
19930
19930
|
if (message.body != null && message.hasOwnProperty("body"))
|
19931
|
-
object.body = $root.opentelemetry.proto.common.v1.AnyValue.toObject(message.body,
|
19931
|
+
object.body = $root.opentelemetry.proto.common.v1.AnyValue.toObject(message.body, options2);
|
19932
19932
|
if (message.attributes && message.attributes.length) {
|
19933
19933
|
object.attributes = [];
|
19934
19934
|
for (var j = 0; j < message.attributes.length; ++j)
|
19935
|
-
object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j],
|
19935
|
+
object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options2);
|
19936
19936
|
}
|
19937
19937
|
if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount"))
|
19938
19938
|
object.droppedAttributesCount = message.droppedAttributesCount;
|
19939
19939
|
if (message.flags != null && message.hasOwnProperty("flags"))
|
19940
19940
|
object.flags = message.flags;
|
19941
19941
|
if (message.traceId != null && message.hasOwnProperty("traceId"))
|
19942
|
-
object.traceId =
|
19942
|
+
object.traceId = options2.bytes === String ? $util.base64.encode(message.traceId, 0, message.traceId.length) : options2.bytes === Array ? Array.prototype.slice.call(message.traceId) : message.traceId;
|
19943
19943
|
if (message.spanId != null && message.hasOwnProperty("spanId"))
|
19944
|
-
object.spanId =
|
19944
|
+
object.spanId = options2.bytes === String ? $util.base64.encode(message.spanId, 0, message.spanId.length) : options2.bytes === Array ? Array.prototype.slice.call(message.spanId) : message.spanId;
|
19945
19945
|
if (message.observedTimeUnixNano != null && message.hasOwnProperty("observedTimeUnixNano"))
|
19946
19946
|
if (typeof message.observedTimeUnixNano === "number")
|
19947
|
-
object.observedTimeUnixNano =
|
19947
|
+
object.observedTimeUnixNano = options2.longs === String ? String(message.observedTimeUnixNano) : message.observedTimeUnixNano;
|
19948
19948
|
else
|
19949
|
-
object.observedTimeUnixNano =
|
19949
|
+
object.observedTimeUnixNano = options2.longs === String ? $util.Long.prototype.toString.call(message.observedTimeUnixNano) : options2.longs === Number ? new $util.LongBits(message.observedTimeUnixNano.low >>> 0, message.observedTimeUnixNano.high >>> 0).toNumber() : message.observedTimeUnixNano;
|
19950
19950
|
if (message.eventName != null && message.hasOwnProperty("eventName"))
|
19951
19951
|
object.eventName = message.eventName;
|
19952
19952
|
return object;
|
@@ -20026,12 +20026,12 @@ function optionalHexToBinary(str) {
|
|
20026
20026
|
return void 0;
|
20027
20027
|
return hexToBinary(str);
|
20028
20028
|
}
|
20029
|
-
function getOtlpEncoder(
|
20030
|
-
if (
|
20029
|
+
function getOtlpEncoder(options2) {
|
20030
|
+
if (options2 === void 0) {
|
20031
20031
|
return DEFAULT_ENCODER;
|
20032
20032
|
}
|
20033
|
-
const useLongBits =
|
20034
|
-
const useHex =
|
20033
|
+
const useLongBits = options2.useLongBits ?? true;
|
20034
|
+
const useHex = options2.useHex ?? false;
|
20035
20035
|
return {
|
20036
20036
|
encodeHrTime: useLongBits ? encodeAsLongBits : encodeTimestamp,
|
20037
20037
|
encodeSpanContext: useHex ? identity : hexToBinary,
|
@@ -20109,8 +20109,8 @@ var init_internal = __esm({
|
|
20109
20109
|
});
|
20110
20110
|
|
20111
20111
|
// ../../node_modules/.pnpm/@opentelemetry+otlp-transformer@0.204.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-transformer/build/esm/logs/internal.js
|
20112
|
-
function createExportLogsServiceRequest(logRecords,
|
20113
|
-
const encoder = getOtlpEncoder(
|
20112
|
+
function createExportLogsServiceRequest(logRecords, options2) {
|
20113
|
+
const encoder = getOtlpEncoder(options2);
|
20114
20114
|
return {
|
20115
20115
|
resourceLogs: logRecordsToResourceLogs(logRecords, encoder)
|
20116
20116
|
};
|
@@ -20223,8 +20223,8 @@ var init_internal_types = __esm({
|
|
20223
20223
|
});
|
20224
20224
|
|
20225
20225
|
// ../../node_modules/.pnpm/@opentelemetry+otlp-transformer@0.204.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-transformer/build/esm/metrics/internal.js
|
20226
|
-
function toResourceMetrics(resourceMetrics,
|
20227
|
-
const encoder = getOtlpEncoder(
|
20226
|
+
function toResourceMetrics(resourceMetrics, options2) {
|
20227
|
+
const encoder = getOtlpEncoder(options2);
|
20228
20228
|
const processedResource = createResource(resourceMetrics.resource);
|
20229
20229
|
return {
|
20230
20230
|
resource: processedResource,
|
@@ -20343,9 +20343,9 @@ function toAggregationTemporality(temporality) {
|
|
20343
20343
|
return EAggregationTemporality.AGGREGATION_TEMPORALITY_CUMULATIVE;
|
20344
20344
|
}
|
20345
20345
|
}
|
20346
|
-
function createExportMetricsServiceRequest(resourceMetrics,
|
20346
|
+
function createExportMetricsServiceRequest(resourceMetrics, options2) {
|
20347
20347
|
return {
|
20348
|
-
resourceMetrics: resourceMetrics.map((metrics2) => toResourceMetrics(metrics2,
|
20348
|
+
resourceMetrics: resourceMetrics.map((metrics2) => toResourceMetrics(metrics2, options2))
|
20349
20349
|
};
|
20350
20350
|
}
|
20351
20351
|
var init_internal3 = __esm({
|
@@ -20433,8 +20433,8 @@ function toOtlpSpanEvent(timedEvent, encoder) {
|
|
20433
20433
|
droppedAttributesCount: timedEvent.droppedAttributesCount || 0
|
20434
20434
|
};
|
20435
20435
|
}
|
20436
|
-
function createExportTraceServiceRequest(spans,
|
20437
|
-
const encoder = getOtlpEncoder(
|
20436
|
+
function createExportTraceServiceRequest(spans, options2) {
|
20437
|
+
const encoder = getOtlpEncoder(options2);
|
20438
20438
|
return {
|
20439
20439
|
resourceSpans: spanRecordsToResourceSpans(spans, encoder)
|
20440
20440
|
};
|
@@ -20707,11 +20707,11 @@ function validateUserProvidedUrl(url) {
|
|
20707
20707
|
throw new Error(`Configuration: Could not parse user-provided export URL: '${url}'`);
|
20708
20708
|
}
|
20709
20709
|
}
|
20710
|
-
function httpAgentFactoryFromOptions(
|
20710
|
+
function httpAgentFactoryFromOptions(options2) {
|
20711
20711
|
return async (protocol) => {
|
20712
20712
|
const module = protocol === "http:" ? import("http") : import("https");
|
20713
20713
|
const { Agent } = await module;
|
20714
|
-
return new Agent(
|
20714
|
+
return new Agent(options2);
|
20715
20715
|
};
|
20716
20716
|
}
|
20717
20717
|
function mergeOtlpHttpConfigurationWithDefaults(userProvidedConfiguration, fallbackConfiguration, defaultConfiguration) {
|
@@ -20768,7 +20768,7 @@ import * as zlib from "zlib";
|
|
20768
20768
|
import { Readable } from "stream";
|
20769
20769
|
function sendWithHttp(request, params, agent, data, onDone, timeoutMillis) {
|
20770
20770
|
const parsedUrl = new URL(params.url);
|
20771
|
-
const
|
20771
|
+
const options2 = {
|
20772
20772
|
hostname: parsedUrl.hostname,
|
20773
20773
|
port: parsedUrl.port,
|
20774
20774
|
path: parsedUrl.pathname,
|
@@ -20778,7 +20778,7 @@ function sendWithHttp(request, params, agent, data, onDone, timeoutMillis) {
|
|
20778
20778
|
},
|
20779
20779
|
agent
|
20780
20780
|
};
|
20781
|
-
const req = request(
|
20781
|
+
const req = request(options2, (res) => {
|
20782
20782
|
const responseData = [];
|
20783
20783
|
res.on("data", (chunk) => responseData.push(chunk));
|
20784
20784
|
res.on("end", () => {
|
@@ -20893,8 +20893,8 @@ var init_http_exporter_transport = __esm({
|
|
20893
20893
|
function getJitter() {
|
20894
20894
|
return Math.random() * (2 * JITTER) - JITTER;
|
20895
20895
|
}
|
20896
|
-
function createRetryingTransport(
|
20897
|
-
return new RetryingTransport(
|
20896
|
+
function createRetryingTransport(options2) {
|
20897
|
+
return new RetryingTransport(options2.transport);
|
20898
20898
|
}
|
20899
20899
|
var MAX_ATTEMPTS, INITIAL_BACKOFF, MAX_BACKOFF, BACKOFF_MULTIPLIER, JITTER, RetryingTransport;
|
20900
20900
|
var init_retrying_transport = __esm({
|
@@ -20943,14 +20943,14 @@ var init_retrying_transport = __esm({
|
|
20943
20943
|
});
|
20944
20944
|
|
20945
20945
|
// ../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.204.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/build/esm/otlp-http-export-delegate.js
|
20946
|
-
function createOtlpHttpExportDelegate(
|
20946
|
+
function createOtlpHttpExportDelegate(options2, serializer) {
|
20947
20947
|
return createOtlpExportDelegate({
|
20948
20948
|
transport: createRetryingTransport({
|
20949
|
-
transport: createHttpExporterTransport(
|
20949
|
+
transport: createHttpExporterTransport(options2)
|
20950
20950
|
}),
|
20951
20951
|
serializer,
|
20952
|
-
promiseHandler: createBoundedQueueExportPromiseHandler(
|
20953
|
-
}, { timeout:
|
20952
|
+
promiseHandler: createBoundedQueueExportPromiseHandler(options2)
|
20953
|
+
}, { timeout: options2.timeoutMillis });
|
20954
20954
|
}
|
20955
20955
|
var init_otlp_http_export_delegate = __esm({
|
20956
20956
|
"../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.204.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/build/esm/otlp-http-export-delegate.js"() {
|
@@ -21322,8 +21322,8 @@ var require_grpc_exporter_transport = __commonJS({
|
|
21322
21322
|
}
|
21323
21323
|
};
|
21324
21324
|
exports.GrpcExporterTransport = GrpcExporterTransport;
|
21325
|
-
function createOtlpGrpcExporterTransport(
|
21326
|
-
return new GrpcExporterTransport(
|
21325
|
+
function createOtlpGrpcExporterTransport(options2) {
|
21326
|
+
return new GrpcExporterTransport(options2);
|
21327
21327
|
}
|
21328
21328
|
exports.createOtlpGrpcExporterTransport = createOtlpGrpcExporterTransport;
|
21329
21329
|
}
|
@@ -21574,12 +21574,12 @@ var require_otlp_grpc_export_delegate = __commonJS({
|
|
21574
21574
|
exports.createOtlpGrpcExportDelegate = void 0;
|
21575
21575
|
var otlp_exporter_base_1 = (init_esm7(), __toCommonJS(esm_exports5));
|
21576
21576
|
var grpc_exporter_transport_1 = require_grpc_exporter_transport();
|
21577
|
-
function createOtlpGrpcExportDelegate(
|
21578
|
-
return (0, otlp_exporter_base_1.createOtlpNetworkExportDelegate)(
|
21579
|
-
address:
|
21580
|
-
compression:
|
21581
|
-
credentials:
|
21582
|
-
metadata:
|
21577
|
+
function createOtlpGrpcExportDelegate(options2, serializer, grpcName, grpcPath) {
|
21578
|
+
return (0, otlp_exporter_base_1.createOtlpNetworkExportDelegate)(options2, serializer, (0, grpc_exporter_transport_1.createOtlpGrpcExporterTransport)({
|
21579
|
+
address: options2.url,
|
21580
|
+
compression: options2.compression,
|
21581
|
+
credentials: options2.credentials,
|
21582
|
+
metadata: options2.metadata,
|
21583
21583
|
grpcName,
|
21584
21584
|
grpcPath
|
21585
21585
|
}));
|
@@ -23128,8 +23128,8 @@ var init_Tracer = __esm({
|
|
23128
23128
|
* Starts a new Span or returns the default NoopSpan based on the sampling
|
23129
23129
|
* decision.
|
23130
23130
|
*/
|
23131
|
-
startSpan(name,
|
23132
|
-
if (
|
23131
|
+
startSpan(name, options2 = {}, context2 = context.active()) {
|
23132
|
+
if (options2.root) {
|
23133
23133
|
context2 = trace.deleteSpan(context2);
|
23134
23134
|
}
|
23135
23135
|
const parentSpan = trace.getSpan(context2);
|
@@ -23150,14 +23150,14 @@ var init_Tracer = __esm({
|
|
23150
23150
|
traceState = parentSpanContext.traceState;
|
23151
23151
|
validParentSpanContext = parentSpanContext;
|
23152
23152
|
}
|
23153
|
-
const spanKind =
|
23154
|
-
const links = (
|
23153
|
+
const spanKind = options2.kind ?? SpanKind.INTERNAL;
|
23154
|
+
const links = (options2.links ?? []).map((link) => {
|
23155
23155
|
return {
|
23156
23156
|
context: link.context,
|
23157
23157
|
attributes: sanitizeAttributes(link.attributes)
|
23158
23158
|
};
|
23159
23159
|
});
|
23160
|
-
const attributes = sanitizeAttributes(
|
23160
|
+
const attributes = sanitizeAttributes(options2.attributes);
|
23161
23161
|
const samplingResult = this._sampler.shouldSample(context2, traceId, name, spanKind, attributes, links);
|
23162
23162
|
traceState = samplingResult.traceState ?? traceState;
|
23163
23163
|
const traceFlags = samplingResult.decision === SamplingDecision.RECORD_AND_SAMPLED ? TraceFlags.SAMPLED : TraceFlags.NONE;
|
@@ -23178,7 +23178,7 @@ var init_Tracer = __esm({
|
|
23178
23178
|
links,
|
23179
23179
|
parentSpanContext: validParentSpanContext,
|
23180
23180
|
attributes: initAttributes,
|
23181
|
-
startTime:
|
23181
|
+
startTime: options2.startTime,
|
23182
23182
|
spanProcessor: this._spanProcessor,
|
23183
23183
|
spanLimits: this._spanLimits
|
23184
23184
|
});
|
@@ -23301,10 +23301,10 @@ var init_BasicTracerProvider = __esm({
|
|
23301
23301
|
}
|
23302
23302
|
this._activeSpanProcessor = new MultiSpanProcessor(spanProcessors);
|
23303
23303
|
}
|
23304
|
-
getTracer(name, version,
|
23305
|
-
const key = `${name}@${version || ""}:${
|
23304
|
+
getTracer(name, version, options2) {
|
23305
|
+
const key = `${name}@${version || ""}:${options2?.schemaUrl || ""}`;
|
23306
23306
|
if (!this._tracers.has(key)) {
|
23307
|
-
this._tracers.set(key, new Tracer({ name, version, schemaUrl:
|
23307
|
+
this._tracers.set(key, new Tracer({ name, version, schemaUrl: options2?.schemaUrl }, this._config, this._resource, this._activeSpanProcessor));
|
23308
23308
|
}
|
23309
23309
|
return this._tracers.get(key);
|
23310
23310
|
}
|
@@ -23974,12 +23974,12 @@ var FullProcessorServiceImpl = class {
|
|
23974
23974
|
async stop(request, context2) {
|
23975
23975
|
return await this.instance.stop(request, context2);
|
23976
23976
|
}
|
23977
|
-
async processBindings(request,
|
23977
|
+
async processBindings(request, options2) {
|
23978
23978
|
for (const binding of request.bindings) {
|
23979
23979
|
this.patcher.adjustDataBinding(binding);
|
23980
23980
|
}
|
23981
23981
|
try {
|
23982
|
-
const result = await this.instance.processBindings(request,
|
23982
|
+
const result = await this.instance.processBindings(request, options2);
|
23983
23983
|
this.adjustResult(result.result);
|
23984
23984
|
if (!result.configUpdated && result.result?.states?.configUpdated) {
|
23985
23985
|
result.configUpdated = result.result?.states?.configUpdated;
|
@@ -24092,8 +24092,8 @@ import("node:process").then((p) => p.stdout.write(""));
|
|
24092
24092
|
|
24093
24093
|
// src/action-server.ts
|
24094
24094
|
var ActionServer = class {
|
24095
|
-
constructor(
|
24096
|
-
this.loader =
|
24095
|
+
constructor(loader2) {
|
24096
|
+
this.loader = loader2;
|
24097
24097
|
}
|
24098
24098
|
async listen(port) {
|
24099
24099
|
const pluginManager = PluginManager.INSTANCE;
|
@@ -24115,10 +24115,10 @@ BigInt.prototype.toJSON = function() {
|
|
24115
24115
|
return this.toString();
|
24116
24116
|
};
|
24117
24117
|
var ServiceManager = class extends ProcessorServiceImpl {
|
24118
|
-
constructor(
|
24119
|
-
super(
|
24120
|
-
this.options =
|
24121
|
-
this.workerData.options =
|
24118
|
+
constructor(loader2, options2, shutdownHandler) {
|
24119
|
+
super(loader2, options2, shutdownHandler);
|
24120
|
+
this.options = options2;
|
24121
|
+
this.workerData.options = options2;
|
24122
24122
|
}
|
24123
24123
|
pool;
|
24124
24124
|
workerData = {};
|
@@ -24271,10 +24271,10 @@ var ProcessorServiceImplV3 = class {
|
|
24271
24271
|
loader;
|
24272
24272
|
shutdownHandler;
|
24273
24273
|
started = false;
|
24274
|
-
constructor(
|
24275
|
-
this.loader =
|
24274
|
+
constructor(loader2, options2, shutdownHandler) {
|
24275
|
+
this.loader = loader2;
|
24276
24276
|
this.shutdownHandler = shutdownHandler;
|
24277
|
-
this.enablePartition =
|
24277
|
+
this.enablePartition = options2?.["enable-partition"] == true;
|
24278
24278
|
}
|
24279
24279
|
async start(request, context2) {
|
24280
24280
|
if (this.started) {
|
@@ -24455,7 +24455,7 @@ function myParseInt(value, dummyPrevious) {
|
|
24455
24455
|
return parsedValue;
|
24456
24456
|
}
|
24457
24457
|
var program2 = new Command();
|
24458
|
-
program2.allowUnknownOption().
|
24458
|
+
program2.allowUnknownOption().name("processor-runner").description("Sentio Processor Runtime").version(packageJson.version).argument("<target>", "Path to the processor module to load").option("-p, --port <port>", "Port to listen on", "4000").option("--concurrency <number>", "Number of concurrent workers", myParseInt, 4).option("--batch-count <number>", "Batch count for processing", myParseInt, 1).option("-c, --chains-config <path>", "Path to chains configuration file", "chains-config.json").option("--chainquery-server <url>", "Chain query server URL", "").option("--pricefeed-server <url>", "Price feed server URL", "").option("--log-format <format>", "Log format (console|json)", "console").option("--debug", "Enable debug mode", false).option("--otlp-debug", "Enable OTLP debug mode", false).option("--start-action-server", "Start action server instead of processor server", false).option("--worker <number>", "Number of worker threads", myParseInt, workerNum).option("--process-timeout <seconds>", "Process timeout in seconds", myParseInt, 60).option(
|
24459
24459
|
"--worker-timeout <seconds>",
|
24460
24460
|
"Worker timeout in seconds",
|
24461
24461
|
myParseInt,
|
@@ -24464,135 +24464,127 @@ program2.allowUnknownOption().allowExcessArguments().name("processor-runner").de
|
|
24464
24464
|
"--enable-partition",
|
24465
24465
|
"Enable binding data partition",
|
24466
24466
|
process.env["SENTIO_ENABLE_BINDING_DATA_PARTITION"] === "true"
|
24467
|
-
).
|
24468
|
-
|
24469
|
-
|
24470
|
-
|
24471
|
-
|
24472
|
-
|
24473
|
-
|
24474
|
-
|
24475
|
-
|
24476
|
-
|
24477
|
-
|
24478
|
-
|
24479
|
-
|
24480
|
-
await
|
24481
|
-
|
24482
|
-
|
24483
|
-
|
24484
|
-
|
24485
|
-
|
24486
|
-
|
24487
|
-
|
24488
|
-
|
24489
|
-
|
24490
|
-
|
24491
|
-
|
24492
|
-
|
24493
|
-
|
24467
|
+
).parse();
|
24468
|
+
var options = program2.opts();
|
24469
|
+
options.target = program2.processedArgs[0];
|
24470
|
+
var logLevel = process.env["LOG_LEVEL"]?.toLowerCase();
|
24471
|
+
setupLogger(options.logFormat === "json", logLevel === "debug" ? true : options.debug);
|
24472
|
+
console.debug("Starting with", options.target);
|
24473
|
+
await setupOTLP(options.otlpDebug);
|
24474
|
+
Error.stackTraceLimit = 20;
|
24475
|
+
configureEndpoints(options);
|
24476
|
+
console.debug("Starting Server", options);
|
24477
|
+
var server;
|
24478
|
+
var baseService;
|
24479
|
+
var loader = async () => {
|
24480
|
+
const m = await import(options.target);
|
24481
|
+
console.debug("Module loaded", m);
|
24482
|
+
return m;
|
24483
|
+
};
|
24484
|
+
if (options.startActionServer) {
|
24485
|
+
server = new ActionServer(loader);
|
24486
|
+
server.listen(options.port);
|
24487
|
+
} else {
|
24488
|
+
server = (0, import_nice_grpc2.createServer)({
|
24489
|
+
"grpc.max_send_message_length": 768 * 1024 * 1024,
|
24490
|
+
"grpc.max_receive_message_length": 768 * 1024 * 1024,
|
24491
|
+
"grpc.default_compression_algorithm": import_grpc_js.compressionAlgorithms.gzip
|
24492
|
+
}).use((0, import_nice_grpc_opentelemetry.openTelemetryServerMiddleware)()).use(import_nice_grpc_error_details.errorDetailsServerMiddleware);
|
24493
|
+
if (options.worker > 1) {
|
24494
|
+
baseService = new ServiceManager(loader, options, server.shutdown);
|
24494
24495
|
} else {
|
24495
|
-
|
24496
|
-
|
24497
|
-
|
24498
|
-
|
24499
|
-
|
24500
|
-
|
24501
|
-
|
24502
|
-
|
24503
|
-
|
24504
|
-
|
24505
|
-
|
24506
|
-
|
24507
|
-
|
24508
|
-
|
24509
|
-
|
24510
|
-
|
24511
|
-
|
24512
|
-
|
24513
|
-
|
24514
|
-
|
24515
|
-
|
24516
|
-
|
24517
|
-
|
24518
|
-
|
24519
|
-
|
24520
|
-
|
24521
|
-
|
24522
|
-
|
24523
|
-
|
24524
|
-
|
24525
|
-
|
24526
|
-
|
24527
|
-
await dumpHeap(file);
|
24528
|
-
const readStream = import_fs_extra2.default.createReadStream(file);
|
24529
|
-
res.writeHead(200, { "Content-Type": "application/json" });
|
24530
|
-
readStream.pipe(res);
|
24531
|
-
res.end();
|
24532
|
-
} catch {
|
24533
|
-
res.writeHead(500);
|
24534
|
-
res.end();
|
24535
|
-
}
|
24536
|
-
break;
|
24496
|
+
baseService = new ProcessorServiceImpl(loader, options, server.shutdown);
|
24497
|
+
}
|
24498
|
+
const service = new FullProcessorServiceImpl(baseService);
|
24499
|
+
server.add(ProcessorDefinition, service);
|
24500
|
+
server.add(
|
24501
|
+
ProcessorV3Definition,
|
24502
|
+
new FullProcessorServiceV3Impl(new ProcessorServiceImplV3(loader, options, server.shutdown))
|
24503
|
+
);
|
24504
|
+
server.listen("0.0.0.0:" + options.port);
|
24505
|
+
console.log("Processor Server Started at:", options.port);
|
24506
|
+
}
|
24507
|
+
var metricsPort = 4040;
|
24508
|
+
var httpServer = http.createServer(async function(req, res) {
|
24509
|
+
if (req.url) {
|
24510
|
+
const reqUrl = new URL(req.url, `http://${req.headers.host}`);
|
24511
|
+
const queries = reqUrl.searchParams;
|
24512
|
+
switch (reqUrl.pathname) {
|
24513
|
+
// case '/metrics':
|
24514
|
+
// const metrics = await mergedRegistry.metrics()
|
24515
|
+
// res.write(metrics)
|
24516
|
+
// break
|
24517
|
+
case "/heap": {
|
24518
|
+
try {
|
24519
|
+
const file = "/tmp/" + Date.now() + ".heapsnapshot";
|
24520
|
+
await dumpHeap(file);
|
24521
|
+
const readStream = import_fs_extra2.default.createReadStream(file);
|
24522
|
+
res.writeHead(200, { "Content-Type": "application/json" });
|
24523
|
+
readStream.pipe(res);
|
24524
|
+
res.end();
|
24525
|
+
} catch {
|
24526
|
+
res.writeHead(500);
|
24527
|
+
res.end();
|
24537
24528
|
}
|
24538
|
-
|
24539
|
-
|
24540
|
-
|
24541
|
-
|
24542
|
-
|
24543
|
-
|
24544
|
-
|
24545
|
-
|
24546
|
-
|
24547
|
-
|
24548
|
-
|
24549
|
-
|
24550
|
-
|
24551
|
-
|
24552
|
-
|
24553
|
-
|
24529
|
+
break;
|
24530
|
+
}
|
24531
|
+
case "/profile": {
|
24532
|
+
try {
|
24533
|
+
const profileTime = parseInt(queries.get("t") || "1000", 10) || 1e3;
|
24534
|
+
const session = new Session();
|
24535
|
+
session.connect();
|
24536
|
+
await session.post("Profiler.enable");
|
24537
|
+
await session.post("Profiler.start");
|
24538
|
+
await new Promise((resolve) => setTimeout(resolve, profileTime));
|
24539
|
+
const { profile } = await session.post("Profiler.stop");
|
24540
|
+
res.writeHead(200, { "Content-Type": "application/json" });
|
24541
|
+
res.write(JSON.stringify(profile));
|
24542
|
+
session.disconnect();
|
24543
|
+
} catch {
|
24544
|
+
res.writeHead(500);
|
24554
24545
|
}
|
24555
|
-
|
24556
|
-
res.writeHead(404);
|
24546
|
+
break;
|
24557
24547
|
}
|
24558
|
-
|
24559
|
-
|
24560
|
-
}
|
24561
|
-
res.end();
|
24562
|
-
}).listen(metricsPort);
|
24563
|
-
console.log("Metric Server Started at:", metricsPort);
|
24564
|
-
process.on("SIGINT", function() {
|
24565
|
-
shutdownServers(server, httpServer, 0);
|
24566
|
-
}).on("uncaughtException", (err) => {
|
24567
|
-
console.error("Uncaught Exception, please checking if await is properly used", err);
|
24568
|
-
if (baseService) {
|
24569
|
-
baseService.unhandled = err;
|
24570
|
-
}
|
24571
|
-
}).on("unhandledRejection", (reason, p) => {
|
24572
|
-
if (reason?.message.startsWith('invalid ENS name (disallowed character: "*"')) {
|
24573
|
-
return;
|
24574
|
-
}
|
24575
|
-
console.error("Unhandled Rejection, please checking if await is properly", reason);
|
24576
|
-
if (baseService) {
|
24577
|
-
baseService.unhandled = reason;
|
24548
|
+
default:
|
24549
|
+
res.writeHead(404);
|
24578
24550
|
}
|
24579
|
-
}
|
24580
|
-
|
24581
|
-
|
24582
|
-
|
24583
|
-
|
24584
|
-
|
24585
|
-
|
24586
|
-
|
24587
|
-
|
24588
|
-
|
24589
|
-
|
24590
|
-
|
24591
|
-
|
24592
|
-
|
24593
|
-
|
24594
|
-
|
24551
|
+
} else {
|
24552
|
+
res.writeHead(404);
|
24553
|
+
}
|
24554
|
+
res.end();
|
24555
|
+
}).listen(metricsPort);
|
24556
|
+
console.log("Metric Server Started at:", metricsPort);
|
24557
|
+
process.on("SIGINT", function() {
|
24558
|
+
shutdownServers(0);
|
24559
|
+
}).on("uncaughtException", (err) => {
|
24560
|
+
console.error("Uncaught Exception, please checking if await is properly used", err);
|
24561
|
+
if (baseService) {
|
24562
|
+
baseService.unhandled = err;
|
24563
|
+
}
|
24564
|
+
}).on("unhandledRejection", (reason, p) => {
|
24565
|
+
if (reason?.message.startsWith('invalid ENS name (disallowed character: "*"')) {
|
24566
|
+
return;
|
24567
|
+
}
|
24568
|
+
console.error("Unhandled Rejection, please checking if await is properly", reason);
|
24569
|
+
if (baseService) {
|
24570
|
+
baseService.unhandled = reason;
|
24595
24571
|
}
|
24572
|
+
});
|
24573
|
+
if (process.env["OOM_DUMP_MEMORY_SIZE_GB"]) {
|
24574
|
+
let dumping = false;
|
24575
|
+
const memorySize = parseFloat(process.env["OOM_DUMP_MEMORY_SIZE_GB"]);
|
24576
|
+
console.log("heap dumping is enabled, limit set to ", memorySize, "gb");
|
24577
|
+
const dir = process.env["OOM_DUMP_DIR"] || "/tmp";
|
24578
|
+
setInterval(async () => {
|
24579
|
+
const mem = process.memoryUsage();
|
24580
|
+
console.log("Current Memory Usage", mem);
|
24581
|
+
if (mem.heapTotal > memorySize * 1024 * 1024 * 1024 && !dumping) {
|
24582
|
+
const file = path2.join(dir, `${Date.now()}.heapsnapshot`);
|
24583
|
+
dumping = true;
|
24584
|
+
await dumpHeap(file);
|
24585
|
+
process.exit(11);
|
24586
|
+
}
|
24587
|
+
}, 1e3 * 60);
|
24596
24588
|
}
|
24597
24589
|
async function dumpHeap(file) {
|
24598
24590
|
console.log("Heap dumping to", file);
|
@@ -24611,8 +24603,8 @@ async function dumpHeap(file) {
|
|
24611
24603
|
import_fs_extra2.default.closeSync(fd);
|
24612
24604
|
}
|
24613
24605
|
}
|
24614
|
-
function shutdownServers(
|
24615
|
-
server
|
24606
|
+
function shutdownServers(exitCode) {
|
24607
|
+
server.forceShutdown();
|
24616
24608
|
console.log("RPC server shut down");
|
24617
24609
|
httpServer.close(function() {
|
24618
24610
|
console.log("Http server shut down");
|