@midwayjs/otel 3.5.3 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/configuration.js +3 -4
- package/dist/decorator/tracer.decorator.js +2 -2
- package/dist/service.d.ts +1 -1
- package/dist/service.js +5 -5
- package/package.json +5 -6
package/README.md
CHANGED
|
@@ -71,7 +71,7 @@ You can find more information at [opentelemetry-js](https://github.com/open-tele
|
|
|
71
71
|
Enable component first.
|
|
72
72
|
|
|
73
73
|
```typescript
|
|
74
|
-
import { Configuration } from '@midwayjs/
|
|
74
|
+
import { Configuration } from '@midwayjs/core';
|
|
75
75
|
import * as koa from '@midwayjs/koa';
|
|
76
76
|
import * as otel from '@midwayjs/otel';
|
|
77
77
|
|
package/dist/configuration.js
CHANGED
|
@@ -10,7 +10,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.OtelConfiguration = void 0;
|
|
13
|
-
const decorator_1 = require("@midwayjs/decorator");
|
|
14
13
|
const core_1 = require("@midwayjs/core");
|
|
15
14
|
const tracer_decorator_1 = require("./decorator/tracer.decorator");
|
|
16
15
|
const service_1 = require("./service");
|
|
@@ -47,15 +46,15 @@ let OtelConfiguration = class OtelConfiguration {
|
|
|
47
46
|
}
|
|
48
47
|
};
|
|
49
48
|
__decorate([
|
|
50
|
-
(0,
|
|
49
|
+
(0, core_1.Inject)(),
|
|
51
50
|
__metadata("design:type", core_1.MidwayDecoratorService)
|
|
52
51
|
], OtelConfiguration.prototype, "decoratorService", void 0);
|
|
53
52
|
__decorate([
|
|
54
|
-
(0,
|
|
53
|
+
(0, core_1.Inject)(),
|
|
55
54
|
__metadata("design:type", service_1.TraceService)
|
|
56
55
|
], OtelConfiguration.prototype, "traceService", void 0);
|
|
57
56
|
OtelConfiguration = __decorate([
|
|
58
|
-
(0,
|
|
57
|
+
(0, core_1.Configuration)({
|
|
59
58
|
namespace: 'otel',
|
|
60
59
|
})
|
|
61
60
|
], OtelConfiguration);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Trace = exports.TRACE_KEY = void 0;
|
|
4
|
-
const
|
|
4
|
+
const core_1 = require("@midwayjs/core");
|
|
5
5
|
exports.TRACE_KEY = 'decorator:open_telemetry_key';
|
|
6
6
|
function Trace(spanName) {
|
|
7
|
-
return (0,
|
|
7
|
+
return (0, core_1.createCustomMethodDecorator)(exports.TRACE_KEY, {
|
|
8
8
|
spanName,
|
|
9
9
|
});
|
|
10
10
|
}
|
package/dist/service.d.ts
CHANGED
package/dist/service.js
CHANGED
|
@@ -10,7 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.TraceService = void 0;
|
|
13
|
-
const
|
|
13
|
+
const core_1 = require("@midwayjs/core");
|
|
14
14
|
const api_1 = require("@opentelemetry/api");
|
|
15
15
|
let TraceService = class TraceService {
|
|
16
16
|
async init() {
|
|
@@ -30,18 +30,18 @@ let TraceService = class TraceService {
|
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
__decorate([
|
|
33
|
-
(0,
|
|
33
|
+
(0, core_1.App)(),
|
|
34
34
|
__metadata("design:type", Object)
|
|
35
35
|
], TraceService.prototype, "app", void 0);
|
|
36
36
|
__decorate([
|
|
37
|
-
(0,
|
|
37
|
+
(0, core_1.Init)(),
|
|
38
38
|
__metadata("design:type", Function),
|
|
39
39
|
__metadata("design:paramtypes", []),
|
|
40
40
|
__metadata("design:returntype", Promise)
|
|
41
41
|
], TraceService.prototype, "init", null);
|
|
42
42
|
TraceService = __decorate([
|
|
43
|
-
(0,
|
|
44
|
-
(0,
|
|
43
|
+
(0, core_1.Provide)(),
|
|
44
|
+
(0, core_1.Scope)(core_1.ScopeEnum.Singleton)
|
|
45
45
|
], TraceService);
|
|
46
46
|
exports.TraceService = TraceService;
|
|
47
47
|
//# sourceMappingURL=service.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/otel",
|
|
3
3
|
"description": "midway open telemetry component",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.7.0",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"typings": "index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -10,10 +10,9 @@
|
|
|
10
10
|
"index.d.ts"
|
|
11
11
|
],
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@midwayjs/core": "^3.
|
|
14
|
-
"@midwayjs/
|
|
15
|
-
"@midwayjs/
|
|
16
|
-
"@midwayjs/mock": "^3.5.3",
|
|
13
|
+
"@midwayjs/core": "^3.7.0",
|
|
14
|
+
"@midwayjs/koa": "^3.7.0",
|
|
15
|
+
"@midwayjs/mock": "^3.7.0",
|
|
17
16
|
"@opentelemetry/core": "^1.0.1",
|
|
18
17
|
"@opentelemetry/sdk-trace-base": "^1.0.1",
|
|
19
18
|
"@opentelemetry/sdk-trace-node": "^1.0.1"
|
|
@@ -42,5 +41,5 @@
|
|
|
42
41
|
"type": "git",
|
|
43
42
|
"url": "https://github.com/midwayjs/midway.git"
|
|
44
43
|
},
|
|
45
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "99386083ee26b386fd508b9c892091c914e77535"
|
|
46
45
|
}
|