UNPKG

@aws/aws-distro-opentelemetry-node-autoinstrumentation

Version:

This package provides Amazon Web Services distribution of the OpenTelemetry Node Instrumentation, which allows for auto-instrumentation of NodeJS applications.

19 lines 622 B
"use strict"; // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 Object.defineProperty(exports, "__esModule", { value: true }); exports.getNodeVersion = void 0; const getNodeVersion = () => { const nodeVersion = process.versions.node; const versionParts = nodeVersion.split('.'); if (versionParts.length === 0) { return -1; } const majorVersion = parseInt(versionParts[0], 10); if (isNaN(majorVersion)) { return -1; } return majorVersion; }; exports.getNodeVersion = getNodeVersion; //# sourceMappingURL=utils.js.map