agentv 3.1.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agentv-provider-5CJVBBGG-2XVZBW7L.js +9 -0
- package/dist/agentv-provider-5CJVBBGG-2XVZBW7L.js.map +1 -0
- package/dist/chunk-3L2L5GIL.js +51 -0
- package/dist/chunk-3L2L5GIL.js.map +1 -0
- package/dist/chunk-5H446C7X.js +50 -0
- package/dist/chunk-5H446C7X.js.map +1 -0
- package/dist/chunk-6GSYTMXD.js +31520 -0
- package/dist/chunk-6GSYTMXD.js.map +1 -0
- package/dist/chunk-BL4PVUAT.js +261 -0
- package/dist/chunk-BL4PVUAT.js.map +1 -0
- package/dist/chunk-C5GOHBQM.js +84 -0
- package/dist/chunk-C5GOHBQM.js.map +1 -0
- package/dist/chunk-CY4TSIZS.js +6149 -0
- package/dist/chunk-CY4TSIZS.js.map +1 -0
- package/dist/chunk-JK6V4KVD.js +114 -0
- package/dist/chunk-JK6V4KVD.js.map +1 -0
- package/dist/chunk-LRULMAAA.js +1711 -0
- package/dist/chunk-LRULMAAA.js.map +1 -0
- package/dist/chunk-QHH6QXNY.js +24380 -0
- package/dist/chunk-QHH6QXNY.js.map +1 -0
- package/dist/chunk-QZRZDCHV.js +4263 -0
- package/dist/chunk-QZRZDCHV.js.map +1 -0
- package/dist/chunk-SR4I5KET.js +1238 -0
- package/dist/chunk-SR4I5KET.js.map +1 -0
- package/dist/chunk-VQ2ZO7XJ.js +2098 -0
- package/dist/chunk-VQ2ZO7XJ.js.map +1 -0
- package/dist/chunk-XALGXSKB.js +21 -0
- package/dist/chunk-XALGXSKB.js.map +1 -0
- package/dist/chunk-XOSNETAV.js +565 -0
- package/dist/chunk-XOSNETAV.js.map +1 -0
- package/dist/cli.js +29 -0
- package/dist/cli.js.map +1 -0
- package/dist/dist-NOJMJ5CF.js +305 -0
- package/dist/dist-NOJMJ5CF.js.map +1 -0
- package/dist/esm-5Q4BZALM-5REQWAUV.js +924 -0
- package/dist/esm-5Q4BZALM-5REQWAUV.js.map +1 -0
- package/dist/esm-CZAWIY6F.js +32 -0
- package/dist/esm-CZAWIY6F.js.map +1 -0
- package/dist/esm-QNEMCJPL.js +933 -0
- package/dist/esm-QNEMCJPL.js.map +1 -0
- package/dist/esm-R77SNOF5.js +65 -0
- package/dist/esm-R77SNOF5.js.map +1 -0
- package/dist/esm-RVQPUGWH.js +1207 -0
- package/dist/esm-RVQPUGWH.js.map +1 -0
- package/dist/getMachineId-bsd-HSK5LZMG.js +41 -0
- package/dist/getMachineId-bsd-HSK5LZMG.js.map +1 -0
- package/dist/getMachineId-darwin-4DP6CCJV.js +41 -0
- package/dist/getMachineId-darwin-4DP6CCJV.js.map +1 -0
- package/dist/getMachineId-linux-44LJ5UJB.js +33 -0
- package/dist/getMachineId-linux-44LJ5UJB.js.map +1 -0
- package/dist/getMachineId-unsupported-NVK6IATM.js +24 -0
- package/dist/getMachineId-unsupported-NVK6IATM.js.map +1 -0
- package/dist/getMachineId-win-YZ36S7VA.js +43 -0
- package/dist/getMachineId-win-YZ36S7VA.js.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/interactive-Q37ICHBG.js +334 -0
- package/dist/interactive-Q37ICHBG.js.map +1 -0
- package/dist/otlp-json-file-exporter-77FDBRSY-EZAPHWP6.js +9 -0
- package/dist/otlp-json-file-exporter-77FDBRSY-EZAPHWP6.js.map +1 -0
- package/dist/simple-trace-file-exporter-S76DMABU-5FCJESD2.js +9 -0
- package/dist/simple-trace-file-exporter-S76DMABU-5FCJESD2.js.map +1 -0
- package/dist/src-ML4D2MC2.js +1733 -0
- package/dist/src-ML4D2MC2.js.map +1 -0
- package/dist/templates/.agentv/targets.yaml +5 -24
- package/dist/token-POXF46NU.js +66 -0
- package/dist/token-POXF46NU.js.map +1 -0
- package/dist/token-util-6GWYZWGE.js +8 -0
- package/dist/token-util-6GWYZWGE.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
__esm
|
|
4
|
+
} from "./chunk-5H446C7X.js";
|
|
5
|
+
|
|
6
|
+
// ../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/execAsync.js
|
|
7
|
+
import * as child_process from "child_process";
|
|
8
|
+
import * as util from "util";
|
|
9
|
+
var execAsync;
|
|
10
|
+
var init_execAsync = __esm({
|
|
11
|
+
"../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/execAsync.js"() {
|
|
12
|
+
"use strict";
|
|
13
|
+
execAsync = util.promisify(child_process.exec);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
execAsync,
|
|
19
|
+
init_execAsync
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=chunk-XALGXSKB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/src/detectors/platform/node/machine-id/execAsync.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as child_process from 'child_process';\nimport * as util from 'util';\n\nexport const execAsync = util.promisify(child_process.exec);\n"],"mappings":";;;;;;AAgBA,YAAY,mBAAmB;AAC/B,YAAY,UAAU;AAjBtB,IAmBa;AAnBb;;;AAmBO,IAAM,YAAiB,eAAwB,kBAAI;;;","names":[]}
|
|
@@ -0,0 +1,565 @@
|
|
|
1
|
+
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
SDK_INFO,
|
|
4
|
+
getStringFromEnv,
|
|
5
|
+
init_esm as init_esm3
|
|
6
|
+
} from "./chunk-SR4I5KET.js";
|
|
7
|
+
import {
|
|
8
|
+
ATTR_SERVICE_NAME,
|
|
9
|
+
ATTR_TELEMETRY_SDK_LANGUAGE,
|
|
10
|
+
ATTR_TELEMETRY_SDK_NAME,
|
|
11
|
+
ATTR_TELEMETRY_SDK_VERSION,
|
|
12
|
+
init_esm as init_esm2
|
|
13
|
+
} from "./chunk-VQ2ZO7XJ.js";
|
|
14
|
+
import {
|
|
15
|
+
diag,
|
|
16
|
+
init_esm
|
|
17
|
+
} from "./chunk-LRULMAAA.js";
|
|
18
|
+
import {
|
|
19
|
+
__esm
|
|
20
|
+
} from "./chunk-5H446C7X.js";
|
|
21
|
+
|
|
22
|
+
// ../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/default-service-name.js
|
|
23
|
+
function defaultServiceName() {
|
|
24
|
+
if (serviceName === void 0) {
|
|
25
|
+
try {
|
|
26
|
+
const argv0 = globalThis.process.argv0;
|
|
27
|
+
serviceName = argv0 ? `unknown_service:${argv0}` : "unknown_service";
|
|
28
|
+
} catch {
|
|
29
|
+
serviceName = "unknown_service";
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return serviceName;
|
|
33
|
+
}
|
|
34
|
+
var serviceName;
|
|
35
|
+
var init_default_service_name = __esm({
|
|
36
|
+
"../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/default-service-name.js"() {
|
|
37
|
+
"use strict";
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// ../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/utils.js
|
|
42
|
+
var isPromiseLike;
|
|
43
|
+
var init_utils = __esm({
|
|
44
|
+
"../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/utils.js"() {
|
|
45
|
+
"use strict";
|
|
46
|
+
isPromiseLike = (val) => {
|
|
47
|
+
return val !== null && typeof val === "object" && typeof val.then === "function";
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// ../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/ResourceImpl.js
|
|
53
|
+
function resourceFromAttributes(attributes, options) {
|
|
54
|
+
return ResourceImpl.FromAttributeList(Object.entries(attributes), options);
|
|
55
|
+
}
|
|
56
|
+
function resourceFromDetectedResource(detectedResource, options) {
|
|
57
|
+
return new ResourceImpl(detectedResource, options);
|
|
58
|
+
}
|
|
59
|
+
function emptyResource() {
|
|
60
|
+
return resourceFromAttributes({});
|
|
61
|
+
}
|
|
62
|
+
function defaultResource() {
|
|
63
|
+
return resourceFromAttributes({
|
|
64
|
+
[ATTR_SERVICE_NAME]: defaultServiceName(),
|
|
65
|
+
[ATTR_TELEMETRY_SDK_LANGUAGE]: SDK_INFO[ATTR_TELEMETRY_SDK_LANGUAGE],
|
|
66
|
+
[ATTR_TELEMETRY_SDK_NAME]: SDK_INFO[ATTR_TELEMETRY_SDK_NAME],
|
|
67
|
+
[ATTR_TELEMETRY_SDK_VERSION]: SDK_INFO[ATTR_TELEMETRY_SDK_VERSION]
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function guardedRawAttributes(attributes) {
|
|
71
|
+
return attributes.map(([k, v]) => {
|
|
72
|
+
if (isPromiseLike(v)) {
|
|
73
|
+
return [
|
|
74
|
+
k,
|
|
75
|
+
v.catch((err) => {
|
|
76
|
+
diag.debug("promise rejection for resource attribute: %s - %s", k, err);
|
|
77
|
+
return void 0;
|
|
78
|
+
})
|
|
79
|
+
];
|
|
80
|
+
}
|
|
81
|
+
return [k, v];
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function validateSchemaUrl(schemaUrl) {
|
|
85
|
+
if (typeof schemaUrl === "string" || schemaUrl === void 0) {
|
|
86
|
+
return schemaUrl;
|
|
87
|
+
}
|
|
88
|
+
diag.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.", schemaUrl);
|
|
89
|
+
return void 0;
|
|
90
|
+
}
|
|
91
|
+
function mergeSchemaUrl(old, updating) {
|
|
92
|
+
const oldSchemaUrl = old?.schemaUrl;
|
|
93
|
+
const updatingSchemaUrl = updating?.schemaUrl;
|
|
94
|
+
const isOldEmpty = oldSchemaUrl === void 0 || oldSchemaUrl === "";
|
|
95
|
+
const isUpdatingEmpty = updatingSchemaUrl === void 0 || updatingSchemaUrl === "";
|
|
96
|
+
if (isOldEmpty) {
|
|
97
|
+
return updatingSchemaUrl;
|
|
98
|
+
}
|
|
99
|
+
if (isUpdatingEmpty) {
|
|
100
|
+
return oldSchemaUrl;
|
|
101
|
+
}
|
|
102
|
+
if (oldSchemaUrl === updatingSchemaUrl) {
|
|
103
|
+
return oldSchemaUrl;
|
|
104
|
+
}
|
|
105
|
+
diag.warn('Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.', oldSchemaUrl, updatingSchemaUrl);
|
|
106
|
+
return void 0;
|
|
107
|
+
}
|
|
108
|
+
var ResourceImpl;
|
|
109
|
+
var init_ResourceImpl = __esm({
|
|
110
|
+
"../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/ResourceImpl.js"() {
|
|
111
|
+
"use strict";
|
|
112
|
+
init_esm();
|
|
113
|
+
init_esm3();
|
|
114
|
+
init_esm2();
|
|
115
|
+
init_default_service_name();
|
|
116
|
+
init_utils();
|
|
117
|
+
ResourceImpl = class _ResourceImpl {
|
|
118
|
+
_rawAttributes;
|
|
119
|
+
_asyncAttributesPending = false;
|
|
120
|
+
_schemaUrl;
|
|
121
|
+
_memoizedAttributes;
|
|
122
|
+
static FromAttributeList(attributes, options) {
|
|
123
|
+
const res = new _ResourceImpl({}, options);
|
|
124
|
+
res._rawAttributes = guardedRawAttributes(attributes);
|
|
125
|
+
res._asyncAttributesPending = attributes.filter(([_, val]) => isPromiseLike(val)).length > 0;
|
|
126
|
+
return res;
|
|
127
|
+
}
|
|
128
|
+
constructor(resource, options) {
|
|
129
|
+
const attributes = resource.attributes ?? {};
|
|
130
|
+
this._rawAttributes = Object.entries(attributes).map(([k, v]) => {
|
|
131
|
+
if (isPromiseLike(v)) {
|
|
132
|
+
this._asyncAttributesPending = true;
|
|
133
|
+
}
|
|
134
|
+
return [k, v];
|
|
135
|
+
});
|
|
136
|
+
this._rawAttributes = guardedRawAttributes(this._rawAttributes);
|
|
137
|
+
this._schemaUrl = validateSchemaUrl(options?.schemaUrl);
|
|
138
|
+
}
|
|
139
|
+
get asyncAttributesPending() {
|
|
140
|
+
return this._asyncAttributesPending;
|
|
141
|
+
}
|
|
142
|
+
async waitForAsyncAttributes() {
|
|
143
|
+
if (!this.asyncAttributesPending) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
for (let i = 0; i < this._rawAttributes.length; i++) {
|
|
147
|
+
const [k, v] = this._rawAttributes[i];
|
|
148
|
+
this._rawAttributes[i] = [k, isPromiseLike(v) ? await v : v];
|
|
149
|
+
}
|
|
150
|
+
this._asyncAttributesPending = false;
|
|
151
|
+
}
|
|
152
|
+
get attributes() {
|
|
153
|
+
if (this.asyncAttributesPending) {
|
|
154
|
+
diag.error("Accessing resource attributes before async attributes settled");
|
|
155
|
+
}
|
|
156
|
+
if (this._memoizedAttributes) {
|
|
157
|
+
return this._memoizedAttributes;
|
|
158
|
+
}
|
|
159
|
+
const attrs = {};
|
|
160
|
+
for (const [k, v] of this._rawAttributes) {
|
|
161
|
+
if (isPromiseLike(v)) {
|
|
162
|
+
diag.debug(`Unsettled resource attribute ${k} skipped`);
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
if (v != null) {
|
|
166
|
+
attrs[k] ??= v;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
if (!this._asyncAttributesPending) {
|
|
170
|
+
this._memoizedAttributes = attrs;
|
|
171
|
+
}
|
|
172
|
+
return attrs;
|
|
173
|
+
}
|
|
174
|
+
getRawAttributes() {
|
|
175
|
+
return this._rawAttributes;
|
|
176
|
+
}
|
|
177
|
+
get schemaUrl() {
|
|
178
|
+
return this._schemaUrl;
|
|
179
|
+
}
|
|
180
|
+
merge(resource) {
|
|
181
|
+
if (resource == null)
|
|
182
|
+
return this;
|
|
183
|
+
const mergedSchemaUrl = mergeSchemaUrl(this, resource);
|
|
184
|
+
const mergedOptions = mergedSchemaUrl ? { schemaUrl: mergedSchemaUrl } : void 0;
|
|
185
|
+
return _ResourceImpl.FromAttributeList([...resource.getRawAttributes(), ...this.getRawAttributes()], mergedOptions);
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
// ../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detect-resources.js
|
|
192
|
+
var detectResources;
|
|
193
|
+
var init_detect_resources = __esm({
|
|
194
|
+
"../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detect-resources.js"() {
|
|
195
|
+
"use strict";
|
|
196
|
+
init_esm();
|
|
197
|
+
init_ResourceImpl();
|
|
198
|
+
detectResources = (config = {}) => {
|
|
199
|
+
const resources = (config.detectors || []).map((d) => {
|
|
200
|
+
try {
|
|
201
|
+
const resource = resourceFromDetectedResource(d.detect(config));
|
|
202
|
+
diag.debug(`${d.constructor.name} found resource.`, resource);
|
|
203
|
+
return resource;
|
|
204
|
+
} catch (e) {
|
|
205
|
+
diag.debug(`${d.constructor.name} failed: ${e.message}`);
|
|
206
|
+
return emptyResource();
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
return resources.reduce((acc, resource) => acc.merge(resource), emptyResource());
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
// ../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/EnvDetector.js
|
|
215
|
+
var EnvDetector, envDetector;
|
|
216
|
+
var init_EnvDetector = __esm({
|
|
217
|
+
"../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/EnvDetector.js"() {
|
|
218
|
+
"use strict";
|
|
219
|
+
init_esm();
|
|
220
|
+
init_esm2();
|
|
221
|
+
init_esm3();
|
|
222
|
+
EnvDetector = class {
|
|
223
|
+
// Type, attribute keys, and attribute values should not exceed 256 characters.
|
|
224
|
+
_MAX_LENGTH = 255;
|
|
225
|
+
// OTEL_RESOURCE_ATTRIBUTES is a comma-separated list of attributes.
|
|
226
|
+
_COMMA_SEPARATOR = ",";
|
|
227
|
+
// OTEL_RESOURCE_ATTRIBUTES contains key value pair separated by '='.
|
|
228
|
+
_LABEL_KEY_VALUE_SPLITTER = "=";
|
|
229
|
+
_ERROR_MESSAGE_INVALID_CHARS = "should be a ASCII string with a length greater than 0 and not exceed " + this._MAX_LENGTH + " characters.";
|
|
230
|
+
_ERROR_MESSAGE_INVALID_VALUE = "should be a ASCII string with a length not exceed " + this._MAX_LENGTH + " characters.";
|
|
231
|
+
/**
|
|
232
|
+
* Returns a {@link Resource} populated with attributes from the
|
|
233
|
+
* OTEL_RESOURCE_ATTRIBUTES environment variable. Note this is an async
|
|
234
|
+
* function to conform to the Detector interface.
|
|
235
|
+
*
|
|
236
|
+
* @param config The resource detection config
|
|
237
|
+
*/
|
|
238
|
+
detect(_config) {
|
|
239
|
+
const attributes = {};
|
|
240
|
+
const rawAttributes = getStringFromEnv("OTEL_RESOURCE_ATTRIBUTES");
|
|
241
|
+
const serviceName2 = getStringFromEnv("OTEL_SERVICE_NAME");
|
|
242
|
+
if (rawAttributes) {
|
|
243
|
+
try {
|
|
244
|
+
const parsedAttributes = this._parseResourceAttributes(rawAttributes);
|
|
245
|
+
Object.assign(attributes, parsedAttributes);
|
|
246
|
+
} catch (e) {
|
|
247
|
+
diag.debug(`EnvDetector failed: ${e.message}`);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
if (serviceName2) {
|
|
251
|
+
attributes[ATTR_SERVICE_NAME] = serviceName2;
|
|
252
|
+
}
|
|
253
|
+
return { attributes };
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Creates an attribute map from the OTEL_RESOURCE_ATTRIBUTES environment
|
|
257
|
+
* variable.
|
|
258
|
+
*
|
|
259
|
+
* OTEL_RESOURCE_ATTRIBUTES: A comma-separated list of attributes describing
|
|
260
|
+
* the source in more detail, e.g. “key1=val1,key2=val2”. Domain names and
|
|
261
|
+
* paths are accepted as attribute keys. Values may be quoted or unquoted in
|
|
262
|
+
* general. If a value contains whitespace, =, or " characters, it must
|
|
263
|
+
* always be quoted.
|
|
264
|
+
*
|
|
265
|
+
* @param rawEnvAttributes The resource attributes as a comma-separated list
|
|
266
|
+
* of key/value pairs.
|
|
267
|
+
* @returns The sanitized resource attributes.
|
|
268
|
+
*/
|
|
269
|
+
_parseResourceAttributes(rawEnvAttributes) {
|
|
270
|
+
if (!rawEnvAttributes)
|
|
271
|
+
return {};
|
|
272
|
+
const attributes = {};
|
|
273
|
+
const rawAttributes = rawEnvAttributes.split(this._COMMA_SEPARATOR, -1);
|
|
274
|
+
for (const rawAttribute of rawAttributes) {
|
|
275
|
+
const keyValuePair = rawAttribute.split(this._LABEL_KEY_VALUE_SPLITTER, -1);
|
|
276
|
+
if (keyValuePair.length !== 2) {
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
let [key, value] = keyValuePair;
|
|
280
|
+
key = key.trim();
|
|
281
|
+
value = value.trim().split(/^"|"$/).join("");
|
|
282
|
+
if (!this._isValidAndNotEmpty(key)) {
|
|
283
|
+
throw new Error(`Attribute key ${this._ERROR_MESSAGE_INVALID_CHARS}`);
|
|
284
|
+
}
|
|
285
|
+
if (!this._isValid(value)) {
|
|
286
|
+
throw new Error(`Attribute value ${this._ERROR_MESSAGE_INVALID_VALUE}`);
|
|
287
|
+
}
|
|
288
|
+
attributes[key] = decodeURIComponent(value);
|
|
289
|
+
}
|
|
290
|
+
return attributes;
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Determines whether the given String is a valid printable ASCII string with
|
|
294
|
+
* a length not exceed _MAX_LENGTH characters.
|
|
295
|
+
*
|
|
296
|
+
* @param str The String to be validated.
|
|
297
|
+
* @returns Whether the String is valid.
|
|
298
|
+
*/
|
|
299
|
+
_isValid(name) {
|
|
300
|
+
return name.length <= this._MAX_LENGTH && this._isBaggageOctetString(name);
|
|
301
|
+
}
|
|
302
|
+
// https://www.w3.org/TR/baggage/#definition
|
|
303
|
+
_isBaggageOctetString(str) {
|
|
304
|
+
for (let i = 0; i < str.length; i++) {
|
|
305
|
+
const ch = str.charCodeAt(i);
|
|
306
|
+
if (ch < 33 || ch === 44 || ch === 59 || ch === 92 || ch > 126) {
|
|
307
|
+
return false;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
return true;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Determines whether the given String is a valid printable ASCII string with
|
|
314
|
+
* a length greater than 0 and not exceed _MAX_LENGTH characters.
|
|
315
|
+
*
|
|
316
|
+
* @param str The String to be validated.
|
|
317
|
+
* @returns Whether the String is valid and not empty.
|
|
318
|
+
*/
|
|
319
|
+
_isValidAndNotEmpty(str) {
|
|
320
|
+
return str.length > 0 && this._isValid(str);
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
envDetector = new EnvDetector();
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
// ../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/semconv.js
|
|
328
|
+
var ATTR_HOST_ARCH, ATTR_HOST_ID, ATTR_HOST_NAME, ATTR_OS_TYPE, ATTR_OS_VERSION, ATTR_PROCESS_COMMAND, ATTR_PROCESS_COMMAND_ARGS, ATTR_PROCESS_EXECUTABLE_NAME, ATTR_PROCESS_EXECUTABLE_PATH, ATTR_PROCESS_OWNER, ATTR_PROCESS_PID, ATTR_PROCESS_RUNTIME_DESCRIPTION, ATTR_PROCESS_RUNTIME_NAME, ATTR_PROCESS_RUNTIME_VERSION, ATTR_SERVICE_INSTANCE_ID;
|
|
329
|
+
var init_semconv = __esm({
|
|
330
|
+
"../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/semconv.js"() {
|
|
331
|
+
"use strict";
|
|
332
|
+
ATTR_HOST_ARCH = "host.arch";
|
|
333
|
+
ATTR_HOST_ID = "host.id";
|
|
334
|
+
ATTR_HOST_NAME = "host.name";
|
|
335
|
+
ATTR_OS_TYPE = "os.type";
|
|
336
|
+
ATTR_OS_VERSION = "os.version";
|
|
337
|
+
ATTR_PROCESS_COMMAND = "process.command";
|
|
338
|
+
ATTR_PROCESS_COMMAND_ARGS = "process.command_args";
|
|
339
|
+
ATTR_PROCESS_EXECUTABLE_NAME = "process.executable.name";
|
|
340
|
+
ATTR_PROCESS_EXECUTABLE_PATH = "process.executable.path";
|
|
341
|
+
ATTR_PROCESS_OWNER = "process.owner";
|
|
342
|
+
ATTR_PROCESS_PID = "process.pid";
|
|
343
|
+
ATTR_PROCESS_RUNTIME_DESCRIPTION = "process.runtime.description";
|
|
344
|
+
ATTR_PROCESS_RUNTIME_NAME = "process.runtime.name";
|
|
345
|
+
ATTR_PROCESS_RUNTIME_VERSION = "process.runtime.version";
|
|
346
|
+
ATTR_SERVICE_INSTANCE_ID = "service.instance.id";
|
|
347
|
+
}
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
// ../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId.js
|
|
351
|
+
import * as process2 from "process";
|
|
352
|
+
async function getMachineId() {
|
|
353
|
+
if (!getMachineIdImpl) {
|
|
354
|
+
switch (process2.platform) {
|
|
355
|
+
case "darwin":
|
|
356
|
+
getMachineIdImpl = (await import("./getMachineId-darwin-4DP6CCJV.js")).getMachineId;
|
|
357
|
+
break;
|
|
358
|
+
case "linux":
|
|
359
|
+
getMachineIdImpl = (await import("./getMachineId-linux-44LJ5UJB.js")).getMachineId;
|
|
360
|
+
break;
|
|
361
|
+
case "freebsd":
|
|
362
|
+
getMachineIdImpl = (await import("./getMachineId-bsd-HSK5LZMG.js")).getMachineId;
|
|
363
|
+
break;
|
|
364
|
+
case "win32":
|
|
365
|
+
getMachineIdImpl = (await import("./getMachineId-win-YZ36S7VA.js")).getMachineId;
|
|
366
|
+
break;
|
|
367
|
+
default:
|
|
368
|
+
getMachineIdImpl = (await import("./getMachineId-unsupported-NVK6IATM.js")).getMachineId;
|
|
369
|
+
break;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
return getMachineIdImpl();
|
|
373
|
+
}
|
|
374
|
+
var getMachineIdImpl;
|
|
375
|
+
var init_getMachineId = __esm({
|
|
376
|
+
"../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId.js"() {
|
|
377
|
+
"use strict";
|
|
378
|
+
}
|
|
379
|
+
});
|
|
380
|
+
|
|
381
|
+
// ../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/utils.js
|
|
382
|
+
var normalizeArch, normalizeType;
|
|
383
|
+
var init_utils2 = __esm({
|
|
384
|
+
"../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/utils.js"() {
|
|
385
|
+
"use strict";
|
|
386
|
+
normalizeArch = (nodeArchString) => {
|
|
387
|
+
switch (nodeArchString) {
|
|
388
|
+
case "arm":
|
|
389
|
+
return "arm32";
|
|
390
|
+
case "ppc":
|
|
391
|
+
return "ppc32";
|
|
392
|
+
case "x64":
|
|
393
|
+
return "amd64";
|
|
394
|
+
default:
|
|
395
|
+
return nodeArchString;
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
normalizeType = (nodePlatform) => {
|
|
399
|
+
switch (nodePlatform) {
|
|
400
|
+
case "sunos":
|
|
401
|
+
return "solaris";
|
|
402
|
+
case "win32":
|
|
403
|
+
return "windows";
|
|
404
|
+
default:
|
|
405
|
+
return nodePlatform;
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
});
|
|
410
|
+
|
|
411
|
+
// ../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/HostDetector.js
|
|
412
|
+
import { arch, hostname } from "os";
|
|
413
|
+
var HostDetector, hostDetector;
|
|
414
|
+
var init_HostDetector = __esm({
|
|
415
|
+
"../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/HostDetector.js"() {
|
|
416
|
+
"use strict";
|
|
417
|
+
init_semconv();
|
|
418
|
+
init_getMachineId();
|
|
419
|
+
init_utils2();
|
|
420
|
+
HostDetector = class {
|
|
421
|
+
detect(_config) {
|
|
422
|
+
const attributes = {
|
|
423
|
+
[ATTR_HOST_NAME]: hostname(),
|
|
424
|
+
[ATTR_HOST_ARCH]: normalizeArch(arch()),
|
|
425
|
+
[ATTR_HOST_ID]: getMachineId()
|
|
426
|
+
};
|
|
427
|
+
return { attributes };
|
|
428
|
+
}
|
|
429
|
+
};
|
|
430
|
+
hostDetector = new HostDetector();
|
|
431
|
+
}
|
|
432
|
+
});
|
|
433
|
+
|
|
434
|
+
// ../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/OSDetector.js
|
|
435
|
+
import { platform as platform2, release } from "os";
|
|
436
|
+
var OSDetector, osDetector;
|
|
437
|
+
var init_OSDetector = __esm({
|
|
438
|
+
"../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/OSDetector.js"() {
|
|
439
|
+
"use strict";
|
|
440
|
+
init_semconv();
|
|
441
|
+
init_utils2();
|
|
442
|
+
OSDetector = class {
|
|
443
|
+
detect(_config) {
|
|
444
|
+
const attributes = {
|
|
445
|
+
[ATTR_OS_TYPE]: normalizeType(platform2()),
|
|
446
|
+
[ATTR_OS_VERSION]: release()
|
|
447
|
+
};
|
|
448
|
+
return { attributes };
|
|
449
|
+
}
|
|
450
|
+
};
|
|
451
|
+
osDetector = new OSDetector();
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
|
|
455
|
+
// ../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/ProcessDetector.js
|
|
456
|
+
import * as os from "os";
|
|
457
|
+
var ProcessDetector, processDetector;
|
|
458
|
+
var init_ProcessDetector = __esm({
|
|
459
|
+
"../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/ProcessDetector.js"() {
|
|
460
|
+
"use strict";
|
|
461
|
+
init_esm();
|
|
462
|
+
init_semconv();
|
|
463
|
+
ProcessDetector = class {
|
|
464
|
+
detect(_config) {
|
|
465
|
+
const attributes = {
|
|
466
|
+
[ATTR_PROCESS_PID]: process.pid,
|
|
467
|
+
[ATTR_PROCESS_EXECUTABLE_NAME]: process.title,
|
|
468
|
+
[ATTR_PROCESS_EXECUTABLE_PATH]: process.execPath,
|
|
469
|
+
[ATTR_PROCESS_COMMAND_ARGS]: [
|
|
470
|
+
process.argv[0],
|
|
471
|
+
...process.execArgv,
|
|
472
|
+
...process.argv.slice(1)
|
|
473
|
+
],
|
|
474
|
+
[ATTR_PROCESS_RUNTIME_VERSION]: process.versions.node,
|
|
475
|
+
[ATTR_PROCESS_RUNTIME_NAME]: "nodejs",
|
|
476
|
+
[ATTR_PROCESS_RUNTIME_DESCRIPTION]: "Node.js"
|
|
477
|
+
};
|
|
478
|
+
if (process.argv.length > 1) {
|
|
479
|
+
attributes[ATTR_PROCESS_COMMAND] = process.argv[1];
|
|
480
|
+
}
|
|
481
|
+
try {
|
|
482
|
+
const userInfo2 = os.userInfo();
|
|
483
|
+
attributes[ATTR_PROCESS_OWNER] = userInfo2.username;
|
|
484
|
+
} catch (e) {
|
|
485
|
+
diag.debug(`error obtaining process owner: ${e}`);
|
|
486
|
+
}
|
|
487
|
+
return { attributes };
|
|
488
|
+
}
|
|
489
|
+
};
|
|
490
|
+
processDetector = new ProcessDetector();
|
|
491
|
+
}
|
|
492
|
+
});
|
|
493
|
+
|
|
494
|
+
// ../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/ServiceInstanceIdDetector.js
|
|
495
|
+
import { randomUUID } from "crypto";
|
|
496
|
+
var ServiceInstanceIdDetector, serviceInstanceIdDetector;
|
|
497
|
+
var init_ServiceInstanceIdDetector = __esm({
|
|
498
|
+
"../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/ServiceInstanceIdDetector.js"() {
|
|
499
|
+
"use strict";
|
|
500
|
+
init_semconv();
|
|
501
|
+
ServiceInstanceIdDetector = class {
|
|
502
|
+
detect(_config) {
|
|
503
|
+
return {
|
|
504
|
+
attributes: {
|
|
505
|
+
[ATTR_SERVICE_INSTANCE_ID]: randomUUID()
|
|
506
|
+
}
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
};
|
|
510
|
+
serviceInstanceIdDetector = new ServiceInstanceIdDetector();
|
|
511
|
+
}
|
|
512
|
+
});
|
|
513
|
+
|
|
514
|
+
// ../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/index.js
|
|
515
|
+
var init_node = __esm({
|
|
516
|
+
"../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/index.js"() {
|
|
517
|
+
"use strict";
|
|
518
|
+
init_HostDetector();
|
|
519
|
+
init_OSDetector();
|
|
520
|
+
init_ProcessDetector();
|
|
521
|
+
init_ServiceInstanceIdDetector();
|
|
522
|
+
}
|
|
523
|
+
});
|
|
524
|
+
|
|
525
|
+
// ../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/platform/index.js
|
|
526
|
+
var init_platform = __esm({
|
|
527
|
+
"../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/platform/index.js"() {
|
|
528
|
+
"use strict";
|
|
529
|
+
init_node();
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
|
|
533
|
+
// ../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/index.js
|
|
534
|
+
var init_detectors = __esm({
|
|
535
|
+
"../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/detectors/index.js"() {
|
|
536
|
+
"use strict";
|
|
537
|
+
init_EnvDetector();
|
|
538
|
+
init_platform();
|
|
539
|
+
}
|
|
540
|
+
});
|
|
541
|
+
|
|
542
|
+
// ../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/index.js
|
|
543
|
+
var init_esm4 = __esm({
|
|
544
|
+
"../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/build/esm/index.js"() {
|
|
545
|
+
init_detect_resources();
|
|
546
|
+
init_detectors();
|
|
547
|
+
init_ResourceImpl();
|
|
548
|
+
init_default_service_name();
|
|
549
|
+
}
|
|
550
|
+
});
|
|
551
|
+
|
|
552
|
+
export {
|
|
553
|
+
defaultServiceName,
|
|
554
|
+
resourceFromAttributes,
|
|
555
|
+
emptyResource,
|
|
556
|
+
defaultResource,
|
|
557
|
+
detectResources,
|
|
558
|
+
envDetector,
|
|
559
|
+
hostDetector,
|
|
560
|
+
osDetector,
|
|
561
|
+
processDetector,
|
|
562
|
+
serviceInstanceIdDetector,
|
|
563
|
+
init_esm4 as init_esm
|
|
564
|
+
};
|
|
565
|
+
//# sourceMappingURL=chunk-XOSNETAV.js.map
|