Big News: Socket Selected for OpenAI's Cybersecurity Grant Program.Details
Socket
Book a DemoSign in
Socket

@opentelemetry/resources

Package Overview
Dependencies
Maintainers
3
Versions
187
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/resources - npm Package Compare versions

Comparing version
1.24.0
to
1.24.1
+2
build/esm/detectors/platform/browser/HostDetector.d.ts
export declare const hostDetector: import("../../NoopDetector").NoopDetector;
//# sourceMappingURL=HostDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetector } from '../../NoopDetector';
export var hostDetector = noopDetector;
//# sourceMappingURL=HostDetector.js.map
{"version":3,"file":"HostDetector.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/HostDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,CAAC,IAAM,YAAY,GAAG,YAAY,CAAC","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 { noopDetector } from '../../NoopDetector';\n\nexport const hostDetector = noopDetector;\n"]}
export declare const hostDetectorSync: import("../../NoopDetectorSync").NoopDetectorSync;
//# sourceMappingURL=HostDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetectorSync } from '../../NoopDetectorSync';
export var hostDetectorSync = noopDetectorSync;
//# sourceMappingURL=HostDetectorSync.js.map
{"version":3,"file":"HostDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/HostDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,CAAC,IAAM,gBAAgB,GAAG,gBAAgB,CAAC","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 { noopDetectorSync } from '../../NoopDetectorSync';\n\nexport const hostDetectorSync = noopDetectorSync;\n"]}
export { hostDetector } from './HostDetector';
export { hostDetectorSync } from './HostDetectorSync';
export { osDetector } from './OSDetector';
export { osDetectorSync } from './OSDetectorSync';
export { processDetector } from './ProcessDetector';
export { processDetectorSync } from './ProcessDetectorSync';
export { serviceInstanceIdDetectorSync } from './ServiceInstanceIdDetectorSync';
//# sourceMappingURL=index.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { hostDetector } from './HostDetector';
export { hostDetectorSync } from './HostDetectorSync';
export { osDetector } from './OSDetector';
export { osDetectorSync } from './OSDetectorSync';
export { processDetector } from './ProcessDetector';
export { processDetectorSync } from './ProcessDetectorSync';
export { serviceInstanceIdDetectorSync } from './ServiceInstanceIdDetectorSync';
//# sourceMappingURL=index.js.map
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC","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\nexport { hostDetector } from './HostDetector';\nexport { hostDetectorSync } from './HostDetectorSync';\nexport { osDetector } from './OSDetector';\nexport { osDetectorSync } from './OSDetectorSync';\nexport { processDetector } from './ProcessDetector';\nexport { processDetectorSync } from './ProcessDetectorSync';\nexport { serviceInstanceIdDetectorSync } from './ServiceInstanceIdDetectorSync';\n"]}
export declare const osDetector: import("../../NoopDetector").NoopDetector;
//# sourceMappingURL=OSDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetector } from '../../NoopDetector';
export var osDetector = noopDetector;
//# sourceMappingURL=OSDetector.js.map
{"version":3,"file":"OSDetector.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/OSDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,CAAC,IAAM,UAAU,GAAG,YAAY,CAAC","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 { noopDetector } from '../../NoopDetector';\n\nexport const osDetector = noopDetector;\n"]}
export declare const osDetectorSync: import("../../NoopDetectorSync").NoopDetectorSync;
//# sourceMappingURL=OSDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetectorSync } from '../../NoopDetectorSync';
export var osDetectorSync = noopDetectorSync;
//# sourceMappingURL=OSDetectorSync.js.map
{"version":3,"file":"OSDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/OSDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,CAAC,IAAM,cAAc,GAAG,gBAAgB,CAAC","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 { noopDetectorSync } from '../../NoopDetectorSync';\n\nexport const osDetectorSync = noopDetectorSync;\n"]}
export declare const processDetector: import("../../NoopDetector").NoopDetector;
//# sourceMappingURL=ProcessDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetector } from '../../NoopDetector';
export var processDetector = noopDetector;
//# sourceMappingURL=ProcessDetector.js.map
{"version":3,"file":"ProcessDetector.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/ProcessDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,CAAC,IAAM,eAAe,GAAG,YAAY,CAAC","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 { noopDetector } from '../../NoopDetector';\n\nexport const processDetector = noopDetector;\n"]}
export declare const processDetectorSync: import("../../NoopDetector").NoopDetector;
//# sourceMappingURL=ProcessDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetector } from '../../NoopDetector';
export var processDetectorSync = noopDetector;
//# sourceMappingURL=ProcessDetectorSync.js.map
{"version":3,"file":"ProcessDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/ProcessDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,CAAC,IAAM,mBAAmB,GAAG,YAAY,CAAC","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 { noopDetector } from '../../NoopDetector';\n\nexport const processDetectorSync = noopDetector;\n"]}
/**
* @experimental
*/
export declare const serviceInstanceIdDetectorSync: import("../../NoopDetectorSync").NoopDetectorSync;
//# sourceMappingURL=ServiceInstanceIdDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetectorSync } from '../../NoopDetectorSync';
/**
* @experimental
*/
export var serviceInstanceIdDetectorSync = noopDetectorSync;
//# sourceMappingURL=ServiceInstanceIdDetectorSync.js.map
{"version":3,"file":"ServiceInstanceIdDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/ServiceInstanceIdDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D;;GAEG;AACH,MAAM,CAAC,IAAM,6BAA6B,GAAG,gBAAgB,CAAC","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 { noopDetectorSync } from '../../NoopDetectorSync';\n\n/**\n * @experimental\n */\nexport const serviceInstanceIdDetectorSync = noopDetectorSync;\n"]}
export { hostDetector, hostDetectorSync, osDetector, osDetectorSync, processDetector, processDetectorSync, serviceInstanceIdDetectorSync, } from './node';
//# sourceMappingURL=index.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { hostDetector, hostDetectorSync, osDetector, osDetectorSync, processDetector, processDetectorSync, serviceInstanceIdDetectorSync, } from './node';
//# sourceMappingURL=index.js.map
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/detectors/platform/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,6BAA6B,GAC9B,MAAM,QAAQ,CAAC","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 */\nexport {\n hostDetector,\n hostDetectorSync,\n osDetector,\n osDetectorSync,\n processDetector,\n processDetectorSync,\n serviceInstanceIdDetectorSync,\n} from './node';\n"]}
import { Detector } from '../../../types';
import { ResourceDetectionConfig } from '../../../config';
import { IResource } from '../../../IResource';
/**
* HostDetector detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
declare class HostDetector implements Detector {
detect(_config?: ResourceDetectionConfig): Promise<IResource>;
}
export declare const hostDetector: HostDetector;
export {};
//# sourceMappingURL=HostDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { hostDetectorSync } from './HostDetectorSync';
/**
* HostDetector detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
var HostDetector = /** @class */ (function () {
function HostDetector() {
}
HostDetector.prototype.detect = function (_config) {
return Promise.resolve(hostDetectorSync.detect(_config));
};
return HostDetector;
}());
export var hostDetector = new HostDetector();
//# sourceMappingURL=HostDetector.js.map
{"version":3,"file":"HostDetector.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/HostDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;GAGG;AACH;IAAA;IAIA,CAAC;IAHC,6BAAM,GAAN,UAAO,OAAiC;QACtC,OAAO,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3D,CAAC;IACH,mBAAC;AAAD,CAAC,AAJD,IAIC;AAED,MAAM,CAAC,IAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC","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 { Detector } from '../../../types';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { IResource } from '../../../IResource';\nimport { hostDetectorSync } from './HostDetectorSync';\n\n/**\n * HostDetector detects the resources related to the host current process is\n * running on. Currently only non-cloud-based attributes are included.\n */\nclass HostDetector implements Detector {\n detect(_config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(hostDetectorSync.detect(_config));\n }\n}\n\nexport const hostDetector = new HostDetector();\n"]}
import { Resource } from '../../../Resource';
import { DetectorSync } from '../../../types';
import { ResourceDetectionConfig } from '../../../config';
/**
* HostDetectorSync detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
declare class HostDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): Resource;
private _getAsyncAttributes;
}
export declare const hostDetectorSync: HostDetectorSync;
export {};
//# sourceMappingURL=HostDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { Resource } from '../../../Resource';
import { arch, hostname } from 'os';
import { normalizeArch } from './utils';
import { getMachineId } from './machine-id/getMachineId';
/**
* HostDetectorSync detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
var HostDetectorSync = /** @class */ (function () {
function HostDetectorSync() {
}
HostDetectorSync.prototype.detect = function (_config) {
var _a;
var attributes = (_a = {},
_a[SemanticResourceAttributes.HOST_NAME] = hostname(),
_a[SemanticResourceAttributes.HOST_ARCH] = normalizeArch(arch()),
_a);
return new Resource(attributes, this._getAsyncAttributes());
};
HostDetectorSync.prototype._getAsyncAttributes = function () {
return getMachineId().then(function (machineId) {
var attributes = {};
if (machineId) {
attributes[SemanticResourceAttributes.HOST_ID] = machineId;
}
return attributes;
});
};
return HostDetectorSync;
}());
export var hostDetectorSync = new HostDetectorSync();
//# sourceMappingURL=HostDetectorSync.js.map
{"version":3,"file":"HostDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/HostDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG7C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD;;;GAGG;AACH;IAAA;IAmBA,CAAC;IAlBC,iCAAM,GAAN,UAAO,OAAiC;;QACtC,IAAM,UAAU;YACd,GAAC,0BAA0B,CAAC,SAAS,IAAG,QAAQ,EAAE;YAClD,GAAC,0BAA0B,CAAC,SAAS,IAAG,aAAa,CAAC,IAAI,EAAE,CAAC;eAC9D,CAAC;QAEF,OAAO,IAAI,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAC9D,CAAC;IAEO,8CAAmB,GAA3B;QACE,OAAO,YAAY,EAAE,CAAC,IAAI,CAAC,UAAA,SAAS;YAClC,IAAM,UAAU,GAAuB,EAAE,CAAC;YAC1C,IAAI,SAAS,EAAE;gBACb,UAAU,CAAC,0BAA0B,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;aAC5D;YACD,OAAO,UAAU,CAAC;QACpB,CAAC,CAAC,CAAC;IACL,CAAC;IACH,uBAAC;AAAD,CAAC,AAnBD,IAmBC;AAED,MAAM,CAAC,IAAM,gBAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC","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 { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../../types';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { arch, hostname } from 'os';\nimport { normalizeArch } from './utils';\nimport { getMachineId } from './machine-id/getMachineId';\n\n/**\n * HostDetectorSync detects the resources related to the host current process is\n * running on. Currently only non-cloud-based attributes are included.\n */\nclass HostDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): Resource {\n const attributes: ResourceAttributes = {\n [SemanticResourceAttributes.HOST_NAME]: hostname(),\n [SemanticResourceAttributes.HOST_ARCH]: normalizeArch(arch()),\n };\n\n return new Resource(attributes, this._getAsyncAttributes());\n }\n\n private _getAsyncAttributes(): Promise<ResourceAttributes> {\n return getMachineId().then(machineId => {\n const attributes: ResourceAttributes = {};\n if (machineId) {\n attributes[SemanticResourceAttributes.HOST_ID] = machineId;\n }\n return attributes;\n });\n }\n}\n\nexport const hostDetectorSync = new HostDetectorSync();\n"]}
export { hostDetector } from './HostDetector';
export { hostDetectorSync } from './HostDetectorSync';
export { osDetector } from './OSDetector';
export { osDetectorSync } from './OSDetectorSync';
export { processDetector } from './ProcessDetector';
export { processDetectorSync } from './ProcessDetectorSync';
export { serviceInstanceIdDetectorSync } from './ServiceInstanceIdDetectorSync';
//# sourceMappingURL=index.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { hostDetector } from './HostDetector';
export { hostDetectorSync } from './HostDetectorSync';
export { osDetector } from './OSDetector';
export { osDetectorSync } from './OSDetectorSync';
export { processDetector } from './ProcessDetector';
export { processDetectorSync } from './ProcessDetectorSync';
export { serviceInstanceIdDetectorSync } from './ServiceInstanceIdDetectorSync';
//# sourceMappingURL=index.js.map
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC","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\nexport { hostDetector } from './HostDetector';\nexport { hostDetectorSync } from './HostDetectorSync';\nexport { osDetector } from './OSDetector';\nexport { osDetectorSync } from './OSDetectorSync';\nexport { processDetector } from './ProcessDetector';\nexport { processDetectorSync } from './ProcessDetectorSync';\nexport { serviceInstanceIdDetectorSync } from './ServiceInstanceIdDetectorSync';\n"]}
/// <reference types="node" />
import * as child_process from 'child_process';
export declare const execAsync: typeof child_process.exec.__promisify__;
//# sourceMappingURL=execAsync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as child_process from 'child_process';
import * as util from 'util';
export var execAsync = util.promisify(child_process.exec);
//# sourceMappingURL=execAsync.js.map
{"version":3,"file":"execAsync.js","sourceRoot":"","sources":["../../../../../../src/detectors/platform/node/machine-id/execAsync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,aAAa,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,MAAM,CAAC,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC","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"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-bsd.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
import { promises as fs } from 'fs';
import { execAsync } from './execAsync';
import { diag } from '@opentelemetry/api';
export function getMachineId() {
return __awaiter(this, void 0, void 0, function () {
var result, e_1, result, e_2;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 2, , 3]);
return [4 /*yield*/, fs.readFile('/etc/hostid', { encoding: 'utf8' })];
case 1:
result = _a.sent();
return [2 /*return*/, result.trim()];
case 2:
e_1 = _a.sent();
diag.debug("error reading machine id: " + e_1);
return [3 /*break*/, 3];
case 3:
_a.trys.push([3, 5, , 6]);
return [4 /*yield*/, execAsync('kenv -q smbios.system.uuid')];
case 4:
result = _a.sent();
return [2 /*return*/, result.stdout.trim()];
case 5:
e_2 = _a.sent();
diag.debug("error reading machine id: " + e_2);
return [3 /*break*/, 6];
case 6: return [2 /*return*/, ''];
}
});
});
}
//# sourceMappingURL=getMachineId-bsd.js.map
{"version":3,"file":"getMachineId-bsd.js","sourceRoot":"","sources":["../../../../../../src/detectors/platform/node/machine-id/getMachineId-bsd.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,UAAgB,YAAY;;;;;;;oBAEf,qBAAM,EAAE,CAAC,QAAQ,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,EAAA;;oBAA/D,MAAM,GAAG,SAAsD;oBACrE,sBAAO,MAAM,CAAC,IAAI,EAAE,EAAC;;;oBAErB,IAAI,CAAC,KAAK,CAAC,+BAA6B,GAAG,CAAC,CAAC;;;;oBAI9B,qBAAM,SAAS,CAAC,4BAA4B,CAAC,EAAA;;oBAAtD,MAAM,GAAG,SAA6C;oBAC5D,sBAAO,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAC;;;oBAE5B,IAAI,CAAC,KAAK,CAAC,+BAA6B,GAAG,CAAC,CAAC;;wBAG/C,sBAAO,EAAE,EAAC;;;;CACX","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 { promises as fs } from 'fs';\nimport { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n try {\n const result = await fs.readFile('/etc/hostid', { encoding: 'utf8' });\n return result.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n try {\n const result = await execAsync('kenv -q smbios.system.uuid');\n return result.stdout.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-darwin.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
import { execAsync } from './execAsync';
import { diag } from '@opentelemetry/api';
export function getMachineId() {
return __awaiter(this, void 0, void 0, function () {
var result, idLine, parts, e_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 2, , 3]);
return [4 /*yield*/, execAsync('ioreg -rd1 -c "IOPlatformExpertDevice"')];
case 1:
result = _a.sent();
idLine = result.stdout
.split('\n')
.find(function (line) { return line.includes('IOPlatformUUID'); });
if (!idLine) {
return [2 /*return*/, ''];
}
parts = idLine.split('" = "');
if (parts.length === 2) {
return [2 /*return*/, parts[1].slice(0, -1)];
}
return [3 /*break*/, 3];
case 2:
e_1 = _a.sent();
diag.debug("error reading machine id: " + e_1);
return [3 /*break*/, 3];
case 3: return [2 /*return*/, ''];
}
});
});
}
//# sourceMappingURL=getMachineId-darwin.js.map
{"version":3,"file":"getMachineId-darwin.js","sourceRoot":"","sources":["../../../../../../src/detectors/platform/node/machine-id/getMachineId-darwin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,UAAgB,YAAY;;;;;;;oBAEf,qBAAM,SAAS,CAAC,wCAAwC,CAAC,EAAA;;oBAAlE,MAAM,GAAG,SAAyD;oBAElE,MAAM,GAAG,MAAM,CAAC,MAAM;yBACzB,KAAK,CAAC,IAAI,CAAC;yBACX,IAAI,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAA/B,CAA+B,CAAC,CAAC;oBAEjD,IAAI,CAAC,MAAM,EAAE;wBACX,sBAAO,EAAE,EAAC;qBACX;oBAEK,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;oBACpC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;wBACtB,sBAAO,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAC;qBAC9B;;;;oBAED,IAAI,CAAC,KAAK,CAAC,+BAA6B,GAAG,CAAC,CAAC;;wBAG/C,sBAAO,EAAE,EAAC;;;;CACX","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 { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n try {\n const result = await execAsync('ioreg -rd1 -c \"IOPlatformExpertDevice\"');\n\n const idLine = result.stdout\n .split('\\n')\n .find(line => line.includes('IOPlatformUUID'));\n\n if (!idLine) {\n return '';\n }\n\n const parts = idLine.split('\" = \"');\n if (parts.length === 2) {\n return parts[1].slice(0, -1);\n }\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-linux.d.ts.map
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { promises as fs } from 'fs';
import { diag } from '@opentelemetry/api';
export function getMachineId() {
return __awaiter(this, void 0, void 0, function () {
var paths, paths_1, paths_1_1, path, result, e_1, e_2_1;
var e_2, _a;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
paths = ['/etc/machine-id', '/var/lib/dbus/machine-id'];
_b.label = 1;
case 1:
_b.trys.push([1, 8, 9, 10]);
paths_1 = __values(paths), paths_1_1 = paths_1.next();
_b.label = 2;
case 2:
if (!!paths_1_1.done) return [3 /*break*/, 7];
path = paths_1_1.value;
_b.label = 3;
case 3:
_b.trys.push([3, 5, , 6]);
return [4 /*yield*/, fs.readFile(path, { encoding: 'utf8' })];
case 4:
result = _b.sent();
return [2 /*return*/, result.trim()];
case 5:
e_1 = _b.sent();
diag.debug("error reading machine id: " + e_1);
return [3 /*break*/, 6];
case 6:
paths_1_1 = paths_1.next();
return [3 /*break*/, 2];
case 7: return [3 /*break*/, 10];
case 8:
e_2_1 = _b.sent();
e_2 = { error: e_2_1 };
return [3 /*break*/, 10];
case 9:
try {
if (paths_1_1 && !paths_1_1.done && (_a = paths_1.return)) _a.call(paths_1);
}
finally { if (e_2) throw e_2.error; }
return [7 /*endfinally*/];
case 10: return [2 /*return*/, ''];
}
});
});
}
//# sourceMappingURL=getMachineId-linux.js.map
{"version":3,"file":"getMachineId-linux.js","sourceRoot":"","sources":["../../../../../../src/detectors/platform/node/machine-id/getMachineId-linux.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,UAAgB,YAAY;;;;;;;oBAC1B,KAAK,GAAG,CAAC,iBAAiB,EAAE,0BAA0B,CAAC,CAAC;;;;oBAE3C,UAAA,SAAA,KAAK,CAAA;;;;oBAAb,IAAI;;;;oBAEI,qBAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,EAAA;;oBAAtD,MAAM,GAAG,SAA6C;oBAC5D,sBAAO,MAAM,CAAC,IAAI,EAAE,EAAC;;;oBAErB,IAAI,CAAC,KAAK,CAAC,+BAA6B,GAAG,CAAC,CAAC;;;;;;;;;;;;;;;;yBAIjD,sBAAO,EAAE,EAAC;;;;CACX","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 */\nimport { promises as fs } from 'fs';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n const paths = ['/etc/machine-id', '/var/lib/dbus/machine-id'];\n\n for (const path of paths) {\n try {\n const result = await fs.readFile(path, { encoding: 'utf8' });\n return result.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n }\n\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-unsupported.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
import { diag } from '@opentelemetry/api';
export function getMachineId() {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
diag.debug('could not read machine-id: unsupported platform');
return [2 /*return*/, ''];
});
});
}
//# sourceMappingURL=getMachineId-unsupported.js.map
{"version":3,"file":"getMachineId-unsupported.js","sourceRoot":"","sources":["../../../../../../src/detectors/platform/node/machine-id/getMachineId-unsupported.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,UAAgB,YAAY;;;YAChC,IAAI,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;YAC9D,sBAAO,EAAE,EAAC;;;CACX","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 { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n diag.debug('could not read machine-id: unsupported platform');\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-win.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
import * as process from 'process';
import { execAsync } from './execAsync';
import { diag } from '@opentelemetry/api';
export function getMachineId() {
return __awaiter(this, void 0, void 0, function () {
var args, command, result, parts, e_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
args = 'QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid';
command = '%windir%\\System32\\REG.exe';
if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {
command = '%windir%\\sysnative\\cmd.exe /c ' + command;
}
_a.label = 1;
case 1:
_a.trys.push([1, 3, , 4]);
return [4 /*yield*/, execAsync(command + " " + args)];
case 2:
result = _a.sent();
parts = result.stdout.split('REG_SZ');
if (parts.length === 2) {
return [2 /*return*/, parts[1].trim()];
}
return [3 /*break*/, 4];
case 3:
e_1 = _a.sent();
diag.debug("error reading machine id: " + e_1);
return [3 /*break*/, 4];
case 4: return [2 /*return*/, ''];
}
});
});
}
//# sourceMappingURL=getMachineId-win.js.map
{"version":3,"file":"getMachineId-win.js","sourceRoot":"","sources":["../../../../../../src/detectors/platform/node/machine-id/getMachineId-win.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,UAAgB,YAAY;;;;;;oBAC1B,IAAI,GACR,4EAA4E,CAAC;oBAC3E,OAAO,GAAG,6BAA6B,CAAC;oBAC5C,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,IAAI,wBAAwB,IAAI,OAAO,CAAC,GAAG,EAAE;wBACtE,OAAO,GAAG,kCAAkC,GAAG,OAAO,CAAC;qBACxD;;;;oBAGgB,qBAAM,SAAS,CAAI,OAAO,SAAI,IAAM,CAAC,EAAA;;oBAA9C,MAAM,GAAG,SAAqC;oBAC9C,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;oBAC5C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;wBACtB,sBAAO,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAC;qBACxB;;;;oBAED,IAAI,CAAC,KAAK,CAAC,+BAA6B,GAAG,CAAC,CAAC;;wBAG/C,sBAAO,EAAE,EAAC;;;;CACX","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 process from 'process';\nimport { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n const args =\n 'QUERY HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Cryptography /v MachineGuid';\n let command = '%windir%\\\\System32\\\\REG.exe';\n if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {\n command = '%windir%\\\\sysnative\\\\cmd.exe /c ' + command;\n }\n\n try {\n const result = await execAsync(`${command} ${args}`);\n const parts = result.stdout.split('REG_SZ');\n if (parts.length === 2) {\n return parts[1].trim();\n }\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return '';\n}\n"]}
declare let getMachineId: () => Promise<string>;
export { getMachineId };
//# sourceMappingURL=getMachineId.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as process from 'process';
var getMachineId;
switch (process.platform) {
case 'darwin':
(getMachineId = require('./getMachineId-darwin').getMachineId);
break;
case 'linux':
(getMachineId = require('./getMachineId-linux').getMachineId);
break;
case 'freebsd':
(getMachineId = require('./getMachineId-bsd').getMachineId);
break;
case 'win32':
(getMachineId = require('./getMachineId-win').getMachineId);
break;
default:
(getMachineId = require('./getMachineId-unsupported').getMachineId);
}
export { getMachineId };
//# sourceMappingURL=getMachineId.js.map
{"version":3,"file":"getMachineId.js","sourceRoot":"","sources":["../../../../../../src/detectors/platform/node/machine-id/getMachineId.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,IAAI,YAAmC,CAAC;AAExC,QAAQ,OAAO,CAAC,QAAQ,EAAE;IACxB,KAAK,QAAQ;QACX,CAAG,YAAY,GAAK,OAAO,CAAC,uBAAuB,CAAC,aAArC,CAAsC,CAAC;QACtD,MAAM;IACR,KAAK,OAAO;QACV,CAAG,YAAY,GAAK,OAAO,CAAC,sBAAsB,CAAC,aAApC,CAAqC,CAAC;QACrD,MAAM;IACR,KAAK,SAAS;QACZ,CAAG,YAAY,GAAK,OAAO,CAAC,oBAAoB,CAAC,aAAlC,CAAmC,CAAC;QACnD,MAAM;IACR,KAAK,OAAO;QACV,CAAG,YAAY,GAAK,OAAO,CAAC,oBAAoB,CAAC,aAAlC,CAAmC,CAAC;QACnD,MAAM;IACR;QACE,CAAG,YAAY,GAAK,OAAO,CAAC,4BAA4B,CAAC,aAA1C,CAA2C,CAAC;CAC9D;AAED,OAAO,EAAE,YAAY,EAAE,CAAC","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 */\nimport * as process from 'process';\n\nlet getMachineId: () => Promise<string>;\n\nswitch (process.platform) {\n case 'darwin':\n ({ getMachineId } = require('./getMachineId-darwin'));\n break;\n case 'linux':\n ({ getMachineId } = require('./getMachineId-linux'));\n break;\n case 'freebsd':\n ({ getMachineId } = require('./getMachineId-bsd'));\n break;\n case 'win32':\n ({ getMachineId } = require('./getMachineId-win'));\n break;\n default:\n ({ getMachineId } = require('./getMachineId-unsupported'));\n}\n\nexport { getMachineId };\n"]}
import { Detector } from '../../../types';
import { ResourceDetectionConfig } from '../../../config';
import { IResource } from '../../../IResource';
/**
* OSDetector detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
declare class OSDetector implements Detector {
detect(_config?: ResourceDetectionConfig): Promise<IResource>;
}
export declare const osDetector: OSDetector;
export {};
//# sourceMappingURL=OSDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { osDetectorSync } from './OSDetectorSync';
/**
* OSDetector detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
var OSDetector = /** @class */ (function () {
function OSDetector() {
}
OSDetector.prototype.detect = function (_config) {
return Promise.resolve(osDetectorSync.detect(_config));
};
return OSDetector;
}());
export var osDetector = new OSDetector();
//# sourceMappingURL=OSDetector.js.map
{"version":3,"file":"OSDetector.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/OSDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;GAGG;AACH;IAAA;IAIA,CAAC;IAHC,2BAAM,GAAN,UAAO,OAAiC;QACtC,OAAO,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACzD,CAAC;IACH,iBAAC;AAAD,CAAC,AAJD,IAIC;AAED,MAAM,CAAC,IAAM,UAAU,GAAG,IAAI,UAAU,EAAE,CAAC","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 { Detector } from '../../../types';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { IResource } from '../../../IResource';\nimport { osDetectorSync } from './OSDetectorSync';\n\n/**\n * OSDetector detects the resources related to the operating system (OS) on\n * which the process represented by this resource is running.\n */\nclass OSDetector implements Detector {\n detect(_config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(osDetectorSync.detect(_config));\n }\n}\n\nexport const osDetector = new OSDetector();\n"]}
import { Resource } from '../../../Resource';
import { DetectorSync } from '../../../types';
import { ResourceDetectionConfig } from '../../../config';
/**
* OSDetectorSync detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
declare class OSDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): Resource;
}
export declare const osDetectorSync: OSDetectorSync;
export {};
//# sourceMappingURL=OSDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { Resource } from '../../../Resource';
import { platform, release } from 'os';
import { normalizeType } from './utils';
/**
* OSDetectorSync detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
var OSDetectorSync = /** @class */ (function () {
function OSDetectorSync() {
}
OSDetectorSync.prototype.detect = function (_config) {
var _a;
var attributes = (_a = {},
_a[SemanticResourceAttributes.OS_TYPE] = normalizeType(platform()),
_a[SemanticResourceAttributes.OS_VERSION] = release(),
_a);
return new Resource(attributes);
};
return OSDetectorSync;
}());
export var osDetectorSync = new OSDetectorSync();
//# sourceMappingURL=OSDetectorSync.js.map
{"version":3,"file":"OSDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/OSDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG7C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC;;;GAGG;AACH;IAAA;IAQA,CAAC;IAPC,+BAAM,GAAN,UAAO,OAAiC;;QACtC,IAAM,UAAU;YACd,GAAC,0BAA0B,CAAC,OAAO,IAAG,aAAa,CAAC,QAAQ,EAAE,CAAC;YAC/D,GAAC,0BAA0B,CAAC,UAAU,IAAG,OAAO,EAAE;eACnD,CAAC;QACF,OAAO,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IACH,qBAAC;AAAD,CAAC,AARD,IAQC;AAED,MAAM,CAAC,IAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC","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 { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../../types';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { platform, release } from 'os';\nimport { normalizeType } from './utils';\n\n/**\n * OSDetectorSync detects the resources related to the operating system (OS) on\n * which the process represented by this resource is running.\n */\nclass OSDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): Resource {\n const attributes: ResourceAttributes = {\n [SemanticResourceAttributes.OS_TYPE]: normalizeType(platform()),\n [SemanticResourceAttributes.OS_VERSION]: release(),\n };\n return new Resource(attributes);\n }\n}\n\nexport const osDetectorSync = new OSDetectorSync();\n"]}
import { Detector } from '../../../types';
import { ResourceDetectionConfig } from '../../../config';
import { IResource } from '../../../IResource';
/**
* ProcessDetector will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
declare class ProcessDetector implements Detector {
detect(config?: ResourceDetectionConfig): Promise<IResource>;
}
export declare const processDetector: ProcessDetector;
export {};
//# sourceMappingURL=ProcessDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { processDetectorSync } from './ProcessDetectorSync';
/**
* ProcessDetector will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
var ProcessDetector = /** @class */ (function () {
function ProcessDetector() {
}
ProcessDetector.prototype.detect = function (config) {
return Promise.resolve(processDetectorSync.detect(config));
};
return ProcessDetector;
}());
export var processDetector = new ProcessDetector();
//# sourceMappingURL=ProcessDetector.js.map
{"version":3,"file":"ProcessDetector.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/ProcessDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;GAGG;AACH;IAAA;IAIA,CAAC;IAHC,gCAAM,GAAN,UAAO,MAAgC;QACrC,OAAO,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7D,CAAC;IACH,sBAAC;AAAD,CAAC,AAJD,IAIC;AAED,MAAM,CAAC,IAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC","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 { Detector } from '../../../types';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { IResource } from '../../../IResource';\nimport { processDetectorSync } from './ProcessDetectorSync';\n\n/**\n * ProcessDetector will be used to detect the resources related current process running\n * and being instrumented from the NodeJS Process module.\n */\nclass ProcessDetector implements Detector {\n detect(config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(processDetectorSync.detect(config));\n }\n}\n\nexport const processDetector = new ProcessDetector();\n"]}
import { DetectorSync } from '../../../types';
import { ResourceDetectionConfig } from '../../../config';
import { IResource } from '../../../IResource';
/**
* ProcessDetectorSync will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
declare class ProcessDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): IResource;
}
export declare const processDetectorSync: ProcessDetectorSync;
export {};
//# sourceMappingURL=ProcessDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
import { diag } from '@opentelemetry/api';
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { Resource } from '../../../Resource';
import * as os from 'os';
/**
* ProcessDetectorSync will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
var ProcessDetectorSync = /** @class */ (function () {
function ProcessDetectorSync() {
}
ProcessDetectorSync.prototype.detect = function (_config) {
var _a;
var attributes = (_a = {},
_a[SemanticResourceAttributes.PROCESS_PID] = process.pid,
_a[SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME] = process.title,
_a[SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH] = process.execPath,
_a[SemanticResourceAttributes.PROCESS_COMMAND_ARGS] = __spreadArray(__spreadArray([
process.argv[0]
], __read(process.execArgv), false), __read(process.argv.slice(1)), false),
_a[SemanticResourceAttributes.PROCESS_RUNTIME_VERSION] = process.versions.node,
_a[SemanticResourceAttributes.PROCESS_RUNTIME_NAME] = 'nodejs',
_a[SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION] = 'Node.js',
_a);
if (process.argv.length > 1) {
attributes[SemanticResourceAttributes.PROCESS_COMMAND] = process.argv[1];
}
try {
var userInfo = os.userInfo();
attributes[SemanticResourceAttributes.PROCESS_OWNER] = userInfo.username;
}
catch (e) {
diag.debug("error obtaining process owner: " + e);
}
return new Resource(attributes);
};
return ProcessDetectorSync;
}());
export var processDetectorSync = new ProcessDetectorSync();
//# sourceMappingURL=ProcessDetectorSync.js.map
{"version":3,"file":"ProcessDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/ProcessDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7C,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB;;;GAGG;AACH;IAAA;IA8BA,CAAC;IA7BC,oCAAM,GAAN,UAAO,OAAiC;;QACtC,IAAM,UAAU;YACd,GAAC,0BAA0B,CAAC,WAAW,IAAG,OAAO,CAAC,GAAG;YACrD,GAAC,0BAA0B,CAAC,uBAAuB,IAAG,OAAO,CAAC,KAAK;YACnE,GAAC,0BAA0B,CAAC,uBAAuB,IAAG,OAAO,CAAC,QAAQ;YACtE,GAAC,0BAA0B,CAAC,oBAAoB;gBAC9C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;sBACZ,OAAO,CAAC,QAAQ,kBAChB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SACzB;YACD,GAAC,0BAA0B,CAAC,uBAAuB,IACjD,OAAO,CAAC,QAAQ,CAAC,IAAI;YACvB,GAAC,0BAA0B,CAAC,oBAAoB,IAAG,QAAQ;YAC3D,GAAC,0BAA0B,CAAC,2BAA2B,IAAG,SAAS;eACpE,CAAC;QAEF,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;YAC3B,UAAU,CAAC,0BAA0B,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAC1E;QAED,IAAI;YACF,IAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;YAC/B,UAAU,CAAC,0BAA0B,CAAC,aAAa,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC;SAC1E;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,CAAC,KAAK,CAAC,oCAAkC,CAAG,CAAC,CAAC;SACnD;QAED,OAAO,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IACH,0BAAC;AAAD,CAAC,AA9BD,IA8BC;AAED,MAAM,CAAC,IAAM,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAC","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 { diag } from '@opentelemetry/api';\nimport { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../../types';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { IResource } from '../../../IResource';\nimport * as os from 'os';\n\n/**\n * ProcessDetectorSync will be used to detect the resources related current process running\n * and being instrumented from the NodeJS Process module.\n */\nclass ProcessDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): IResource {\n const attributes: ResourceAttributes = {\n [SemanticResourceAttributes.PROCESS_PID]: process.pid,\n [SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME]: process.title,\n [SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH]: process.execPath,\n [SemanticResourceAttributes.PROCESS_COMMAND_ARGS]: [\n process.argv[0],\n ...process.execArgv,\n ...process.argv.slice(1),\n ],\n [SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]:\n process.versions.node,\n [SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'nodejs',\n [SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Node.js',\n };\n\n if (process.argv.length > 1) {\n attributes[SemanticResourceAttributes.PROCESS_COMMAND] = process.argv[1];\n }\n\n try {\n const userInfo = os.userInfo();\n attributes[SemanticResourceAttributes.PROCESS_OWNER] = userInfo.username;\n } catch (e) {\n diag.debug(`error obtaining process owner: ${e}`);\n }\n\n return new Resource(attributes);\n }\n}\n\nexport const processDetectorSync = new ProcessDetectorSync();\n"]}
import { Resource } from '../../../Resource';
import { DetectorSync } from '../../../types';
import { ResourceDetectionConfig } from '../../../config';
/**
* ServiceInstanceIdDetectorSync detects the resources related to the service instance ID.
*/
declare class ServiceInstanceIdDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): Resource;
}
/**
* @experimental
*/
export declare const serviceInstanceIdDetectorSync: ServiceInstanceIdDetectorSync;
export {};
//# sourceMappingURL=ServiceInstanceIdDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { SEMRESATTRS_SERVICE_INSTANCE_ID } from '@opentelemetry/semantic-conventions';
import { Resource } from '../../../Resource';
import { randomUUID } from 'crypto';
/**
* ServiceInstanceIdDetectorSync detects the resources related to the service instance ID.
*/
var ServiceInstanceIdDetectorSync = /** @class */ (function () {
function ServiceInstanceIdDetectorSync() {
}
ServiceInstanceIdDetectorSync.prototype.detect = function (_config) {
var _a;
var attributes = (_a = {},
_a[SEMRESATTRS_SERVICE_INSTANCE_ID] = randomUUID(),
_a);
return new Resource(attributes);
};
return ServiceInstanceIdDetectorSync;
}());
/**
* @experimental
*/
export var serviceInstanceIdDetectorSync = new ServiceInstanceIdDetectorSync();
//# sourceMappingURL=ServiceInstanceIdDetectorSync.js.map
{"version":3,"file":"ServiceInstanceIdDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/ServiceInstanceIdDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG7C,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC;;GAEG;AACH;IAAA;IAQA,CAAC;IAPC,8CAAM,GAAN,UAAO,OAAiC;;QACtC,IAAM,UAAU;YACd,GAAC,+BAA+B,IAAG,UAAU,EAAE;eAChD,CAAC;QAEF,OAAO,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IACH,oCAAC;AAAD,CAAC,AARD,IAQC;AAED;;GAEG;AACH,MAAM,CAAC,IAAM,6BAA6B,GACxC,IAAI,6BAA6B,EAAE,CAAC","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 { SEMRESATTRS_SERVICE_INSTANCE_ID } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../../types';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { randomUUID } from 'crypto';\n\n/**\n * ServiceInstanceIdDetectorSync detects the resources related to the service instance ID.\n */\nclass ServiceInstanceIdDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): Resource {\n const attributes: ResourceAttributes = {\n [SEMRESATTRS_SERVICE_INSTANCE_ID]: randomUUID(),\n };\n\n return new Resource(attributes);\n }\n}\n\n/**\n * @experimental\n */\nexport const serviceInstanceIdDetectorSync =\n new ServiceInstanceIdDetectorSync();\n"]}
export declare const normalizeArch: (nodeArchString: string) => string;
export declare const normalizeType: (nodePlatform: string) => string;
//# sourceMappingURL=utils.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export var normalizeArch = function (nodeArchString) {
// Maps from https://nodejs.org/api/os.html#osarch to arch values in spec:
// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/host.md
switch (nodeArchString) {
case 'arm':
return 'arm32';
case 'ppc':
return 'ppc32';
case 'x64':
return 'amd64';
default:
return nodeArchString;
}
};
export var normalizeType = function (nodePlatform) {
// Maps from https://nodejs.org/api/os.html#osplatform to arch values in spec:
// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/os.md
switch (nodePlatform) {
case 'sunos':
return 'solaris';
case 'win32':
return 'windows';
default:
return nodePlatform;
}
};
//# sourceMappingURL=utils.js.map
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,IAAM,aAAa,GAAG,UAAC,cAAsB;IAClD,0EAA0E;IAC1E,8HAA8H;IAC9H,QAAQ,cAAc,EAAE;QACtB,KAAK,KAAK;YACR,OAAO,OAAO,CAAC;QACjB,KAAK,KAAK;YACR,OAAO,OAAO,CAAC;QACjB,KAAK,KAAK;YACR,OAAO,OAAO,CAAC;QACjB;YACE,OAAO,cAAc,CAAC;KACzB;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,aAAa,GAAG,UAAC,YAAoB;IAChD,8EAA8E;IAC9E,4HAA4H;IAC5H,QAAQ,YAAY,EAAE;QACpB,KAAK,OAAO;YACV,OAAO,SAAS,CAAC;QACnB,KAAK,OAAO;YACV,OAAO,SAAS,CAAC;QACnB;YACE,OAAO,YAAY,CAAC;KACvB;AACH,CAAC,CAAC","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 */\nexport const normalizeArch = (nodeArchString: string): string => {\n // Maps from https://nodejs.org/api/os.html#osarch to arch values in spec:\n // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/host.md\n switch (nodeArchString) {\n case 'arm':\n return 'arm32';\n case 'ppc':\n return 'ppc32';\n case 'x64':\n return 'amd64';\n default:\n return nodeArchString;\n }\n};\n\nexport const normalizeType = (nodePlatform: string): string => {\n // Maps from https://nodejs.org/api/os.html#osplatform to arch values in spec:\n // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/os.md\n switch (nodePlatform) {\n case 'sunos':\n return 'solaris';\n case 'win32':\n return 'windows';\n default:\n return nodePlatform;\n }\n};\n"]}
export declare const hostDetector: import("../../NoopDetector").NoopDetector;
//# sourceMappingURL=HostDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetector } from '../../NoopDetector';
export const hostDetector = noopDetector;
//# sourceMappingURL=HostDetector.js.map
{"version":3,"file":"HostDetector.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/HostDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC","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 { noopDetector } from '../../NoopDetector';\n\nexport const hostDetector = noopDetector;\n"]}
export declare const hostDetectorSync: import("../../NoopDetectorSync").NoopDetectorSync;
//# sourceMappingURL=HostDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetectorSync } from '../../NoopDetectorSync';
export const hostDetectorSync = noopDetectorSync;
//# sourceMappingURL=HostDetectorSync.js.map
{"version":3,"file":"HostDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/HostDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,gBAAgB,CAAC","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 { noopDetectorSync } from '../../NoopDetectorSync';\n\nexport const hostDetectorSync = noopDetectorSync;\n"]}
export { hostDetector } from './HostDetector';
export { hostDetectorSync } from './HostDetectorSync';
export { osDetector } from './OSDetector';
export { osDetectorSync } from './OSDetectorSync';
export { processDetector } from './ProcessDetector';
export { processDetectorSync } from './ProcessDetectorSync';
export { serviceInstanceIdDetectorSync } from './ServiceInstanceIdDetectorSync';
//# sourceMappingURL=index.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { hostDetector } from './HostDetector';
export { hostDetectorSync } from './HostDetectorSync';
export { osDetector } from './OSDetector';
export { osDetectorSync } from './OSDetectorSync';
export { processDetector } from './ProcessDetector';
export { processDetectorSync } from './ProcessDetectorSync';
export { serviceInstanceIdDetectorSync } from './ServiceInstanceIdDetectorSync';
//# sourceMappingURL=index.js.map
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC","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\nexport { hostDetector } from './HostDetector';\nexport { hostDetectorSync } from './HostDetectorSync';\nexport { osDetector } from './OSDetector';\nexport { osDetectorSync } from './OSDetectorSync';\nexport { processDetector } from './ProcessDetector';\nexport { processDetectorSync } from './ProcessDetectorSync';\nexport { serviceInstanceIdDetectorSync } from './ServiceInstanceIdDetectorSync';\n"]}
export declare const osDetector: import("../../NoopDetector").NoopDetector;
//# sourceMappingURL=OSDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetector } from '../../NoopDetector';
export const osDetector = noopDetector;
//# sourceMappingURL=OSDetector.js.map
{"version":3,"file":"OSDetector.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/OSDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC","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 { noopDetector } from '../../NoopDetector';\n\nexport const osDetector = noopDetector;\n"]}
export declare const osDetectorSync: import("../../NoopDetectorSync").NoopDetectorSync;
//# sourceMappingURL=OSDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetectorSync } from '../../NoopDetectorSync';
export const osDetectorSync = noopDetectorSync;
//# sourceMappingURL=OSDetectorSync.js.map
{"version":3,"file":"OSDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/OSDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC","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 { noopDetectorSync } from '../../NoopDetectorSync';\n\nexport const osDetectorSync = noopDetectorSync;\n"]}
export declare const processDetector: import("../../NoopDetector").NoopDetector;
//# sourceMappingURL=ProcessDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetector } from '../../NoopDetector';
export const processDetector = noopDetector;
//# sourceMappingURL=ProcessDetector.js.map
{"version":3,"file":"ProcessDetector.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/ProcessDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,CAAC,MAAM,eAAe,GAAG,YAAY,CAAC","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 { noopDetector } from '../../NoopDetector';\n\nexport const processDetector = noopDetector;\n"]}
export declare const processDetectorSync: import("../../NoopDetector").NoopDetector;
//# sourceMappingURL=ProcessDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetector } from '../../NoopDetector';
export const processDetectorSync = noopDetector;
//# sourceMappingURL=ProcessDetectorSync.js.map
{"version":3,"file":"ProcessDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/ProcessDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,CAAC,MAAM,mBAAmB,GAAG,YAAY,CAAC","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 { noopDetector } from '../../NoopDetector';\n\nexport const processDetectorSync = noopDetector;\n"]}
/**
* @experimental
*/
export declare const serviceInstanceIdDetectorSync: import("../../NoopDetectorSync").NoopDetectorSync;
//# sourceMappingURL=ServiceInstanceIdDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetectorSync } from '../../NoopDetectorSync';
/**
* @experimental
*/
export const serviceInstanceIdDetectorSync = noopDetectorSync;
//# sourceMappingURL=ServiceInstanceIdDetectorSync.js.map
{"version":3,"file":"ServiceInstanceIdDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/ServiceInstanceIdDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,gBAAgB,CAAC","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 { noopDetectorSync } from '../../NoopDetectorSync';\n\n/**\n * @experimental\n */\nexport const serviceInstanceIdDetectorSync = noopDetectorSync;\n"]}
export { hostDetector, hostDetectorSync, osDetector, osDetectorSync, processDetector, processDetectorSync, serviceInstanceIdDetectorSync, } from './node';
//# sourceMappingURL=index.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { hostDetector, hostDetectorSync, osDetector, osDetectorSync, processDetector, processDetectorSync, serviceInstanceIdDetectorSync, } from './node';
//# sourceMappingURL=index.js.map
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/detectors/platform/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,6BAA6B,GAC9B,MAAM,QAAQ,CAAC","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 */\nexport {\n hostDetector,\n hostDetectorSync,\n osDetector,\n osDetectorSync,\n processDetector,\n processDetectorSync,\n serviceInstanceIdDetectorSync,\n} from './node';\n"]}
import { Detector } from '../../../types';
import { ResourceDetectionConfig } from '../../../config';
import { IResource } from '../../../IResource';
/**
* HostDetector detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
declare class HostDetector implements Detector {
detect(_config?: ResourceDetectionConfig): Promise<IResource>;
}
export declare const hostDetector: HostDetector;
export {};
//# sourceMappingURL=HostDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { hostDetectorSync } from './HostDetectorSync';
/**
* HostDetector detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
class HostDetector {
detect(_config) {
return Promise.resolve(hostDetectorSync.detect(_config));
}
}
export const hostDetector = new HostDetector();
//# sourceMappingURL=HostDetector.js.map
{"version":3,"file":"HostDetector.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/HostDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;GAGG;AACH,MAAM,YAAY;IAChB,MAAM,CAAC,OAAiC;QACtC,OAAO,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3D,CAAC;CACF;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC","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 { Detector } from '../../../types';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { IResource } from '../../../IResource';\nimport { hostDetectorSync } from './HostDetectorSync';\n\n/**\n * HostDetector detects the resources related to the host current process is\n * running on. Currently only non-cloud-based attributes are included.\n */\nclass HostDetector implements Detector {\n detect(_config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(hostDetectorSync.detect(_config));\n }\n}\n\nexport const hostDetector = new HostDetector();\n"]}
import { Resource } from '../../../Resource';
import { DetectorSync } from '../../../types';
import { ResourceDetectionConfig } from '../../../config';
/**
* HostDetectorSync detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
declare class HostDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): Resource;
private _getAsyncAttributes;
}
export declare const hostDetectorSync: HostDetectorSync;
export {};
//# sourceMappingURL=HostDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { Resource } from '../../../Resource';
import { arch, hostname } from 'os';
import { normalizeArch } from './utils';
import { getMachineId } from './machine-id/getMachineId';
/**
* HostDetectorSync detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
class HostDetectorSync {
detect(_config) {
const attributes = {
[SemanticResourceAttributes.HOST_NAME]: hostname(),
[SemanticResourceAttributes.HOST_ARCH]: normalizeArch(arch()),
};
return new Resource(attributes, this._getAsyncAttributes());
}
_getAsyncAttributes() {
return getMachineId().then(machineId => {
const attributes = {};
if (machineId) {
attributes[SemanticResourceAttributes.HOST_ID] = machineId;
}
return attributes;
});
}
}
export const hostDetectorSync = new HostDetectorSync();
//# sourceMappingURL=HostDetectorSync.js.map
{"version":3,"file":"HostDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/HostDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG7C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD;;;GAGG;AACH,MAAM,gBAAgB;IACpB,MAAM,CAAC,OAAiC;QACtC,MAAM,UAAU,GAAuB;YACrC,CAAC,0BAA0B,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE;YAClD,CAAC,0BAA0B,CAAC,SAAS,CAAC,EAAE,aAAa,CAAC,IAAI,EAAE,CAAC;SAC9D,CAAC;QAEF,OAAO,IAAI,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAC9D,CAAC;IAEO,mBAAmB;QACzB,OAAO,YAAY,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;YACrC,MAAM,UAAU,GAAuB,EAAE,CAAC;YAC1C,IAAI,SAAS,EAAE;gBACb,UAAU,CAAC,0BAA0B,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;aAC5D;YACD,OAAO,UAAU,CAAC;QACpB,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC","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 { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../../types';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { arch, hostname } from 'os';\nimport { normalizeArch } from './utils';\nimport { getMachineId } from './machine-id/getMachineId';\n\n/**\n * HostDetectorSync detects the resources related to the host current process is\n * running on. Currently only non-cloud-based attributes are included.\n */\nclass HostDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): Resource {\n const attributes: ResourceAttributes = {\n [SemanticResourceAttributes.HOST_NAME]: hostname(),\n [SemanticResourceAttributes.HOST_ARCH]: normalizeArch(arch()),\n };\n\n return new Resource(attributes, this._getAsyncAttributes());\n }\n\n private _getAsyncAttributes(): Promise<ResourceAttributes> {\n return getMachineId().then(machineId => {\n const attributes: ResourceAttributes = {};\n if (machineId) {\n attributes[SemanticResourceAttributes.HOST_ID] = machineId;\n }\n return attributes;\n });\n }\n}\n\nexport const hostDetectorSync = new HostDetectorSync();\n"]}
export { hostDetector } from './HostDetector';
export { hostDetectorSync } from './HostDetectorSync';
export { osDetector } from './OSDetector';
export { osDetectorSync } from './OSDetectorSync';
export { processDetector } from './ProcessDetector';
export { processDetectorSync } from './ProcessDetectorSync';
export { serviceInstanceIdDetectorSync } from './ServiceInstanceIdDetectorSync';
//# sourceMappingURL=index.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { hostDetector } from './HostDetector';
export { hostDetectorSync } from './HostDetectorSync';
export { osDetector } from './OSDetector';
export { osDetectorSync } from './OSDetectorSync';
export { processDetector } from './ProcessDetector';
export { processDetectorSync } from './ProcessDetectorSync';
export { serviceInstanceIdDetectorSync } from './ServiceInstanceIdDetectorSync';
//# sourceMappingURL=index.js.map
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC","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\nexport { hostDetector } from './HostDetector';\nexport { hostDetectorSync } from './HostDetectorSync';\nexport { osDetector } from './OSDetector';\nexport { osDetectorSync } from './OSDetectorSync';\nexport { processDetector } from './ProcessDetector';\nexport { processDetectorSync } from './ProcessDetectorSync';\nexport { serviceInstanceIdDetectorSync } from './ServiceInstanceIdDetectorSync';\n"]}
/// <reference types="node" />
import * as child_process from 'child_process';
export declare const execAsync: typeof child_process.exec.__promisify__;
//# sourceMappingURL=execAsync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as child_process from 'child_process';
import * as util from 'util';
export const execAsync = util.promisify(child_process.exec);
//# sourceMappingURL=execAsync.js.map
{"version":3,"file":"execAsync.js","sourceRoot":"","sources":["../../../../../../src/detectors/platform/node/machine-id/execAsync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,aAAa,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC","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"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-bsd.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { promises as fs } from 'fs';
import { execAsync } from './execAsync';
import { diag } from '@opentelemetry/api';
export async function getMachineId() {
try {
const result = await fs.readFile('/etc/hostid', { encoding: 'utf8' });
return result.trim();
}
catch (e) {
diag.debug(`error reading machine id: ${e}`);
}
try {
const result = await execAsync('kenv -q smbios.system.uuid');
return result.stdout.trim();
}
catch (e) {
diag.debug(`error reading machine id: ${e}`);
}
return '';
}
//# sourceMappingURL=getMachineId-bsd.js.map
{"version":3,"file":"getMachineId-bsd.js","sourceRoot":"","sources":["../../../../../../src/detectors/platform/node/machine-id/getMachineId-bsd.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;QACtE,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;KACtB;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,CAAC,CAAC;KAC9C;IAED,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,4BAA4B,CAAC,CAAC;QAC7D,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;KAC7B;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,CAAC,CAAC;KAC9C;IAED,OAAO,EAAE,CAAC;AACZ,CAAC","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 { promises as fs } from 'fs';\nimport { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n try {\n const result = await fs.readFile('/etc/hostid', { encoding: 'utf8' });\n return result.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n try {\n const result = await execAsync('kenv -q smbios.system.uuid');\n return result.stdout.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-darwin.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { execAsync } from './execAsync';
import { diag } from '@opentelemetry/api';
export async function getMachineId() {
try {
const result = await execAsync('ioreg -rd1 -c "IOPlatformExpertDevice"');
const idLine = result.stdout
.split('\n')
.find(line => line.includes('IOPlatformUUID'));
if (!idLine) {
return '';
}
const parts = idLine.split('" = "');
if (parts.length === 2) {
return parts[1].slice(0, -1);
}
}
catch (e) {
diag.debug(`error reading machine id: ${e}`);
}
return '';
}
//# sourceMappingURL=getMachineId-darwin.js.map
{"version":3,"file":"getMachineId-darwin.js","sourceRoot":"","sources":["../../../../../../src/detectors/platform/node/machine-id/getMachineId-darwin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,wCAAwC,CAAC,CAAC;QAEzE,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM;aACzB,KAAK,CAAC,IAAI,CAAC;aACX,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC;QAEjD,IAAI,CAAC,MAAM,EAAE;YACX,OAAO,EAAE,CAAC;SACX;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACpC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;SAC9B;KACF;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,CAAC,CAAC;KAC9C;IAED,OAAO,EAAE,CAAC;AACZ,CAAC","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 { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n try {\n const result = await execAsync('ioreg -rd1 -c \"IOPlatformExpertDevice\"');\n\n const idLine = result.stdout\n .split('\\n')\n .find(line => line.includes('IOPlatformUUID'));\n\n if (!idLine) {\n return '';\n }\n\n const parts = idLine.split('\" = \"');\n if (parts.length === 2) {\n return parts[1].slice(0, -1);\n }\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-linux.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { promises as fs } from 'fs';
import { diag } from '@opentelemetry/api';
export async function getMachineId() {
const paths = ['/etc/machine-id', '/var/lib/dbus/machine-id'];
for (const path of paths) {
try {
const result = await fs.readFile(path, { encoding: 'utf8' });
return result.trim();
}
catch (e) {
diag.debug(`error reading machine id: ${e}`);
}
}
return '';
}
//# sourceMappingURL=getMachineId-linux.js.map
{"version":3,"file":"getMachineId-linux.js","sourceRoot":"","sources":["../../../../../../src/detectors/platform/node/machine-id/getMachineId-linux.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,MAAM,KAAK,GAAG,CAAC,iBAAiB,EAAE,0BAA0B,CAAC,CAAC;IAE9D,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACxB,IAAI;YACF,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;YAC7D,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;SACtB;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,CAAC,CAAC;SAC9C;KACF;IAED,OAAO,EAAE,CAAC;AACZ,CAAC","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 */\nimport { promises as fs } from 'fs';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n const paths = ['/etc/machine-id', '/var/lib/dbus/machine-id'];\n\n for (const path of paths) {\n try {\n const result = await fs.readFile(path, { encoding: 'utf8' });\n return result.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n }\n\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-unsupported.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { diag } from '@opentelemetry/api';
export async function getMachineId() {
diag.debug('could not read machine-id: unsupported platform');
return '';
}
//# sourceMappingURL=getMachineId-unsupported.js.map
{"version":3,"file":"getMachineId-unsupported.js","sourceRoot":"","sources":["../../../../../../src/detectors/platform/node/machine-id/getMachineId-unsupported.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,IAAI,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;IAC9D,OAAO,EAAE,CAAC;AACZ,CAAC","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 { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n diag.debug('could not read machine-id: unsupported platform');\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-win.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as process from 'process';
import { execAsync } from './execAsync';
import { diag } from '@opentelemetry/api';
export async function getMachineId() {
const args = 'QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid';
let command = '%windir%\\System32\\REG.exe';
if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {
command = '%windir%\\sysnative\\cmd.exe /c ' + command;
}
try {
const result = await execAsync(`${command} ${args}`);
const parts = result.stdout.split('REG_SZ');
if (parts.length === 2) {
return parts[1].trim();
}
}
catch (e) {
diag.debug(`error reading machine id: ${e}`);
}
return '';
}
//# sourceMappingURL=getMachineId-win.js.map
{"version":3,"file":"getMachineId-win.js","sourceRoot":"","sources":["../../../../../../src/detectors/platform/node/machine-id/getMachineId-win.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,MAAM,IAAI,GACR,4EAA4E,CAAC;IAC/E,IAAI,OAAO,GAAG,6BAA6B,CAAC;IAC5C,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,IAAI,wBAAwB,IAAI,OAAO,CAAC,GAAG,EAAE;QACtE,OAAO,GAAG,kCAAkC,GAAG,OAAO,CAAC;KACxD;IAED,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,GAAG,OAAO,IAAI,IAAI,EAAE,CAAC,CAAC;QACrD,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC5C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACxB;KACF;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,CAAC,CAAC;KAC9C;IAED,OAAO,EAAE,CAAC;AACZ,CAAC","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 process from 'process';\nimport { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n const args =\n 'QUERY HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Cryptography /v MachineGuid';\n let command = '%windir%\\\\System32\\\\REG.exe';\n if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {\n command = '%windir%\\\\sysnative\\\\cmd.exe /c ' + command;\n }\n\n try {\n const result = await execAsync(`${command} ${args}`);\n const parts = result.stdout.split('REG_SZ');\n if (parts.length === 2) {\n return parts[1].trim();\n }\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return '';\n}\n"]}
declare let getMachineId: () => Promise<string>;
export { getMachineId };
//# sourceMappingURL=getMachineId.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as process from 'process';
let getMachineId;
switch (process.platform) {
case 'darwin':
({ getMachineId } = require('./getMachineId-darwin'));
break;
case 'linux':
({ getMachineId } = require('./getMachineId-linux'));
break;
case 'freebsd':
({ getMachineId } = require('./getMachineId-bsd'));
break;
case 'win32':
({ getMachineId } = require('./getMachineId-win'));
break;
default:
({ getMachineId } = require('./getMachineId-unsupported'));
}
export { getMachineId };
//# sourceMappingURL=getMachineId.js.map
{"version":3,"file":"getMachineId.js","sourceRoot":"","sources":["../../../../../../src/detectors/platform/node/machine-id/getMachineId.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,IAAI,YAAmC,CAAC;AAExC,QAAQ,OAAO,CAAC,QAAQ,EAAE;IACxB,KAAK,QAAQ;QACX,CAAC,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC,CAAC;QACtD,MAAM;IACR,KAAK,OAAO;QACV,CAAC,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC;QACrD,MAAM;IACR,KAAK,SAAS;QACZ,CAAC,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC;QACnD,MAAM;IACR,KAAK,OAAO;QACV,CAAC,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC;QACnD,MAAM;IACR;QACE,CAAC,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC,CAAC;CAC9D;AAED,OAAO,EAAE,YAAY,EAAE,CAAC","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 */\nimport * as process from 'process';\n\nlet getMachineId: () => Promise<string>;\n\nswitch (process.platform) {\n case 'darwin':\n ({ getMachineId } = require('./getMachineId-darwin'));\n break;\n case 'linux':\n ({ getMachineId } = require('./getMachineId-linux'));\n break;\n case 'freebsd':\n ({ getMachineId } = require('./getMachineId-bsd'));\n break;\n case 'win32':\n ({ getMachineId } = require('./getMachineId-win'));\n break;\n default:\n ({ getMachineId } = require('./getMachineId-unsupported'));\n}\n\nexport { getMachineId };\n"]}
import { Detector } from '../../../types';
import { ResourceDetectionConfig } from '../../../config';
import { IResource } from '../../../IResource';
/**
* OSDetector detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
declare class OSDetector implements Detector {
detect(_config?: ResourceDetectionConfig): Promise<IResource>;
}
export declare const osDetector: OSDetector;
export {};
//# sourceMappingURL=OSDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { osDetectorSync } from './OSDetectorSync';
/**
* OSDetector detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
class OSDetector {
detect(_config) {
return Promise.resolve(osDetectorSync.detect(_config));
}
}
export const osDetector = new OSDetector();
//# sourceMappingURL=OSDetector.js.map
{"version":3,"file":"OSDetector.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/OSDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;GAGG;AACH,MAAM,UAAU;IACd,MAAM,CAAC,OAAiC;QACtC,OAAO,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACzD,CAAC;CACF;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,UAAU,EAAE,CAAC","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 { Detector } from '../../../types';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { IResource } from '../../../IResource';\nimport { osDetectorSync } from './OSDetectorSync';\n\n/**\n * OSDetector detects the resources related to the operating system (OS) on\n * which the process represented by this resource is running.\n */\nclass OSDetector implements Detector {\n detect(_config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(osDetectorSync.detect(_config));\n }\n}\n\nexport const osDetector = new OSDetector();\n"]}
import { Resource } from '../../../Resource';
import { DetectorSync } from '../../../types';
import { ResourceDetectionConfig } from '../../../config';
/**
* OSDetectorSync detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
declare class OSDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): Resource;
}
export declare const osDetectorSync: OSDetectorSync;
export {};
//# sourceMappingURL=OSDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { Resource } from '../../../Resource';
import { platform, release } from 'os';
import { normalizeType } from './utils';
/**
* OSDetectorSync detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
class OSDetectorSync {
detect(_config) {
const attributes = {
[SemanticResourceAttributes.OS_TYPE]: normalizeType(platform()),
[SemanticResourceAttributes.OS_VERSION]: release(),
};
return new Resource(attributes);
}
}
export const osDetectorSync = new OSDetectorSync();
//# sourceMappingURL=OSDetectorSync.js.map
{"version":3,"file":"OSDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/OSDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG7C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC;;;GAGG;AACH,MAAM,cAAc;IAClB,MAAM,CAAC,OAAiC;QACtC,MAAM,UAAU,GAAuB;YACrC,CAAC,0BAA0B,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,QAAQ,EAAE,CAAC;YAC/D,CAAC,0BAA0B,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE;SACnD,CAAC;QACF,OAAO,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC","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 { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../../types';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { platform, release } from 'os';\nimport { normalizeType } from './utils';\n\n/**\n * OSDetectorSync detects the resources related to the operating system (OS) on\n * which the process represented by this resource is running.\n */\nclass OSDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): Resource {\n const attributes: ResourceAttributes = {\n [SemanticResourceAttributes.OS_TYPE]: normalizeType(platform()),\n [SemanticResourceAttributes.OS_VERSION]: release(),\n };\n return new Resource(attributes);\n }\n}\n\nexport const osDetectorSync = new OSDetectorSync();\n"]}
import { Detector } from '../../../types';
import { ResourceDetectionConfig } from '../../../config';
import { IResource } from '../../../IResource';
/**
* ProcessDetector will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
declare class ProcessDetector implements Detector {
detect(config?: ResourceDetectionConfig): Promise<IResource>;
}
export declare const processDetector: ProcessDetector;
export {};
//# sourceMappingURL=ProcessDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { processDetectorSync } from './ProcessDetectorSync';
/**
* ProcessDetector will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
class ProcessDetector {
detect(config) {
return Promise.resolve(processDetectorSync.detect(config));
}
}
export const processDetector = new ProcessDetector();
//# sourceMappingURL=ProcessDetector.js.map
{"version":3,"file":"ProcessDetector.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/ProcessDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;GAGG;AACH,MAAM,eAAe;IACnB,MAAM,CAAC,MAAgC;QACrC,OAAO,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7D,CAAC;CACF;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC","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 { Detector } from '../../../types';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { IResource } from '../../../IResource';\nimport { processDetectorSync } from './ProcessDetectorSync';\n\n/**\n * ProcessDetector will be used to detect the resources related current process running\n * and being instrumented from the NodeJS Process module.\n */\nclass ProcessDetector implements Detector {\n detect(config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(processDetectorSync.detect(config));\n }\n}\n\nexport const processDetector = new ProcessDetector();\n"]}
import { DetectorSync } from '../../../types';
import { ResourceDetectionConfig } from '../../../config';
import { IResource } from '../../../IResource';
/**
* ProcessDetectorSync will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
declare class ProcessDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): IResource;
}
export declare const processDetectorSync: ProcessDetectorSync;
export {};
//# sourceMappingURL=ProcessDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { diag } from '@opentelemetry/api';
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { Resource } from '../../../Resource';
import * as os from 'os';
/**
* ProcessDetectorSync will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
class ProcessDetectorSync {
detect(_config) {
const attributes = {
[SemanticResourceAttributes.PROCESS_PID]: process.pid,
[SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME]: process.title,
[SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH]: process.execPath,
[SemanticResourceAttributes.PROCESS_COMMAND_ARGS]: [
process.argv[0],
...process.execArgv,
...process.argv.slice(1),
],
[SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]: process.versions.node,
[SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'nodejs',
[SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Node.js',
};
if (process.argv.length > 1) {
attributes[SemanticResourceAttributes.PROCESS_COMMAND] = process.argv[1];
}
try {
const userInfo = os.userInfo();
attributes[SemanticResourceAttributes.PROCESS_OWNER] = userInfo.username;
}
catch (e) {
diag.debug(`error obtaining process owner: ${e}`);
}
return new Resource(attributes);
}
}
export const processDetectorSync = new ProcessDetectorSync();
//# sourceMappingURL=ProcessDetectorSync.js.map
{"version":3,"file":"ProcessDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/ProcessDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7C,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB;;;GAGG;AACH,MAAM,mBAAmB;IACvB,MAAM,CAAC,OAAiC;QACtC,MAAM,UAAU,GAAuB;YACrC,CAAC,0BAA0B,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,GAAG;YACrD,CAAC,0BAA0B,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAC,KAAK;YACnE,CAAC,0BAA0B,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAC,QAAQ;YACtE,CAAC,0BAA0B,CAAC,oBAAoB,CAAC,EAAE;gBACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;gBACf,GAAG,OAAO,CAAC,QAAQ;gBACnB,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;aACzB;YACD,CAAC,0BAA0B,CAAC,uBAAuB,CAAC,EAClD,OAAO,CAAC,QAAQ,CAAC,IAAI;YACvB,CAAC,0BAA0B,CAAC,oBAAoB,CAAC,EAAE,QAAQ;YAC3D,CAAC,0BAA0B,CAAC,2BAA2B,CAAC,EAAE,SAAS;SACpE,CAAC;QAEF,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;YAC3B,UAAU,CAAC,0BAA0B,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAC1E;QAED,IAAI;YACF,MAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;YAC/B,UAAU,CAAC,0BAA0B,CAAC,aAAa,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC;SAC1E;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,CAAC,KAAK,CAAC,kCAAkC,CAAC,EAAE,CAAC,CAAC;SACnD;QAED,OAAO,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAC","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 { diag } from '@opentelemetry/api';\nimport { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../../types';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { IResource } from '../../../IResource';\nimport * as os from 'os';\n\n/**\n * ProcessDetectorSync will be used to detect the resources related current process running\n * and being instrumented from the NodeJS Process module.\n */\nclass ProcessDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): IResource {\n const attributes: ResourceAttributes = {\n [SemanticResourceAttributes.PROCESS_PID]: process.pid,\n [SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME]: process.title,\n [SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH]: process.execPath,\n [SemanticResourceAttributes.PROCESS_COMMAND_ARGS]: [\n process.argv[0],\n ...process.execArgv,\n ...process.argv.slice(1),\n ],\n [SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]:\n process.versions.node,\n [SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'nodejs',\n [SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Node.js',\n };\n\n if (process.argv.length > 1) {\n attributes[SemanticResourceAttributes.PROCESS_COMMAND] = process.argv[1];\n }\n\n try {\n const userInfo = os.userInfo();\n attributes[SemanticResourceAttributes.PROCESS_OWNER] = userInfo.username;\n } catch (e) {\n diag.debug(`error obtaining process owner: ${e}`);\n }\n\n return new Resource(attributes);\n }\n}\n\nexport const processDetectorSync = new ProcessDetectorSync();\n"]}
import { Resource } from '../../../Resource';
import { DetectorSync } from '../../../types';
import { ResourceDetectionConfig } from '../../../config';
/**
* ServiceInstanceIdDetectorSync detects the resources related to the service instance ID.
*/
declare class ServiceInstanceIdDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): Resource;
}
/**
* @experimental
*/
export declare const serviceInstanceIdDetectorSync: ServiceInstanceIdDetectorSync;
export {};
//# sourceMappingURL=ServiceInstanceIdDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { SEMRESATTRS_SERVICE_INSTANCE_ID } from '@opentelemetry/semantic-conventions';
import { Resource } from '../../../Resource';
import { randomUUID } from 'crypto';
/**
* ServiceInstanceIdDetectorSync detects the resources related to the service instance ID.
*/
class ServiceInstanceIdDetectorSync {
detect(_config) {
const attributes = {
[SEMRESATTRS_SERVICE_INSTANCE_ID]: randomUUID(),
};
return new Resource(attributes);
}
}
/**
* @experimental
*/
export const serviceInstanceIdDetectorSync = new ServiceInstanceIdDetectorSync();
//# sourceMappingURL=ServiceInstanceIdDetectorSync.js.map
{"version":3,"file":"ServiceInstanceIdDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/ServiceInstanceIdDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG7C,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC;;GAEG;AACH,MAAM,6BAA6B;IACjC,MAAM,CAAC,OAAiC;QACtC,MAAM,UAAU,GAAuB;YACrC,CAAC,+BAA+B,CAAC,EAAE,UAAU,EAAE;SAChD,CAAC;QAEF,OAAO,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GACxC,IAAI,6BAA6B,EAAE,CAAC","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 { SEMRESATTRS_SERVICE_INSTANCE_ID } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../../types';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { randomUUID } from 'crypto';\n\n/**\n * ServiceInstanceIdDetectorSync detects the resources related to the service instance ID.\n */\nclass ServiceInstanceIdDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): Resource {\n const attributes: ResourceAttributes = {\n [SEMRESATTRS_SERVICE_INSTANCE_ID]: randomUUID(),\n };\n\n return new Resource(attributes);\n }\n}\n\n/**\n * @experimental\n */\nexport const serviceInstanceIdDetectorSync =\n new ServiceInstanceIdDetectorSync();\n"]}
export declare const normalizeArch: (nodeArchString: string) => string;
export declare const normalizeType: (nodePlatform: string) => string;
//# sourceMappingURL=utils.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const normalizeArch = (nodeArchString) => {
// Maps from https://nodejs.org/api/os.html#osarch to arch values in spec:
// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/host.md
switch (nodeArchString) {
case 'arm':
return 'arm32';
case 'ppc':
return 'ppc32';
case 'x64':
return 'amd64';
default:
return nodeArchString;
}
};
export const normalizeType = (nodePlatform) => {
// Maps from https://nodejs.org/api/os.html#osplatform to arch values in spec:
// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/os.md
switch (nodePlatform) {
case 'sunos':
return 'solaris';
case 'win32':
return 'windows';
default:
return nodePlatform;
}
};
//# sourceMappingURL=utils.js.map
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,cAAsB,EAAU,EAAE;IAC9D,0EAA0E;IAC1E,8HAA8H;IAC9H,QAAQ,cAAc,EAAE;QACtB,KAAK,KAAK;YACR,OAAO,OAAO,CAAC;QACjB,KAAK,KAAK;YACR,OAAO,OAAO,CAAC;QACjB,KAAK,KAAK;YACR,OAAO,OAAO,CAAC;QACjB;YACE,OAAO,cAAc,CAAC;KACzB;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,YAAoB,EAAU,EAAE;IAC5D,8EAA8E;IAC9E,4HAA4H;IAC5H,QAAQ,YAAY,EAAE;QACpB,KAAK,OAAO;YACV,OAAO,SAAS,CAAC;QACnB,KAAK,OAAO;YACV,OAAO,SAAS,CAAC;QACnB;YACE,OAAO,YAAY,CAAC;KACvB;AACH,CAAC,CAAC","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 */\nexport const normalizeArch = (nodeArchString: string): string => {\n // Maps from https://nodejs.org/api/os.html#osarch to arch values in spec:\n // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/host.md\n switch (nodeArchString) {\n case 'arm':\n return 'arm32';\n case 'ppc':\n return 'ppc32';\n case 'x64':\n return 'amd64';\n default:\n return nodeArchString;\n }\n};\n\nexport const normalizeType = (nodePlatform: string): string => {\n // Maps from https://nodejs.org/api/os.html#osplatform to arch values in spec:\n // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/os.md\n switch (nodePlatform) {\n case 'sunos':\n return 'solaris';\n case 'win32':\n return 'windows';\n default:\n return nodePlatform;\n }\n};\n"]}
export declare const hostDetector: import("../../NoopDetector").NoopDetector;
//# sourceMappingURL=HostDetector.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.hostDetector = void 0;
const NoopDetector_1 = require("../../NoopDetector");
exports.hostDetector = NoopDetector_1.noopDetector;
//# sourceMappingURL=HostDetector.js.map
{"version":3,"file":"HostDetector.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/HostDetector.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,qDAAkD;AAErC,QAAA,YAAY,GAAG,2BAAY,CAAC","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 { noopDetector } from '../../NoopDetector';\n\nexport const hostDetector = noopDetector;\n"]}
export declare const hostDetectorSync: import("../../NoopDetectorSync").NoopDetectorSync;
//# sourceMappingURL=HostDetectorSync.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.hostDetectorSync = void 0;
const NoopDetectorSync_1 = require("../../NoopDetectorSync");
exports.hostDetectorSync = NoopDetectorSync_1.noopDetectorSync;
//# sourceMappingURL=HostDetectorSync.js.map
{"version":3,"file":"HostDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/HostDetectorSync.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,6DAA0D;AAE7C,QAAA,gBAAgB,GAAG,mCAAgB,CAAC","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 { noopDetectorSync } from '../../NoopDetectorSync';\n\nexport const hostDetectorSync = noopDetectorSync;\n"]}
export { hostDetector } from './HostDetector';
export { hostDetectorSync } from './HostDetectorSync';
export { osDetector } from './OSDetector';
export { osDetectorSync } from './OSDetectorSync';
export { processDetector } from './ProcessDetector';
export { processDetectorSync } from './ProcessDetectorSync';
export { serviceInstanceIdDetectorSync } from './ServiceInstanceIdDetectorSync';
//# sourceMappingURL=index.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.serviceInstanceIdDetectorSync = exports.processDetectorSync = exports.processDetector = exports.osDetectorSync = exports.osDetector = exports.hostDetectorSync = exports.hostDetector = void 0;
var HostDetector_1 = require("./HostDetector");
Object.defineProperty(exports, "hostDetector", { enumerable: true, get: function () { return HostDetector_1.hostDetector; } });
var HostDetectorSync_1 = require("./HostDetectorSync");
Object.defineProperty(exports, "hostDetectorSync", { enumerable: true, get: function () { return HostDetectorSync_1.hostDetectorSync; } });
var OSDetector_1 = require("./OSDetector");
Object.defineProperty(exports, "osDetector", { enumerable: true, get: function () { return OSDetector_1.osDetector; } });
var OSDetectorSync_1 = require("./OSDetectorSync");
Object.defineProperty(exports, "osDetectorSync", { enumerable: true, get: function () { return OSDetectorSync_1.osDetectorSync; } });
var ProcessDetector_1 = require("./ProcessDetector");
Object.defineProperty(exports, "processDetector", { enumerable: true, get: function () { return ProcessDetector_1.processDetector; } });
var ProcessDetectorSync_1 = require("./ProcessDetectorSync");
Object.defineProperty(exports, "processDetectorSync", { enumerable: true, get: function () { return ProcessDetectorSync_1.processDetectorSync; } });
var ServiceInstanceIdDetectorSync_1 = require("./ServiceInstanceIdDetectorSync");
Object.defineProperty(exports, "serviceInstanceIdDetectorSync", { enumerable: true, get: function () { return ServiceInstanceIdDetectorSync_1.serviceInstanceIdDetectorSync; } });
//# sourceMappingURL=index.js.map
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,iFAAgF;AAAvE,8IAAA,6BAA6B,OAAA","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\nexport { hostDetector } from './HostDetector';\nexport { hostDetectorSync } from './HostDetectorSync';\nexport { osDetector } from './OSDetector';\nexport { osDetectorSync } from './OSDetectorSync';\nexport { processDetector } from './ProcessDetector';\nexport { processDetectorSync } from './ProcessDetectorSync';\nexport { serviceInstanceIdDetectorSync } from './ServiceInstanceIdDetectorSync';\n"]}
export declare const osDetector: import("../../NoopDetector").NoopDetector;
//# sourceMappingURL=OSDetector.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.osDetector = void 0;
const NoopDetector_1 = require("../../NoopDetector");
exports.osDetector = NoopDetector_1.noopDetector;
//# sourceMappingURL=OSDetector.js.map
{"version":3,"file":"OSDetector.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/OSDetector.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,qDAAkD;AAErC,QAAA,UAAU,GAAG,2BAAY,CAAC","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 { noopDetector } from '../../NoopDetector';\n\nexport const osDetector = noopDetector;\n"]}
export declare const osDetectorSync: import("../../NoopDetectorSync").NoopDetectorSync;
//# sourceMappingURL=OSDetectorSync.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.osDetectorSync = void 0;
const NoopDetectorSync_1 = require("../../NoopDetectorSync");
exports.osDetectorSync = NoopDetectorSync_1.noopDetectorSync;
//# sourceMappingURL=OSDetectorSync.js.map
{"version":3,"file":"OSDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/OSDetectorSync.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,6DAA0D;AAE7C,QAAA,cAAc,GAAG,mCAAgB,CAAC","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 { noopDetectorSync } from '../../NoopDetectorSync';\n\nexport const osDetectorSync = noopDetectorSync;\n"]}
export declare const processDetector: import("../../NoopDetector").NoopDetector;
//# sourceMappingURL=ProcessDetector.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.processDetector = void 0;
const NoopDetector_1 = require("../../NoopDetector");
exports.processDetector = NoopDetector_1.noopDetector;
//# sourceMappingURL=ProcessDetector.js.map
{"version":3,"file":"ProcessDetector.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/ProcessDetector.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,qDAAkD;AAErC,QAAA,eAAe,GAAG,2BAAY,CAAC","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 { noopDetector } from '../../NoopDetector';\n\nexport const processDetector = noopDetector;\n"]}
export declare const processDetectorSync: import("../../NoopDetector").NoopDetector;
//# sourceMappingURL=ProcessDetectorSync.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.processDetectorSync = void 0;
const NoopDetector_1 = require("../../NoopDetector");
exports.processDetectorSync = NoopDetector_1.noopDetector;
//# sourceMappingURL=ProcessDetectorSync.js.map
{"version":3,"file":"ProcessDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/ProcessDetectorSync.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,qDAAkD;AAErC,QAAA,mBAAmB,GAAG,2BAAY,CAAC","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 { noopDetector } from '../../NoopDetector';\n\nexport const processDetectorSync = noopDetector;\n"]}
/**
* @experimental
*/
export declare const serviceInstanceIdDetectorSync: import("../../NoopDetectorSync").NoopDetectorSync;
//# sourceMappingURL=ServiceInstanceIdDetectorSync.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.serviceInstanceIdDetectorSync = void 0;
const NoopDetectorSync_1 = require("../../NoopDetectorSync");
/**
* @experimental
*/
exports.serviceInstanceIdDetectorSync = NoopDetectorSync_1.noopDetectorSync;
//# sourceMappingURL=ServiceInstanceIdDetectorSync.js.map
{"version":3,"file":"ServiceInstanceIdDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/browser/ServiceInstanceIdDetectorSync.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,6DAA0D;AAE1D;;GAEG;AACU,QAAA,6BAA6B,GAAG,mCAAgB,CAAC","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 { noopDetectorSync } from '../../NoopDetectorSync';\n\n/**\n * @experimental\n */\nexport const serviceInstanceIdDetectorSync = noopDetectorSync;\n"]}
export { hostDetector, hostDetectorSync, osDetector, osDetectorSync, processDetector, processDetectorSync, serviceInstanceIdDetectorSync, } from './node';
//# sourceMappingURL=index.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.serviceInstanceIdDetectorSync = exports.processDetectorSync = exports.processDetector = exports.osDetectorSync = exports.osDetector = exports.hostDetectorSync = exports.hostDetector = void 0;
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var node_1 = require("./node");
Object.defineProperty(exports, "hostDetector", { enumerable: true, get: function () { return node_1.hostDetector; } });
Object.defineProperty(exports, "hostDetectorSync", { enumerable: true, get: function () { return node_1.hostDetectorSync; } });
Object.defineProperty(exports, "osDetector", { enumerable: true, get: function () { return node_1.osDetector; } });
Object.defineProperty(exports, "osDetectorSync", { enumerable: true, get: function () { return node_1.osDetectorSync; } });
Object.defineProperty(exports, "processDetector", { enumerable: true, get: function () { return node_1.processDetector; } });
Object.defineProperty(exports, "processDetectorSync", { enumerable: true, get: function () { return node_1.processDetectorSync; } });
Object.defineProperty(exports, "serviceInstanceIdDetectorSync", { enumerable: true, get: function () { return node_1.serviceInstanceIdDetectorSync; } });
//# sourceMappingURL=index.js.map
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/detectors/platform/index.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,+BAQgB;AAPd,oGAAA,YAAY,OAAA;AACZ,wGAAA,gBAAgB,OAAA;AAChB,kGAAA,UAAU,OAAA;AACV,sGAAA,cAAc,OAAA;AACd,uGAAA,eAAe,OAAA;AACf,2GAAA,mBAAmB,OAAA;AACnB,qHAAA,6BAA6B,OAAA","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 */\nexport {\n hostDetector,\n hostDetectorSync,\n osDetector,\n osDetectorSync,\n processDetector,\n processDetectorSync,\n serviceInstanceIdDetectorSync,\n} from './node';\n"]}
import { Detector } from '../../../types';
import { ResourceDetectionConfig } from '../../../config';
import { IResource } from '../../../IResource';
/**
* HostDetector detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
declare class HostDetector implements Detector {
detect(_config?: ResourceDetectionConfig): Promise<IResource>;
}
export declare const hostDetector: HostDetector;
export {};
//# sourceMappingURL=HostDetector.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.hostDetector = void 0;
const HostDetectorSync_1 = require("./HostDetectorSync");
/**
* HostDetector detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
class HostDetector {
detect(_config) {
return Promise.resolve(HostDetectorSync_1.hostDetectorSync.detect(_config));
}
}
exports.hostDetector = new HostDetector();
//# sourceMappingURL=HostDetector.js.map
{"version":3,"file":"HostDetector.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/HostDetector.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAKH,yDAAsD;AAEtD;;;GAGG;AACH,MAAM,YAAY;IAChB,MAAM,CAAC,OAAiC;QACtC,OAAO,OAAO,CAAC,OAAO,CAAC,mCAAgB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3D,CAAC;CACF;AAEY,QAAA,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC","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 { Detector } from '../../../types';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { IResource } from '../../../IResource';\nimport { hostDetectorSync } from './HostDetectorSync';\n\n/**\n * HostDetector detects the resources related to the host current process is\n * running on. Currently only non-cloud-based attributes are included.\n */\nclass HostDetector implements Detector {\n detect(_config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(hostDetectorSync.detect(_config));\n }\n}\n\nexport const hostDetector = new HostDetector();\n"]}
import { Resource } from '../../../Resource';
import { DetectorSync } from '../../../types';
import { ResourceDetectionConfig } from '../../../config';
/**
* HostDetectorSync detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
declare class HostDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): Resource;
private _getAsyncAttributes;
}
export declare const hostDetectorSync: HostDetectorSync;
export {};
//# sourceMappingURL=HostDetectorSync.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.hostDetectorSync = void 0;
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
const Resource_1 = require("../../../Resource");
const os_1 = require("os");
const utils_1 = require("./utils");
const getMachineId_1 = require("./machine-id/getMachineId");
/**
* HostDetectorSync detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
class HostDetectorSync {
detect(_config) {
const attributes = {
[semantic_conventions_1.SemanticResourceAttributes.HOST_NAME]: (0, os_1.hostname)(),
[semantic_conventions_1.SemanticResourceAttributes.HOST_ARCH]: (0, utils_1.normalizeArch)((0, os_1.arch)()),
};
return new Resource_1.Resource(attributes, this._getAsyncAttributes());
}
_getAsyncAttributes() {
return (0, getMachineId_1.getMachineId)().then(machineId => {
const attributes = {};
if (machineId) {
attributes[semantic_conventions_1.SemanticResourceAttributes.HOST_ID] = machineId;
}
return attributes;
});
}
}
exports.hostDetectorSync = new HostDetectorSync();
//# sourceMappingURL=HostDetectorSync.js.map
{"version":3,"file":"HostDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/HostDetectorSync.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,8EAAiF;AACjF,gDAA6C;AAG7C,2BAAoC;AACpC,mCAAwC;AACxC,4DAAyD;AAEzD;;;GAGG;AACH,MAAM,gBAAgB;IACpB,MAAM,CAAC,OAAiC;QACtC,MAAM,UAAU,GAAuB;YACrC,CAAC,iDAA0B,CAAC,SAAS,CAAC,EAAE,IAAA,aAAQ,GAAE;YAClD,CAAC,iDAA0B,CAAC,SAAS,CAAC,EAAE,IAAA,qBAAa,EAAC,IAAA,SAAI,GAAE,CAAC;SAC9D,CAAC;QAEF,OAAO,IAAI,mBAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAC9D,CAAC;IAEO,mBAAmB;QACzB,OAAO,IAAA,2BAAY,GAAE,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;YACrC,MAAM,UAAU,GAAuB,EAAE,CAAC;YAC1C,IAAI,SAAS,EAAE;gBACb,UAAU,CAAC,iDAA0B,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;aAC5D;YACD,OAAO,UAAU,CAAC;QACpB,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAEY,QAAA,gBAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC","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 { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../../types';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { arch, hostname } from 'os';\nimport { normalizeArch } from './utils';\nimport { getMachineId } from './machine-id/getMachineId';\n\n/**\n * HostDetectorSync detects the resources related to the host current process is\n * running on. Currently only non-cloud-based attributes are included.\n */\nclass HostDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): Resource {\n const attributes: ResourceAttributes = {\n [SemanticResourceAttributes.HOST_NAME]: hostname(),\n [SemanticResourceAttributes.HOST_ARCH]: normalizeArch(arch()),\n };\n\n return new Resource(attributes, this._getAsyncAttributes());\n }\n\n private _getAsyncAttributes(): Promise<ResourceAttributes> {\n return getMachineId().then(machineId => {\n const attributes: ResourceAttributes = {};\n if (machineId) {\n attributes[SemanticResourceAttributes.HOST_ID] = machineId;\n }\n return attributes;\n });\n }\n}\n\nexport const hostDetectorSync = new HostDetectorSync();\n"]}
export { hostDetector } from './HostDetector';
export { hostDetectorSync } from './HostDetectorSync';
export { osDetector } from './OSDetector';
export { osDetectorSync } from './OSDetectorSync';
export { processDetector } from './ProcessDetector';
export { processDetectorSync } from './ProcessDetectorSync';
export { serviceInstanceIdDetectorSync } from './ServiceInstanceIdDetectorSync';
//# sourceMappingURL=index.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.serviceInstanceIdDetectorSync = exports.processDetectorSync = exports.processDetector = exports.osDetectorSync = exports.osDetector = exports.hostDetectorSync = exports.hostDetector = void 0;
var HostDetector_1 = require("./HostDetector");
Object.defineProperty(exports, "hostDetector", { enumerable: true, get: function () { return HostDetector_1.hostDetector; } });
var HostDetectorSync_1 = require("./HostDetectorSync");
Object.defineProperty(exports, "hostDetectorSync", { enumerable: true, get: function () { return HostDetectorSync_1.hostDetectorSync; } });
var OSDetector_1 = require("./OSDetector");
Object.defineProperty(exports, "osDetector", { enumerable: true, get: function () { return OSDetector_1.osDetector; } });
var OSDetectorSync_1 = require("./OSDetectorSync");
Object.defineProperty(exports, "osDetectorSync", { enumerable: true, get: function () { return OSDetectorSync_1.osDetectorSync; } });
var ProcessDetector_1 = require("./ProcessDetector");
Object.defineProperty(exports, "processDetector", { enumerable: true, get: function () { return ProcessDetector_1.processDetector; } });
var ProcessDetectorSync_1 = require("./ProcessDetectorSync");
Object.defineProperty(exports, "processDetectorSync", { enumerable: true, get: function () { return ProcessDetectorSync_1.processDetectorSync; } });
var ServiceInstanceIdDetectorSync_1 = require("./ServiceInstanceIdDetectorSync");
Object.defineProperty(exports, "serviceInstanceIdDetectorSync", { enumerable: true, get: function () { return ServiceInstanceIdDetectorSync_1.serviceInstanceIdDetectorSync; } });
//# sourceMappingURL=index.js.map
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,iFAAgF;AAAvE,8IAAA,6BAA6B,OAAA","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\nexport { hostDetector } from './HostDetector';\nexport { hostDetectorSync } from './HostDetectorSync';\nexport { osDetector } from './OSDetector';\nexport { osDetectorSync } from './OSDetectorSync';\nexport { processDetector } from './ProcessDetector';\nexport { processDetectorSync } from './ProcessDetectorSync';\nexport { serviceInstanceIdDetectorSync } from './ServiceInstanceIdDetectorSync';\n"]}
/// <reference types="node" />
import * as child_process from 'child_process';
export declare const execAsync: typeof child_process.exec.__promisify__;
//# sourceMappingURL=execAsync.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.execAsync = void 0;
const child_process = require("child_process");
const util = require("util");
exports.execAsync = util.promisify(child_process.exec);
//# sourceMappingURL=execAsync.js.map
{"version":3,"file":"execAsync.js","sourceRoot":"","sources":["../../../../../../src/detectors/platform/node/machine-id/execAsync.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,+CAA+C;AAC/C,6BAA6B;AAEhB,QAAA,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC","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"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-bsd.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMachineId = void 0;
const fs_1 = require("fs");
const execAsync_1 = require("./execAsync");
const api_1 = require("@opentelemetry/api");
async function getMachineId() {
try {
const result = await fs_1.promises.readFile('/etc/hostid', { encoding: 'utf8' });
return result.trim();
}
catch (e) {
api_1.diag.debug(`error reading machine id: ${e}`);
}
try {
const result = await (0, execAsync_1.execAsync)('kenv -q smbios.system.uuid');
return result.stdout.trim();
}
catch (e) {
api_1.diag.debug(`error reading machine id: ${e}`);
}
return '';
}
exports.getMachineId = getMachineId;
//# sourceMappingURL=getMachineId-bsd.js.map
{"version":3,"file":"getMachineId-bsd.js","sourceRoot":"","sources":["../../../../../../src/detectors/platform/node/machine-id/getMachineId-bsd.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,2BAAoC;AACpC,2CAAwC;AACxC,4CAA0C;AAEnC,KAAK,UAAU,YAAY;IAChC,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,aAAE,CAAC,QAAQ,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;QACtE,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;KACtB;IAAC,OAAO,CAAC,EAAE;QACV,UAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,CAAC,CAAC;KAC9C;IAED,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,IAAA,qBAAS,EAAC,4BAA4B,CAAC,CAAC;QAC7D,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;KAC7B;IAAC,OAAO,CAAC,EAAE;QACV,UAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,CAAC,CAAC;KAC9C;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AAhBD,oCAgBC","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 { promises as fs } from 'fs';\nimport { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n try {\n const result = await fs.readFile('/etc/hostid', { encoding: 'utf8' });\n return result.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n try {\n const result = await execAsync('kenv -q smbios.system.uuid');\n return result.stdout.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-darwin.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMachineId = void 0;
const execAsync_1 = require("./execAsync");
const api_1 = require("@opentelemetry/api");
async function getMachineId() {
try {
const result = await (0, execAsync_1.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"');
const idLine = result.stdout
.split('\n')
.find(line => line.includes('IOPlatformUUID'));
if (!idLine) {
return '';
}
const parts = idLine.split('" = "');
if (parts.length === 2) {
return parts[1].slice(0, -1);
}
}
catch (e) {
api_1.diag.debug(`error reading machine id: ${e}`);
}
return '';
}
exports.getMachineId = getMachineId;
//# sourceMappingURL=getMachineId-darwin.js.map
{"version":3,"file":"getMachineId-darwin.js","sourceRoot":"","sources":["../../../../../../src/detectors/platform/node/machine-id/getMachineId-darwin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,2CAAwC;AACxC,4CAA0C;AAEnC,KAAK,UAAU,YAAY;IAChC,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,IAAA,qBAAS,EAAC,wCAAwC,CAAC,CAAC;QAEzE,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM;aACzB,KAAK,CAAC,IAAI,CAAC;aACX,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC;QAEjD,IAAI,CAAC,MAAM,EAAE;YACX,OAAO,EAAE,CAAC;SACX;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACpC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;SAC9B;KACF;IAAC,OAAO,CAAC,EAAE;QACV,UAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,CAAC,CAAC;KAC9C;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AArBD,oCAqBC","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 { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n try {\n const result = await execAsync('ioreg -rd1 -c \"IOPlatformExpertDevice\"');\n\n const idLine = result.stdout\n .split('\\n')\n .find(line => line.includes('IOPlatformUUID'));\n\n if (!idLine) {\n return '';\n }\n\n const parts = idLine.split('\" = \"');\n if (parts.length === 2) {\n return parts[1].slice(0, -1);\n }\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-linux.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMachineId = void 0;
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const fs_1 = require("fs");
const api_1 = require("@opentelemetry/api");
async function getMachineId() {
const paths = ['/etc/machine-id', '/var/lib/dbus/machine-id'];
for (const path of paths) {
try {
const result = await fs_1.promises.readFile(path, { encoding: 'utf8' });
return result.trim();
}
catch (e) {
api_1.diag.debug(`error reading machine id: ${e}`);
}
}
return '';
}
exports.getMachineId = getMachineId;
//# sourceMappingURL=getMachineId-linux.js.map
{"version":3,"file":"getMachineId-linux.js","sourceRoot":"","sources":["../../../../../../src/detectors/platform/node/machine-id/getMachineId-linux.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,2BAAoC;AACpC,4CAA0C;AAEnC,KAAK,UAAU,YAAY;IAChC,MAAM,KAAK,GAAG,CAAC,iBAAiB,EAAE,0BAA0B,CAAC,CAAC;IAE9D,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACxB,IAAI;YACF,MAAM,MAAM,GAAG,MAAM,aAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;YAC7D,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;SACtB;QAAC,OAAO,CAAC,EAAE;YACV,UAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,CAAC,CAAC;SAC9C;KACF;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AAbD,oCAaC","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 */\nimport { promises as fs } from 'fs';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n const paths = ['/etc/machine-id', '/var/lib/dbus/machine-id'];\n\n for (const path of paths) {\n try {\n const result = await fs.readFile(path, { encoding: 'utf8' });\n return result.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n }\n\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-unsupported.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMachineId = void 0;
const api_1 = require("@opentelemetry/api");
async function getMachineId() {
api_1.diag.debug('could not read machine-id: unsupported platform');
return '';
}
exports.getMachineId = getMachineId;
//# sourceMappingURL=getMachineId-unsupported.js.map
{"version":3,"file":"getMachineId-unsupported.js","sourceRoot":"","sources":["../../../../../../src/detectors/platform/node/machine-id/getMachineId-unsupported.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAA0C;AAEnC,KAAK,UAAU,YAAY;IAChC,UAAI,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;IAC9D,OAAO,EAAE,CAAC;AACZ,CAAC;AAHD,oCAGC","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 { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n diag.debug('could not read machine-id: unsupported platform');\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-win.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMachineId = void 0;
const process = require("process");
const execAsync_1 = require("./execAsync");
const api_1 = require("@opentelemetry/api");
async function getMachineId() {
const args = 'QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid';
let command = '%windir%\\System32\\REG.exe';
if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {
command = '%windir%\\sysnative\\cmd.exe /c ' + command;
}
try {
const result = await (0, execAsync_1.execAsync)(`${command} ${args}`);
const parts = result.stdout.split('REG_SZ');
if (parts.length === 2) {
return parts[1].trim();
}
}
catch (e) {
api_1.diag.debug(`error reading machine id: ${e}`);
}
return '';
}
exports.getMachineId = getMachineId;
//# sourceMappingURL=getMachineId-win.js.map
{"version":3,"file":"getMachineId-win.js","sourceRoot":"","sources":["../../../../../../src/detectors/platform/node/machine-id/getMachineId-win.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,mCAAmC;AACnC,2CAAwC;AACxC,4CAA0C;AAEnC,KAAK,UAAU,YAAY;IAChC,MAAM,IAAI,GACR,4EAA4E,CAAC;IAC/E,IAAI,OAAO,GAAG,6BAA6B,CAAC;IAC5C,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,IAAI,wBAAwB,IAAI,OAAO,CAAC,GAAG,EAAE;QACtE,OAAO,GAAG,kCAAkC,GAAG,OAAO,CAAC;KACxD;IAED,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,IAAA,qBAAS,EAAC,GAAG,OAAO,IAAI,IAAI,EAAE,CAAC,CAAC;QACrD,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC5C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACxB;KACF;IAAC,OAAO,CAAC,EAAE;QACV,UAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,CAAC,CAAC;KAC9C;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AAnBD,oCAmBC","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 process from 'process';\nimport { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n const args =\n 'QUERY HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Cryptography /v MachineGuid';\n let command = '%windir%\\\\System32\\\\REG.exe';\n if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {\n command = '%windir%\\\\sysnative\\\\cmd.exe /c ' + command;\n }\n\n try {\n const result = await execAsync(`${command} ${args}`);\n const parts = result.stdout.split('REG_SZ');\n if (parts.length === 2) {\n return parts[1].trim();\n }\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return '';\n}\n"]}
declare let getMachineId: () => Promise<string>;
export { getMachineId };
//# sourceMappingURL=getMachineId.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMachineId = void 0;
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const process = require("process");
let getMachineId;
exports.getMachineId = getMachineId;
switch (process.platform) {
case 'darwin':
(exports.getMachineId = getMachineId = require('./getMachineId-darwin').getMachineId);
break;
case 'linux':
(exports.getMachineId = getMachineId = require('./getMachineId-linux').getMachineId);
break;
case 'freebsd':
(exports.getMachineId = getMachineId = require('./getMachineId-bsd').getMachineId);
break;
case 'win32':
(exports.getMachineId = getMachineId = require('./getMachineId-win').getMachineId);
break;
default:
(exports.getMachineId = getMachineId = require('./getMachineId-unsupported').getMachineId);
}
//# sourceMappingURL=getMachineId.js.map
{"version":3,"file":"getMachineId.js","sourceRoot":"","sources":["../../../../../../src/detectors/platform/node/machine-id/getMachineId.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,mCAAmC;AAEnC,IAAI,YAAmC,CAAC;AAmB/B,oCAAY;AAjBrB,QAAQ,OAAO,CAAC,QAAQ,EAAE;IACxB,KAAK,QAAQ;QACX,CAAG,uBAAA,YAAY,GAAK,OAAO,CAAC,uBAAuB,CAAC,aAArC,CAAsC,CAAC;QACtD,MAAM;IACR,KAAK,OAAO;QACV,CAAG,uBAAA,YAAY,GAAK,OAAO,CAAC,sBAAsB,CAAC,aAApC,CAAqC,CAAC;QACrD,MAAM;IACR,KAAK,SAAS;QACZ,CAAG,uBAAA,YAAY,GAAK,OAAO,CAAC,oBAAoB,CAAC,aAAlC,CAAmC,CAAC;QACnD,MAAM;IACR,KAAK,OAAO;QACV,CAAG,uBAAA,YAAY,GAAK,OAAO,CAAC,oBAAoB,CAAC,aAAlC,CAAmC,CAAC;QACnD,MAAM;IACR;QACE,CAAG,uBAAA,YAAY,GAAK,OAAO,CAAC,4BAA4B,CAAC,aAA1C,CAA2C,CAAC;CAC9D","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 */\nimport * as process from 'process';\n\nlet getMachineId: () => Promise<string>;\n\nswitch (process.platform) {\n case 'darwin':\n ({ getMachineId } = require('./getMachineId-darwin'));\n break;\n case 'linux':\n ({ getMachineId } = require('./getMachineId-linux'));\n break;\n case 'freebsd':\n ({ getMachineId } = require('./getMachineId-bsd'));\n break;\n case 'win32':\n ({ getMachineId } = require('./getMachineId-win'));\n break;\n default:\n ({ getMachineId } = require('./getMachineId-unsupported'));\n}\n\nexport { getMachineId };\n"]}
import { Detector } from '../../../types';
import { ResourceDetectionConfig } from '../../../config';
import { IResource } from '../../../IResource';
/**
* OSDetector detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
declare class OSDetector implements Detector {
detect(_config?: ResourceDetectionConfig): Promise<IResource>;
}
export declare const osDetector: OSDetector;
export {};
//# sourceMappingURL=OSDetector.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.osDetector = void 0;
const OSDetectorSync_1 = require("./OSDetectorSync");
/**
* OSDetector detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
class OSDetector {
detect(_config) {
return Promise.resolve(OSDetectorSync_1.osDetectorSync.detect(_config));
}
}
exports.osDetector = new OSDetector();
//# sourceMappingURL=OSDetector.js.map
{"version":3,"file":"OSDetector.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/OSDetector.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAKH,qDAAkD;AAElD;;;GAGG;AACH,MAAM,UAAU;IACd,MAAM,CAAC,OAAiC;QACtC,OAAO,OAAO,CAAC,OAAO,CAAC,+BAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACzD,CAAC;CACF;AAEY,QAAA,UAAU,GAAG,IAAI,UAAU,EAAE,CAAC","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 { Detector } from '../../../types';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { IResource } from '../../../IResource';\nimport { osDetectorSync } from './OSDetectorSync';\n\n/**\n * OSDetector detects the resources related to the operating system (OS) on\n * which the process represented by this resource is running.\n */\nclass OSDetector implements Detector {\n detect(_config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(osDetectorSync.detect(_config));\n }\n}\n\nexport const osDetector = new OSDetector();\n"]}
import { Resource } from '../../../Resource';
import { DetectorSync } from '../../../types';
import { ResourceDetectionConfig } from '../../../config';
/**
* OSDetectorSync detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
declare class OSDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): Resource;
}
export declare const osDetectorSync: OSDetectorSync;
export {};
//# sourceMappingURL=OSDetectorSync.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.osDetectorSync = void 0;
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
const Resource_1 = require("../../../Resource");
const os_1 = require("os");
const utils_1 = require("./utils");
/**
* OSDetectorSync detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
class OSDetectorSync {
detect(_config) {
const attributes = {
[semantic_conventions_1.SemanticResourceAttributes.OS_TYPE]: (0, utils_1.normalizeType)((0, os_1.platform)()),
[semantic_conventions_1.SemanticResourceAttributes.OS_VERSION]: (0, os_1.release)(),
};
return new Resource_1.Resource(attributes);
}
}
exports.osDetectorSync = new OSDetectorSync();
//# sourceMappingURL=OSDetectorSync.js.map
{"version":3,"file":"OSDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/OSDetectorSync.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,8EAAiF;AACjF,gDAA6C;AAG7C,2BAAuC;AACvC,mCAAwC;AAExC;;;GAGG;AACH,MAAM,cAAc;IAClB,MAAM,CAAC,OAAiC;QACtC,MAAM,UAAU,GAAuB;YACrC,CAAC,iDAA0B,CAAC,OAAO,CAAC,EAAE,IAAA,qBAAa,EAAC,IAAA,aAAQ,GAAE,CAAC;YAC/D,CAAC,iDAA0B,CAAC,UAAU,CAAC,EAAE,IAAA,YAAO,GAAE;SACnD,CAAC;QACF,OAAO,IAAI,mBAAQ,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;CACF;AAEY,QAAA,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC","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 { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../../types';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { platform, release } from 'os';\nimport { normalizeType } from './utils';\n\n/**\n * OSDetectorSync detects the resources related to the operating system (OS) on\n * which the process represented by this resource is running.\n */\nclass OSDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): Resource {\n const attributes: ResourceAttributes = {\n [SemanticResourceAttributes.OS_TYPE]: normalizeType(platform()),\n [SemanticResourceAttributes.OS_VERSION]: release(),\n };\n return new Resource(attributes);\n }\n}\n\nexport const osDetectorSync = new OSDetectorSync();\n"]}
import { Detector } from '../../../types';
import { ResourceDetectionConfig } from '../../../config';
import { IResource } from '../../../IResource';
/**
* ProcessDetector will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
declare class ProcessDetector implements Detector {
detect(config?: ResourceDetectionConfig): Promise<IResource>;
}
export declare const processDetector: ProcessDetector;
export {};
//# sourceMappingURL=ProcessDetector.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.processDetector = void 0;
const ProcessDetectorSync_1 = require("./ProcessDetectorSync");
/**
* ProcessDetector will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
class ProcessDetector {
detect(config) {
return Promise.resolve(ProcessDetectorSync_1.processDetectorSync.detect(config));
}
}
exports.processDetector = new ProcessDetector();
//# sourceMappingURL=ProcessDetector.js.map
{"version":3,"file":"ProcessDetector.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/ProcessDetector.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAKH,+DAA4D;AAE5D;;;GAGG;AACH,MAAM,eAAe;IACnB,MAAM,CAAC,MAAgC;QACrC,OAAO,OAAO,CAAC,OAAO,CAAC,yCAAmB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7D,CAAC;CACF;AAEY,QAAA,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC","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 { Detector } from '../../../types';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { IResource } from '../../../IResource';\nimport { processDetectorSync } from './ProcessDetectorSync';\n\n/**\n * ProcessDetector will be used to detect the resources related current process running\n * and being instrumented from the NodeJS Process module.\n */\nclass ProcessDetector implements Detector {\n detect(config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(processDetectorSync.detect(config));\n }\n}\n\nexport const processDetector = new ProcessDetector();\n"]}
import { DetectorSync } from '../../../types';
import { ResourceDetectionConfig } from '../../../config';
import { IResource } from '../../../IResource';
/**
* ProcessDetectorSync will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
declare class ProcessDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): IResource;
}
export declare const processDetectorSync: ProcessDetectorSync;
export {};
//# sourceMappingURL=ProcessDetectorSync.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.processDetectorSync = void 0;
const api_1 = require("@opentelemetry/api");
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
const Resource_1 = require("../../../Resource");
const os = require("os");
/**
* ProcessDetectorSync will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
class ProcessDetectorSync {
detect(_config) {
const attributes = {
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_PID]: process.pid,
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME]: process.title,
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH]: process.execPath,
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_COMMAND_ARGS]: [
process.argv[0],
...process.execArgv,
...process.argv.slice(1),
],
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]: process.versions.node,
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'nodejs',
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Node.js',
};
if (process.argv.length > 1) {
attributes[semantic_conventions_1.SemanticResourceAttributes.PROCESS_COMMAND] = process.argv[1];
}
try {
const userInfo = os.userInfo();
attributes[semantic_conventions_1.SemanticResourceAttributes.PROCESS_OWNER] = userInfo.username;
}
catch (e) {
api_1.diag.debug(`error obtaining process owner: ${e}`);
}
return new Resource_1.Resource(attributes);
}
}
exports.processDetectorSync = new ProcessDetectorSync();
//# sourceMappingURL=ProcessDetectorSync.js.map
{"version":3,"file":"ProcessDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/ProcessDetectorSync.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAA0C;AAC1C,8EAAiF;AACjF,gDAA6C;AAI7C,yBAAyB;AAEzB;;;GAGG;AACH,MAAM,mBAAmB;IACvB,MAAM,CAAC,OAAiC;QACtC,MAAM,UAAU,GAAuB;YACrC,CAAC,iDAA0B,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,GAAG;YACrD,CAAC,iDAA0B,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAC,KAAK;YACnE,CAAC,iDAA0B,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAC,QAAQ;YACtE,CAAC,iDAA0B,CAAC,oBAAoB,CAAC,EAAE;gBACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;gBACf,GAAG,OAAO,CAAC,QAAQ;gBACnB,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;aACzB;YACD,CAAC,iDAA0B,CAAC,uBAAuB,CAAC,EAClD,OAAO,CAAC,QAAQ,CAAC,IAAI;YACvB,CAAC,iDAA0B,CAAC,oBAAoB,CAAC,EAAE,QAAQ;YAC3D,CAAC,iDAA0B,CAAC,2BAA2B,CAAC,EAAE,SAAS;SACpE,CAAC;QAEF,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;YAC3B,UAAU,CAAC,iDAA0B,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAC1E;QAED,IAAI;YACF,MAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;YAC/B,UAAU,CAAC,iDAA0B,CAAC,aAAa,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC;SAC1E;QAAC,OAAO,CAAC,EAAE;YACV,UAAI,CAAC,KAAK,CAAC,kCAAkC,CAAC,EAAE,CAAC,CAAC;SACnD;QAED,OAAO,IAAI,mBAAQ,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;CACF;AAEY,QAAA,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAC","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 { diag } from '@opentelemetry/api';\nimport { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../../types';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { IResource } from '../../../IResource';\nimport * as os from 'os';\n\n/**\n * ProcessDetectorSync will be used to detect the resources related current process running\n * and being instrumented from the NodeJS Process module.\n */\nclass ProcessDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): IResource {\n const attributes: ResourceAttributes = {\n [SemanticResourceAttributes.PROCESS_PID]: process.pid,\n [SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME]: process.title,\n [SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH]: process.execPath,\n [SemanticResourceAttributes.PROCESS_COMMAND_ARGS]: [\n process.argv[0],\n ...process.execArgv,\n ...process.argv.slice(1),\n ],\n [SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]:\n process.versions.node,\n [SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'nodejs',\n [SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Node.js',\n };\n\n if (process.argv.length > 1) {\n attributes[SemanticResourceAttributes.PROCESS_COMMAND] = process.argv[1];\n }\n\n try {\n const userInfo = os.userInfo();\n attributes[SemanticResourceAttributes.PROCESS_OWNER] = userInfo.username;\n } catch (e) {\n diag.debug(`error obtaining process owner: ${e}`);\n }\n\n return new Resource(attributes);\n }\n}\n\nexport const processDetectorSync = new ProcessDetectorSync();\n"]}
import { Resource } from '../../../Resource';
import { DetectorSync } from '../../../types';
import { ResourceDetectionConfig } from '../../../config';
/**
* ServiceInstanceIdDetectorSync detects the resources related to the service instance ID.
*/
declare class ServiceInstanceIdDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): Resource;
}
/**
* @experimental
*/
export declare const serviceInstanceIdDetectorSync: ServiceInstanceIdDetectorSync;
export {};
//# sourceMappingURL=ServiceInstanceIdDetectorSync.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.serviceInstanceIdDetectorSync = void 0;
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
const Resource_1 = require("../../../Resource");
const crypto_1 = require("crypto");
/**
* ServiceInstanceIdDetectorSync detects the resources related to the service instance ID.
*/
class ServiceInstanceIdDetectorSync {
detect(_config) {
const attributes = {
[semantic_conventions_1.SEMRESATTRS_SERVICE_INSTANCE_ID]: (0, crypto_1.randomUUID)(),
};
return new Resource_1.Resource(attributes);
}
}
/**
* @experimental
*/
exports.serviceInstanceIdDetectorSync = new ServiceInstanceIdDetectorSync();
//# sourceMappingURL=ServiceInstanceIdDetectorSync.js.map
{"version":3,"file":"ServiceInstanceIdDetectorSync.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/ServiceInstanceIdDetectorSync.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,8EAAsF;AACtF,gDAA6C;AAG7C,mCAAoC;AAEpC;;GAEG;AACH,MAAM,6BAA6B;IACjC,MAAM,CAAC,OAAiC;QACtC,MAAM,UAAU,GAAuB;YACrC,CAAC,sDAA+B,CAAC,EAAE,IAAA,mBAAU,GAAE;SAChD,CAAC;QAEF,OAAO,IAAI,mBAAQ,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;CACF;AAED;;GAEG;AACU,QAAA,6BAA6B,GACxC,IAAI,6BAA6B,EAAE,CAAC","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 { SEMRESATTRS_SERVICE_INSTANCE_ID } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../../types';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { randomUUID } from 'crypto';\n\n/**\n * ServiceInstanceIdDetectorSync detects the resources related to the service instance ID.\n */\nclass ServiceInstanceIdDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): Resource {\n const attributes: ResourceAttributes = {\n [SEMRESATTRS_SERVICE_INSTANCE_ID]: randomUUID(),\n };\n\n return new Resource(attributes);\n }\n}\n\n/**\n * @experimental\n */\nexport const serviceInstanceIdDetectorSync =\n new ServiceInstanceIdDetectorSync();\n"]}
export declare const normalizeArch: (nodeArchString: string) => string;
export declare const normalizeType: (nodePlatform: string) => string;
//# sourceMappingURL=utils.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalizeType = exports.normalizeArch = void 0;
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const normalizeArch = (nodeArchString) => {
// Maps from https://nodejs.org/api/os.html#osarch to arch values in spec:
// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/host.md
switch (nodeArchString) {
case 'arm':
return 'arm32';
case 'ppc':
return 'ppc32';
case 'x64':
return 'amd64';
default:
return nodeArchString;
}
};
exports.normalizeArch = normalizeArch;
const normalizeType = (nodePlatform) => {
// Maps from https://nodejs.org/api/os.html#osplatform to arch values in spec:
// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/os.md
switch (nodePlatform) {
case 'sunos':
return 'solaris';
case 'win32':
return 'windows';
default:
return nodePlatform;
}
};
exports.normalizeType = normalizeType;
//# sourceMappingURL=utils.js.map
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/utils.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACI,MAAM,aAAa,GAAG,CAAC,cAAsB,EAAU,EAAE;IAC9D,0EAA0E;IAC1E,8HAA8H;IAC9H,QAAQ,cAAc,EAAE;QACtB,KAAK,KAAK;YACR,OAAO,OAAO,CAAC;QACjB,KAAK,KAAK;YACR,OAAO,OAAO,CAAC;QACjB,KAAK,KAAK;YACR,OAAO,OAAO,CAAC;QACjB;YACE,OAAO,cAAc,CAAC;KACzB;AACH,CAAC,CAAC;AAbW,QAAA,aAAa,iBAaxB;AAEK,MAAM,aAAa,GAAG,CAAC,YAAoB,EAAU,EAAE;IAC5D,8EAA8E;IAC9E,4HAA4H;IAC5H,QAAQ,YAAY,EAAE;QACpB,KAAK,OAAO;YACV,OAAO,SAAS,CAAC;QACnB,KAAK,OAAO;YACV,OAAO,SAAS,CAAC;QACnB;YACE,OAAO,YAAY,CAAC;KACvB;AACH,CAAC,CAAC;AAXW,QAAA,aAAa,iBAWxB","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 */\nexport const normalizeArch = (nodeArchString: string): string => {\n // Maps from https://nodejs.org/api/os.html#osarch to arch values in spec:\n // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/host.md\n switch (nodeArchString) {\n case 'arm':\n return 'arm32';\n case 'ppc':\n return 'ppc32';\n case 'x64':\n return 'amd64';\n default:\n return nodeArchString;\n }\n};\n\nexport const normalizeType = (nodePlatform: string): string => {\n // Maps from https://nodejs.org/api/os.html#osplatform to arch values in spec:\n // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/os.md\n switch (nodePlatform) {\n case 'sunos':\n return 'solaris';\n case 'win32':\n return 'windows';\n default:\n return nodePlatform;\n }\n};\n"]}
+3
-1

@@ -1,2 +0,4 @@

import { Detector, IResource, ResourceDetectionConfig } from '..';
import { IResource } from '../IResource';
import { ResourceDetectionConfig } from '../config';
import { Detector } from '../types';
/**

@@ -3,0 +5,0 @@ * BrowserDetector will be used to detect the resources related to browser.

@@ -16,3 +16,3 @@ /*

*/
import { browserDetectorSync, } from '..';
import { browserDetectorSync } from './BrowserDetectorSync';
/**

@@ -19,0 +19,0 @@ * BrowserDetector will be used to detect the resources related to browser.

@@ -1,1 +0,1 @@

{"version":3,"file":"BrowserDetector.js","sourceRoot":"","sources":["../../../src/detectors/BrowserDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,mBAAmB,GAIpB,MAAM,IAAI,CAAC;AAEZ;;GAEG;AACH;IAAA;IAIA,CAAC;IAHC,gCAAM,GAAN,UAAO,MAAgC;QACrC,OAAO,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7D,CAAC;IACH,sBAAC;AAAD,CAAC,AAJD,IAIC;AAED,MAAM,CAAC,IAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC","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 {\n browserDetectorSync,\n Detector,\n IResource,\n ResourceDetectionConfig,\n} from '..';\n\n/**\n * BrowserDetector will be used to detect the resources related to browser.\n */\nclass BrowserDetector implements Detector {\n detect(config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(browserDetectorSync.detect(config));\n }\n}\n\nexport const browserDetector = new BrowserDetector();\n"]}
{"version":3,"file":"BrowserDetector.js","sourceRoot":"","sources":["../../../src/detectors/BrowserDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;GAEG;AACH;IAAA;IAIA,CAAC;IAHC,gCAAM,GAAN,UAAO,MAAgC;QACrC,OAAO,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7D,CAAC;IACH,sBAAC;AAAD,CAAC,AAJD,IAIC;AAED,MAAM,CAAC,IAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC","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 { IResource } from '../IResource';\nimport { ResourceDetectionConfig } from '../config';\nimport { Detector } from '../types';\nimport { browserDetectorSync } from './BrowserDetectorSync';\n\n/**\n * BrowserDetector will be used to detect the resources related to browser.\n */\nclass BrowserDetector implements Detector {\n detect(config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(browserDetectorSync.detect(config));\n }\n}\n\nexport const browserDetector = new BrowserDetector();\n"]}

@@ -1,2 +0,4 @@

import { DetectorSync, IResource, ResourceDetectionConfig } from '..';
import { DetectorSync } from '../types';
import { ResourceDetectionConfig } from '../config';
import { IResource } from '../IResource';
/**

@@ -3,0 +5,0 @@ * BrowserDetectorSync will be used to detect the resources related to browser.

@@ -28,4 +28,4 @@ /*

import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { Resource } from '..';
import { diag } from '@opentelemetry/api';
import { Resource } from '../Resource';
/**

@@ -32,0 +32,0 @@ * BrowserDetectorSync will be used to detect the resources related to browser.

@@ -1,1 +0,1 @@

{"version":3,"file":"BrowserDetectorSync.js","sourceRoot":"","sources":["../../../src/detectors/BrowserDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAA2B,QAAQ,EAA2B,MAAM,IAAI,CAAC;AAEhF,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C;;GAEG;AACH;IAAA;IA0CA,CAAC;IAzCC,oCAAM,GAAN,UAAO,MAAgC;;;QACrC,IAAM,SAAS,GACb,OAAO,SAAS,KAAK,WAAW;YAChC,CAAA,MAAA,MAAA,MAAM,CAAC,OAAO,0CAAE,QAAQ,0CAAE,IAAI,MAAK,SAAS,IAAI,+BAA+B;YAC/E,6DAA6D;YAC7D,kCAAkC;YAClC,CAAA,MAAA,MAAM,CAAC,GAAG,0CAAE,OAAO,MAAK,SAAS,CAAC,CAAC,mCAAmC;QACxE,IAAI,CAAC,SAAS,EAAE;YACd,OAAO,QAAQ,CAAC,KAAK,EAAE,CAAC;SACzB;QACD,IAAM,eAAe;YACnB,GAAC,0BAA0B,CAAC,oBAAoB,IAAG,SAAS;YAC5D,GAAC,0BAA0B,CAAC,2BAA2B,IAAG,aAAa;YACvE,GAAC,0BAA0B,CAAC,uBAAuB,IAAG,SAAS,CAAC,SAAS;eAC1E,CAAC;QACF,OAAO,IAAI,CAAC,sBAAsB,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAC9D,CAAC;IACD;;;;;;OAMG;IACK,oDAAsB,GAA9B,UACE,eAAmC,EACnC,OAAiC;QAEjC,IACE,eAAe,CAAC,0BAA0B,CAAC,uBAAuB,CAAC,KAAK,EAAE,EAC1E;YACA,IAAI,CAAC,KAAK,CACR,qEAAqE,CACtE,CAAC;YACF,OAAO,QAAQ,CAAC,KAAK,EAAE,CAAC;SACzB;aAAM;YACL,OAAO,IAAI,QAAQ,cACd,eAAe,EAClB,CAAC;SACJ;IACH,CAAC;IACH,0BAAC;AAAD,CAAC,AA1CD,IA0CC;AAED,MAAM,CAAC,IAAM,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAC","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 { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { DetectorSync, IResource, Resource, ResourceDetectionConfig } from '..';\nimport { ResourceAttributes } from '../types';\nimport { diag } from '@opentelemetry/api';\n\n/**\n * BrowserDetectorSync will be used to detect the resources related to browser.\n */\nclass BrowserDetectorSync implements DetectorSync {\n detect(config?: ResourceDetectionConfig): IResource {\n const isBrowser =\n typeof navigator !== 'undefined' &&\n global.process?.versions?.node === undefined && // Node.js v21 adds `navigator`\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore don't have Bun types\n global.Bun?.version === undefined; // Bun (bun.sh) defines `navigator`\n if (!isBrowser) {\n return Resource.empty();\n }\n const browserResource: ResourceAttributes = {\n [SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'browser',\n [SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Web Browser',\n [SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]: navigator.userAgent,\n };\n return this._getResourceAttributes(browserResource, config);\n }\n /**\n * Validates process resource attribute map from process variables\n *\n * @param browserResource The un-sanitized resource attributes from process as key/value pairs.\n * @param config: Config\n * @returns The sanitized resource attributes.\n */\n private _getResourceAttributes(\n browserResource: ResourceAttributes,\n _config?: ResourceDetectionConfig\n ) {\n if (\n browserResource[SemanticResourceAttributes.PROCESS_RUNTIME_VERSION] === ''\n ) {\n diag.debug(\n 'BrowserDetector failed: Unable to find required browser resources. '\n );\n return Resource.empty();\n } else {\n return new Resource({\n ...browserResource,\n });\n }\n }\n}\n\nexport const browserDetectorSync = new BrowserDetectorSync();\n"]}
{"version":3,"file":"BrowserDetectorSync.js","sourceRoot":"","sources":["../../../src/detectors/BrowserDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AAEjF,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAG1C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC;;GAEG;AACH;IAAA;IA0CA,CAAC;IAzCC,oCAAM,GAAN,UAAO,MAAgC;;;QACrC,IAAM,SAAS,GACb,OAAO,SAAS,KAAK,WAAW;YAChC,CAAA,MAAA,MAAA,MAAM,CAAC,OAAO,0CAAE,QAAQ,0CAAE,IAAI,MAAK,SAAS,IAAI,+BAA+B;YAC/E,6DAA6D;YAC7D,kCAAkC;YAClC,CAAA,MAAA,MAAM,CAAC,GAAG,0CAAE,OAAO,MAAK,SAAS,CAAC,CAAC,mCAAmC;QACxE,IAAI,CAAC,SAAS,EAAE;YACd,OAAO,QAAQ,CAAC,KAAK,EAAE,CAAC;SACzB;QACD,IAAM,eAAe;YACnB,GAAC,0BAA0B,CAAC,oBAAoB,IAAG,SAAS;YAC5D,GAAC,0BAA0B,CAAC,2BAA2B,IAAG,aAAa;YACvE,GAAC,0BAA0B,CAAC,uBAAuB,IAAG,SAAS,CAAC,SAAS;eAC1E,CAAC;QACF,OAAO,IAAI,CAAC,sBAAsB,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAC9D,CAAC;IACD;;;;;;OAMG;IACK,oDAAsB,GAA9B,UACE,eAAmC,EACnC,OAAiC;QAEjC,IACE,eAAe,CAAC,0BAA0B,CAAC,uBAAuB,CAAC,KAAK,EAAE,EAC1E;YACA,IAAI,CAAC,KAAK,CACR,qEAAqE,CACtE,CAAC;YACF,OAAO,QAAQ,CAAC,KAAK,EAAE,CAAC;SACzB;aAAM;YACL,OAAO,IAAI,QAAQ,cACd,eAAe,EAClB,CAAC;SACJ;IACH,CAAC;IACH,0BAAC;AAAD,CAAC,AA1CD,IA0CC;AAED,MAAM,CAAC,IAAM,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAC","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 { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { DetectorSync, ResourceAttributes } from '../types';\nimport { diag } from '@opentelemetry/api';\nimport { ResourceDetectionConfig } from '../config';\nimport { IResource } from '../IResource';\nimport { Resource } from '../Resource';\n\n/**\n * BrowserDetectorSync will be used to detect the resources related to browser.\n */\nclass BrowserDetectorSync implements DetectorSync {\n detect(config?: ResourceDetectionConfig): IResource {\n const isBrowser =\n typeof navigator !== 'undefined' &&\n global.process?.versions?.node === undefined && // Node.js v21 adds `navigator`\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore don't have Bun types\n global.Bun?.version === undefined; // Bun (bun.sh) defines `navigator`\n if (!isBrowser) {\n return Resource.empty();\n }\n const browserResource: ResourceAttributes = {\n [SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'browser',\n [SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Web Browser',\n [SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]: navigator.userAgent,\n };\n return this._getResourceAttributes(browserResource, config);\n }\n /**\n * Validates process resource attribute map from process variables\n *\n * @param browserResource The un-sanitized resource attributes from process as key/value pairs.\n * @param config: Config\n * @returns The sanitized resource attributes.\n */\n private _getResourceAttributes(\n browserResource: ResourceAttributes,\n _config?: ResourceDetectionConfig\n ) {\n if (\n browserResource[SemanticResourceAttributes.PROCESS_RUNTIME_VERSION] === ''\n ) {\n diag.debug(\n 'BrowserDetector failed: Unable to find required browser resources. '\n );\n return Resource.empty();\n } else {\n return new Resource({\n ...browserResource,\n });\n }\n }\n}\n\nexport const browserDetectorSync = new BrowserDetectorSync();\n"]}

@@ -1,5 +0,6 @@

export * from './BrowserDetector';
export * from './EnvDetector';
export * from './BrowserDetectorSync';
export * from './EnvDetectorSync';
export { hostDetector, hostDetectorSync, osDetector, osDetectorSync, processDetector, processDetectorSync, serviceInstanceIdDetectorSync, } from './platform';
export { browserDetector } from './BrowserDetector';
export { envDetector } from './EnvDetector';
export { browserDetectorSync } from './BrowserDetectorSync';
export { envDetectorSync } from './EnvDetectorSync';
//# sourceMappingURL=index.d.ts.map

@@ -16,6 +16,7 @@ /*

*/
export * from './BrowserDetector';
export * from './EnvDetector';
export * from './BrowserDetectorSync';
export * from './EnvDetectorSync';
export { hostDetector, hostDetectorSync, osDetector, osDetectorSync, processDetector, processDetectorSync, serviceInstanceIdDetectorSync, } from './platform';
export { browserDetector } from './BrowserDetector';
export { envDetector } from './EnvDetector';
export { browserDetectorSync } from './BrowserDetectorSync';
export { envDetectorSync } from './EnvDetectorSync';
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/detectors/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC","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\nexport * from './BrowserDetector';\nexport * from './EnvDetector';\nexport * from './BrowserDetectorSync';\nexport * from './EnvDetectorSync';\n"]}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/detectors/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,6BAA6B,GAC9B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC","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\nexport {\n hostDetector,\n hostDetectorSync,\n osDetector,\n osDetectorSync,\n processDetector,\n processDetectorSync,\n serviceInstanceIdDetectorSync,\n} from './platform';\nexport { browserDetector } from './BrowserDetector';\nexport { envDetector } from './EnvDetector';\nexport { browserDetectorSync } from './BrowserDetectorSync';\nexport { envDetectorSync } from './EnvDetectorSync';\n"]}

@@ -1,8 +0,8 @@

export * from './Resource';
export * from './IResource';
export * from './platform';
export * from './types';
export * from './config';
export * from './detectors';
export * from './detect-resources';
export { Resource } from './Resource';
export { IResource } from './IResource';
export { defaultServiceName } from './platform';
export { DetectorSync, ResourceAttributes, Detector } from './types';
export { ResourceDetectionConfig } from './config';
export { browserDetector, browserDetectorSync, envDetector, envDetectorSync, hostDetector, hostDetectorSync, osDetector, osDetectorSync, processDetector, processDetectorSync, serviceInstanceIdDetectorSync, } from './detectors';
export { detectResourcesSync, detectResources } from './detect-resources';
//# sourceMappingURL=index.d.ts.map

@@ -16,9 +16,6 @@ /*

*/
export * from './Resource';
export * from './IResource';
export * from './platform';
export * from './types';
export * from './config';
export * from './detectors';
export * from './detect-resources';
export { Resource } from './Resource';
export { defaultServiceName } from './platform';
export { browserDetector, browserDetectorSync, envDetector, envDetectorSync, hostDetector, hostDetectorSync, osDetector, osDetectorSync, processDetector, processDetectorSync, serviceInstanceIdDetectorSync, } from './detectors';
export { detectResourcesSync, detectResources } from './detect-resources';
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC","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\nexport * from './Resource';\nexport * from './IResource';\nexport * from './platform';\nexport * from './types';\nexport * from './config';\nexport * from './detectors';\nexport * from './detect-resources';\n"]}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,6BAA6B,GAC9B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC","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\nexport { Resource } from './Resource';\nexport { IResource } from './IResource';\nexport { defaultServiceName } from './platform';\nexport { DetectorSync, ResourceAttributes, Detector } from './types';\nexport { ResourceDetectionConfig } from './config';\nexport {\n browserDetector,\n browserDetectorSync,\n envDetector,\n envDetectorSync,\n hostDetector,\n hostDetectorSync,\n osDetector,\n osDetectorSync,\n processDetector,\n processDetectorSync,\n serviceInstanceIdDetectorSync,\n} from './detectors';\nexport { detectResourcesSync, detectResources } from './detect-resources';\n"]}

@@ -1,9 +0,2 @@

export * from './default-service-name';
export * from './HostDetector';
export * from './HostDetectorSync';
export * from './OSDetector';
export * from './OSDetectorSync';
export * from './ProcessDetector';
export * from './ProcessDetectorSync';
export * from './ServiceInstanceIdDetectorSync';
export { defaultServiceName } from './default-service-name';
//# sourceMappingURL=index.d.ts.map

@@ -16,10 +16,3 @@ /*

*/
export * from './default-service-name';
export * from './HostDetector';
export * from './HostDetectorSync';
export * from './OSDetector';
export * from './OSDetectorSync';
export * from './ProcessDetector';
export * from './ProcessDetectorSync';
export * from './ServiceInstanceIdDetectorSync';
export { defaultServiceName } from './default-service-name';
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC","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\nexport * from './default-service-name';\nexport * from './HostDetector';\nexport * from './HostDetectorSync';\nexport * from './OSDetector';\nexport * from './OSDetectorSync';\nexport * from './ProcessDetector';\nexport * from './ProcessDetectorSync';\nexport * from './ServiceInstanceIdDetectorSync';\n"]}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC","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 */\nexport { defaultServiceName } from './default-service-name';\n"]}

@@ -1,2 +0,2 @@

export * from './node';
export { defaultServiceName } from './node';
//# sourceMappingURL=index.d.ts.map

@@ -16,3 +16,3 @@ /*

*/
export * from './node';
export { defaultServiceName } from './node';
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platform/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,QAAQ,CAAC","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\nexport * from './node';\n"]}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platform/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC","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\nexport { defaultServiceName } from './node';\n"]}

@@ -1,9 +0,2 @@

export * from './default-service-name';
export * from './HostDetector';
export * from './HostDetectorSync';
export * from './OSDetector';
export * from './OSDetectorSync';
export * from './ProcessDetector';
export * from './ProcessDetectorSync';
export * from './ServiceInstanceIdDetectorSync';
export { defaultServiceName } from './default-service-name';
//# sourceMappingURL=index.d.ts.map

@@ -16,10 +16,3 @@ /*

*/
export * from './default-service-name';
export * from './HostDetector';
export * from './HostDetectorSync';
export * from './OSDetector';
export * from './OSDetectorSync';
export * from './ProcessDetector';
export * from './ProcessDetectorSync';
export * from './ServiceInstanceIdDetectorSync';
export { defaultServiceName } from './default-service-name';
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC","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\nexport * from './default-service-name';\nexport * from './HostDetector';\nexport * from './HostDetectorSync';\nexport * from './OSDetector';\nexport * from './OSDetectorSync';\nexport * from './ProcessDetector';\nexport * from './ProcessDetectorSync';\nexport * from './ServiceInstanceIdDetectorSync';\n"]}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC","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 */\nexport { defaultServiceName } from './default-service-name';\n"]}

@@ -1,2 +0,2 @@

export declare const VERSION = "1.24.0";
export declare const VERSION = "1.24.1";
//# sourceMappingURL=version.d.ts.map

@@ -17,3 +17,3 @@ /*

// this is autogenerated file, see scripts/version-update.js
export var VERSION = '1.24.0';
export var VERSION = '1.24.1';
//# sourceMappingURL=version.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC","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\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '1.24.0';\n"]}
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC","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\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '1.24.1';\n"]}

@@ -1,2 +0,4 @@

import { Detector, IResource, ResourceDetectionConfig } from '..';
import { IResource } from '../IResource';
import { ResourceDetectionConfig } from '../config';
import { Detector } from '../types';
/**

@@ -3,0 +5,0 @@ * BrowserDetector will be used to detect the resources related to browser.

@@ -16,3 +16,3 @@ /*

*/
import { browserDetectorSync, } from '..';
import { browserDetectorSync } from './BrowserDetectorSync';
/**

@@ -19,0 +19,0 @@ * BrowserDetector will be used to detect the resources related to browser.

@@ -1,1 +0,1 @@

{"version":3,"file":"BrowserDetector.js","sourceRoot":"","sources":["../../../src/detectors/BrowserDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,mBAAmB,GAIpB,MAAM,IAAI,CAAC;AAEZ;;GAEG;AACH,MAAM,eAAe;IACnB,MAAM,CAAC,MAAgC;QACrC,OAAO,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7D,CAAC;CACF;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC","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 {\n browserDetectorSync,\n Detector,\n IResource,\n ResourceDetectionConfig,\n} from '..';\n\n/**\n * BrowserDetector will be used to detect the resources related to browser.\n */\nclass BrowserDetector implements Detector {\n detect(config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(browserDetectorSync.detect(config));\n }\n}\n\nexport const browserDetector = new BrowserDetector();\n"]}
{"version":3,"file":"BrowserDetector.js","sourceRoot":"","sources":["../../../src/detectors/BrowserDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;GAEG;AACH,MAAM,eAAe;IACnB,MAAM,CAAC,MAAgC;QACrC,OAAO,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7D,CAAC;CACF;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC","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 { IResource } from '../IResource';\nimport { ResourceDetectionConfig } from '../config';\nimport { Detector } from '../types';\nimport { browserDetectorSync } from './BrowserDetectorSync';\n\n/**\n * BrowserDetector will be used to detect the resources related to browser.\n */\nclass BrowserDetector implements Detector {\n detect(config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(browserDetectorSync.detect(config));\n }\n}\n\nexport const browserDetector = new BrowserDetector();\n"]}

@@ -1,2 +0,4 @@

import { DetectorSync, IResource, ResourceDetectionConfig } from '..';
import { DetectorSync } from '../types';
import { ResourceDetectionConfig } from '../config';
import { IResource } from '../IResource';
/**

@@ -3,0 +5,0 @@ * BrowserDetectorSync will be used to detect the resources related to browser.

@@ -17,4 +17,4 @@ /*

import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { Resource } from '..';
import { diag } from '@opentelemetry/api';
import { Resource } from '../Resource';
/**

@@ -21,0 +21,0 @@ * BrowserDetectorSync will be used to detect the resources related to browser.

@@ -1,1 +0,1 @@

{"version":3,"file":"BrowserDetectorSync.js","sourceRoot":"","sources":["../../../src/detectors/BrowserDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAA2B,QAAQ,EAA2B,MAAM,IAAI,CAAC;AAEhF,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C;;GAEG;AACH,MAAM,mBAAmB;IACvB,MAAM,CAAC,MAAgC;;QACrC,MAAM,SAAS,GACb,OAAO,SAAS,KAAK,WAAW;YAChC,CAAA,MAAA,MAAA,MAAM,CAAC,OAAO,0CAAE,QAAQ,0CAAE,IAAI,MAAK,SAAS,IAAI,+BAA+B;YAC/E,6DAA6D;YAC7D,kCAAkC;YAClC,CAAA,MAAA,MAAM,CAAC,GAAG,0CAAE,OAAO,MAAK,SAAS,CAAC,CAAC,mCAAmC;QACxE,IAAI,CAAC,SAAS,EAAE;YACd,OAAO,QAAQ,CAAC,KAAK,EAAE,CAAC;SACzB;QACD,MAAM,eAAe,GAAuB;YAC1C,CAAC,0BAA0B,CAAC,oBAAoB,CAAC,EAAE,SAAS;YAC5D,CAAC,0BAA0B,CAAC,2BAA2B,CAAC,EAAE,aAAa;YACvE,CAAC,0BAA0B,CAAC,uBAAuB,CAAC,EAAE,SAAS,CAAC,SAAS;SAC1E,CAAC;QACF,OAAO,IAAI,CAAC,sBAAsB,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAC9D,CAAC;IACD;;;;;;OAMG;IACK,sBAAsB,CAC5B,eAAmC,EACnC,OAAiC;QAEjC,IACE,eAAe,CAAC,0BAA0B,CAAC,uBAAuB,CAAC,KAAK,EAAE,EAC1E;YACA,IAAI,CAAC,KAAK,CACR,qEAAqE,CACtE,CAAC;YACF,OAAO,QAAQ,CAAC,KAAK,EAAE,CAAC;SACzB;aAAM;YACL,OAAO,IAAI,QAAQ,mBACd,eAAe,EAClB,CAAC;SACJ;IACH,CAAC;CACF;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAC","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 { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { DetectorSync, IResource, Resource, ResourceDetectionConfig } from '..';\nimport { ResourceAttributes } from '../types';\nimport { diag } from '@opentelemetry/api';\n\n/**\n * BrowserDetectorSync will be used to detect the resources related to browser.\n */\nclass BrowserDetectorSync implements DetectorSync {\n detect(config?: ResourceDetectionConfig): IResource {\n const isBrowser =\n typeof navigator !== 'undefined' &&\n global.process?.versions?.node === undefined && // Node.js v21 adds `navigator`\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore don't have Bun types\n global.Bun?.version === undefined; // Bun (bun.sh) defines `navigator`\n if (!isBrowser) {\n return Resource.empty();\n }\n const browserResource: ResourceAttributes = {\n [SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'browser',\n [SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Web Browser',\n [SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]: navigator.userAgent,\n };\n return this._getResourceAttributes(browserResource, config);\n }\n /**\n * Validates process resource attribute map from process variables\n *\n * @param browserResource The un-sanitized resource attributes from process as key/value pairs.\n * @param config: Config\n * @returns The sanitized resource attributes.\n */\n private _getResourceAttributes(\n browserResource: ResourceAttributes,\n _config?: ResourceDetectionConfig\n ) {\n if (\n browserResource[SemanticResourceAttributes.PROCESS_RUNTIME_VERSION] === ''\n ) {\n diag.debug(\n 'BrowserDetector failed: Unable to find required browser resources. '\n );\n return Resource.empty();\n } else {\n return new Resource({\n ...browserResource,\n });\n }\n }\n}\n\nexport const browserDetectorSync = new BrowserDetectorSync();\n"]}
{"version":3,"file":"BrowserDetectorSync.js","sourceRoot":"","sources":["../../../src/detectors/BrowserDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AAEjF,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAG1C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC;;GAEG;AACH,MAAM,mBAAmB;IACvB,MAAM,CAAC,MAAgC;;QACrC,MAAM,SAAS,GACb,OAAO,SAAS,KAAK,WAAW;YAChC,CAAA,MAAA,MAAA,MAAM,CAAC,OAAO,0CAAE,QAAQ,0CAAE,IAAI,MAAK,SAAS,IAAI,+BAA+B;YAC/E,6DAA6D;YAC7D,kCAAkC;YAClC,CAAA,MAAA,MAAM,CAAC,GAAG,0CAAE,OAAO,MAAK,SAAS,CAAC,CAAC,mCAAmC;QACxE,IAAI,CAAC,SAAS,EAAE;YACd,OAAO,QAAQ,CAAC,KAAK,EAAE,CAAC;SACzB;QACD,MAAM,eAAe,GAAuB;YAC1C,CAAC,0BAA0B,CAAC,oBAAoB,CAAC,EAAE,SAAS;YAC5D,CAAC,0BAA0B,CAAC,2BAA2B,CAAC,EAAE,aAAa;YACvE,CAAC,0BAA0B,CAAC,uBAAuB,CAAC,EAAE,SAAS,CAAC,SAAS;SAC1E,CAAC;QACF,OAAO,IAAI,CAAC,sBAAsB,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAC9D,CAAC;IACD;;;;;;OAMG;IACK,sBAAsB,CAC5B,eAAmC,EACnC,OAAiC;QAEjC,IACE,eAAe,CAAC,0BAA0B,CAAC,uBAAuB,CAAC,KAAK,EAAE,EAC1E;YACA,IAAI,CAAC,KAAK,CACR,qEAAqE,CACtE,CAAC;YACF,OAAO,QAAQ,CAAC,KAAK,EAAE,CAAC;SACzB;aAAM;YACL,OAAO,IAAI,QAAQ,mBACd,eAAe,EAClB,CAAC;SACJ;IACH,CAAC;CACF;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAC","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 { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { DetectorSync, ResourceAttributes } from '../types';\nimport { diag } from '@opentelemetry/api';\nimport { ResourceDetectionConfig } from '../config';\nimport { IResource } from '../IResource';\nimport { Resource } from '../Resource';\n\n/**\n * BrowserDetectorSync will be used to detect the resources related to browser.\n */\nclass BrowserDetectorSync implements DetectorSync {\n detect(config?: ResourceDetectionConfig): IResource {\n const isBrowser =\n typeof navigator !== 'undefined' &&\n global.process?.versions?.node === undefined && // Node.js v21 adds `navigator`\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore don't have Bun types\n global.Bun?.version === undefined; // Bun (bun.sh) defines `navigator`\n if (!isBrowser) {\n return Resource.empty();\n }\n const browserResource: ResourceAttributes = {\n [SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'browser',\n [SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Web Browser',\n [SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]: navigator.userAgent,\n };\n return this._getResourceAttributes(browserResource, config);\n }\n /**\n * Validates process resource attribute map from process variables\n *\n * @param browserResource The un-sanitized resource attributes from process as key/value pairs.\n * @param config: Config\n * @returns The sanitized resource attributes.\n */\n private _getResourceAttributes(\n browserResource: ResourceAttributes,\n _config?: ResourceDetectionConfig\n ) {\n if (\n browserResource[SemanticResourceAttributes.PROCESS_RUNTIME_VERSION] === ''\n ) {\n diag.debug(\n 'BrowserDetector failed: Unable to find required browser resources. '\n );\n return Resource.empty();\n } else {\n return new Resource({\n ...browserResource,\n });\n }\n }\n}\n\nexport const browserDetectorSync = new BrowserDetectorSync();\n"]}

@@ -1,5 +0,6 @@

export * from './BrowserDetector';
export * from './EnvDetector';
export * from './BrowserDetectorSync';
export * from './EnvDetectorSync';
export { hostDetector, hostDetectorSync, osDetector, osDetectorSync, processDetector, processDetectorSync, serviceInstanceIdDetectorSync, } from './platform';
export { browserDetector } from './BrowserDetector';
export { envDetector } from './EnvDetector';
export { browserDetectorSync } from './BrowserDetectorSync';
export { envDetectorSync } from './EnvDetectorSync';
//# sourceMappingURL=index.d.ts.map

@@ -16,6 +16,7 @@ /*

*/
export * from './BrowserDetector';
export * from './EnvDetector';
export * from './BrowserDetectorSync';
export * from './EnvDetectorSync';
export { hostDetector, hostDetectorSync, osDetector, osDetectorSync, processDetector, processDetectorSync, serviceInstanceIdDetectorSync, } from './platform';
export { browserDetector } from './BrowserDetector';
export { envDetector } from './EnvDetector';
export { browserDetectorSync } from './BrowserDetectorSync';
export { envDetectorSync } from './EnvDetectorSync';
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/detectors/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC","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\nexport * from './BrowserDetector';\nexport * from './EnvDetector';\nexport * from './BrowserDetectorSync';\nexport * from './EnvDetectorSync';\n"]}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/detectors/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,6BAA6B,GAC9B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC","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\nexport {\n hostDetector,\n hostDetectorSync,\n osDetector,\n osDetectorSync,\n processDetector,\n processDetectorSync,\n serviceInstanceIdDetectorSync,\n} from './platform';\nexport { browserDetector } from './BrowserDetector';\nexport { envDetector } from './EnvDetector';\nexport { browserDetectorSync } from './BrowserDetectorSync';\nexport { envDetectorSync } from './EnvDetectorSync';\n"]}

@@ -1,8 +0,8 @@

export * from './Resource';
export * from './IResource';
export * from './platform';
export * from './types';
export * from './config';
export * from './detectors';
export * from './detect-resources';
export { Resource } from './Resource';
export { IResource } from './IResource';
export { defaultServiceName } from './platform';
export { DetectorSync, ResourceAttributes, Detector } from './types';
export { ResourceDetectionConfig } from './config';
export { browserDetector, browserDetectorSync, envDetector, envDetectorSync, hostDetector, hostDetectorSync, osDetector, osDetectorSync, processDetector, processDetectorSync, serviceInstanceIdDetectorSync, } from './detectors';
export { detectResourcesSync, detectResources } from './detect-resources';
//# sourceMappingURL=index.d.ts.map

@@ -16,9 +16,6 @@ /*

*/
export * from './Resource';
export * from './IResource';
export * from './platform';
export * from './types';
export * from './config';
export * from './detectors';
export * from './detect-resources';
export { Resource } from './Resource';
export { defaultServiceName } from './platform';
export { browserDetector, browserDetectorSync, envDetector, envDetectorSync, hostDetector, hostDetectorSync, osDetector, osDetectorSync, processDetector, processDetectorSync, serviceInstanceIdDetectorSync, } from './detectors';
export { detectResourcesSync, detectResources } from './detect-resources';
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC","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\nexport * from './Resource';\nexport * from './IResource';\nexport * from './platform';\nexport * from './types';\nexport * from './config';\nexport * from './detectors';\nexport * from './detect-resources';\n"]}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,6BAA6B,GAC9B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC","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\nexport { Resource } from './Resource';\nexport { IResource } from './IResource';\nexport { defaultServiceName } from './platform';\nexport { DetectorSync, ResourceAttributes, Detector } from './types';\nexport { ResourceDetectionConfig } from './config';\nexport {\n browserDetector,\n browserDetectorSync,\n envDetector,\n envDetectorSync,\n hostDetector,\n hostDetectorSync,\n osDetector,\n osDetectorSync,\n processDetector,\n processDetectorSync,\n serviceInstanceIdDetectorSync,\n} from './detectors';\nexport { detectResourcesSync, detectResources } from './detect-resources';\n"]}

@@ -1,9 +0,2 @@

export * from './default-service-name';
export * from './HostDetector';
export * from './HostDetectorSync';
export * from './OSDetector';
export * from './OSDetectorSync';
export * from './ProcessDetector';
export * from './ProcessDetectorSync';
export * from './ServiceInstanceIdDetectorSync';
export { defaultServiceName } from './default-service-name';
//# sourceMappingURL=index.d.ts.map

@@ -16,10 +16,3 @@ /*

*/
export * from './default-service-name';
export * from './HostDetector';
export * from './HostDetectorSync';
export * from './OSDetector';
export * from './OSDetectorSync';
export * from './ProcessDetector';
export * from './ProcessDetectorSync';
export * from './ServiceInstanceIdDetectorSync';
export { defaultServiceName } from './default-service-name';
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC","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\nexport * from './default-service-name';\nexport * from './HostDetector';\nexport * from './HostDetectorSync';\nexport * from './OSDetector';\nexport * from './OSDetectorSync';\nexport * from './ProcessDetector';\nexport * from './ProcessDetectorSync';\nexport * from './ServiceInstanceIdDetectorSync';\n"]}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC","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 */\nexport { defaultServiceName } from './default-service-name';\n"]}

@@ -1,2 +0,2 @@

export * from './node';
export { defaultServiceName } from './node';
//# sourceMappingURL=index.d.ts.map

@@ -16,3 +16,3 @@ /*

*/
export * from './node';
export { defaultServiceName } from './node';
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platform/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,QAAQ,CAAC","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\nexport * from './node';\n"]}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platform/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC","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\nexport { defaultServiceName } from './node';\n"]}

@@ -1,9 +0,2 @@

export * from './default-service-name';
export * from './HostDetector';
export * from './HostDetectorSync';
export * from './OSDetector';
export * from './OSDetectorSync';
export * from './ProcessDetector';
export * from './ProcessDetectorSync';
export * from './ServiceInstanceIdDetectorSync';
export { defaultServiceName } from './default-service-name';
//# sourceMappingURL=index.d.ts.map

@@ -16,10 +16,3 @@ /*

*/
export * from './default-service-name';
export * from './HostDetector';
export * from './HostDetectorSync';
export * from './OSDetector';
export * from './OSDetectorSync';
export * from './ProcessDetector';
export * from './ProcessDetectorSync';
export * from './ServiceInstanceIdDetectorSync';
export { defaultServiceName } from './default-service-name';
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC","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\nexport * from './default-service-name';\nexport * from './HostDetector';\nexport * from './HostDetectorSync';\nexport * from './OSDetector';\nexport * from './OSDetectorSync';\nexport * from './ProcessDetector';\nexport * from './ProcessDetectorSync';\nexport * from './ServiceInstanceIdDetectorSync';\n"]}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC","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 */\nexport { defaultServiceName } from './default-service-name';\n"]}

@@ -1,2 +0,2 @@

export declare const VERSION = "1.24.0";
export declare const VERSION = "1.24.1";
//# sourceMappingURL=version.d.ts.map

@@ -17,3 +17,3 @@ /*

// this is autogenerated file, see scripts/version-update.js
export const VERSION = '1.24.0';
export const VERSION = '1.24.1';
//# sourceMappingURL=version.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","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\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '1.24.0';\n"]}
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","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\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '1.24.1';\n"]}

@@ -1,2 +0,4 @@

import { Detector, IResource, ResourceDetectionConfig } from '..';
import { IResource } from '../IResource';
import { ResourceDetectionConfig } from '../config';
import { Detector } from '../types';
/**

@@ -3,0 +5,0 @@ * BrowserDetector will be used to detect the resources related to browser.

@@ -19,3 +19,3 @@ "use strict";

exports.browserDetector = void 0;
const __1 = require("..");
const BrowserDetectorSync_1 = require("./BrowserDetectorSync");
/**

@@ -26,3 +26,3 @@ * BrowserDetector will be used to detect the resources related to browser.

detect(config) {
return Promise.resolve(__1.browserDetectorSync.detect(config));
return Promise.resolve(BrowserDetectorSync_1.browserDetectorSync.detect(config));
}

@@ -29,0 +29,0 @@ }

@@ -1,1 +0,1 @@

{"version":3,"file":"BrowserDetector.js","sourceRoot":"","sources":["../../../src/detectors/BrowserDetector.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,0BAKY;AAEZ;;GAEG;AACH,MAAM,eAAe;IACnB,MAAM,CAAC,MAAgC;QACrC,OAAO,OAAO,CAAC,OAAO,CAAC,uBAAmB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7D,CAAC;CACF;AAEY,QAAA,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC","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 {\n browserDetectorSync,\n Detector,\n IResource,\n ResourceDetectionConfig,\n} from '..';\n\n/**\n * BrowserDetector will be used to detect the resources related to browser.\n */\nclass BrowserDetector implements Detector {\n detect(config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(browserDetectorSync.detect(config));\n }\n}\n\nexport const browserDetector = new BrowserDetector();\n"]}
{"version":3,"file":"BrowserDetector.js","sourceRoot":"","sources":["../../../src/detectors/BrowserDetector.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAKH,+DAA4D;AAE5D;;GAEG;AACH,MAAM,eAAe;IACnB,MAAM,CAAC,MAAgC;QACrC,OAAO,OAAO,CAAC,OAAO,CAAC,yCAAmB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7D,CAAC;CACF;AAEY,QAAA,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC","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 { IResource } from '../IResource';\nimport { ResourceDetectionConfig } from '../config';\nimport { Detector } from '../types';\nimport { browserDetectorSync } from './BrowserDetectorSync';\n\n/**\n * BrowserDetector will be used to detect the resources related to browser.\n */\nclass BrowserDetector implements Detector {\n detect(config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(browserDetectorSync.detect(config));\n }\n}\n\nexport const browserDetector = new BrowserDetector();\n"]}

@@ -1,2 +0,4 @@

import { DetectorSync, IResource, ResourceDetectionConfig } from '..';
import { DetectorSync } from '../types';
import { ResourceDetectionConfig } from '../config';
import { IResource } from '../IResource';
/**

@@ -3,0 +5,0 @@ * BrowserDetectorSync will be used to detect the resources related to browser.

@@ -20,4 +20,4 @@ "use strict";

const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
const __1 = require("..");
const api_1 = require("@opentelemetry/api");
const Resource_1 = require("../Resource");
/**

@@ -35,3 +35,3 @@ * BrowserDetectorSync will be used to detect the resources related to browser.

if (!isBrowser) {
return __1.Resource.empty();
return Resource_1.Resource.empty();
}

@@ -55,6 +55,6 @@ const browserResource = {

api_1.diag.debug('BrowserDetector failed: Unable to find required browser resources. ');
return __1.Resource.empty();
return Resource_1.Resource.empty();
}
else {
return new __1.Resource(Object.assign({}, browserResource));
return new Resource_1.Resource(Object.assign({}, browserResource));
}

@@ -61,0 +61,0 @@ }

@@ -1,1 +0,1 @@

{"version":3,"file":"BrowserDetectorSync.js","sourceRoot":"","sources":["../../../src/detectors/BrowserDetectorSync.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,8EAAiF;AACjF,0BAAgF;AAEhF,4CAA0C;AAE1C;;GAEG;AACH,MAAM,mBAAmB;IACvB,MAAM,CAAC,MAAgC;;QACrC,MAAM,SAAS,GACb,OAAO,SAAS,KAAK,WAAW;YAChC,CAAA,MAAA,MAAA,MAAM,CAAC,OAAO,0CAAE,QAAQ,0CAAE,IAAI,MAAK,SAAS,IAAI,+BAA+B;YAC/E,6DAA6D;YAC7D,kCAAkC;YAClC,CAAA,MAAA,MAAM,CAAC,GAAG,0CAAE,OAAO,MAAK,SAAS,CAAC,CAAC,mCAAmC;QACxE,IAAI,CAAC,SAAS,EAAE;YACd,OAAO,YAAQ,CAAC,KAAK,EAAE,CAAC;SACzB;QACD,MAAM,eAAe,GAAuB;YAC1C,CAAC,iDAA0B,CAAC,oBAAoB,CAAC,EAAE,SAAS;YAC5D,CAAC,iDAA0B,CAAC,2BAA2B,CAAC,EAAE,aAAa;YACvE,CAAC,iDAA0B,CAAC,uBAAuB,CAAC,EAAE,SAAS,CAAC,SAAS;SAC1E,CAAC;QACF,OAAO,IAAI,CAAC,sBAAsB,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAC9D,CAAC;IACD;;;;;;OAMG;IACK,sBAAsB,CAC5B,eAAmC,EACnC,OAAiC;QAEjC,IACE,eAAe,CAAC,iDAA0B,CAAC,uBAAuB,CAAC,KAAK,EAAE,EAC1E;YACA,UAAI,CAAC,KAAK,CACR,qEAAqE,CACtE,CAAC;YACF,OAAO,YAAQ,CAAC,KAAK,EAAE,CAAC;SACzB;aAAM;YACL,OAAO,IAAI,YAAQ,mBACd,eAAe,EAClB,CAAC;SACJ;IACH,CAAC;CACF;AAEY,QAAA,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAC","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 { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { DetectorSync, IResource, Resource, ResourceDetectionConfig } from '..';\nimport { ResourceAttributes } from '../types';\nimport { diag } from '@opentelemetry/api';\n\n/**\n * BrowserDetectorSync will be used to detect the resources related to browser.\n */\nclass BrowserDetectorSync implements DetectorSync {\n detect(config?: ResourceDetectionConfig): IResource {\n const isBrowser =\n typeof navigator !== 'undefined' &&\n global.process?.versions?.node === undefined && // Node.js v21 adds `navigator`\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore don't have Bun types\n global.Bun?.version === undefined; // Bun (bun.sh) defines `navigator`\n if (!isBrowser) {\n return Resource.empty();\n }\n const browserResource: ResourceAttributes = {\n [SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'browser',\n [SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Web Browser',\n [SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]: navigator.userAgent,\n };\n return this._getResourceAttributes(browserResource, config);\n }\n /**\n * Validates process resource attribute map from process variables\n *\n * @param browserResource The un-sanitized resource attributes from process as key/value pairs.\n * @param config: Config\n * @returns The sanitized resource attributes.\n */\n private _getResourceAttributes(\n browserResource: ResourceAttributes,\n _config?: ResourceDetectionConfig\n ) {\n if (\n browserResource[SemanticResourceAttributes.PROCESS_RUNTIME_VERSION] === ''\n ) {\n diag.debug(\n 'BrowserDetector failed: Unable to find required browser resources. '\n );\n return Resource.empty();\n } else {\n return new Resource({\n ...browserResource,\n });\n }\n }\n}\n\nexport const browserDetectorSync = new BrowserDetectorSync();\n"]}
{"version":3,"file":"BrowserDetectorSync.js","sourceRoot":"","sources":["../../../src/detectors/BrowserDetectorSync.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,8EAAiF;AAEjF,4CAA0C;AAG1C,0CAAuC;AAEvC;;GAEG;AACH,MAAM,mBAAmB;IACvB,MAAM,CAAC,MAAgC;;QACrC,MAAM,SAAS,GACb,OAAO,SAAS,KAAK,WAAW;YAChC,CAAA,MAAA,MAAA,MAAM,CAAC,OAAO,0CAAE,QAAQ,0CAAE,IAAI,MAAK,SAAS,IAAI,+BAA+B;YAC/E,6DAA6D;YAC7D,kCAAkC;YAClC,CAAA,MAAA,MAAM,CAAC,GAAG,0CAAE,OAAO,MAAK,SAAS,CAAC,CAAC,mCAAmC;QACxE,IAAI,CAAC,SAAS,EAAE;YACd,OAAO,mBAAQ,CAAC,KAAK,EAAE,CAAC;SACzB;QACD,MAAM,eAAe,GAAuB;YAC1C,CAAC,iDAA0B,CAAC,oBAAoB,CAAC,EAAE,SAAS;YAC5D,CAAC,iDAA0B,CAAC,2BAA2B,CAAC,EAAE,aAAa;YACvE,CAAC,iDAA0B,CAAC,uBAAuB,CAAC,EAAE,SAAS,CAAC,SAAS;SAC1E,CAAC;QACF,OAAO,IAAI,CAAC,sBAAsB,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAC9D,CAAC;IACD;;;;;;OAMG;IACK,sBAAsB,CAC5B,eAAmC,EACnC,OAAiC;QAEjC,IACE,eAAe,CAAC,iDAA0B,CAAC,uBAAuB,CAAC,KAAK,EAAE,EAC1E;YACA,UAAI,CAAC,KAAK,CACR,qEAAqE,CACtE,CAAC;YACF,OAAO,mBAAQ,CAAC,KAAK,EAAE,CAAC;SACzB;aAAM;YACL,OAAO,IAAI,mBAAQ,mBACd,eAAe,EAClB,CAAC;SACJ;IACH,CAAC;CACF;AAEY,QAAA,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAC","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 { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { DetectorSync, ResourceAttributes } from '../types';\nimport { diag } from '@opentelemetry/api';\nimport { ResourceDetectionConfig } from '../config';\nimport { IResource } from '../IResource';\nimport { Resource } from '../Resource';\n\n/**\n * BrowserDetectorSync will be used to detect the resources related to browser.\n */\nclass BrowserDetectorSync implements DetectorSync {\n detect(config?: ResourceDetectionConfig): IResource {\n const isBrowser =\n typeof navigator !== 'undefined' &&\n global.process?.versions?.node === undefined && // Node.js v21 adds `navigator`\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore don't have Bun types\n global.Bun?.version === undefined; // Bun (bun.sh) defines `navigator`\n if (!isBrowser) {\n return Resource.empty();\n }\n const browserResource: ResourceAttributes = {\n [SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'browser',\n [SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Web Browser',\n [SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]: navigator.userAgent,\n };\n return this._getResourceAttributes(browserResource, config);\n }\n /**\n * Validates process resource attribute map from process variables\n *\n * @param browserResource The un-sanitized resource attributes from process as key/value pairs.\n * @param config: Config\n * @returns The sanitized resource attributes.\n */\n private _getResourceAttributes(\n browserResource: ResourceAttributes,\n _config?: ResourceDetectionConfig\n ) {\n if (\n browserResource[SemanticResourceAttributes.PROCESS_RUNTIME_VERSION] === ''\n ) {\n diag.debug(\n 'BrowserDetector failed: Unable to find required browser resources. '\n );\n return Resource.empty();\n } else {\n return new Resource({\n ...browserResource,\n });\n }\n }\n}\n\nexport const browserDetectorSync = new BrowserDetectorSync();\n"]}

@@ -1,5 +0,6 @@

export * from './BrowserDetector';
export * from './EnvDetector';
export * from './BrowserDetectorSync';
export * from './EnvDetectorSync';
export { hostDetector, hostDetectorSync, osDetector, osDetectorSync, processDetector, processDetectorSync, serviceInstanceIdDetectorSync, } from './platform';
export { browserDetector } from './BrowserDetector';
export { envDetector } from './EnvDetector';
export { browserDetectorSync } from './BrowserDetectorSync';
export { envDetectorSync } from './EnvDetectorSync';
//# sourceMappingURL=index.d.ts.map

@@ -17,17 +17,20 @@ "use strict";

*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./BrowserDetector"), exports);
__exportStar(require("./EnvDetector"), exports);
__exportStar(require("./BrowserDetectorSync"), exports);
__exportStar(require("./EnvDetectorSync"), exports);
exports.envDetectorSync = exports.browserDetectorSync = exports.envDetector = exports.browserDetector = exports.serviceInstanceIdDetectorSync = exports.processDetectorSync = exports.processDetector = exports.osDetectorSync = exports.osDetector = exports.hostDetectorSync = exports.hostDetector = void 0;
var platform_1 = require("./platform");
Object.defineProperty(exports, "hostDetector", { enumerable: true, get: function () { return platform_1.hostDetector; } });
Object.defineProperty(exports, "hostDetectorSync", { enumerable: true, get: function () { return platform_1.hostDetectorSync; } });
Object.defineProperty(exports, "osDetector", { enumerable: true, get: function () { return platform_1.osDetector; } });
Object.defineProperty(exports, "osDetectorSync", { enumerable: true, get: function () { return platform_1.osDetectorSync; } });
Object.defineProperty(exports, "processDetector", { enumerable: true, get: function () { return platform_1.processDetector; } });
Object.defineProperty(exports, "processDetectorSync", { enumerable: true, get: function () { return platform_1.processDetectorSync; } });
Object.defineProperty(exports, "serviceInstanceIdDetectorSync", { enumerable: true, get: function () { return platform_1.serviceInstanceIdDetectorSync; } });
var BrowserDetector_1 = require("./BrowserDetector");
Object.defineProperty(exports, "browserDetector", { enumerable: true, get: function () { return BrowserDetector_1.browserDetector; } });
var EnvDetector_1 = require("./EnvDetector");
Object.defineProperty(exports, "envDetector", { enumerable: true, get: function () { return EnvDetector_1.envDetector; } });
var BrowserDetectorSync_1 = require("./BrowserDetectorSync");
Object.defineProperty(exports, "browserDetectorSync", { enumerable: true, get: function () { return BrowserDetectorSync_1.browserDetectorSync; } });
var EnvDetectorSync_1 = require("./EnvDetectorSync");
Object.defineProperty(exports, "envDetectorSync", { enumerable: true, get: function () { return EnvDetectorSync_1.envDetectorSync; } });
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/detectors/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,oDAAkC;AAClC,gDAA8B;AAC9B,wDAAsC;AACtC,oDAAkC","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\nexport * from './BrowserDetector';\nexport * from './EnvDetector';\nexport * from './BrowserDetectorSync';\nexport * from './EnvDetectorSync';\n"]}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/detectors/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,uCAQoB;AAPlB,wGAAA,YAAY,OAAA;AACZ,4GAAA,gBAAgB,OAAA;AAChB,sGAAA,UAAU,OAAA;AACV,0GAAA,cAAc,OAAA;AACd,2GAAA,eAAe,OAAA;AACf,+GAAA,mBAAmB,OAAA;AACnB,yHAAA,6BAA6B,OAAA;AAE/B,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,qDAAoD;AAA3C,kHAAA,eAAe,OAAA","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\nexport {\n hostDetector,\n hostDetectorSync,\n osDetector,\n osDetectorSync,\n processDetector,\n processDetectorSync,\n serviceInstanceIdDetectorSync,\n} from './platform';\nexport { browserDetector } from './BrowserDetector';\nexport { envDetector } from './EnvDetector';\nexport { browserDetectorSync } from './BrowserDetectorSync';\nexport { envDetectorSync } from './EnvDetectorSync';\n"]}

@@ -1,8 +0,8 @@

export * from './Resource';
export * from './IResource';
export * from './platform';
export * from './types';
export * from './config';
export * from './detectors';
export * from './detect-resources';
export { Resource } from './Resource';
export { IResource } from './IResource';
export { defaultServiceName } from './platform';
export { DetectorSync, ResourceAttributes, Detector } from './types';
export { ResourceDetectionConfig } from './config';
export { browserDetector, browserDetectorSync, envDetector, envDetectorSync, hostDetector, hostDetectorSync, osDetector, osDetectorSync, processDetector, processDetectorSync, serviceInstanceIdDetectorSync, } from './detectors';
export { detectResourcesSync, detectResources } from './detect-resources';
//# sourceMappingURL=index.d.ts.map

@@ -17,20 +17,23 @@ "use strict";

*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./Resource"), exports);
__exportStar(require("./IResource"), exports);
__exportStar(require("./platform"), exports);
__exportStar(require("./types"), exports);
__exportStar(require("./config"), exports);
__exportStar(require("./detectors"), exports);
__exportStar(require("./detect-resources"), exports);
exports.detectResources = exports.detectResourcesSync = exports.serviceInstanceIdDetectorSync = exports.processDetectorSync = exports.processDetector = exports.osDetectorSync = exports.osDetector = exports.hostDetectorSync = exports.hostDetector = exports.envDetectorSync = exports.envDetector = exports.browserDetectorSync = exports.browserDetector = exports.defaultServiceName = exports.Resource = void 0;
var Resource_1 = require("./Resource");
Object.defineProperty(exports, "Resource", { enumerable: true, get: function () { return Resource_1.Resource; } });
var platform_1 = require("./platform");
Object.defineProperty(exports, "defaultServiceName", { enumerable: true, get: function () { return platform_1.defaultServiceName; } });
var detectors_1 = require("./detectors");
Object.defineProperty(exports, "browserDetector", { enumerable: true, get: function () { return detectors_1.browserDetector; } });
Object.defineProperty(exports, "browserDetectorSync", { enumerable: true, get: function () { return detectors_1.browserDetectorSync; } });
Object.defineProperty(exports, "envDetector", { enumerable: true, get: function () { return detectors_1.envDetector; } });
Object.defineProperty(exports, "envDetectorSync", { enumerable: true, get: function () { return detectors_1.envDetectorSync; } });
Object.defineProperty(exports, "hostDetector", { enumerable: true, get: function () { return detectors_1.hostDetector; } });
Object.defineProperty(exports, "hostDetectorSync", { enumerable: true, get: function () { return detectors_1.hostDetectorSync; } });
Object.defineProperty(exports, "osDetector", { enumerable: true, get: function () { return detectors_1.osDetector; } });
Object.defineProperty(exports, "osDetectorSync", { enumerable: true, get: function () { return detectors_1.osDetectorSync; } });
Object.defineProperty(exports, "processDetector", { enumerable: true, get: function () { return detectors_1.processDetector; } });
Object.defineProperty(exports, "processDetectorSync", { enumerable: true, get: function () { return detectors_1.processDetectorSync; } });
Object.defineProperty(exports, "serviceInstanceIdDetectorSync", { enumerable: true, get: function () { return detectors_1.serviceInstanceIdDetectorSync; } });
var detect_resources_1 = require("./detect-resources");
Object.defineProperty(exports, "detectResourcesSync", { enumerable: true, get: function () { return detect_resources_1.detectResourcesSync; } });
Object.defineProperty(exports, "detectResources", { enumerable: true, get: function () { return detect_resources_1.detectResources; } });
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,6CAA2B;AAC3B,8CAA4B;AAC5B,6CAA2B;AAC3B,0CAAwB;AACxB,2CAAyB;AACzB,8CAA4B;AAC5B,qDAAmC","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\nexport * from './Resource';\nexport * from './IResource';\nexport * from './platform';\nexport * from './types';\nexport * from './config';\nexport * from './detectors';\nexport * from './detect-resources';\n"]}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AAEjB,uCAAgD;AAAvC,8GAAA,kBAAkB,OAAA;AAG3B,yCAYqB;AAXnB,4GAAA,eAAe,OAAA;AACf,gHAAA,mBAAmB,OAAA;AACnB,wGAAA,WAAW,OAAA;AACX,4GAAA,eAAe,OAAA;AACf,yGAAA,YAAY,OAAA;AACZ,6GAAA,gBAAgB,OAAA;AAChB,uGAAA,UAAU,OAAA;AACV,2GAAA,cAAc,OAAA;AACd,4GAAA,eAAe,OAAA;AACf,gHAAA,mBAAmB,OAAA;AACnB,0HAAA,6BAA6B,OAAA;AAE/B,uDAA0E;AAAjE,uHAAA,mBAAmB,OAAA;AAAE,mHAAA,eAAe,OAAA","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\nexport { Resource } from './Resource';\nexport { IResource } from './IResource';\nexport { defaultServiceName } from './platform';\nexport { DetectorSync, ResourceAttributes, Detector } from './types';\nexport { ResourceDetectionConfig } from './config';\nexport {\n browserDetector,\n browserDetectorSync,\n envDetector,\n envDetectorSync,\n hostDetector,\n hostDetectorSync,\n osDetector,\n osDetectorSync,\n processDetector,\n processDetectorSync,\n serviceInstanceIdDetectorSync,\n} from './detectors';\nexport { detectResourcesSync, detectResources } from './detect-resources';\n"]}

@@ -1,9 +0,2 @@

export * from './default-service-name';
export * from './HostDetector';
export * from './HostDetectorSync';
export * from './OSDetector';
export * from './OSDetectorSync';
export * from './ProcessDetector';
export * from './ProcessDetectorSync';
export * from './ServiceInstanceIdDetectorSync';
export { defaultServiceName } from './default-service-name';
//# sourceMappingURL=index.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultServiceName = void 0;
/*

@@ -17,21 +19,4 @@ * Copyright The OpenTelemetry Authors

*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./default-service-name"), exports);
__exportStar(require("./HostDetector"), exports);
__exportStar(require("./HostDetectorSync"), exports);
__exportStar(require("./OSDetector"), exports);
__exportStar(require("./OSDetectorSync"), exports);
__exportStar(require("./ProcessDetector"), exports);
__exportStar(require("./ProcessDetectorSync"), exports);
__exportStar(require("./ServiceInstanceIdDetectorSync"), exports);
var default_service_name_1 = require("./default-service-name");
Object.defineProperty(exports, "defaultServiceName", { enumerable: true, get: function () { return default_service_name_1.defaultServiceName; } });
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/browser/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,yDAAuC;AACvC,iDAA+B;AAC/B,qDAAmC;AACnC,+CAA6B;AAC7B,mDAAiC;AACjC,oDAAkC;AAClC,wDAAsC;AACtC,kEAAgD","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\nexport * from './default-service-name';\nexport * from './HostDetector';\nexport * from './HostDetectorSync';\nexport * from './OSDetector';\nexport * from './OSDetectorSync';\nexport * from './ProcessDetector';\nexport * from './ProcessDetectorSync';\nexport * from './ServiceInstanceIdDetectorSync';\n"]}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/browser/index.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,+DAA4D;AAAnD,0HAAA,kBAAkB,OAAA","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 */\nexport { defaultServiceName } from './default-service-name';\n"]}

@@ -1,2 +0,2 @@

export * from './node';
export { defaultServiceName } from './node';
//# sourceMappingURL=index.d.ts.map

@@ -17,14 +17,6 @@ "use strict";

*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./node"), exports);
exports.defaultServiceName = void 0;
var node_1 = require("./node");
Object.defineProperty(exports, "defaultServiceName", { enumerable: true, get: function () { return node_1.defaultServiceName; } });
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platform/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,yCAAuB","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\nexport * from './node';\n"]}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platform/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,+BAA4C;AAAnC,0GAAA,kBAAkB,OAAA","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\nexport { defaultServiceName } from './node';\n"]}

@@ -1,9 +0,2 @@

export * from './default-service-name';
export * from './HostDetector';
export * from './HostDetectorSync';
export * from './OSDetector';
export * from './OSDetectorSync';
export * from './ProcessDetector';
export * from './ProcessDetectorSync';
export * from './ServiceInstanceIdDetectorSync';
export { defaultServiceName } from './default-service-name';
//# sourceMappingURL=index.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultServiceName = void 0;
/*

@@ -17,21 +19,4 @@ * Copyright The OpenTelemetry Authors

*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./default-service-name"), exports);
__exportStar(require("./HostDetector"), exports);
__exportStar(require("./HostDetectorSync"), exports);
__exportStar(require("./OSDetector"), exports);
__exportStar(require("./OSDetectorSync"), exports);
__exportStar(require("./ProcessDetector"), exports);
__exportStar(require("./ProcessDetectorSync"), exports);
__exportStar(require("./ServiceInstanceIdDetectorSync"), exports);
var default_service_name_1 = require("./default-service-name");
Object.defineProperty(exports, "defaultServiceName", { enumerable: true, get: function () { return default_service_name_1.defaultServiceName; } });
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/node/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,yDAAuC;AACvC,iDAA+B;AAC/B,qDAAmC;AACnC,+CAA6B;AAC7B,mDAAiC;AACjC,oDAAkC;AAClC,wDAAsC;AACtC,kEAAgD","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\nexport * from './default-service-name';\nexport * from './HostDetector';\nexport * from './HostDetectorSync';\nexport * from './OSDetector';\nexport * from './OSDetectorSync';\nexport * from './ProcessDetector';\nexport * from './ProcessDetectorSync';\nexport * from './ServiceInstanceIdDetectorSync';\n"]}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/node/index.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,+DAA4D;AAAnD,0HAAA,kBAAkB,OAAA","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 */\nexport { defaultServiceName } from './default-service-name';\n"]}

@@ -1,2 +0,2 @@

export declare const VERSION = "1.24.0";
export declare const VERSION = "1.24.1";
//# sourceMappingURL=version.d.ts.map

@@ -20,3 +20,3 @@ "use strict";

// this is autogenerated file, see scripts/version-update.js
exports.VERSION = '1.24.0';
exports.VERSION = '1.24.1';
//# sourceMappingURL=version.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,OAAO,GAAG,QAAQ,CAAC","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\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '1.24.0';\n"]}
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,OAAO,GAAG,QAAQ,CAAC","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\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '1.24.1';\n"]}
{
"name": "@opentelemetry/resources",
"version": "1.24.0",
"version": "1.24.1",
"description": "OpenTelemetry SDK resources",

@@ -12,3 +12,7 @@ "main": "build/src/index.js",

"./build/esnext/platform/index.js": "./build/esnext/platform/browser/index.js",
"./build/src/platform/index.js": "./build/src/platform/browser/index.js"
"./build/src/platform/index.js": "./build/src/platform/browser/index.js",
"./src/detectors/platform/index.ts": "./src/detectors/platform/browser/index.ts",
"./build/esm/detectors/platform/index.js": "./build/esm/detectors/platform/browser/index.js",
"./build/esnext/detectors/platform/index.js": "./build/esnext/detectors/platform/browser/index.js",
"./build/src/detectors/platform/index.js": "./build/src/detectors/platform/browser/index.js"
},

@@ -95,8 +99,8 @@ "types": "build/src/index.d.ts",

"dependencies": {
"@opentelemetry/core": "1.24.0",
"@opentelemetry/semantic-conventions": "1.24.0"
"@opentelemetry/core": "1.24.1",
"@opentelemetry/semantic-conventions": "1.24.1"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources",
"sideEffects": false,
"gitHead": "3ab4f765d8d696327b7d139ae6a45e7bd7edd924"
"gitHead": "41c2626fe0ed03e2e83bd79ee43c9bdf0ffd80d8"
}
export declare const hostDetector: import("../../detectors/NoopDetector").NoopDetector;
//# sourceMappingURL=HostDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetector } from '../../detectors/NoopDetector';
export var hostDetector = noopDetector;
//# sourceMappingURL=HostDetector.js.map
{"version":3,"file":"HostDetector.js","sourceRoot":"","sources":["../../../../src/platform/browser/HostDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,MAAM,CAAC,IAAM,YAAY,GAAG,YAAY,CAAC","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 { noopDetector } from '../../detectors/NoopDetector';\n\nexport const hostDetector = noopDetector;\n"]}
export declare const hostDetectorSync: import("../../detectors/NoopDetectorSync").NoopDetectorSync;
//# sourceMappingURL=HostDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetectorSync } from '../../detectors/NoopDetectorSync';
export var hostDetectorSync = noopDetectorSync;
//# sourceMappingURL=HostDetectorSync.js.map
{"version":3,"file":"HostDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/browser/HostDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,MAAM,CAAC,IAAM,gBAAgB,GAAG,gBAAgB,CAAC","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 { noopDetectorSync } from '../../detectors/NoopDetectorSync';\n\nexport const hostDetectorSync = noopDetectorSync;\n"]}
export declare const osDetector: import("../../detectors/NoopDetector").NoopDetector;
//# sourceMappingURL=OSDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetector } from '../../detectors/NoopDetector';
export var osDetector = noopDetector;
//# sourceMappingURL=OSDetector.js.map
{"version":3,"file":"OSDetector.js","sourceRoot":"","sources":["../../../../src/platform/browser/OSDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,MAAM,CAAC,IAAM,UAAU,GAAG,YAAY,CAAC","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 { noopDetector } from '../../detectors/NoopDetector';\n\nexport const osDetector = noopDetector;\n"]}
export declare const osDetectorSync: import("../../detectors/NoopDetectorSync").NoopDetectorSync;
//# sourceMappingURL=OSDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetectorSync } from '../../detectors/NoopDetectorSync';
export var osDetectorSync = noopDetectorSync;
//# sourceMappingURL=OSDetectorSync.js.map
{"version":3,"file":"OSDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/browser/OSDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,MAAM,CAAC,IAAM,cAAc,GAAG,gBAAgB,CAAC","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 { noopDetectorSync } from '../../detectors/NoopDetectorSync';\n\nexport const osDetectorSync = noopDetectorSync;\n"]}
export declare const processDetector: import("../../detectors/NoopDetector").NoopDetector;
//# sourceMappingURL=ProcessDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetector } from '../../detectors/NoopDetector';
export var processDetector = noopDetector;
//# sourceMappingURL=ProcessDetector.js.map
{"version":3,"file":"ProcessDetector.js","sourceRoot":"","sources":["../../../../src/platform/browser/ProcessDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,MAAM,CAAC,IAAM,eAAe,GAAG,YAAY,CAAC","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 { noopDetector } from '../../detectors/NoopDetector';\n\nexport const processDetector = noopDetector;\n"]}
export declare const processDetectorSync: import("../../detectors/NoopDetector").NoopDetector;
//# sourceMappingURL=ProcessDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetector } from '../../detectors/NoopDetector';
export var processDetectorSync = noopDetector;
//# sourceMappingURL=ProcessDetectorSync.js.map
{"version":3,"file":"ProcessDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/browser/ProcessDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,MAAM,CAAC,IAAM,mBAAmB,GAAG,YAAY,CAAC","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 { noopDetector } from '../../detectors/NoopDetector';\n\nexport const processDetectorSync = noopDetector;\n"]}
/**
* @experimental
*/
export declare const serviceInstanceIdDetectorSync: import("../../detectors/NoopDetectorSync").NoopDetectorSync;
//# sourceMappingURL=ServiceInstanceIdDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetectorSync } from '../../detectors/NoopDetectorSync';
/**
* @experimental
*/
export var serviceInstanceIdDetectorSync = noopDetectorSync;
//# sourceMappingURL=ServiceInstanceIdDetectorSync.js.map
{"version":3,"file":"ServiceInstanceIdDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/browser/ServiceInstanceIdDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE;;GAEG;AACH,MAAM,CAAC,IAAM,6BAA6B,GAAG,gBAAgB,CAAC","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 { noopDetectorSync } from '../../detectors/NoopDetectorSync';\n\n/**\n * @experimental\n */\nexport const serviceInstanceIdDetectorSync = noopDetectorSync;\n"]}
import { Detector } from '../../types';
import { ResourceDetectionConfig } from '../../config';
import { IResource } from '../../IResource';
/**
* HostDetector detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
declare class HostDetector implements Detector {
detect(_config?: ResourceDetectionConfig): Promise<IResource>;
}
export declare const hostDetector: HostDetector;
export {};
//# sourceMappingURL=HostDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { hostDetectorSync } from './HostDetectorSync';
/**
* HostDetector detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
var HostDetector = /** @class */ (function () {
function HostDetector() {
}
HostDetector.prototype.detect = function (_config) {
return Promise.resolve(hostDetectorSync.detect(_config));
};
return HostDetector;
}());
export var hostDetector = new HostDetector();
//# sourceMappingURL=HostDetector.js.map
{"version":3,"file":"HostDetector.js","sourceRoot":"","sources":["../../../../src/platform/node/HostDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;GAGG;AACH;IAAA;IAIA,CAAC;IAHC,6BAAM,GAAN,UAAO,OAAiC;QACtC,OAAO,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3D,CAAC;IACH,mBAAC;AAAD,CAAC,AAJD,IAIC;AAED,MAAM,CAAC,IAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC","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 { Detector } from '../../types';\nimport { ResourceDetectionConfig } from '../../config';\nimport { IResource } from '../../IResource';\nimport { hostDetectorSync } from './HostDetectorSync';\n\n/**\n * HostDetector detects the resources related to the host current process is\n * running on. Currently only non-cloud-based attributes are included.\n */\nclass HostDetector implements Detector {\n detect(_config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(hostDetectorSync.detect(_config));\n }\n}\n\nexport const hostDetector = new HostDetector();\n"]}
import { Resource } from '../../Resource';
import { DetectorSync } from '../../types';
import { ResourceDetectionConfig } from '../../config';
/**
* HostDetectorSync detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
declare class HostDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): Resource;
private _getAsyncAttributes;
}
export declare const hostDetectorSync: HostDetectorSync;
export {};
//# sourceMappingURL=HostDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { Resource } from '../../Resource';
import { arch, hostname } from 'os';
import { normalizeArch } from './utils';
import { getMachineId } from './machine-id/getMachineId';
/**
* HostDetectorSync detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
var HostDetectorSync = /** @class */ (function () {
function HostDetectorSync() {
}
HostDetectorSync.prototype.detect = function (_config) {
var _a;
var attributes = (_a = {},
_a[SemanticResourceAttributes.HOST_NAME] = hostname(),
_a[SemanticResourceAttributes.HOST_ARCH] = normalizeArch(arch()),
_a);
return new Resource(attributes, this._getAsyncAttributes());
};
HostDetectorSync.prototype._getAsyncAttributes = function () {
return getMachineId().then(function (machineId) {
var attributes = {};
if (machineId) {
attributes[SemanticResourceAttributes.HOST_ID] = machineId;
}
return attributes;
});
};
return HostDetectorSync;
}());
export var hostDetectorSync = new HostDetectorSync();
//# sourceMappingURL=HostDetectorSync.js.map
{"version":3,"file":"HostDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/node/HostDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD;;;GAGG;AACH;IAAA;IAmBA,CAAC;IAlBC,iCAAM,GAAN,UAAO,OAAiC;;QACtC,IAAM,UAAU;YACd,GAAC,0BAA0B,CAAC,SAAS,IAAG,QAAQ,EAAE;YAClD,GAAC,0BAA0B,CAAC,SAAS,IAAG,aAAa,CAAC,IAAI,EAAE,CAAC;eAC9D,CAAC;QAEF,OAAO,IAAI,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAC9D,CAAC;IAEO,8CAAmB,GAA3B;QACE,OAAO,YAAY,EAAE,CAAC,IAAI,CAAC,UAAA,SAAS;YAClC,IAAM,UAAU,GAAuB,EAAE,CAAC;YAC1C,IAAI,SAAS,EAAE;gBACb,UAAU,CAAC,0BAA0B,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;aAC5D;YACD,OAAO,UAAU,CAAC;QACpB,CAAC,CAAC,CAAC;IACL,CAAC;IACH,uBAAC;AAAD,CAAC,AAnBD,IAmBC;AAED,MAAM,CAAC,IAAM,gBAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC","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 { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../types';\nimport { ResourceDetectionConfig } from '../../config';\nimport { arch, hostname } from 'os';\nimport { normalizeArch } from './utils';\nimport { getMachineId } from './machine-id/getMachineId';\n\n/**\n * HostDetectorSync detects the resources related to the host current process is\n * running on. Currently only non-cloud-based attributes are included.\n */\nclass HostDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): Resource {\n const attributes: ResourceAttributes = {\n [SemanticResourceAttributes.HOST_NAME]: hostname(),\n [SemanticResourceAttributes.HOST_ARCH]: normalizeArch(arch()),\n };\n\n return new Resource(attributes, this._getAsyncAttributes());\n }\n\n private _getAsyncAttributes(): Promise<ResourceAttributes> {\n return getMachineId().then(machineId => {\n const attributes: ResourceAttributes = {};\n if (machineId) {\n attributes[SemanticResourceAttributes.HOST_ID] = machineId;\n }\n return attributes;\n });\n }\n}\n\nexport const hostDetectorSync = new HostDetectorSync();\n"]}
/// <reference types="node" />
import * as child_process from 'child_process';
export declare const execAsync: typeof child_process.exec.__promisify__;
//# sourceMappingURL=execAsync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as child_process from 'child_process';
import * as util from 'util';
export var execAsync = util.promisify(child_process.exec);
//# sourceMappingURL=execAsync.js.map
{"version":3,"file":"execAsync.js","sourceRoot":"","sources":["../../../../../src/platform/node/machine-id/execAsync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,aAAa,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,MAAM,CAAC,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC","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"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-bsd.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
import { promises as fs } from 'fs';
import { execAsync } from './execAsync';
import { diag } from '@opentelemetry/api';
export function getMachineId() {
return __awaiter(this, void 0, void 0, function () {
var result, e_1, result, e_2;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 2, , 3]);
return [4 /*yield*/, fs.readFile('/etc/hostid', { encoding: 'utf8' })];
case 1:
result = _a.sent();
return [2 /*return*/, result.trim()];
case 2:
e_1 = _a.sent();
diag.debug("error reading machine id: " + e_1);
return [3 /*break*/, 3];
case 3:
_a.trys.push([3, 5, , 6]);
return [4 /*yield*/, execAsync('kenv -q smbios.system.uuid')];
case 4:
result = _a.sent();
return [2 /*return*/, result.stdout.trim()];
case 5:
e_2 = _a.sent();
diag.debug("error reading machine id: " + e_2);
return [3 /*break*/, 6];
case 6: return [2 /*return*/, ''];
}
});
});
}
//# sourceMappingURL=getMachineId-bsd.js.map
{"version":3,"file":"getMachineId-bsd.js","sourceRoot":"","sources":["../../../../../src/platform/node/machine-id/getMachineId-bsd.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,UAAgB,YAAY;;;;;;;oBAEf,qBAAM,EAAE,CAAC,QAAQ,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,EAAA;;oBAA/D,MAAM,GAAG,SAAsD;oBACrE,sBAAO,MAAM,CAAC,IAAI,EAAE,EAAC;;;oBAErB,IAAI,CAAC,KAAK,CAAC,+BAA6B,GAAG,CAAC,CAAC;;;;oBAI9B,qBAAM,SAAS,CAAC,4BAA4B,CAAC,EAAA;;oBAAtD,MAAM,GAAG,SAA6C;oBAC5D,sBAAO,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAC;;;oBAE5B,IAAI,CAAC,KAAK,CAAC,+BAA6B,GAAG,CAAC,CAAC;;wBAG/C,sBAAO,EAAE,EAAC;;;;CACX","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 { promises as fs } from 'fs';\nimport { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n try {\n const result = await fs.readFile('/etc/hostid', { encoding: 'utf8' });\n return result.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n try {\n const result = await execAsync('kenv -q smbios.system.uuid');\n return result.stdout.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-darwin.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
import { execAsync } from './execAsync';
import { diag } from '@opentelemetry/api';
export function getMachineId() {
return __awaiter(this, void 0, void 0, function () {
var result, idLine, parts, e_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 2, , 3]);
return [4 /*yield*/, execAsync('ioreg -rd1 -c "IOPlatformExpertDevice"')];
case 1:
result = _a.sent();
idLine = result.stdout
.split('\n')
.find(function (line) { return line.includes('IOPlatformUUID'); });
if (!idLine) {
return [2 /*return*/, ''];
}
parts = idLine.split('" = "');
if (parts.length === 2) {
return [2 /*return*/, parts[1].slice(0, -1)];
}
return [3 /*break*/, 3];
case 2:
e_1 = _a.sent();
diag.debug("error reading machine id: " + e_1);
return [3 /*break*/, 3];
case 3: return [2 /*return*/, ''];
}
});
});
}
//# sourceMappingURL=getMachineId-darwin.js.map
{"version":3,"file":"getMachineId-darwin.js","sourceRoot":"","sources":["../../../../../src/platform/node/machine-id/getMachineId-darwin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,UAAgB,YAAY;;;;;;;oBAEf,qBAAM,SAAS,CAAC,wCAAwC,CAAC,EAAA;;oBAAlE,MAAM,GAAG,SAAyD;oBAElE,MAAM,GAAG,MAAM,CAAC,MAAM;yBACzB,KAAK,CAAC,IAAI,CAAC;yBACX,IAAI,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAA/B,CAA+B,CAAC,CAAC;oBAEjD,IAAI,CAAC,MAAM,EAAE;wBACX,sBAAO,EAAE,EAAC;qBACX;oBAEK,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;oBACpC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;wBACtB,sBAAO,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAC;qBAC9B;;;;oBAED,IAAI,CAAC,KAAK,CAAC,+BAA6B,GAAG,CAAC,CAAC;;wBAG/C,sBAAO,EAAE,EAAC;;;;CACX","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 { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n try {\n const result = await execAsync('ioreg -rd1 -c \"IOPlatformExpertDevice\"');\n\n const idLine = result.stdout\n .split('\\n')\n .find(line => line.includes('IOPlatformUUID'));\n\n if (!idLine) {\n return '';\n }\n\n const parts = idLine.split('\" = \"');\n if (parts.length === 2) {\n return parts[1].slice(0, -1);\n }\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-linux.d.ts.map
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { promises as fs } from 'fs';
import { diag } from '@opentelemetry/api';
export function getMachineId() {
return __awaiter(this, void 0, void 0, function () {
var paths, paths_1, paths_1_1, path, result, e_1, e_2_1;
var e_2, _a;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
paths = ['/etc/machine-id', '/var/lib/dbus/machine-id'];
_b.label = 1;
case 1:
_b.trys.push([1, 8, 9, 10]);
paths_1 = __values(paths), paths_1_1 = paths_1.next();
_b.label = 2;
case 2:
if (!!paths_1_1.done) return [3 /*break*/, 7];
path = paths_1_1.value;
_b.label = 3;
case 3:
_b.trys.push([3, 5, , 6]);
return [4 /*yield*/, fs.readFile(path, { encoding: 'utf8' })];
case 4:
result = _b.sent();
return [2 /*return*/, result.trim()];
case 5:
e_1 = _b.sent();
diag.debug("error reading machine id: " + e_1);
return [3 /*break*/, 6];
case 6:
paths_1_1 = paths_1.next();
return [3 /*break*/, 2];
case 7: return [3 /*break*/, 10];
case 8:
e_2_1 = _b.sent();
e_2 = { error: e_2_1 };
return [3 /*break*/, 10];
case 9:
try {
if (paths_1_1 && !paths_1_1.done && (_a = paths_1.return)) _a.call(paths_1);
}
finally { if (e_2) throw e_2.error; }
return [7 /*endfinally*/];
case 10: return [2 /*return*/, ''];
}
});
});
}
//# sourceMappingURL=getMachineId-linux.js.map
{"version":3,"file":"getMachineId-linux.js","sourceRoot":"","sources":["../../../../../src/platform/node/machine-id/getMachineId-linux.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,UAAgB,YAAY;;;;;;;oBAC1B,KAAK,GAAG,CAAC,iBAAiB,EAAE,0BAA0B,CAAC,CAAC;;;;oBAE3C,UAAA,SAAA,KAAK,CAAA;;;;oBAAb,IAAI;;;;oBAEI,qBAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,EAAA;;oBAAtD,MAAM,GAAG,SAA6C;oBAC5D,sBAAO,MAAM,CAAC,IAAI,EAAE,EAAC;;;oBAErB,IAAI,CAAC,KAAK,CAAC,+BAA6B,GAAG,CAAC,CAAC;;;;;;;;;;;;;;;;yBAIjD,sBAAO,EAAE,EAAC;;;;CACX","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 */\nimport { promises as fs } from 'fs';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n const paths = ['/etc/machine-id', '/var/lib/dbus/machine-id'];\n\n for (const path of paths) {\n try {\n const result = await fs.readFile(path, { encoding: 'utf8' });\n return result.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n }\n\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-unsupported.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
import { diag } from '@opentelemetry/api';
export function getMachineId() {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
diag.debug('could not read machine-id: unsupported platform');
return [2 /*return*/, ''];
});
});
}
//# sourceMappingURL=getMachineId-unsupported.js.map
{"version":3,"file":"getMachineId-unsupported.js","sourceRoot":"","sources":["../../../../../src/platform/node/machine-id/getMachineId-unsupported.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,UAAgB,YAAY;;;YAChC,IAAI,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;YAC9D,sBAAO,EAAE,EAAC;;;CACX","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 { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n diag.debug('could not read machine-id: unsupported platform');\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-win.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
import * as process from 'process';
import { execAsync } from './execAsync';
import { diag } from '@opentelemetry/api';
export function getMachineId() {
return __awaiter(this, void 0, void 0, function () {
var args, command, result, parts, e_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
args = 'QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid';
command = '%windir%\\System32\\REG.exe';
if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {
command = '%windir%\\sysnative\\cmd.exe /c ' + command;
}
_a.label = 1;
case 1:
_a.trys.push([1, 3, , 4]);
return [4 /*yield*/, execAsync(command + " " + args)];
case 2:
result = _a.sent();
parts = result.stdout.split('REG_SZ');
if (parts.length === 2) {
return [2 /*return*/, parts[1].trim()];
}
return [3 /*break*/, 4];
case 3:
e_1 = _a.sent();
diag.debug("error reading machine id: " + e_1);
return [3 /*break*/, 4];
case 4: return [2 /*return*/, ''];
}
});
});
}
//# sourceMappingURL=getMachineId-win.js.map
{"version":3,"file":"getMachineId-win.js","sourceRoot":"","sources":["../../../../../src/platform/node/machine-id/getMachineId-win.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,UAAgB,YAAY;;;;;;oBAC1B,IAAI,GACR,4EAA4E,CAAC;oBAC3E,OAAO,GAAG,6BAA6B,CAAC;oBAC5C,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,IAAI,wBAAwB,IAAI,OAAO,CAAC,GAAG,EAAE;wBACtE,OAAO,GAAG,kCAAkC,GAAG,OAAO,CAAC;qBACxD;;;;oBAGgB,qBAAM,SAAS,CAAI,OAAO,SAAI,IAAM,CAAC,EAAA;;oBAA9C,MAAM,GAAG,SAAqC;oBAC9C,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;oBAC5C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;wBACtB,sBAAO,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAC;qBACxB;;;;oBAED,IAAI,CAAC,KAAK,CAAC,+BAA6B,GAAG,CAAC,CAAC;;wBAG/C,sBAAO,EAAE,EAAC;;;;CACX","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 process from 'process';\nimport { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n const args =\n 'QUERY HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Cryptography /v MachineGuid';\n let command = '%windir%\\\\System32\\\\REG.exe';\n if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {\n command = '%windir%\\\\sysnative\\\\cmd.exe /c ' + command;\n }\n\n try {\n const result = await execAsync(`${command} ${args}`);\n const parts = result.stdout.split('REG_SZ');\n if (parts.length === 2) {\n return parts[1].trim();\n }\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return '';\n}\n"]}
declare let getMachineId: () => Promise<string>;
export { getMachineId };
//# sourceMappingURL=getMachineId.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as process from 'process';
var getMachineId;
switch (process.platform) {
case 'darwin':
(getMachineId = require('./getMachineId-darwin').getMachineId);
break;
case 'linux':
(getMachineId = require('./getMachineId-linux').getMachineId);
break;
case 'freebsd':
(getMachineId = require('./getMachineId-bsd').getMachineId);
break;
case 'win32':
(getMachineId = require('./getMachineId-win').getMachineId);
break;
default:
(getMachineId = require('./getMachineId-unsupported').getMachineId);
}
export { getMachineId };
//# sourceMappingURL=getMachineId.js.map
{"version":3,"file":"getMachineId.js","sourceRoot":"","sources":["../../../../../src/platform/node/machine-id/getMachineId.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,IAAI,YAAmC,CAAC;AAExC,QAAQ,OAAO,CAAC,QAAQ,EAAE;IACxB,KAAK,QAAQ;QACX,CAAG,YAAY,GAAK,OAAO,CAAC,uBAAuB,CAAC,aAArC,CAAsC,CAAC;QACtD,MAAM;IACR,KAAK,OAAO;QACV,CAAG,YAAY,GAAK,OAAO,CAAC,sBAAsB,CAAC,aAApC,CAAqC,CAAC;QACrD,MAAM;IACR,KAAK,SAAS;QACZ,CAAG,YAAY,GAAK,OAAO,CAAC,oBAAoB,CAAC,aAAlC,CAAmC,CAAC;QACnD,MAAM;IACR,KAAK,OAAO;QACV,CAAG,YAAY,GAAK,OAAO,CAAC,oBAAoB,CAAC,aAAlC,CAAmC,CAAC;QACnD,MAAM;IACR;QACE,CAAG,YAAY,GAAK,OAAO,CAAC,4BAA4B,CAAC,aAA1C,CAA2C,CAAC;CAC9D;AAED,OAAO,EAAE,YAAY,EAAE,CAAC","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 */\nimport * as process from 'process';\n\nlet getMachineId: () => Promise<string>;\n\nswitch (process.platform) {\n case 'darwin':\n ({ getMachineId } = require('./getMachineId-darwin'));\n break;\n case 'linux':\n ({ getMachineId } = require('./getMachineId-linux'));\n break;\n case 'freebsd':\n ({ getMachineId } = require('./getMachineId-bsd'));\n break;\n case 'win32':\n ({ getMachineId } = require('./getMachineId-win'));\n break;\n default:\n ({ getMachineId } = require('./getMachineId-unsupported'));\n}\n\nexport { getMachineId };\n"]}
import { Detector } from '../../types';
import { ResourceDetectionConfig } from '../../config';
import { IResource } from '../../IResource';
/**
* OSDetector detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
declare class OSDetector implements Detector {
detect(_config?: ResourceDetectionConfig): Promise<IResource>;
}
export declare const osDetector: OSDetector;
export {};
//# sourceMappingURL=OSDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { osDetectorSync } from './OSDetectorSync';
/**
* OSDetector detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
var OSDetector = /** @class */ (function () {
function OSDetector() {
}
OSDetector.prototype.detect = function (_config) {
return Promise.resolve(osDetectorSync.detect(_config));
};
return OSDetector;
}());
export var osDetector = new OSDetector();
//# sourceMappingURL=OSDetector.js.map
{"version":3,"file":"OSDetector.js","sourceRoot":"","sources":["../../../../src/platform/node/OSDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;GAGG;AACH;IAAA;IAIA,CAAC;IAHC,2BAAM,GAAN,UAAO,OAAiC;QACtC,OAAO,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACzD,CAAC;IACH,iBAAC;AAAD,CAAC,AAJD,IAIC;AAED,MAAM,CAAC,IAAM,UAAU,GAAG,IAAI,UAAU,EAAE,CAAC","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 { Detector } from '../../types';\nimport { ResourceDetectionConfig } from '../../config';\nimport { IResource } from '../../IResource';\nimport { osDetectorSync } from './OSDetectorSync';\n\n/**\n * OSDetector detects the resources related to the operating system (OS) on\n * which the process represented by this resource is running.\n */\nclass OSDetector implements Detector {\n detect(_config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(osDetectorSync.detect(_config));\n }\n}\n\nexport const osDetector = new OSDetector();\n"]}
import { Resource } from '../../Resource';
import { DetectorSync } from '../../types';
import { ResourceDetectionConfig } from '../../config';
/**
* OSDetectorSync detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
declare class OSDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): Resource;
}
export declare const osDetectorSync: OSDetectorSync;
export {};
//# sourceMappingURL=OSDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { Resource } from '../../Resource';
import { platform, release } from 'os';
import { normalizeType } from './utils';
/**
* OSDetectorSync detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
var OSDetectorSync = /** @class */ (function () {
function OSDetectorSync() {
}
OSDetectorSync.prototype.detect = function (_config) {
var _a;
var attributes = (_a = {},
_a[SemanticResourceAttributes.OS_TYPE] = normalizeType(platform()),
_a[SemanticResourceAttributes.OS_VERSION] = release(),
_a);
return new Resource(attributes);
};
return OSDetectorSync;
}());
export var osDetectorSync = new OSDetectorSync();
//# sourceMappingURL=OSDetectorSync.js.map
{"version":3,"file":"OSDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/node/OSDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC;;;GAGG;AACH;IAAA;IAQA,CAAC;IAPC,+BAAM,GAAN,UAAO,OAAiC;;QACtC,IAAM,UAAU;YACd,GAAC,0BAA0B,CAAC,OAAO,IAAG,aAAa,CAAC,QAAQ,EAAE,CAAC;YAC/D,GAAC,0BAA0B,CAAC,UAAU,IAAG,OAAO,EAAE;eACnD,CAAC;QACF,OAAO,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IACH,qBAAC;AAAD,CAAC,AARD,IAQC;AAED,MAAM,CAAC,IAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC","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 { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../types';\nimport { ResourceDetectionConfig } from '../../config';\nimport { platform, release } from 'os';\nimport { normalizeType } from './utils';\n\n/**\n * OSDetectorSync detects the resources related to the operating system (OS) on\n * which the process represented by this resource is running.\n */\nclass OSDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): Resource {\n const attributes: ResourceAttributes = {\n [SemanticResourceAttributes.OS_TYPE]: normalizeType(platform()),\n [SemanticResourceAttributes.OS_VERSION]: release(),\n };\n return new Resource(attributes);\n }\n}\n\nexport const osDetectorSync = new OSDetectorSync();\n"]}
import { Detector } from '../../types';
import { ResourceDetectionConfig } from '../../config';
import { IResource } from '../../IResource';
/**
* ProcessDetector will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
declare class ProcessDetector implements Detector {
detect(config?: ResourceDetectionConfig): Promise<IResource>;
}
export declare const processDetector: ProcessDetector;
export {};
//# sourceMappingURL=ProcessDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { processDetectorSync } from './ProcessDetectorSync';
/**
* ProcessDetector will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
var ProcessDetector = /** @class */ (function () {
function ProcessDetector() {
}
ProcessDetector.prototype.detect = function (config) {
return Promise.resolve(processDetectorSync.detect(config));
};
return ProcessDetector;
}());
export var processDetector = new ProcessDetector();
//# sourceMappingURL=ProcessDetector.js.map
{"version":3,"file":"ProcessDetector.js","sourceRoot":"","sources":["../../../../src/platform/node/ProcessDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;GAGG;AACH;IAAA;IAIA,CAAC;IAHC,gCAAM,GAAN,UAAO,MAAgC;QACrC,OAAO,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7D,CAAC;IACH,sBAAC;AAAD,CAAC,AAJD,IAIC;AAED,MAAM,CAAC,IAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC","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 { Detector } from '../../types';\nimport { ResourceDetectionConfig } from '../../config';\nimport { IResource } from '../../IResource';\nimport { processDetectorSync } from './ProcessDetectorSync';\n\n/**\n * ProcessDetector will be used to detect the resources related current process running\n * and being instrumented from the NodeJS Process module.\n */\nclass ProcessDetector implements Detector {\n detect(config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(processDetectorSync.detect(config));\n }\n}\n\nexport const processDetector = new ProcessDetector();\n"]}
import { DetectorSync } from '../../types';
import { ResourceDetectionConfig } from '../../config';
import { IResource } from '../../IResource';
/**
* ProcessDetectorSync will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
declare class ProcessDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): IResource;
}
export declare const processDetectorSync: ProcessDetectorSync;
export {};
//# sourceMappingURL=ProcessDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
import { diag } from '@opentelemetry/api';
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { Resource } from '../../Resource';
import * as os from 'os';
/**
* ProcessDetectorSync will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
var ProcessDetectorSync = /** @class */ (function () {
function ProcessDetectorSync() {
}
ProcessDetectorSync.prototype.detect = function (_config) {
var _a;
var attributes = (_a = {},
_a[SemanticResourceAttributes.PROCESS_PID] = process.pid,
_a[SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME] = process.title,
_a[SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH] = process.execPath,
_a[SemanticResourceAttributes.PROCESS_COMMAND_ARGS] = __spreadArray(__spreadArray([
process.argv[0]
], __read(process.execArgv), false), __read(process.argv.slice(1)), false),
_a[SemanticResourceAttributes.PROCESS_RUNTIME_VERSION] = process.versions.node,
_a[SemanticResourceAttributes.PROCESS_RUNTIME_NAME] = 'nodejs',
_a[SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION] = 'Node.js',
_a);
if (process.argv.length > 1) {
attributes[SemanticResourceAttributes.PROCESS_COMMAND] = process.argv[1];
}
try {
var userInfo = os.userInfo();
attributes[SemanticResourceAttributes.PROCESS_OWNER] = userInfo.username;
}
catch (e) {
diag.debug("error obtaining process owner: " + e);
}
return new Resource(attributes);
};
return ProcessDetectorSync;
}());
export var processDetectorSync = new ProcessDetectorSync();
//# sourceMappingURL=ProcessDetectorSync.js.map
{"version":3,"file":"ProcessDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/node/ProcessDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAI1C,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB;;;GAGG;AACH;IAAA;IA8BA,CAAC;IA7BC,oCAAM,GAAN,UAAO,OAAiC;;QACtC,IAAM,UAAU;YACd,GAAC,0BAA0B,CAAC,WAAW,IAAG,OAAO,CAAC,GAAG;YACrD,GAAC,0BAA0B,CAAC,uBAAuB,IAAG,OAAO,CAAC,KAAK;YACnE,GAAC,0BAA0B,CAAC,uBAAuB,IAAG,OAAO,CAAC,QAAQ;YACtE,GAAC,0BAA0B,CAAC,oBAAoB;gBAC9C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;sBACZ,OAAO,CAAC,QAAQ,kBAChB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SACzB;YACD,GAAC,0BAA0B,CAAC,uBAAuB,IACjD,OAAO,CAAC,QAAQ,CAAC,IAAI;YACvB,GAAC,0BAA0B,CAAC,oBAAoB,IAAG,QAAQ;YAC3D,GAAC,0BAA0B,CAAC,2BAA2B,IAAG,SAAS;eACpE,CAAC;QAEF,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;YAC3B,UAAU,CAAC,0BAA0B,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAC1E;QAED,IAAI;YACF,IAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;YAC/B,UAAU,CAAC,0BAA0B,CAAC,aAAa,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC;SAC1E;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,CAAC,KAAK,CAAC,oCAAkC,CAAG,CAAC,CAAC;SACnD;QAED,OAAO,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IACH,0BAAC;AAAD,CAAC,AA9BD,IA8BC;AAED,MAAM,CAAC,IAAM,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAC","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 { diag } from '@opentelemetry/api';\nimport { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../types';\nimport { ResourceDetectionConfig } from '../../config';\nimport { IResource } from '../../IResource';\nimport * as os from 'os';\n\n/**\n * ProcessDetectorSync will be used to detect the resources related current process running\n * and being instrumented from the NodeJS Process module.\n */\nclass ProcessDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): IResource {\n const attributes: ResourceAttributes = {\n [SemanticResourceAttributes.PROCESS_PID]: process.pid,\n [SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME]: process.title,\n [SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH]: process.execPath,\n [SemanticResourceAttributes.PROCESS_COMMAND_ARGS]: [\n process.argv[0],\n ...process.execArgv,\n ...process.argv.slice(1),\n ],\n [SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]:\n process.versions.node,\n [SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'nodejs',\n [SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Node.js',\n };\n\n if (process.argv.length > 1) {\n attributes[SemanticResourceAttributes.PROCESS_COMMAND] = process.argv[1];\n }\n\n try {\n const userInfo = os.userInfo();\n attributes[SemanticResourceAttributes.PROCESS_OWNER] = userInfo.username;\n } catch (e) {\n diag.debug(`error obtaining process owner: ${e}`);\n }\n\n return new Resource(attributes);\n }\n}\n\nexport const processDetectorSync = new ProcessDetectorSync();\n"]}
import { Resource } from '../../Resource';
import { DetectorSync } from '../../types';
import { ResourceDetectionConfig } from '../../config';
/**
* ServiceInstanceIdDetectorSync detects the resources related to the service instance ID.
*/
declare class ServiceInstanceIdDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): Resource;
}
/**
* @experimental
*/
export declare const serviceInstanceIdDetectorSync: ServiceInstanceIdDetectorSync;
export {};
//# sourceMappingURL=ServiceInstanceIdDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { SEMRESATTRS_SERVICE_INSTANCE_ID } from '@opentelemetry/semantic-conventions';
import { Resource } from '../../Resource';
import { randomUUID } from 'crypto';
/**
* ServiceInstanceIdDetectorSync detects the resources related to the service instance ID.
*/
var ServiceInstanceIdDetectorSync = /** @class */ (function () {
function ServiceInstanceIdDetectorSync() {
}
ServiceInstanceIdDetectorSync.prototype.detect = function (_config) {
var _a;
var attributes = (_a = {},
_a[SEMRESATTRS_SERVICE_INSTANCE_ID] = randomUUID(),
_a);
return new Resource(attributes);
};
return ServiceInstanceIdDetectorSync;
}());
/**
* @experimental
*/
export var serviceInstanceIdDetectorSync = new ServiceInstanceIdDetectorSync();
//# sourceMappingURL=ServiceInstanceIdDetectorSync.js.map
{"version":3,"file":"ServiceInstanceIdDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/node/ServiceInstanceIdDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC;;GAEG;AACH;IAAA;IAQA,CAAC;IAPC,8CAAM,GAAN,UAAO,OAAiC;;QACtC,IAAM,UAAU;YACd,GAAC,+BAA+B,IAAG,UAAU,EAAE;eAChD,CAAC;QAEF,OAAO,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IACH,oCAAC;AAAD,CAAC,AARD,IAQC;AAED;;GAEG;AACH,MAAM,CAAC,IAAM,6BAA6B,GACxC,IAAI,6BAA6B,EAAE,CAAC","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 { SEMRESATTRS_SERVICE_INSTANCE_ID } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../types';\nimport { ResourceDetectionConfig } from '../../config';\nimport { randomUUID } from 'crypto';\n\n/**\n * ServiceInstanceIdDetectorSync detects the resources related to the service instance ID.\n */\nclass ServiceInstanceIdDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): Resource {\n const attributes: ResourceAttributes = {\n [SEMRESATTRS_SERVICE_INSTANCE_ID]: randomUUID(),\n };\n\n return new Resource(attributes);\n }\n}\n\n/**\n * @experimental\n */\nexport const serviceInstanceIdDetectorSync =\n new ServiceInstanceIdDetectorSync();\n"]}
export declare const normalizeArch: (nodeArchString: string) => string;
export declare const normalizeType: (nodePlatform: string) => string;
//# sourceMappingURL=utils.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export var normalizeArch = function (nodeArchString) {
// Maps from https://nodejs.org/api/os.html#osarch to arch values in spec:
// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/host.md
switch (nodeArchString) {
case 'arm':
return 'arm32';
case 'ppc':
return 'ppc32';
case 'x64':
return 'amd64';
default:
return nodeArchString;
}
};
export var normalizeType = function (nodePlatform) {
// Maps from https://nodejs.org/api/os.html#osplatform to arch values in spec:
// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/os.md
switch (nodePlatform) {
case 'sunos':
return 'solaris';
case 'win32':
return 'windows';
default:
return nodePlatform;
}
};
//# sourceMappingURL=utils.js.map
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/platform/node/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,IAAM,aAAa,GAAG,UAAC,cAAsB;IAClD,0EAA0E;IAC1E,8HAA8H;IAC9H,QAAQ,cAAc,EAAE;QACtB,KAAK,KAAK;YACR,OAAO,OAAO,CAAC;QACjB,KAAK,KAAK;YACR,OAAO,OAAO,CAAC;QACjB,KAAK,KAAK;YACR,OAAO,OAAO,CAAC;QACjB;YACE,OAAO,cAAc,CAAC;KACzB;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,aAAa,GAAG,UAAC,YAAoB;IAChD,8EAA8E;IAC9E,4HAA4H;IAC5H,QAAQ,YAAY,EAAE;QACpB,KAAK,OAAO;YACV,OAAO,SAAS,CAAC;QACnB,KAAK,OAAO;YACV,OAAO,SAAS,CAAC;QACnB;YACE,OAAO,YAAY,CAAC;KACvB;AACH,CAAC,CAAC","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 */\nexport const normalizeArch = (nodeArchString: string): string => {\n // Maps from https://nodejs.org/api/os.html#osarch to arch values in spec:\n // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/host.md\n switch (nodeArchString) {\n case 'arm':\n return 'arm32';\n case 'ppc':\n return 'ppc32';\n case 'x64':\n return 'amd64';\n default:\n return nodeArchString;\n }\n};\n\nexport const normalizeType = (nodePlatform: string): string => {\n // Maps from https://nodejs.org/api/os.html#osplatform to arch values in spec:\n // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/os.md\n switch (nodePlatform) {\n case 'sunos':\n return 'solaris';\n case 'win32':\n return 'windows';\n default:\n return nodePlatform;\n }\n};\n"]}
export declare const hostDetector: import("../../detectors/NoopDetector").NoopDetector;
//# sourceMappingURL=HostDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetector } from '../../detectors/NoopDetector';
export const hostDetector = noopDetector;
//# sourceMappingURL=HostDetector.js.map
{"version":3,"file":"HostDetector.js","sourceRoot":"","sources":["../../../../src/platform/browser/HostDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC","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 { noopDetector } from '../../detectors/NoopDetector';\n\nexport const hostDetector = noopDetector;\n"]}
export declare const hostDetectorSync: import("../../detectors/NoopDetectorSync").NoopDetectorSync;
//# sourceMappingURL=HostDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetectorSync } from '../../detectors/NoopDetectorSync';
export const hostDetectorSync = noopDetectorSync;
//# sourceMappingURL=HostDetectorSync.js.map
{"version":3,"file":"HostDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/browser/HostDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,MAAM,CAAC,MAAM,gBAAgB,GAAG,gBAAgB,CAAC","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 { noopDetectorSync } from '../../detectors/NoopDetectorSync';\n\nexport const hostDetectorSync = noopDetectorSync;\n"]}
export declare const osDetector: import("../../detectors/NoopDetector").NoopDetector;
//# sourceMappingURL=OSDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetector } from '../../detectors/NoopDetector';
export const osDetector = noopDetector;
//# sourceMappingURL=OSDetector.js.map
{"version":3,"file":"OSDetector.js","sourceRoot":"","sources":["../../../../src/platform/browser/OSDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC","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 { noopDetector } from '../../detectors/NoopDetector';\n\nexport const osDetector = noopDetector;\n"]}
export declare const osDetectorSync: import("../../detectors/NoopDetectorSync").NoopDetectorSync;
//# sourceMappingURL=OSDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetectorSync } from '../../detectors/NoopDetectorSync';
export const osDetectorSync = noopDetectorSync;
//# sourceMappingURL=OSDetectorSync.js.map
{"version":3,"file":"OSDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/browser/OSDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC","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 { noopDetectorSync } from '../../detectors/NoopDetectorSync';\n\nexport const osDetectorSync = noopDetectorSync;\n"]}
export declare const processDetector: import("../../detectors/NoopDetector").NoopDetector;
//# sourceMappingURL=ProcessDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetector } from '../../detectors/NoopDetector';
export const processDetector = noopDetector;
//# sourceMappingURL=ProcessDetector.js.map
{"version":3,"file":"ProcessDetector.js","sourceRoot":"","sources":["../../../../src/platform/browser/ProcessDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,MAAM,CAAC,MAAM,eAAe,GAAG,YAAY,CAAC","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 { noopDetector } from '../../detectors/NoopDetector';\n\nexport const processDetector = noopDetector;\n"]}
export declare const processDetectorSync: import("../../detectors/NoopDetector").NoopDetector;
//# sourceMappingURL=ProcessDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetector } from '../../detectors/NoopDetector';
export const processDetectorSync = noopDetector;
//# sourceMappingURL=ProcessDetectorSync.js.map
{"version":3,"file":"ProcessDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/browser/ProcessDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,MAAM,CAAC,MAAM,mBAAmB,GAAG,YAAY,CAAC","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 { noopDetector } from '../../detectors/NoopDetector';\n\nexport const processDetectorSync = noopDetector;\n"]}
/**
* @experimental
*/
export declare const serviceInstanceIdDetectorSync: import("../../detectors/NoopDetectorSync").NoopDetectorSync;
//# sourceMappingURL=ServiceInstanceIdDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { noopDetectorSync } from '../../detectors/NoopDetectorSync';
/**
* @experimental
*/
export const serviceInstanceIdDetectorSync = noopDetectorSync;
//# sourceMappingURL=ServiceInstanceIdDetectorSync.js.map
{"version":3,"file":"ServiceInstanceIdDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/browser/ServiceInstanceIdDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,gBAAgB,CAAC","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 { noopDetectorSync } from '../../detectors/NoopDetectorSync';\n\n/**\n * @experimental\n */\nexport const serviceInstanceIdDetectorSync = noopDetectorSync;\n"]}
import { Detector } from '../../types';
import { ResourceDetectionConfig } from '../../config';
import { IResource } from '../../IResource';
/**
* HostDetector detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
declare class HostDetector implements Detector {
detect(_config?: ResourceDetectionConfig): Promise<IResource>;
}
export declare const hostDetector: HostDetector;
export {};
//# sourceMappingURL=HostDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { hostDetectorSync } from './HostDetectorSync';
/**
* HostDetector detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
class HostDetector {
detect(_config) {
return Promise.resolve(hostDetectorSync.detect(_config));
}
}
export const hostDetector = new HostDetector();
//# sourceMappingURL=HostDetector.js.map
{"version":3,"file":"HostDetector.js","sourceRoot":"","sources":["../../../../src/platform/node/HostDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;GAGG;AACH,MAAM,YAAY;IAChB,MAAM,CAAC,OAAiC;QACtC,OAAO,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3D,CAAC;CACF;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC","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 { Detector } from '../../types';\nimport { ResourceDetectionConfig } from '../../config';\nimport { IResource } from '../../IResource';\nimport { hostDetectorSync } from './HostDetectorSync';\n\n/**\n * HostDetector detects the resources related to the host current process is\n * running on. Currently only non-cloud-based attributes are included.\n */\nclass HostDetector implements Detector {\n detect(_config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(hostDetectorSync.detect(_config));\n }\n}\n\nexport const hostDetector = new HostDetector();\n"]}
import { Resource } from '../../Resource';
import { DetectorSync } from '../../types';
import { ResourceDetectionConfig } from '../../config';
/**
* HostDetectorSync detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
declare class HostDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): Resource;
private _getAsyncAttributes;
}
export declare const hostDetectorSync: HostDetectorSync;
export {};
//# sourceMappingURL=HostDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { Resource } from '../../Resource';
import { arch, hostname } from 'os';
import { normalizeArch } from './utils';
import { getMachineId } from './machine-id/getMachineId';
/**
* HostDetectorSync detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
class HostDetectorSync {
detect(_config) {
const attributes = {
[SemanticResourceAttributes.HOST_NAME]: hostname(),
[SemanticResourceAttributes.HOST_ARCH]: normalizeArch(arch()),
};
return new Resource(attributes, this._getAsyncAttributes());
}
_getAsyncAttributes() {
return getMachineId().then(machineId => {
const attributes = {};
if (machineId) {
attributes[SemanticResourceAttributes.HOST_ID] = machineId;
}
return attributes;
});
}
}
export const hostDetectorSync = new HostDetectorSync();
//# sourceMappingURL=HostDetectorSync.js.map
{"version":3,"file":"HostDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/node/HostDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD;;;GAGG;AACH,MAAM,gBAAgB;IACpB,MAAM,CAAC,OAAiC;QACtC,MAAM,UAAU,GAAuB;YACrC,CAAC,0BAA0B,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE;YAClD,CAAC,0BAA0B,CAAC,SAAS,CAAC,EAAE,aAAa,CAAC,IAAI,EAAE,CAAC;SAC9D,CAAC;QAEF,OAAO,IAAI,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAC9D,CAAC;IAEO,mBAAmB;QACzB,OAAO,YAAY,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;YACrC,MAAM,UAAU,GAAuB,EAAE,CAAC;YAC1C,IAAI,SAAS,EAAE;gBACb,UAAU,CAAC,0BAA0B,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;aAC5D;YACD,OAAO,UAAU,CAAC;QACpB,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC","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 { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../types';\nimport { ResourceDetectionConfig } from '../../config';\nimport { arch, hostname } from 'os';\nimport { normalizeArch } from './utils';\nimport { getMachineId } from './machine-id/getMachineId';\n\n/**\n * HostDetectorSync detects the resources related to the host current process is\n * running on. Currently only non-cloud-based attributes are included.\n */\nclass HostDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): Resource {\n const attributes: ResourceAttributes = {\n [SemanticResourceAttributes.HOST_NAME]: hostname(),\n [SemanticResourceAttributes.HOST_ARCH]: normalizeArch(arch()),\n };\n\n return new Resource(attributes, this._getAsyncAttributes());\n }\n\n private _getAsyncAttributes(): Promise<ResourceAttributes> {\n return getMachineId().then(machineId => {\n const attributes: ResourceAttributes = {};\n if (machineId) {\n attributes[SemanticResourceAttributes.HOST_ID] = machineId;\n }\n return attributes;\n });\n }\n}\n\nexport const hostDetectorSync = new HostDetectorSync();\n"]}
/// <reference types="node" />
import * as child_process from 'child_process';
export declare const execAsync: typeof child_process.exec.__promisify__;
//# sourceMappingURL=execAsync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as child_process from 'child_process';
import * as util from 'util';
export const execAsync = util.promisify(child_process.exec);
//# sourceMappingURL=execAsync.js.map
{"version":3,"file":"execAsync.js","sourceRoot":"","sources":["../../../../../src/platform/node/machine-id/execAsync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,aAAa,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC","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"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-bsd.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { promises as fs } from 'fs';
import { execAsync } from './execAsync';
import { diag } from '@opentelemetry/api';
export async function getMachineId() {
try {
const result = await fs.readFile('/etc/hostid', { encoding: 'utf8' });
return result.trim();
}
catch (e) {
diag.debug(`error reading machine id: ${e}`);
}
try {
const result = await execAsync('kenv -q smbios.system.uuid');
return result.stdout.trim();
}
catch (e) {
diag.debug(`error reading machine id: ${e}`);
}
return '';
}
//# sourceMappingURL=getMachineId-bsd.js.map
{"version":3,"file":"getMachineId-bsd.js","sourceRoot":"","sources":["../../../../../src/platform/node/machine-id/getMachineId-bsd.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;QACtE,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;KACtB;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,CAAC,CAAC;KAC9C;IAED,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,4BAA4B,CAAC,CAAC;QAC7D,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;KAC7B;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,CAAC,CAAC;KAC9C;IAED,OAAO,EAAE,CAAC;AACZ,CAAC","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 { promises as fs } from 'fs';\nimport { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n try {\n const result = await fs.readFile('/etc/hostid', { encoding: 'utf8' });\n return result.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n try {\n const result = await execAsync('kenv -q smbios.system.uuid');\n return result.stdout.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-darwin.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { execAsync } from './execAsync';
import { diag } from '@opentelemetry/api';
export async function getMachineId() {
try {
const result = await execAsync('ioreg -rd1 -c "IOPlatformExpertDevice"');
const idLine = result.stdout
.split('\n')
.find(line => line.includes('IOPlatformUUID'));
if (!idLine) {
return '';
}
const parts = idLine.split('" = "');
if (parts.length === 2) {
return parts[1].slice(0, -1);
}
}
catch (e) {
diag.debug(`error reading machine id: ${e}`);
}
return '';
}
//# sourceMappingURL=getMachineId-darwin.js.map
{"version":3,"file":"getMachineId-darwin.js","sourceRoot":"","sources":["../../../../../src/platform/node/machine-id/getMachineId-darwin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,wCAAwC,CAAC,CAAC;QAEzE,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM;aACzB,KAAK,CAAC,IAAI,CAAC;aACX,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC;QAEjD,IAAI,CAAC,MAAM,EAAE;YACX,OAAO,EAAE,CAAC;SACX;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACpC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;SAC9B;KACF;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,CAAC,CAAC;KAC9C;IAED,OAAO,EAAE,CAAC;AACZ,CAAC","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 { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n try {\n const result = await execAsync('ioreg -rd1 -c \"IOPlatformExpertDevice\"');\n\n const idLine = result.stdout\n .split('\\n')\n .find(line => line.includes('IOPlatformUUID'));\n\n if (!idLine) {\n return '';\n }\n\n const parts = idLine.split('\" = \"');\n if (parts.length === 2) {\n return parts[1].slice(0, -1);\n }\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-linux.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { promises as fs } from 'fs';
import { diag } from '@opentelemetry/api';
export async function getMachineId() {
const paths = ['/etc/machine-id', '/var/lib/dbus/machine-id'];
for (const path of paths) {
try {
const result = await fs.readFile(path, { encoding: 'utf8' });
return result.trim();
}
catch (e) {
diag.debug(`error reading machine id: ${e}`);
}
}
return '';
}
//# sourceMappingURL=getMachineId-linux.js.map
{"version":3,"file":"getMachineId-linux.js","sourceRoot":"","sources":["../../../../../src/platform/node/machine-id/getMachineId-linux.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,MAAM,KAAK,GAAG,CAAC,iBAAiB,EAAE,0BAA0B,CAAC,CAAC;IAE9D,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACxB,IAAI;YACF,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;YAC7D,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;SACtB;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,CAAC,CAAC;SAC9C;KACF;IAED,OAAO,EAAE,CAAC;AACZ,CAAC","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 */\nimport { promises as fs } from 'fs';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n const paths = ['/etc/machine-id', '/var/lib/dbus/machine-id'];\n\n for (const path of paths) {\n try {\n const result = await fs.readFile(path, { encoding: 'utf8' });\n return result.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n }\n\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-unsupported.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { diag } from '@opentelemetry/api';
export async function getMachineId() {
diag.debug('could not read machine-id: unsupported platform');
return '';
}
//# sourceMappingURL=getMachineId-unsupported.js.map
{"version":3,"file":"getMachineId-unsupported.js","sourceRoot":"","sources":["../../../../../src/platform/node/machine-id/getMachineId-unsupported.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,IAAI,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;IAC9D,OAAO,EAAE,CAAC;AACZ,CAAC","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 { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n diag.debug('could not read machine-id: unsupported platform');\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-win.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as process from 'process';
import { execAsync } from './execAsync';
import { diag } from '@opentelemetry/api';
export async function getMachineId() {
const args = 'QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid';
let command = '%windir%\\System32\\REG.exe';
if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {
command = '%windir%\\sysnative\\cmd.exe /c ' + command;
}
try {
const result = await execAsync(`${command} ${args}`);
const parts = result.stdout.split('REG_SZ');
if (parts.length === 2) {
return parts[1].trim();
}
}
catch (e) {
diag.debug(`error reading machine id: ${e}`);
}
return '';
}
//# sourceMappingURL=getMachineId-win.js.map
{"version":3,"file":"getMachineId-win.js","sourceRoot":"","sources":["../../../../../src/platform/node/machine-id/getMachineId-win.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,MAAM,IAAI,GACR,4EAA4E,CAAC;IAC/E,IAAI,OAAO,GAAG,6BAA6B,CAAC;IAC5C,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,IAAI,wBAAwB,IAAI,OAAO,CAAC,GAAG,EAAE;QACtE,OAAO,GAAG,kCAAkC,GAAG,OAAO,CAAC;KACxD;IAED,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,GAAG,OAAO,IAAI,IAAI,EAAE,CAAC,CAAC;QACrD,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC5C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACxB;KACF;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,CAAC,CAAC;KAC9C;IAED,OAAO,EAAE,CAAC;AACZ,CAAC","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 process from 'process';\nimport { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n const args =\n 'QUERY HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Cryptography /v MachineGuid';\n let command = '%windir%\\\\System32\\\\REG.exe';\n if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {\n command = '%windir%\\\\sysnative\\\\cmd.exe /c ' + command;\n }\n\n try {\n const result = await execAsync(`${command} ${args}`);\n const parts = result.stdout.split('REG_SZ');\n if (parts.length === 2) {\n return parts[1].trim();\n }\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return '';\n}\n"]}
declare let getMachineId: () => Promise<string>;
export { getMachineId };
//# sourceMappingURL=getMachineId.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as process from 'process';
let getMachineId;
switch (process.platform) {
case 'darwin':
({ getMachineId } = require('./getMachineId-darwin'));
break;
case 'linux':
({ getMachineId } = require('./getMachineId-linux'));
break;
case 'freebsd':
({ getMachineId } = require('./getMachineId-bsd'));
break;
case 'win32':
({ getMachineId } = require('./getMachineId-win'));
break;
default:
({ getMachineId } = require('./getMachineId-unsupported'));
}
export { getMachineId };
//# sourceMappingURL=getMachineId.js.map
{"version":3,"file":"getMachineId.js","sourceRoot":"","sources":["../../../../../src/platform/node/machine-id/getMachineId.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,IAAI,YAAmC,CAAC;AAExC,QAAQ,OAAO,CAAC,QAAQ,EAAE;IACxB,KAAK,QAAQ;QACX,CAAC,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC,CAAC;QACtD,MAAM;IACR,KAAK,OAAO;QACV,CAAC,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC;QACrD,MAAM;IACR,KAAK,SAAS;QACZ,CAAC,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC;QACnD,MAAM;IACR,KAAK,OAAO;QACV,CAAC,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC;QACnD,MAAM;IACR;QACE,CAAC,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC,CAAC;CAC9D;AAED,OAAO,EAAE,YAAY,EAAE,CAAC","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 */\nimport * as process from 'process';\n\nlet getMachineId: () => Promise<string>;\n\nswitch (process.platform) {\n case 'darwin':\n ({ getMachineId } = require('./getMachineId-darwin'));\n break;\n case 'linux':\n ({ getMachineId } = require('./getMachineId-linux'));\n break;\n case 'freebsd':\n ({ getMachineId } = require('./getMachineId-bsd'));\n break;\n case 'win32':\n ({ getMachineId } = require('./getMachineId-win'));\n break;\n default:\n ({ getMachineId } = require('./getMachineId-unsupported'));\n}\n\nexport { getMachineId };\n"]}
import { Detector } from '../../types';
import { ResourceDetectionConfig } from '../../config';
import { IResource } from '../../IResource';
/**
* OSDetector detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
declare class OSDetector implements Detector {
detect(_config?: ResourceDetectionConfig): Promise<IResource>;
}
export declare const osDetector: OSDetector;
export {};
//# sourceMappingURL=OSDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { osDetectorSync } from './OSDetectorSync';
/**
* OSDetector detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
class OSDetector {
detect(_config) {
return Promise.resolve(osDetectorSync.detect(_config));
}
}
export const osDetector = new OSDetector();
//# sourceMappingURL=OSDetector.js.map
{"version":3,"file":"OSDetector.js","sourceRoot":"","sources":["../../../../src/platform/node/OSDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;GAGG;AACH,MAAM,UAAU;IACd,MAAM,CAAC,OAAiC;QACtC,OAAO,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACzD,CAAC;CACF;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,UAAU,EAAE,CAAC","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 { Detector } from '../../types';\nimport { ResourceDetectionConfig } from '../../config';\nimport { IResource } from '../../IResource';\nimport { osDetectorSync } from './OSDetectorSync';\n\n/**\n * OSDetector detects the resources related to the operating system (OS) on\n * which the process represented by this resource is running.\n */\nclass OSDetector implements Detector {\n detect(_config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(osDetectorSync.detect(_config));\n }\n}\n\nexport const osDetector = new OSDetector();\n"]}
import { Resource } from '../../Resource';
import { DetectorSync } from '../../types';
import { ResourceDetectionConfig } from '../../config';
/**
* OSDetectorSync detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
declare class OSDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): Resource;
}
export declare const osDetectorSync: OSDetectorSync;
export {};
//# sourceMappingURL=OSDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { Resource } from '../../Resource';
import { platform, release } from 'os';
import { normalizeType } from './utils';
/**
* OSDetectorSync detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
class OSDetectorSync {
detect(_config) {
const attributes = {
[SemanticResourceAttributes.OS_TYPE]: normalizeType(platform()),
[SemanticResourceAttributes.OS_VERSION]: release(),
};
return new Resource(attributes);
}
}
export const osDetectorSync = new OSDetectorSync();
//# sourceMappingURL=OSDetectorSync.js.map
{"version":3,"file":"OSDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/node/OSDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC;;;GAGG;AACH,MAAM,cAAc;IAClB,MAAM,CAAC,OAAiC;QACtC,MAAM,UAAU,GAAuB;YACrC,CAAC,0BAA0B,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,QAAQ,EAAE,CAAC;YAC/D,CAAC,0BAA0B,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE;SACnD,CAAC;QACF,OAAO,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC","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 { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../types';\nimport { ResourceDetectionConfig } from '../../config';\nimport { platform, release } from 'os';\nimport { normalizeType } from './utils';\n\n/**\n * OSDetectorSync detects the resources related to the operating system (OS) on\n * which the process represented by this resource is running.\n */\nclass OSDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): Resource {\n const attributes: ResourceAttributes = {\n [SemanticResourceAttributes.OS_TYPE]: normalizeType(platform()),\n [SemanticResourceAttributes.OS_VERSION]: release(),\n };\n return new Resource(attributes);\n }\n}\n\nexport const osDetectorSync = new OSDetectorSync();\n"]}
import { Detector } from '../../types';
import { ResourceDetectionConfig } from '../../config';
import { IResource } from '../../IResource';
/**
* ProcessDetector will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
declare class ProcessDetector implements Detector {
detect(config?: ResourceDetectionConfig): Promise<IResource>;
}
export declare const processDetector: ProcessDetector;
export {};
//# sourceMappingURL=ProcessDetector.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { processDetectorSync } from './ProcessDetectorSync';
/**
* ProcessDetector will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
class ProcessDetector {
detect(config) {
return Promise.resolve(processDetectorSync.detect(config));
}
}
export const processDetector = new ProcessDetector();
//# sourceMappingURL=ProcessDetector.js.map
{"version":3,"file":"ProcessDetector.js","sourceRoot":"","sources":["../../../../src/platform/node/ProcessDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;GAGG;AACH,MAAM,eAAe;IACnB,MAAM,CAAC,MAAgC;QACrC,OAAO,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7D,CAAC;CACF;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC","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 { Detector } from '../../types';\nimport { ResourceDetectionConfig } from '../../config';\nimport { IResource } from '../../IResource';\nimport { processDetectorSync } from './ProcessDetectorSync';\n\n/**\n * ProcessDetector will be used to detect the resources related current process running\n * and being instrumented from the NodeJS Process module.\n */\nclass ProcessDetector implements Detector {\n detect(config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(processDetectorSync.detect(config));\n }\n}\n\nexport const processDetector = new ProcessDetector();\n"]}
import { DetectorSync } from '../../types';
import { ResourceDetectionConfig } from '../../config';
import { IResource } from '../../IResource';
/**
* ProcessDetectorSync will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
declare class ProcessDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): IResource;
}
export declare const processDetectorSync: ProcessDetectorSync;
export {};
//# sourceMappingURL=ProcessDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { diag } from '@opentelemetry/api';
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { Resource } from '../../Resource';
import * as os from 'os';
/**
* ProcessDetectorSync will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
class ProcessDetectorSync {
detect(_config) {
const attributes = {
[SemanticResourceAttributes.PROCESS_PID]: process.pid,
[SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME]: process.title,
[SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH]: process.execPath,
[SemanticResourceAttributes.PROCESS_COMMAND_ARGS]: [
process.argv[0],
...process.execArgv,
...process.argv.slice(1),
],
[SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]: process.versions.node,
[SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'nodejs',
[SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Node.js',
};
if (process.argv.length > 1) {
attributes[SemanticResourceAttributes.PROCESS_COMMAND] = process.argv[1];
}
try {
const userInfo = os.userInfo();
attributes[SemanticResourceAttributes.PROCESS_OWNER] = userInfo.username;
}
catch (e) {
diag.debug(`error obtaining process owner: ${e}`);
}
return new Resource(attributes);
}
}
export const processDetectorSync = new ProcessDetectorSync();
//# sourceMappingURL=ProcessDetectorSync.js.map
{"version":3,"file":"ProcessDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/node/ProcessDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAI1C,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB;;;GAGG;AACH,MAAM,mBAAmB;IACvB,MAAM,CAAC,OAAiC;QACtC,MAAM,UAAU,GAAuB;YACrC,CAAC,0BAA0B,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,GAAG;YACrD,CAAC,0BAA0B,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAC,KAAK;YACnE,CAAC,0BAA0B,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAC,QAAQ;YACtE,CAAC,0BAA0B,CAAC,oBAAoB,CAAC,EAAE;gBACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;gBACf,GAAG,OAAO,CAAC,QAAQ;gBACnB,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;aACzB;YACD,CAAC,0BAA0B,CAAC,uBAAuB,CAAC,EAClD,OAAO,CAAC,QAAQ,CAAC,IAAI;YACvB,CAAC,0BAA0B,CAAC,oBAAoB,CAAC,EAAE,QAAQ;YAC3D,CAAC,0BAA0B,CAAC,2BAA2B,CAAC,EAAE,SAAS;SACpE,CAAC;QAEF,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;YAC3B,UAAU,CAAC,0BAA0B,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAC1E;QAED,IAAI;YACF,MAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;YAC/B,UAAU,CAAC,0BAA0B,CAAC,aAAa,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC;SAC1E;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,CAAC,KAAK,CAAC,kCAAkC,CAAC,EAAE,CAAC,CAAC;SACnD;QAED,OAAO,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAC","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 { diag } from '@opentelemetry/api';\nimport { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../types';\nimport { ResourceDetectionConfig } from '../../config';\nimport { IResource } from '../../IResource';\nimport * as os from 'os';\n\n/**\n * ProcessDetectorSync will be used to detect the resources related current process running\n * and being instrumented from the NodeJS Process module.\n */\nclass ProcessDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): IResource {\n const attributes: ResourceAttributes = {\n [SemanticResourceAttributes.PROCESS_PID]: process.pid,\n [SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME]: process.title,\n [SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH]: process.execPath,\n [SemanticResourceAttributes.PROCESS_COMMAND_ARGS]: [\n process.argv[0],\n ...process.execArgv,\n ...process.argv.slice(1),\n ],\n [SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]:\n process.versions.node,\n [SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'nodejs',\n [SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Node.js',\n };\n\n if (process.argv.length > 1) {\n attributes[SemanticResourceAttributes.PROCESS_COMMAND] = process.argv[1];\n }\n\n try {\n const userInfo = os.userInfo();\n attributes[SemanticResourceAttributes.PROCESS_OWNER] = userInfo.username;\n } catch (e) {\n diag.debug(`error obtaining process owner: ${e}`);\n }\n\n return new Resource(attributes);\n }\n}\n\nexport const processDetectorSync = new ProcessDetectorSync();\n"]}
import { Resource } from '../../Resource';
import { DetectorSync } from '../../types';
import { ResourceDetectionConfig } from '../../config';
/**
* ServiceInstanceIdDetectorSync detects the resources related to the service instance ID.
*/
declare class ServiceInstanceIdDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): Resource;
}
/**
* @experimental
*/
export declare const serviceInstanceIdDetectorSync: ServiceInstanceIdDetectorSync;
export {};
//# sourceMappingURL=ServiceInstanceIdDetectorSync.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { SEMRESATTRS_SERVICE_INSTANCE_ID } from '@opentelemetry/semantic-conventions';
import { Resource } from '../../Resource';
import { randomUUID } from 'crypto';
/**
* ServiceInstanceIdDetectorSync detects the resources related to the service instance ID.
*/
class ServiceInstanceIdDetectorSync {
detect(_config) {
const attributes = {
[SEMRESATTRS_SERVICE_INSTANCE_ID]: randomUUID(),
};
return new Resource(attributes);
}
}
/**
* @experimental
*/
export const serviceInstanceIdDetectorSync = new ServiceInstanceIdDetectorSync();
//# sourceMappingURL=ServiceInstanceIdDetectorSync.js.map
{"version":3,"file":"ServiceInstanceIdDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/node/ServiceInstanceIdDetectorSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC;;GAEG;AACH,MAAM,6BAA6B;IACjC,MAAM,CAAC,OAAiC;QACtC,MAAM,UAAU,GAAuB;YACrC,CAAC,+BAA+B,CAAC,EAAE,UAAU,EAAE;SAChD,CAAC;QAEF,OAAO,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GACxC,IAAI,6BAA6B,EAAE,CAAC","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 { SEMRESATTRS_SERVICE_INSTANCE_ID } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../types';\nimport { ResourceDetectionConfig } from '../../config';\nimport { randomUUID } from 'crypto';\n\n/**\n * ServiceInstanceIdDetectorSync detects the resources related to the service instance ID.\n */\nclass ServiceInstanceIdDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): Resource {\n const attributes: ResourceAttributes = {\n [SEMRESATTRS_SERVICE_INSTANCE_ID]: randomUUID(),\n };\n\n return new Resource(attributes);\n }\n}\n\n/**\n * @experimental\n */\nexport const serviceInstanceIdDetectorSync =\n new ServiceInstanceIdDetectorSync();\n"]}
export declare const normalizeArch: (nodeArchString: string) => string;
export declare const normalizeType: (nodePlatform: string) => string;
//# sourceMappingURL=utils.d.ts.map
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const normalizeArch = (nodeArchString) => {
// Maps from https://nodejs.org/api/os.html#osarch to arch values in spec:
// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/host.md
switch (nodeArchString) {
case 'arm':
return 'arm32';
case 'ppc':
return 'ppc32';
case 'x64':
return 'amd64';
default:
return nodeArchString;
}
};
export const normalizeType = (nodePlatform) => {
// Maps from https://nodejs.org/api/os.html#osplatform to arch values in spec:
// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/os.md
switch (nodePlatform) {
case 'sunos':
return 'solaris';
case 'win32':
return 'windows';
default:
return nodePlatform;
}
};
//# sourceMappingURL=utils.js.map
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/platform/node/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,cAAsB,EAAU,EAAE;IAC9D,0EAA0E;IAC1E,8HAA8H;IAC9H,QAAQ,cAAc,EAAE;QACtB,KAAK,KAAK;YACR,OAAO,OAAO,CAAC;QACjB,KAAK,KAAK;YACR,OAAO,OAAO,CAAC;QACjB,KAAK,KAAK;YACR,OAAO,OAAO,CAAC;QACjB;YACE,OAAO,cAAc,CAAC;KACzB;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,YAAoB,EAAU,EAAE;IAC5D,8EAA8E;IAC9E,4HAA4H;IAC5H,QAAQ,YAAY,EAAE;QACpB,KAAK,OAAO;YACV,OAAO,SAAS,CAAC;QACnB,KAAK,OAAO;YACV,OAAO,SAAS,CAAC;QACnB;YACE,OAAO,YAAY,CAAC;KACvB;AACH,CAAC,CAAC","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 */\nexport const normalizeArch = (nodeArchString: string): string => {\n // Maps from https://nodejs.org/api/os.html#osarch to arch values in spec:\n // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/host.md\n switch (nodeArchString) {\n case 'arm':\n return 'arm32';\n case 'ppc':\n return 'ppc32';\n case 'x64':\n return 'amd64';\n default:\n return nodeArchString;\n }\n};\n\nexport const normalizeType = (nodePlatform: string): string => {\n // Maps from https://nodejs.org/api/os.html#osplatform to arch values in spec:\n // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/os.md\n switch (nodePlatform) {\n case 'sunos':\n return 'solaris';\n case 'win32':\n return 'windows';\n default:\n return nodePlatform;\n }\n};\n"]}
export declare const hostDetector: import("../../detectors/NoopDetector").NoopDetector;
//# sourceMappingURL=HostDetector.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.hostDetector = void 0;
const NoopDetector_1 = require("../../detectors/NoopDetector");
exports.hostDetector = NoopDetector_1.noopDetector;
//# sourceMappingURL=HostDetector.js.map
{"version":3,"file":"HostDetector.js","sourceRoot":"","sources":["../../../../src/platform/browser/HostDetector.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,+DAA4D;AAE/C,QAAA,YAAY,GAAG,2BAAY,CAAC","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 { noopDetector } from '../../detectors/NoopDetector';\n\nexport const hostDetector = noopDetector;\n"]}
export declare const hostDetectorSync: import("../../detectors/NoopDetectorSync").NoopDetectorSync;
//# sourceMappingURL=HostDetectorSync.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.hostDetectorSync = void 0;
const NoopDetectorSync_1 = require("../../detectors/NoopDetectorSync");
exports.hostDetectorSync = NoopDetectorSync_1.noopDetectorSync;
//# sourceMappingURL=HostDetectorSync.js.map
{"version":3,"file":"HostDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/browser/HostDetectorSync.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,uEAAoE;AAEvD,QAAA,gBAAgB,GAAG,mCAAgB,CAAC","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 { noopDetectorSync } from '../../detectors/NoopDetectorSync';\n\nexport const hostDetectorSync = noopDetectorSync;\n"]}
export declare const osDetector: import("../../detectors/NoopDetector").NoopDetector;
//# sourceMappingURL=OSDetector.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.osDetector = void 0;
const NoopDetector_1 = require("../../detectors/NoopDetector");
exports.osDetector = NoopDetector_1.noopDetector;
//# sourceMappingURL=OSDetector.js.map
{"version":3,"file":"OSDetector.js","sourceRoot":"","sources":["../../../../src/platform/browser/OSDetector.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,+DAA4D;AAE/C,QAAA,UAAU,GAAG,2BAAY,CAAC","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 { noopDetector } from '../../detectors/NoopDetector';\n\nexport const osDetector = noopDetector;\n"]}
export declare const osDetectorSync: import("../../detectors/NoopDetectorSync").NoopDetectorSync;
//# sourceMappingURL=OSDetectorSync.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.osDetectorSync = void 0;
const NoopDetectorSync_1 = require("../../detectors/NoopDetectorSync");
exports.osDetectorSync = NoopDetectorSync_1.noopDetectorSync;
//# sourceMappingURL=OSDetectorSync.js.map
{"version":3,"file":"OSDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/browser/OSDetectorSync.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,uEAAoE;AAEvD,QAAA,cAAc,GAAG,mCAAgB,CAAC","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 { noopDetectorSync } from '../../detectors/NoopDetectorSync';\n\nexport const osDetectorSync = noopDetectorSync;\n"]}
export declare const processDetector: import("../../detectors/NoopDetector").NoopDetector;
//# sourceMappingURL=ProcessDetector.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.processDetector = void 0;
const NoopDetector_1 = require("../../detectors/NoopDetector");
exports.processDetector = NoopDetector_1.noopDetector;
//# sourceMappingURL=ProcessDetector.js.map
{"version":3,"file":"ProcessDetector.js","sourceRoot":"","sources":["../../../../src/platform/browser/ProcessDetector.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,+DAA4D;AAE/C,QAAA,eAAe,GAAG,2BAAY,CAAC","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 { noopDetector } from '../../detectors/NoopDetector';\n\nexport const processDetector = noopDetector;\n"]}
export declare const processDetectorSync: import("../../detectors/NoopDetector").NoopDetector;
//# sourceMappingURL=ProcessDetectorSync.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.processDetectorSync = void 0;
const NoopDetector_1 = require("../../detectors/NoopDetector");
exports.processDetectorSync = NoopDetector_1.noopDetector;
//# sourceMappingURL=ProcessDetectorSync.js.map
{"version":3,"file":"ProcessDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/browser/ProcessDetectorSync.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,+DAA4D;AAE/C,QAAA,mBAAmB,GAAG,2BAAY,CAAC","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 { noopDetector } from '../../detectors/NoopDetector';\n\nexport const processDetectorSync = noopDetector;\n"]}
/**
* @experimental
*/
export declare const serviceInstanceIdDetectorSync: import("../../detectors/NoopDetectorSync").NoopDetectorSync;
//# sourceMappingURL=ServiceInstanceIdDetectorSync.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.serviceInstanceIdDetectorSync = void 0;
const NoopDetectorSync_1 = require("../../detectors/NoopDetectorSync");
/**
* @experimental
*/
exports.serviceInstanceIdDetectorSync = NoopDetectorSync_1.noopDetectorSync;
//# sourceMappingURL=ServiceInstanceIdDetectorSync.js.map
{"version":3,"file":"ServiceInstanceIdDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/browser/ServiceInstanceIdDetectorSync.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,uEAAoE;AAEpE;;GAEG;AACU,QAAA,6BAA6B,GAAG,mCAAgB,CAAC","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 { noopDetectorSync } from '../../detectors/NoopDetectorSync';\n\n/**\n * @experimental\n */\nexport const serviceInstanceIdDetectorSync = noopDetectorSync;\n"]}
import { Detector } from '../../types';
import { ResourceDetectionConfig } from '../../config';
import { IResource } from '../../IResource';
/**
* HostDetector detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
declare class HostDetector implements Detector {
detect(_config?: ResourceDetectionConfig): Promise<IResource>;
}
export declare const hostDetector: HostDetector;
export {};
//# sourceMappingURL=HostDetector.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.hostDetector = void 0;
const HostDetectorSync_1 = require("./HostDetectorSync");
/**
* HostDetector detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
class HostDetector {
detect(_config) {
return Promise.resolve(HostDetectorSync_1.hostDetectorSync.detect(_config));
}
}
exports.hostDetector = new HostDetector();
//# sourceMappingURL=HostDetector.js.map
{"version":3,"file":"HostDetector.js","sourceRoot":"","sources":["../../../../src/platform/node/HostDetector.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAKH,yDAAsD;AAEtD;;;GAGG;AACH,MAAM,YAAY;IAChB,MAAM,CAAC,OAAiC;QACtC,OAAO,OAAO,CAAC,OAAO,CAAC,mCAAgB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3D,CAAC;CACF;AAEY,QAAA,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC","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 { Detector } from '../../types';\nimport { ResourceDetectionConfig } from '../../config';\nimport { IResource } from '../../IResource';\nimport { hostDetectorSync } from './HostDetectorSync';\n\n/**\n * HostDetector detects the resources related to the host current process is\n * running on. Currently only non-cloud-based attributes are included.\n */\nclass HostDetector implements Detector {\n detect(_config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(hostDetectorSync.detect(_config));\n }\n}\n\nexport const hostDetector = new HostDetector();\n"]}
import { Resource } from '../../Resource';
import { DetectorSync } from '../../types';
import { ResourceDetectionConfig } from '../../config';
/**
* HostDetectorSync detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
declare class HostDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): Resource;
private _getAsyncAttributes;
}
export declare const hostDetectorSync: HostDetectorSync;
export {};
//# sourceMappingURL=HostDetectorSync.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.hostDetectorSync = void 0;
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
const Resource_1 = require("../../Resource");
const os_1 = require("os");
const utils_1 = require("./utils");
const getMachineId_1 = require("./machine-id/getMachineId");
/**
* HostDetectorSync detects the resources related to the host current process is
* running on. Currently only non-cloud-based attributes are included.
*/
class HostDetectorSync {
detect(_config) {
const attributes = {
[semantic_conventions_1.SemanticResourceAttributes.HOST_NAME]: (0, os_1.hostname)(),
[semantic_conventions_1.SemanticResourceAttributes.HOST_ARCH]: (0, utils_1.normalizeArch)((0, os_1.arch)()),
};
return new Resource_1.Resource(attributes, this._getAsyncAttributes());
}
_getAsyncAttributes() {
return (0, getMachineId_1.getMachineId)().then(machineId => {
const attributes = {};
if (machineId) {
attributes[semantic_conventions_1.SemanticResourceAttributes.HOST_ID] = machineId;
}
return attributes;
});
}
}
exports.hostDetectorSync = new HostDetectorSync();
//# sourceMappingURL=HostDetectorSync.js.map
{"version":3,"file":"HostDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/node/HostDetectorSync.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,8EAAiF;AACjF,6CAA0C;AAG1C,2BAAoC;AACpC,mCAAwC;AACxC,4DAAyD;AAEzD;;;GAGG;AACH,MAAM,gBAAgB;IACpB,MAAM,CAAC,OAAiC;QACtC,MAAM,UAAU,GAAuB;YACrC,CAAC,iDAA0B,CAAC,SAAS,CAAC,EAAE,IAAA,aAAQ,GAAE;YAClD,CAAC,iDAA0B,CAAC,SAAS,CAAC,EAAE,IAAA,qBAAa,EAAC,IAAA,SAAI,GAAE,CAAC;SAC9D,CAAC;QAEF,OAAO,IAAI,mBAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAC9D,CAAC;IAEO,mBAAmB;QACzB,OAAO,IAAA,2BAAY,GAAE,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;YACrC,MAAM,UAAU,GAAuB,EAAE,CAAC;YAC1C,IAAI,SAAS,EAAE;gBACb,UAAU,CAAC,iDAA0B,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;aAC5D;YACD,OAAO,UAAU,CAAC;QACpB,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAEY,QAAA,gBAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC","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 { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../types';\nimport { ResourceDetectionConfig } from '../../config';\nimport { arch, hostname } from 'os';\nimport { normalizeArch } from './utils';\nimport { getMachineId } from './machine-id/getMachineId';\n\n/**\n * HostDetectorSync detects the resources related to the host current process is\n * running on. Currently only non-cloud-based attributes are included.\n */\nclass HostDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): Resource {\n const attributes: ResourceAttributes = {\n [SemanticResourceAttributes.HOST_NAME]: hostname(),\n [SemanticResourceAttributes.HOST_ARCH]: normalizeArch(arch()),\n };\n\n return new Resource(attributes, this._getAsyncAttributes());\n }\n\n private _getAsyncAttributes(): Promise<ResourceAttributes> {\n return getMachineId().then(machineId => {\n const attributes: ResourceAttributes = {};\n if (machineId) {\n attributes[SemanticResourceAttributes.HOST_ID] = machineId;\n }\n return attributes;\n });\n }\n}\n\nexport const hostDetectorSync = new HostDetectorSync();\n"]}
/// <reference types="node" />
import * as child_process from 'child_process';
export declare const execAsync: typeof child_process.exec.__promisify__;
//# sourceMappingURL=execAsync.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.execAsync = void 0;
const child_process = require("child_process");
const util = require("util");
exports.execAsync = util.promisify(child_process.exec);
//# sourceMappingURL=execAsync.js.map
{"version":3,"file":"execAsync.js","sourceRoot":"","sources":["../../../../../src/platform/node/machine-id/execAsync.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,+CAA+C;AAC/C,6BAA6B;AAEhB,QAAA,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC","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"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-bsd.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMachineId = void 0;
const fs_1 = require("fs");
const execAsync_1 = require("./execAsync");
const api_1 = require("@opentelemetry/api");
async function getMachineId() {
try {
const result = await fs_1.promises.readFile('/etc/hostid', { encoding: 'utf8' });
return result.trim();
}
catch (e) {
api_1.diag.debug(`error reading machine id: ${e}`);
}
try {
const result = await (0, execAsync_1.execAsync)('kenv -q smbios.system.uuid');
return result.stdout.trim();
}
catch (e) {
api_1.diag.debug(`error reading machine id: ${e}`);
}
return '';
}
exports.getMachineId = getMachineId;
//# sourceMappingURL=getMachineId-bsd.js.map
{"version":3,"file":"getMachineId-bsd.js","sourceRoot":"","sources":["../../../../../src/platform/node/machine-id/getMachineId-bsd.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,2BAAoC;AACpC,2CAAwC;AACxC,4CAA0C;AAEnC,KAAK,UAAU,YAAY;IAChC,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,aAAE,CAAC,QAAQ,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;QACtE,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;KACtB;IAAC,OAAO,CAAC,EAAE;QACV,UAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,CAAC,CAAC;KAC9C;IAED,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,IAAA,qBAAS,EAAC,4BAA4B,CAAC,CAAC;QAC7D,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;KAC7B;IAAC,OAAO,CAAC,EAAE;QACV,UAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,CAAC,CAAC;KAC9C;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AAhBD,oCAgBC","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 { promises as fs } from 'fs';\nimport { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n try {\n const result = await fs.readFile('/etc/hostid', { encoding: 'utf8' });\n return result.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n try {\n const result = await execAsync('kenv -q smbios.system.uuid');\n return result.stdout.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-darwin.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMachineId = void 0;
const execAsync_1 = require("./execAsync");
const api_1 = require("@opentelemetry/api");
async function getMachineId() {
try {
const result = await (0, execAsync_1.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"');
const idLine = result.stdout
.split('\n')
.find(line => line.includes('IOPlatformUUID'));
if (!idLine) {
return '';
}
const parts = idLine.split('" = "');
if (parts.length === 2) {
return parts[1].slice(0, -1);
}
}
catch (e) {
api_1.diag.debug(`error reading machine id: ${e}`);
}
return '';
}
exports.getMachineId = getMachineId;
//# sourceMappingURL=getMachineId-darwin.js.map
{"version":3,"file":"getMachineId-darwin.js","sourceRoot":"","sources":["../../../../../src/platform/node/machine-id/getMachineId-darwin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,2CAAwC;AACxC,4CAA0C;AAEnC,KAAK,UAAU,YAAY;IAChC,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,IAAA,qBAAS,EAAC,wCAAwC,CAAC,CAAC;QAEzE,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM;aACzB,KAAK,CAAC,IAAI,CAAC;aACX,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC;QAEjD,IAAI,CAAC,MAAM,EAAE;YACX,OAAO,EAAE,CAAC;SACX;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACpC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;SAC9B;KACF;IAAC,OAAO,CAAC,EAAE;QACV,UAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,CAAC,CAAC;KAC9C;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AArBD,oCAqBC","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 { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n try {\n const result = await execAsync('ioreg -rd1 -c \"IOPlatformExpertDevice\"');\n\n const idLine = result.stdout\n .split('\\n')\n .find(line => line.includes('IOPlatformUUID'));\n\n if (!idLine) {\n return '';\n }\n\n const parts = idLine.split('\" = \"');\n if (parts.length === 2) {\n return parts[1].slice(0, -1);\n }\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-linux.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMachineId = void 0;
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const fs_1 = require("fs");
const api_1 = require("@opentelemetry/api");
async function getMachineId() {
const paths = ['/etc/machine-id', '/var/lib/dbus/machine-id'];
for (const path of paths) {
try {
const result = await fs_1.promises.readFile(path, { encoding: 'utf8' });
return result.trim();
}
catch (e) {
api_1.diag.debug(`error reading machine id: ${e}`);
}
}
return '';
}
exports.getMachineId = getMachineId;
//# sourceMappingURL=getMachineId-linux.js.map
{"version":3,"file":"getMachineId-linux.js","sourceRoot":"","sources":["../../../../../src/platform/node/machine-id/getMachineId-linux.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,2BAAoC;AACpC,4CAA0C;AAEnC,KAAK,UAAU,YAAY;IAChC,MAAM,KAAK,GAAG,CAAC,iBAAiB,EAAE,0BAA0B,CAAC,CAAC;IAE9D,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACxB,IAAI;YACF,MAAM,MAAM,GAAG,MAAM,aAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;YAC7D,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;SACtB;QAAC,OAAO,CAAC,EAAE;YACV,UAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,CAAC,CAAC;SAC9C;KACF;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AAbD,oCAaC","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 */\nimport { promises as fs } from 'fs';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n const paths = ['/etc/machine-id', '/var/lib/dbus/machine-id'];\n\n for (const path of paths) {\n try {\n const result = await fs.readFile(path, { encoding: 'utf8' });\n return result.trim();\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n }\n\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-unsupported.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMachineId = void 0;
const api_1 = require("@opentelemetry/api");
async function getMachineId() {
api_1.diag.debug('could not read machine-id: unsupported platform');
return '';
}
exports.getMachineId = getMachineId;
//# sourceMappingURL=getMachineId-unsupported.js.map
{"version":3,"file":"getMachineId-unsupported.js","sourceRoot":"","sources":["../../../../../src/platform/node/machine-id/getMachineId-unsupported.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAA0C;AAEnC,KAAK,UAAU,YAAY;IAChC,UAAI,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;IAC9D,OAAO,EAAE,CAAC;AACZ,CAAC;AAHD,oCAGC","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 { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n diag.debug('could not read machine-id: unsupported platform');\n return '';\n}\n"]}
export declare function getMachineId(): Promise<string>;
//# sourceMappingURL=getMachineId-win.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMachineId = void 0;
const process = require("process");
const execAsync_1 = require("./execAsync");
const api_1 = require("@opentelemetry/api");
async function getMachineId() {
const args = 'QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid';
let command = '%windir%\\System32\\REG.exe';
if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {
command = '%windir%\\sysnative\\cmd.exe /c ' + command;
}
try {
const result = await (0, execAsync_1.execAsync)(`${command} ${args}`);
const parts = result.stdout.split('REG_SZ');
if (parts.length === 2) {
return parts[1].trim();
}
}
catch (e) {
api_1.diag.debug(`error reading machine id: ${e}`);
}
return '';
}
exports.getMachineId = getMachineId;
//# sourceMappingURL=getMachineId-win.js.map
{"version":3,"file":"getMachineId-win.js","sourceRoot":"","sources":["../../../../../src/platform/node/machine-id/getMachineId-win.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,mCAAmC;AACnC,2CAAwC;AACxC,4CAA0C;AAEnC,KAAK,UAAU,YAAY;IAChC,MAAM,IAAI,GACR,4EAA4E,CAAC;IAC/E,IAAI,OAAO,GAAG,6BAA6B,CAAC;IAC5C,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,IAAI,wBAAwB,IAAI,OAAO,CAAC,GAAG,EAAE;QACtE,OAAO,GAAG,kCAAkC,GAAG,OAAO,CAAC;KACxD;IAED,IAAI;QACF,MAAM,MAAM,GAAG,MAAM,IAAA,qBAAS,EAAC,GAAG,OAAO,IAAI,IAAI,EAAE,CAAC,CAAC;QACrD,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC5C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACxB;KACF;IAAC,OAAO,CAAC,EAAE;QACV,UAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,CAAC,CAAC;KAC9C;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AAnBD,oCAmBC","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 process from 'process';\nimport { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string> {\n const args =\n 'QUERY HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Cryptography /v MachineGuid';\n let command = '%windir%\\\\System32\\\\REG.exe';\n if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {\n command = '%windir%\\\\sysnative\\\\cmd.exe /c ' + command;\n }\n\n try {\n const result = await execAsync(`${command} ${args}`);\n const parts = result.stdout.split('REG_SZ');\n if (parts.length === 2) {\n return parts[1].trim();\n }\n } catch (e) {\n diag.debug(`error reading machine id: ${e}`);\n }\n\n return '';\n}\n"]}
declare let getMachineId: () => Promise<string>;
export { getMachineId };
//# sourceMappingURL=getMachineId.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMachineId = void 0;
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const process = require("process");
let getMachineId;
exports.getMachineId = getMachineId;
switch (process.platform) {
case 'darwin':
(exports.getMachineId = getMachineId = require('./getMachineId-darwin').getMachineId);
break;
case 'linux':
(exports.getMachineId = getMachineId = require('./getMachineId-linux').getMachineId);
break;
case 'freebsd':
(exports.getMachineId = getMachineId = require('./getMachineId-bsd').getMachineId);
break;
case 'win32':
(exports.getMachineId = getMachineId = require('./getMachineId-win').getMachineId);
break;
default:
(exports.getMachineId = getMachineId = require('./getMachineId-unsupported').getMachineId);
}
//# sourceMappingURL=getMachineId.js.map
{"version":3,"file":"getMachineId.js","sourceRoot":"","sources":["../../../../../src/platform/node/machine-id/getMachineId.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,mCAAmC;AAEnC,IAAI,YAAmC,CAAC;AAmB/B,oCAAY;AAjBrB,QAAQ,OAAO,CAAC,QAAQ,EAAE;IACxB,KAAK,QAAQ;QACX,CAAG,uBAAA,YAAY,GAAK,OAAO,CAAC,uBAAuB,CAAC,aAArC,CAAsC,CAAC;QACtD,MAAM;IACR,KAAK,OAAO;QACV,CAAG,uBAAA,YAAY,GAAK,OAAO,CAAC,sBAAsB,CAAC,aAApC,CAAqC,CAAC;QACrD,MAAM;IACR,KAAK,SAAS;QACZ,CAAG,uBAAA,YAAY,GAAK,OAAO,CAAC,oBAAoB,CAAC,aAAlC,CAAmC,CAAC;QACnD,MAAM;IACR,KAAK,OAAO;QACV,CAAG,uBAAA,YAAY,GAAK,OAAO,CAAC,oBAAoB,CAAC,aAAlC,CAAmC,CAAC;QACnD,MAAM;IACR;QACE,CAAG,uBAAA,YAAY,GAAK,OAAO,CAAC,4BAA4B,CAAC,aAA1C,CAA2C,CAAC;CAC9D","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 */\nimport * as process from 'process';\n\nlet getMachineId: () => Promise<string>;\n\nswitch (process.platform) {\n case 'darwin':\n ({ getMachineId } = require('./getMachineId-darwin'));\n break;\n case 'linux':\n ({ getMachineId } = require('./getMachineId-linux'));\n break;\n case 'freebsd':\n ({ getMachineId } = require('./getMachineId-bsd'));\n break;\n case 'win32':\n ({ getMachineId } = require('./getMachineId-win'));\n break;\n default:\n ({ getMachineId } = require('./getMachineId-unsupported'));\n}\n\nexport { getMachineId };\n"]}
import { Detector } from '../../types';
import { ResourceDetectionConfig } from '../../config';
import { IResource } from '../../IResource';
/**
* OSDetector detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
declare class OSDetector implements Detector {
detect(_config?: ResourceDetectionConfig): Promise<IResource>;
}
export declare const osDetector: OSDetector;
export {};
//# sourceMappingURL=OSDetector.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.osDetector = void 0;
const OSDetectorSync_1 = require("./OSDetectorSync");
/**
* OSDetector detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
class OSDetector {
detect(_config) {
return Promise.resolve(OSDetectorSync_1.osDetectorSync.detect(_config));
}
}
exports.osDetector = new OSDetector();
//# sourceMappingURL=OSDetector.js.map
{"version":3,"file":"OSDetector.js","sourceRoot":"","sources":["../../../../src/platform/node/OSDetector.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAKH,qDAAkD;AAElD;;;GAGG;AACH,MAAM,UAAU;IACd,MAAM,CAAC,OAAiC;QACtC,OAAO,OAAO,CAAC,OAAO,CAAC,+BAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACzD,CAAC;CACF;AAEY,QAAA,UAAU,GAAG,IAAI,UAAU,EAAE,CAAC","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 { Detector } from '../../types';\nimport { ResourceDetectionConfig } from '../../config';\nimport { IResource } from '../../IResource';\nimport { osDetectorSync } from './OSDetectorSync';\n\n/**\n * OSDetector detects the resources related to the operating system (OS) on\n * which the process represented by this resource is running.\n */\nclass OSDetector implements Detector {\n detect(_config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(osDetectorSync.detect(_config));\n }\n}\n\nexport const osDetector = new OSDetector();\n"]}
import { Resource } from '../../Resource';
import { DetectorSync } from '../../types';
import { ResourceDetectionConfig } from '../../config';
/**
* OSDetectorSync detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
declare class OSDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): Resource;
}
export declare const osDetectorSync: OSDetectorSync;
export {};
//# sourceMappingURL=OSDetectorSync.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.osDetectorSync = void 0;
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
const Resource_1 = require("../../Resource");
const os_1 = require("os");
const utils_1 = require("./utils");
/**
* OSDetectorSync detects the resources related to the operating system (OS) on
* which the process represented by this resource is running.
*/
class OSDetectorSync {
detect(_config) {
const attributes = {
[semantic_conventions_1.SemanticResourceAttributes.OS_TYPE]: (0, utils_1.normalizeType)((0, os_1.platform)()),
[semantic_conventions_1.SemanticResourceAttributes.OS_VERSION]: (0, os_1.release)(),
};
return new Resource_1.Resource(attributes);
}
}
exports.osDetectorSync = new OSDetectorSync();
//# sourceMappingURL=OSDetectorSync.js.map
{"version":3,"file":"OSDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/node/OSDetectorSync.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,8EAAiF;AACjF,6CAA0C;AAG1C,2BAAuC;AACvC,mCAAwC;AAExC;;;GAGG;AACH,MAAM,cAAc;IAClB,MAAM,CAAC,OAAiC;QACtC,MAAM,UAAU,GAAuB;YACrC,CAAC,iDAA0B,CAAC,OAAO,CAAC,EAAE,IAAA,qBAAa,EAAC,IAAA,aAAQ,GAAE,CAAC;YAC/D,CAAC,iDAA0B,CAAC,UAAU,CAAC,EAAE,IAAA,YAAO,GAAE;SACnD,CAAC;QACF,OAAO,IAAI,mBAAQ,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;CACF;AAEY,QAAA,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC","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 { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../types';\nimport { ResourceDetectionConfig } from '../../config';\nimport { platform, release } from 'os';\nimport { normalizeType } from './utils';\n\n/**\n * OSDetectorSync detects the resources related to the operating system (OS) on\n * which the process represented by this resource is running.\n */\nclass OSDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): Resource {\n const attributes: ResourceAttributes = {\n [SemanticResourceAttributes.OS_TYPE]: normalizeType(platform()),\n [SemanticResourceAttributes.OS_VERSION]: release(),\n };\n return new Resource(attributes);\n }\n}\n\nexport const osDetectorSync = new OSDetectorSync();\n"]}
import { Detector } from '../../types';
import { ResourceDetectionConfig } from '../../config';
import { IResource } from '../../IResource';
/**
* ProcessDetector will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
declare class ProcessDetector implements Detector {
detect(config?: ResourceDetectionConfig): Promise<IResource>;
}
export declare const processDetector: ProcessDetector;
export {};
//# sourceMappingURL=ProcessDetector.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.processDetector = void 0;
const ProcessDetectorSync_1 = require("./ProcessDetectorSync");
/**
* ProcessDetector will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
class ProcessDetector {
detect(config) {
return Promise.resolve(ProcessDetectorSync_1.processDetectorSync.detect(config));
}
}
exports.processDetector = new ProcessDetector();
//# sourceMappingURL=ProcessDetector.js.map
{"version":3,"file":"ProcessDetector.js","sourceRoot":"","sources":["../../../../src/platform/node/ProcessDetector.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAKH,+DAA4D;AAE5D;;;GAGG;AACH,MAAM,eAAe;IACnB,MAAM,CAAC,MAAgC;QACrC,OAAO,OAAO,CAAC,OAAO,CAAC,yCAAmB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7D,CAAC;CACF;AAEY,QAAA,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC","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 { Detector } from '../../types';\nimport { ResourceDetectionConfig } from '../../config';\nimport { IResource } from '../../IResource';\nimport { processDetectorSync } from './ProcessDetectorSync';\n\n/**\n * ProcessDetector will be used to detect the resources related current process running\n * and being instrumented from the NodeJS Process module.\n */\nclass ProcessDetector implements Detector {\n detect(config?: ResourceDetectionConfig): Promise<IResource> {\n return Promise.resolve(processDetectorSync.detect(config));\n }\n}\n\nexport const processDetector = new ProcessDetector();\n"]}
import { DetectorSync } from '../../types';
import { ResourceDetectionConfig } from '../../config';
import { IResource } from '../../IResource';
/**
* ProcessDetectorSync will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
declare class ProcessDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): IResource;
}
export declare const processDetectorSync: ProcessDetectorSync;
export {};
//# sourceMappingURL=ProcessDetectorSync.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.processDetectorSync = void 0;
const api_1 = require("@opentelemetry/api");
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
const Resource_1 = require("../../Resource");
const os = require("os");
/**
* ProcessDetectorSync will be used to detect the resources related current process running
* and being instrumented from the NodeJS Process module.
*/
class ProcessDetectorSync {
detect(_config) {
const attributes = {
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_PID]: process.pid,
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME]: process.title,
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH]: process.execPath,
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_COMMAND_ARGS]: [
process.argv[0],
...process.execArgv,
...process.argv.slice(1),
],
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]: process.versions.node,
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'nodejs',
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Node.js',
};
if (process.argv.length > 1) {
attributes[semantic_conventions_1.SemanticResourceAttributes.PROCESS_COMMAND] = process.argv[1];
}
try {
const userInfo = os.userInfo();
attributes[semantic_conventions_1.SemanticResourceAttributes.PROCESS_OWNER] = userInfo.username;
}
catch (e) {
api_1.diag.debug(`error obtaining process owner: ${e}`);
}
return new Resource_1.Resource(attributes);
}
}
exports.processDetectorSync = new ProcessDetectorSync();
//# sourceMappingURL=ProcessDetectorSync.js.map
{"version":3,"file":"ProcessDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/node/ProcessDetectorSync.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAA0C;AAC1C,8EAAiF;AACjF,6CAA0C;AAI1C,yBAAyB;AAEzB;;;GAGG;AACH,MAAM,mBAAmB;IACvB,MAAM,CAAC,OAAiC;QACtC,MAAM,UAAU,GAAuB;YACrC,CAAC,iDAA0B,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,GAAG;YACrD,CAAC,iDAA0B,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAC,KAAK;YACnE,CAAC,iDAA0B,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAC,QAAQ;YACtE,CAAC,iDAA0B,CAAC,oBAAoB,CAAC,EAAE;gBACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;gBACf,GAAG,OAAO,CAAC,QAAQ;gBACnB,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;aACzB;YACD,CAAC,iDAA0B,CAAC,uBAAuB,CAAC,EAClD,OAAO,CAAC,QAAQ,CAAC,IAAI;YACvB,CAAC,iDAA0B,CAAC,oBAAoB,CAAC,EAAE,QAAQ;YAC3D,CAAC,iDAA0B,CAAC,2BAA2B,CAAC,EAAE,SAAS;SACpE,CAAC;QAEF,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;YAC3B,UAAU,CAAC,iDAA0B,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAC1E;QAED,IAAI;YACF,MAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;YAC/B,UAAU,CAAC,iDAA0B,CAAC,aAAa,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC;SAC1E;QAAC,OAAO,CAAC,EAAE;YACV,UAAI,CAAC,KAAK,CAAC,kCAAkC,CAAC,EAAE,CAAC,CAAC;SACnD;QAED,OAAO,IAAI,mBAAQ,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;CACF;AAEY,QAAA,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAC","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 { diag } from '@opentelemetry/api';\nimport { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../types';\nimport { ResourceDetectionConfig } from '../../config';\nimport { IResource } from '../../IResource';\nimport * as os from 'os';\n\n/**\n * ProcessDetectorSync will be used to detect the resources related current process running\n * and being instrumented from the NodeJS Process module.\n */\nclass ProcessDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): IResource {\n const attributes: ResourceAttributes = {\n [SemanticResourceAttributes.PROCESS_PID]: process.pid,\n [SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME]: process.title,\n [SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH]: process.execPath,\n [SemanticResourceAttributes.PROCESS_COMMAND_ARGS]: [\n process.argv[0],\n ...process.execArgv,\n ...process.argv.slice(1),\n ],\n [SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]:\n process.versions.node,\n [SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'nodejs',\n [SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Node.js',\n };\n\n if (process.argv.length > 1) {\n attributes[SemanticResourceAttributes.PROCESS_COMMAND] = process.argv[1];\n }\n\n try {\n const userInfo = os.userInfo();\n attributes[SemanticResourceAttributes.PROCESS_OWNER] = userInfo.username;\n } catch (e) {\n diag.debug(`error obtaining process owner: ${e}`);\n }\n\n return new Resource(attributes);\n }\n}\n\nexport const processDetectorSync = new ProcessDetectorSync();\n"]}
import { Resource } from '../../Resource';
import { DetectorSync } from '../../types';
import { ResourceDetectionConfig } from '../../config';
/**
* ServiceInstanceIdDetectorSync detects the resources related to the service instance ID.
*/
declare class ServiceInstanceIdDetectorSync implements DetectorSync {
detect(_config?: ResourceDetectionConfig): Resource;
}
/**
* @experimental
*/
export declare const serviceInstanceIdDetectorSync: ServiceInstanceIdDetectorSync;
export {};
//# sourceMappingURL=ServiceInstanceIdDetectorSync.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.serviceInstanceIdDetectorSync = void 0;
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
const Resource_1 = require("../../Resource");
const crypto_1 = require("crypto");
/**
* ServiceInstanceIdDetectorSync detects the resources related to the service instance ID.
*/
class ServiceInstanceIdDetectorSync {
detect(_config) {
const attributes = {
[semantic_conventions_1.SEMRESATTRS_SERVICE_INSTANCE_ID]: (0, crypto_1.randomUUID)(),
};
return new Resource_1.Resource(attributes);
}
}
/**
* @experimental
*/
exports.serviceInstanceIdDetectorSync = new ServiceInstanceIdDetectorSync();
//# sourceMappingURL=ServiceInstanceIdDetectorSync.js.map
{"version":3,"file":"ServiceInstanceIdDetectorSync.js","sourceRoot":"","sources":["../../../../src/platform/node/ServiceInstanceIdDetectorSync.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,8EAAsF;AACtF,6CAA0C;AAG1C,mCAAoC;AAEpC;;GAEG;AACH,MAAM,6BAA6B;IACjC,MAAM,CAAC,OAAiC;QACtC,MAAM,UAAU,GAAuB;YACrC,CAAC,sDAA+B,CAAC,EAAE,IAAA,mBAAU,GAAE;SAChD,CAAC;QAEF,OAAO,IAAI,mBAAQ,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;CACF;AAED;;GAEG;AACU,QAAA,6BAA6B,GACxC,IAAI,6BAA6B,EAAE,CAAC","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 { SEMRESATTRS_SERVICE_INSTANCE_ID } from '@opentelemetry/semantic-conventions';\nimport { Resource } from '../../Resource';\nimport { DetectorSync, ResourceAttributes } from '../../types';\nimport { ResourceDetectionConfig } from '../../config';\nimport { randomUUID } from 'crypto';\n\n/**\n * ServiceInstanceIdDetectorSync detects the resources related to the service instance ID.\n */\nclass ServiceInstanceIdDetectorSync implements DetectorSync {\n detect(_config?: ResourceDetectionConfig): Resource {\n const attributes: ResourceAttributes = {\n [SEMRESATTRS_SERVICE_INSTANCE_ID]: randomUUID(),\n };\n\n return new Resource(attributes);\n }\n}\n\n/**\n * @experimental\n */\nexport const serviceInstanceIdDetectorSync =\n new ServiceInstanceIdDetectorSync();\n"]}
export declare const normalizeArch: (nodeArchString: string) => string;
export declare const normalizeType: (nodePlatform: string) => string;
//# sourceMappingURL=utils.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalizeType = exports.normalizeArch = void 0;
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const normalizeArch = (nodeArchString) => {
// Maps from https://nodejs.org/api/os.html#osarch to arch values in spec:
// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/host.md
switch (nodeArchString) {
case 'arm':
return 'arm32';
case 'ppc':
return 'ppc32';
case 'x64':
return 'amd64';
default:
return nodeArchString;
}
};
exports.normalizeArch = normalizeArch;
const normalizeType = (nodePlatform) => {
// Maps from https://nodejs.org/api/os.html#osplatform to arch values in spec:
// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/os.md
switch (nodePlatform) {
case 'sunos':
return 'solaris';
case 'win32':
return 'windows';
default:
return nodePlatform;
}
};
exports.normalizeType = normalizeType;
//# sourceMappingURL=utils.js.map
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/platform/node/utils.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACI,MAAM,aAAa,GAAG,CAAC,cAAsB,EAAU,EAAE;IAC9D,0EAA0E;IAC1E,8HAA8H;IAC9H,QAAQ,cAAc,EAAE;QACtB,KAAK,KAAK;YACR,OAAO,OAAO,CAAC;QACjB,KAAK,KAAK;YACR,OAAO,OAAO,CAAC;QACjB,KAAK,KAAK;YACR,OAAO,OAAO,CAAC;QACjB;YACE,OAAO,cAAc,CAAC;KACzB;AACH,CAAC,CAAC;AAbW,QAAA,aAAa,iBAaxB;AAEK,MAAM,aAAa,GAAG,CAAC,YAAoB,EAAU,EAAE;IAC5D,8EAA8E;IAC9E,4HAA4H;IAC5H,QAAQ,YAAY,EAAE;QACpB,KAAK,OAAO;YACV,OAAO,SAAS,CAAC;QACnB,KAAK,OAAO;YACV,OAAO,SAAS,CAAC;QACnB;YACE,OAAO,YAAY,CAAC;KACvB;AACH,CAAC,CAAC;AAXW,QAAA,aAAa,iBAWxB","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 */\nexport const normalizeArch = (nodeArchString: string): string => {\n // Maps from https://nodejs.org/api/os.html#osarch to arch values in spec:\n // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/host.md\n switch (nodeArchString) {\n case 'arm':\n return 'arm32';\n case 'ppc':\n return 'ppc32';\n case 'x64':\n return 'amd64';\n default:\n return nodeArchString;\n }\n};\n\nexport const normalizeType = (nodePlatform: string): string => {\n // Maps from https://nodejs.org/api/os.html#osplatform to arch values in spec:\n // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/os.md\n switch (nodePlatform) {\n case 'sunos':\n return 'solaris';\n case 'win32':\n return 'windows';\n default:\n return nodePlatform;\n }\n};\n"]}