arvo-core 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md
CHANGED
@@ -14,14 +14,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.OTelNull = exports.exceptionToSpan = exports.logToSpan = exports.fetchOpenTelemetryTracer = void 0;
|
15
15
|
exports.currentOpenTelemetryHeaders = currentOpenTelemetryHeaders;
|
16
16
|
var api_1 = require("@opentelemetry/api");
|
17
|
-
var utils_1 = require("./utils");
|
18
17
|
var core_1 = require("@opentelemetry/core");
|
19
18
|
/**
|
20
19
|
* A tracer instance for the ArvoCore package.
|
21
20
|
*/
|
22
21
|
var fetchOpenTelemetryTracer = function () {
|
23
|
-
|
24
|
-
return api_1.trace.getTracer(pkg.name, pkg.version);
|
22
|
+
return api_1.trace.getTracer('arvo-instrumentation');
|
25
23
|
};
|
26
24
|
exports.fetchOpenTelemetryTracer = fetchOpenTelemetryTracer;
|
27
25
|
/**
|
package/package.json
CHANGED
@@ -1,44 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
-
if (mod && mod.__esModule) return mod;
|
20
|
-
var result = {};
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
-
__setModuleDefault(result, mod);
|
23
|
-
return result;
|
24
|
-
};
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
-
exports.getPackageInfo = getPackageInfo;
|
27
|
-
var fs = __importStar(require("fs"));
|
28
|
-
var path = __importStar(require("path"));
|
29
|
-
function getPackageInfo(defaultName) {
|
30
|
-
try {
|
31
|
-
// Read the package.json file
|
32
|
-
var packageJsonPath = path.resolve(__dirname, '../../package.json');
|
33
|
-
var packageJsonContent = fs.readFileSync(packageJsonPath, 'utf-8');
|
34
|
-
// Parse the JSON content
|
35
|
-
var packageJson = JSON.parse(packageJsonContent);
|
36
|
-
// Extract name and version
|
37
|
-
var name_1 = packageJson.name, version = packageJson.version;
|
38
|
-
return { name: name_1, version: version };
|
39
|
-
}
|
40
|
-
catch (error) {
|
41
|
-
console.error('Error reading package.json:', error);
|
42
|
-
return { name: defaultName, version: 'Unknown' };
|
43
|
-
}
|
44
|
-
}
|