@ogcio/o11y-sdk-node 0.1.0-beta.2 → 0.1.0-beta.4
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/CHANGELOG.md +14 -0
- package/README.md +96 -10
- package/coverage/cobertura-coverage.xml +191 -80
- package/coverage/lcov-report/index.html +17 -17
- package/coverage/lcov-report/sdk-node/index.html +1 -1
- package/coverage/lcov-report/sdk-node/index.ts.html +8 -2
- package/coverage/lcov-report/sdk-node/lib/console.ts.html +130 -0
- package/coverage/lcov-report/sdk-node/lib/grpc.ts.html +27 -27
- package/coverage/lcov-report/sdk-node/lib/http.ts.html +6 -6
- package/coverage/lcov-report/sdk-node/lib/index.html +46 -16
- package/coverage/lcov-report/sdk-node/lib/index.ts.html +5 -14
- package/coverage/lcov-report/sdk-node/lib/instrumentation.node.ts.html +82 -58
- package/coverage/lcov-report/sdk-node/lib/metrics.ts.html +295 -0
- package/coverage/lcov-report/sdk-node/lib/options.ts.html +4 -7
- package/coverage/lcov-report/sdk-node/lib/utils.ts.html +1 -1
- package/coverage/lcov.info +196 -90
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/lib/console.d.ts +3 -0
- package/dist/lib/console.js +12 -0
- package/dist/lib/grpc.js +4 -4
- package/dist/lib/http.js +4 -4
- package/dist/lib/index.d.ts +2 -2
- package/dist/lib/instrumentation.node.js +10 -1
- package/dist/lib/metrics.d.ts +18 -0
- package/dist/lib/metrics.js +28 -0
- package/dist/lib/options.d.ts +2 -3
- package/dist/package.json +50 -0
- package/index.ts +2 -0
- package/lib/console.ts +15 -0
- package/lib/grpc.ts +4 -4
- package/lib/http.ts +4 -4
- package/lib/index.ts +2 -2
- package/lib/instrumentation.node.ts +9 -1
- package/lib/metrics.ts +70 -0
- package/lib/options.ts +2 -3
- package/package.json +22 -22
- package/test/metrics.test.ts +142 -0
- package/test/node-config.test.ts +35 -9
- package/test/validation.test.ts +31 -0
- package/test-report.xml +45 -13
- package/tsconfig.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.0-beta.4](https://github.com/ogcio/o11y/compare/@ogcio/o11y-sdk-node@v0.1.0-beta.3...@ogcio/o11y-sdk-node@v0.1.0-beta.4) (2025-01-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* prepublishOnly hook ([#60](https://github.com/ogcio/o11y/issues/60)) ([9fbd3ad](https://github.com/ogcio/o11y/commit/9fbd3ad0b45a1604cf2eccc26b2f8855640417a1))
|
|
9
|
+
|
|
10
|
+
## [0.1.0-beta.3](https://github.com/ogcio/o11y/compare/@ogcio/o11y-sdk-node@0.1.0-beta.2...@ogcio/o11y-sdk-node@v0.1.0-beta.3) (2025-01-28)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **sdk-node:** custom metrics ([#53](https://github.com/ogcio/o11y/issues/53)) ([3cb40b1](https://github.com/ogcio/o11y/commit/3cb40b1add3d80615c8d123d233724094559c7ff))
|
|
16
|
+
|
|
3
17
|
## [0.1.0-beta.2](https://github.com/ogcio/o11y/compare/@ogcio/o11y-sdk-node@0.1.0-beta.1...@ogcio/o11y-sdk-node@0.1.0-beta.2) (2024-11-28)
|
|
4
18
|
|
|
5
19
|
|
package/README.md
CHANGED
|
@@ -27,9 +27,6 @@ import("@ogcio/o11y-sdk-node/lib/index").then((sdk) =>
|
|
|
27
27
|
sdk.instrumentNode({
|
|
28
28
|
serviceName: "node-microservice",
|
|
29
29
|
collectorUrl: "http://localhost:4317",
|
|
30
|
-
collectorMode: "single",
|
|
31
|
-
enableFS: true,
|
|
32
|
-
diagLogLevel: "DEBUG",
|
|
33
30
|
}),
|
|
34
31
|
);
|
|
35
32
|
```
|
|
@@ -42,18 +39,106 @@ Or setup inside your package.json
|
|
|
42
39
|
|
|
43
40
|
```json
|
|
44
41
|
{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"start": "node --env-file=.env --import ./dist/instrumentation.js dist/index.js"
|
|
49
|
-
}
|
|
50
|
-
....
|
|
42
|
+
"main": "dist/index.js",
|
|
43
|
+
"type": "module",
|
|
44
|
+
"scripts": {
|
|
45
|
+
"start": "node --env-file=.env --import ./dist/instrumentation.js dist/index.js"
|
|
46
|
+
}
|
|
51
47
|
}
|
|
52
48
|
```
|
|
53
49
|
|
|
50
|
+
## Sending Custom Metrics
|
|
51
|
+
|
|
52
|
+
This package gives the possibility to send custom metrics and define them as desired in the code, you can choose between sync metrics and observable async metrics.
|
|
53
|
+
|
|
54
|
+
To use this functionality, you only need to import `getMetric` and enable the application instrumentation.
|
|
55
|
+
|
|
56
|
+
```typescript
|
|
57
|
+
import { getMetric } from "@ogcio/o11y-sdk-node";
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Sync
|
|
61
|
+
|
|
62
|
+
Sync metrics are signals sent when the function has been called.
|
|
63
|
+
|
|
64
|
+
Creating a counter, there are 2 types of counter:
|
|
65
|
+
|
|
66
|
+
- **counter** a simple counter that can only add positive numbers
|
|
67
|
+
- **updowncounter** counter that support also negative numbers
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
const counter = getMetric("counter", {
|
|
71
|
+
attributeName: "counter",
|
|
72
|
+
metricName: "fastify-counter",
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
counter.add(1, {
|
|
76
|
+
my: "my",
|
|
77
|
+
custom: "custom",
|
|
78
|
+
attributes: "attributes",
|
|
79
|
+
});
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Creating a Histogram
|
|
83
|
+
|
|
84
|
+
```typescript
|
|
85
|
+
const histogram = getMetric("histogram", {
|
|
86
|
+
metricName: "response_duration",
|
|
87
|
+
attributeName: "http_response",
|
|
88
|
+
options: {
|
|
89
|
+
advice: {
|
|
90
|
+
explicitBucketBoundaries: [0, 100, 200, 500, 1000],
|
|
91
|
+
},
|
|
92
|
+
description: "Response durations",
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
histogram.record(120, { path: "/home" });
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Async
|
|
100
|
+
|
|
101
|
+
Async metrics are called by the scraper collector to read current data using the `Observable` pattern.
|
|
102
|
+
Creating an async metric means that the application will subscribe to the observability URL and record data on call (default 60s).
|
|
103
|
+
|
|
104
|
+
_keep in mind, you can't send signals on-demand with this component_
|
|
105
|
+
|
|
106
|
+
Creating an async Gauge
|
|
107
|
+
|
|
108
|
+
```typescript
|
|
109
|
+
const asyncGauge = getMetric("async-gauge", {
|
|
110
|
+
metricName: "cpu_usage",
|
|
111
|
+
attributeName: "server_load",
|
|
112
|
+
options: { unit: "percentage" },
|
|
113
|
+
}).addCallback((observer) => {
|
|
114
|
+
observer.observe(50, { host: "server1" });
|
|
115
|
+
});
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Creating an async Counter
|
|
119
|
+
|
|
120
|
+
```typescript
|
|
121
|
+
getMetric("async-counter", {
|
|
122
|
+
attributeName: "scraped-memory",
|
|
123
|
+
metricName: "fastify-counter",
|
|
124
|
+
}).addCallback((observer) => {
|
|
125
|
+
observer.observe(freemem(), {
|
|
126
|
+
"application.os.memory": "free-memory",
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
```
|
|
130
|
+
|
|
54
131
|
## API Reference
|
|
55
132
|
|
|
56
|
-
|
|
133
|
+
#### Protocol
|
|
134
|
+
|
|
135
|
+
protocol is a string parameter used to define how to send signals to observability infrastructure
|
|
136
|
+
|
|
137
|
+
- **grpc** Use gRPC protocol, usually default port use 4317. Is the most performant option for server side applications.
|
|
138
|
+
- **http** Use HTTP standard protocol, usually default port use 4318. Mainly used on web or UI client applications.
|
|
139
|
+
- **console** Used for debugging sending signals to observability cluster, every information will be printed to your runtime console.
|
|
140
|
+
|
|
141
|
+
#### Shared Types
|
|
57
142
|
|
|
58
143
|
```ts
|
|
59
144
|
export type SDKLogLevel =
|
|
@@ -75,3 +160,4 @@ export type SDKLogLevel =
|
|
|
75
160
|
| `diagLogLevel` | `SDKLogLevel` | Diagnostic log level for the internal runtime instrumentation |
|
|
76
161
|
| `collectorMode` | `single \| batch` | Signals sending mode, default is batch for performance |
|
|
77
162
|
| `enableFS` | `boolean` | Flag to enable or disable the tracing for node:fs module |
|
|
163
|
+
| `protocol` | `string` | Type of the protocol used to send signals |
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<?xml version="1.0" ?>
|
|
2
2
|
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
|
|
3
|
-
<coverage lines-valid="
|
|
3
|
+
<coverage lines-valid="164" lines-covered="164" line-rate="1" branches-valid="37" branches-covered="37" branch-rate="1" timestamp="1738078102419" complexity="0" version="0.1">
|
|
4
4
|
<sources>
|
|
5
|
-
<source>/
|
|
5
|
+
<source>/home/vsts/work/1/s/packages/sdk-node</source>
|
|
6
6
|
</sources>
|
|
7
7
|
<packages>
|
|
8
8
|
<package name="sdk-node" line-rate="1" branch-rate="1">
|
|
@@ -16,40 +16,63 @@
|
|
|
16
16
|
</class>
|
|
17
17
|
</classes>
|
|
18
18
|
</package>
|
|
19
|
-
<package name="sdk-node.lib" line-rate="
|
|
19
|
+
<package name="sdk-node.lib" line-rate="1" branch-rate="1">
|
|
20
20
|
<classes>
|
|
21
|
+
<class name="console.ts" filename="lib/console.ts" line-rate="1" branch-rate="1">
|
|
22
|
+
<methods>
|
|
23
|
+
<method name="buildConsoleExporters" hits="1" signature="()V">
|
|
24
|
+
<lines>
|
|
25
|
+
<line number="5" hits="1"/>
|
|
26
|
+
</lines>
|
|
27
|
+
</method>
|
|
28
|
+
</methods>
|
|
29
|
+
<lines>
|
|
30
|
+
<line number="1" hits="1" branch="false"/>
|
|
31
|
+
<line number="5" hits="1" branch="true" condition-coverage="100% (1/1)"/>
|
|
32
|
+
<line number="6" hits="1" branch="false"/>
|
|
33
|
+
<line number="7" hits="1" branch="false"/>
|
|
34
|
+
<line number="8" hits="1" branch="false"/>
|
|
35
|
+
<line number="9" hits="1" branch="false"/>
|
|
36
|
+
<line number="10" hits="1" branch="false"/>
|
|
37
|
+
<line number="11" hits="1" branch="false"/>
|
|
38
|
+
<line number="12" hits="1" branch="false"/>
|
|
39
|
+
<line number="13" hits="1" branch="false"/>
|
|
40
|
+
<line number="14" hits="1" branch="false"/>
|
|
41
|
+
<line number="15" hits="1" branch="false"/>
|
|
42
|
+
</lines>
|
|
43
|
+
</class>
|
|
21
44
|
<class name="grpc.ts" filename="lib/grpc.ts" line-rate="1" branch-rate="1">
|
|
22
45
|
<methods>
|
|
23
|
-
<method name="buildGrpcExporters" hits="
|
|
46
|
+
<method name="buildGrpcExporters" hits="3" signature="()V">
|
|
24
47
|
<lines>
|
|
25
|
-
<line number="10" hits="
|
|
48
|
+
<line number="10" hits="3"/>
|
|
26
49
|
</lines>
|
|
27
50
|
</method>
|
|
28
51
|
</methods>
|
|
29
52
|
<lines>
|
|
30
53
|
<line number="1" hits="1" branch="false"/>
|
|
31
|
-
<line number="10" hits="
|
|
32
|
-
<line number="11" hits="
|
|
33
|
-
<line number="12" hits="
|
|
34
|
-
<line number="13" hits="
|
|
35
|
-
<line number="14" hits="
|
|
36
|
-
<line number="15" hits="
|
|
37
|
-
<line number="16" hits="
|
|
38
|
-
<line number="17" hits="
|
|
39
|
-
<line number="18" hits="
|
|
40
|
-
<line number="19" hits="
|
|
41
|
-
<line number="20" hits="
|
|
42
|
-
<line number="21" hits="
|
|
43
|
-
<line number="22" hits="
|
|
44
|
-
<line number="23" hits="
|
|
45
|
-
<line number="24" hits="
|
|
46
|
-
<line number="25" hits="
|
|
47
|
-
<line number="26" hits="
|
|
48
|
-
<line number="27" hits="
|
|
49
|
-
<line number="28" hits="
|
|
50
|
-
<line number="29" hits="
|
|
51
|
-
<line number="30" hits="
|
|
52
|
-
<line number="31" hits="
|
|
54
|
+
<line number="10" hits="3" branch="true" condition-coverage="100% (1/1)"/>
|
|
55
|
+
<line number="11" hits="3" branch="false"/>
|
|
56
|
+
<line number="12" hits="3" branch="false"/>
|
|
57
|
+
<line number="13" hits="3" branch="false"/>
|
|
58
|
+
<line number="14" hits="3" branch="false"/>
|
|
59
|
+
<line number="15" hits="3" branch="false"/>
|
|
60
|
+
<line number="16" hits="3" branch="false"/>
|
|
61
|
+
<line number="17" hits="3" branch="false"/>
|
|
62
|
+
<line number="18" hits="3" branch="false"/>
|
|
63
|
+
<line number="19" hits="3" branch="false"/>
|
|
64
|
+
<line number="20" hits="3" branch="false"/>
|
|
65
|
+
<line number="21" hits="3" branch="false"/>
|
|
66
|
+
<line number="22" hits="3" branch="false"/>
|
|
67
|
+
<line number="23" hits="3" branch="true" condition-coverage="100% (1/1)"/>
|
|
68
|
+
<line number="24" hits="3" branch="false"/>
|
|
69
|
+
<line number="25" hits="3" branch="false"/>
|
|
70
|
+
<line number="26" hits="3" branch="false"/>
|
|
71
|
+
<line number="27" hits="3" branch="false"/>
|
|
72
|
+
<line number="28" hits="3" branch="false"/>
|
|
73
|
+
<line number="29" hits="3" branch="false"/>
|
|
74
|
+
<line number="30" hits="3" branch="false"/>
|
|
75
|
+
<line number="31" hits="3" branch="false"/>
|
|
53
76
|
</lines>
|
|
54
77
|
</class>
|
|
55
78
|
<class name="http.ts" filename="lib/http.ts" line-rate="1" branch-rate="1">
|
|
@@ -100,74 +123,162 @@
|
|
|
100
123
|
<lines>
|
|
101
124
|
</lines>
|
|
102
125
|
</class>
|
|
103
|
-
<class name="instrumentation.node.ts" filename="lib/instrumentation.node.ts" line-rate="
|
|
126
|
+
<class name="instrumentation.node.ts" filename="lib/instrumentation.node.ts" line-rate="1" branch-rate="1">
|
|
104
127
|
<methods>
|
|
105
|
-
<method name="buildNodeInstrumentation" hits="
|
|
128
|
+
<method name="buildNodeInstrumentation" hits="8" signature="()V">
|
|
106
129
|
<lines>
|
|
107
|
-
<line number="
|
|
130
|
+
<line number="13" hits="8"/>
|
|
108
131
|
</lines>
|
|
109
132
|
</method>
|
|
110
133
|
</methods>
|
|
111
134
|
<lines>
|
|
112
135
|
<line number="1" hits="1" branch="false"/>
|
|
113
|
-
<line number="
|
|
114
|
-
<line number="
|
|
115
|
-
<line number="
|
|
116
|
-
<line number="
|
|
117
|
-
<line number="15" hits="1" branch="false"/>
|
|
118
|
-
<line number="16" hits="1" branch="false"/>
|
|
136
|
+
<line number="13" hits="8" branch="true" condition-coverage="100% (1/1)"/>
|
|
137
|
+
<line number="14" hits="8" branch="false"/>
|
|
138
|
+
<line number="15" hits="8" branch="false"/>
|
|
139
|
+
<line number="16" hits="8" branch="true" condition-coverage="100% (1/1)"/>
|
|
119
140
|
<line number="17" hits="1" branch="false"/>
|
|
120
141
|
<line number="18" hits="1" branch="false"/>
|
|
121
|
-
<line number="19" hits="1" branch="
|
|
122
|
-
<line number="
|
|
123
|
-
<line number="
|
|
124
|
-
<line number="23" hits="
|
|
142
|
+
<line number="19" hits="1" branch="false"/>
|
|
143
|
+
<line number="20" hits="1" branch="false"/>
|
|
144
|
+
<line number="21" hits="1" branch="true" condition-coverage="100% (1/1)"/>
|
|
145
|
+
<line number="23" hits="8" branch="true" condition-coverage="100% (1/1)"/>
|
|
125
146
|
<line number="24" hits="1" branch="false"/>
|
|
126
147
|
<line number="25" hits="1" branch="false"/>
|
|
127
148
|
<line number="26" hits="1" branch="false"/>
|
|
128
|
-
<line number="
|
|
129
|
-
<line number="
|
|
130
|
-
<line number="30" hits="
|
|
149
|
+
<line number="27" hits="1" branch="false"/>
|
|
150
|
+
<line number="28" hits="1" branch="true" condition-coverage="100% (1/1)"/>
|
|
151
|
+
<line number="30" hits="8" branch="true" condition-coverage="100% (2/2)"/>
|
|
131
152
|
<line number="31" hits="1" branch="false"/>
|
|
132
153
|
<line number="32" hits="1" branch="false"/>
|
|
133
|
-
<line number="33" hits="1" branch="
|
|
134
|
-
<line number="
|
|
135
|
-
<line number="
|
|
136
|
-
<line number="
|
|
137
|
-
<line number="39" hits="
|
|
138
|
-
<line number="40" hits="
|
|
139
|
-
<line number="41" hits="
|
|
140
|
-
<line number="
|
|
154
|
+
<line number="33" hits="1" branch="false"/>
|
|
155
|
+
<line number="34" hits="1" branch="false"/>
|
|
156
|
+
<line number="35" hits="1" branch="false"/>
|
|
157
|
+
<line number="37" hits="5" branch="false"/>
|
|
158
|
+
<line number="39" hits="8" branch="true" condition-coverage="100% (1/1)"/>
|
|
159
|
+
<line number="40" hits="1" branch="false"/>
|
|
160
|
+
<line number="41" hits="8" branch="true" condition-coverage="100% (2/2)"/>
|
|
161
|
+
<line number="42" hits="1" branch="false"/>
|
|
162
|
+
<line number="43" hits="4" branch="true" condition-coverage="100% (1/1)"/>
|
|
141
163
|
<line number="44" hits="3" branch="false"/>
|
|
142
|
-
<line number="45" hits="3" branch="
|
|
143
|
-
<line number="
|
|
144
|
-
<line number="
|
|
145
|
-
<line number="
|
|
146
|
-
<line number="
|
|
147
|
-
<line number="51" hits="
|
|
148
|
-
<line number="52" hits="
|
|
149
|
-
<line number="53" hits="
|
|
150
|
-
<line number="
|
|
151
|
-
<line number="
|
|
152
|
-
<line number="
|
|
153
|
-
<line number="
|
|
154
|
-
<line number="
|
|
155
|
-
<line number="
|
|
156
|
-
<line number="
|
|
157
|
-
<line number="
|
|
158
|
-
<line number="
|
|
159
|
-
<line number="
|
|
160
|
-
<line number="
|
|
161
|
-
<line number="66" hits="
|
|
162
|
-
<line number="67" hits="
|
|
163
|
-
<line number="68" hits="
|
|
164
|
-
<line number="69" hits="
|
|
165
|
-
<line number="70" hits="
|
|
166
|
-
<line number="71" hits="
|
|
167
|
-
<line number="72" hits="
|
|
168
|
-
<line number="
|
|
169
|
-
<line number="
|
|
170
|
-
<line number="
|
|
164
|
+
<line number="45" hits="3" branch="true" condition-coverage="100% (1/1)"/>
|
|
165
|
+
<line number="47" hits="5" branch="false"/>
|
|
166
|
+
<line number="48" hits="5" branch="false"/>
|
|
167
|
+
<line number="49" hits="5" branch="false"/>
|
|
168
|
+
<line number="50" hits="5" branch="true" condition-coverage="100% (1/1)"/>
|
|
169
|
+
<line number="51" hits="4" branch="true" condition-coverage="100% (1/1)"/>
|
|
170
|
+
<line number="52" hits="1" branch="false"/>
|
|
171
|
+
<line number="53" hits="8" branch="false"/>
|
|
172
|
+
<line number="55" hits="8" branch="false"/>
|
|
173
|
+
<line number="56" hits="8" branch="false"/>
|
|
174
|
+
<line number="57" hits="8" branch="false"/>
|
|
175
|
+
<line number="58" hits="8" branch="false"/>
|
|
176
|
+
<line number="59" hits="8" branch="false"/>
|
|
177
|
+
<line number="60" hits="8" branch="false"/>
|
|
178
|
+
<line number="61" hits="8" branch="false"/>
|
|
179
|
+
<line number="62" hits="8" branch="false"/>
|
|
180
|
+
<line number="63" hits="8" branch="false"/>
|
|
181
|
+
<line number="64" hits="8" branch="false"/>
|
|
182
|
+
<line number="65" hits="8" branch="false"/>
|
|
183
|
+
<line number="66" hits="8" branch="false"/>
|
|
184
|
+
<line number="67" hits="8" branch="false"/>
|
|
185
|
+
<line number="68" hits="8" branch="true" condition-coverage="100% (1/1)"/>
|
|
186
|
+
<line number="69" hits="8" branch="false"/>
|
|
187
|
+
<line number="70" hits="8" branch="false"/>
|
|
188
|
+
<line number="71" hits="8" branch="false"/>
|
|
189
|
+
<line number="72" hits="8" branch="false"/>
|
|
190
|
+
<line number="74" hits="8" branch="false"/>
|
|
191
|
+
<line number="75" hits="8" branch="false"/>
|
|
192
|
+
<line number="76" hits="8" branch="false"/>
|
|
193
|
+
<line number="77" hits="8" branch="true" condition-coverage="100% (1/1)"/>
|
|
194
|
+
<line number="78" hits="1" branch="false"/>
|
|
195
|
+
<line number="79" hits="1" branch="false"/>
|
|
196
|
+
<line number="80" hits="1" branch="false"/>
|
|
197
|
+
<line number="81" hits="1" branch="false"/>
|
|
198
|
+
<line number="82" hits="1" branch="false"/>
|
|
199
|
+
<line number="83" hits="8" branch="false"/>
|
|
200
|
+
</lines>
|
|
201
|
+
</class>
|
|
202
|
+
<class name="metrics.ts" filename="lib/metrics.ts" line-rate="1" branch-rate="1">
|
|
203
|
+
<methods>
|
|
204
|
+
<method name="gauge" hits="1" signature="()V">
|
|
205
|
+
<lines>
|
|
206
|
+
<line number="33" hits="1"/>
|
|
207
|
+
</lines>
|
|
208
|
+
</method>
|
|
209
|
+
<method name="histogram" hits="1" signature="()V">
|
|
210
|
+
<lines>
|
|
211
|
+
<line number="34" hits="1"/>
|
|
212
|
+
</lines>
|
|
213
|
+
</method>
|
|
214
|
+
<method name="counter" hits="1" signature="()V">
|
|
215
|
+
<lines>
|
|
216
|
+
<line number="35" hits="1"/>
|
|
217
|
+
</lines>
|
|
218
|
+
</method>
|
|
219
|
+
<method name="updowncounter" hits="1" signature="()V">
|
|
220
|
+
<lines>
|
|
221
|
+
<line number="36" hits="1"/>
|
|
222
|
+
</lines>
|
|
223
|
+
</method>
|
|
224
|
+
<method name="async-counter" hits="1" signature="()V">
|
|
225
|
+
<lines>
|
|
226
|
+
<line number="37" hits="1"/>
|
|
227
|
+
</lines>
|
|
228
|
+
</method>
|
|
229
|
+
<method name="async-updowncounter" hits="1" signature="()V">
|
|
230
|
+
<lines>
|
|
231
|
+
<line number="38" hits="1"/>
|
|
232
|
+
</lines>
|
|
233
|
+
</method>
|
|
234
|
+
<method name="async-gauge" hits="2" signature="()V">
|
|
235
|
+
<lines>
|
|
236
|
+
<line number="39" hits="2"/>
|
|
237
|
+
</lines>
|
|
238
|
+
</method>
|
|
239
|
+
<method name="getMeter" hits="9" signature="()V">
|
|
240
|
+
<lines>
|
|
241
|
+
<line number="48" hits="9"/>
|
|
242
|
+
</lines>
|
|
243
|
+
</method>
|
|
244
|
+
<method name="getMetric" hits="9" signature="()V">
|
|
245
|
+
<lines>
|
|
246
|
+
<line number="59" hits="9"/>
|
|
247
|
+
</lines>
|
|
248
|
+
</method>
|
|
249
|
+
</methods>
|
|
250
|
+
<lines>
|
|
251
|
+
<line number="1" hits="1" branch="false"/>
|
|
252
|
+
<line number="28" hits="1" branch="false"/>
|
|
253
|
+
<line number="32" hits="1" branch="false"/>
|
|
254
|
+
<line number="33" hits="1" branch="true" condition-coverage="100% (1/1)"/>
|
|
255
|
+
<line number="34" hits="1" branch="true" condition-coverage="100% (1/1)"/>
|
|
256
|
+
<line number="35" hits="1" branch="true" condition-coverage="100% (1/1)"/>
|
|
257
|
+
<line number="36" hits="1" branch="true" condition-coverage="100% (1/1)"/>
|
|
258
|
+
<line number="37" hits="1" branch="true" condition-coverage="100% (1/1)"/>
|
|
259
|
+
<line number="38" hits="1" branch="true" condition-coverage="100% (1/1)"/>
|
|
260
|
+
<line number="39" hits="1" branch="true" condition-coverage="100% (1/1)"/>
|
|
261
|
+
<line number="40" hits="1" branch="false"/>
|
|
262
|
+
<line number="48" hits="9" branch="true" condition-coverage="100% (1/1)"/>
|
|
263
|
+
<line number="49" hits="9" branch="false"/>
|
|
264
|
+
<line number="50" hits="9" branch="true" condition-coverage="100% (2/2)"/>
|
|
265
|
+
<line number="51" hits="1" branch="false"/>
|
|
266
|
+
<line number="52" hits="1" branch="false"/>
|
|
267
|
+
<line number="53" hits="9" branch="true" condition-coverage="100% (1/1)"/>
|
|
268
|
+
<line number="54" hits="8" branch="false"/>
|
|
269
|
+
<line number="55" hits="8" branch="false"/>
|
|
270
|
+
<line number="56" hits="9" branch="false"/>
|
|
271
|
+
<line number="57" hits="9" branch="false"/>
|
|
272
|
+
<line number="59" hits="1" branch="true" condition-coverage="100% (1/1)"/>
|
|
273
|
+
<line number="60" hits="9" branch="false"/>
|
|
274
|
+
<line number="61" hits="9" branch="false"/>
|
|
275
|
+
<line number="62" hits="9" branch="false"/>
|
|
276
|
+
<line number="63" hits="9" branch="false"/>
|
|
277
|
+
<line number="65" hits="9" branch="true" condition-coverage="100% (1/1)"/>
|
|
278
|
+
<line number="66" hits="1" branch="false"/>
|
|
279
|
+
<line number="67" hits="1" branch="true" condition-coverage="100% (1/1)"/>
|
|
280
|
+
<line number="69" hits="8" branch="false"/>
|
|
281
|
+
<line number="70" hits="8" branch="false"/>
|
|
171
282
|
</lines>
|
|
172
283
|
</class>
|
|
173
284
|
<class name="options.ts" filename="lib/options.ts" line-rate="0" branch-rate="0">
|
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">100% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>164/164</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">100% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>37/37</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
40
|
<span class="strong">100% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>15/15</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">100% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>164/164</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -95,17 +95,17 @@
|
|
|
95
95
|
|
|
96
96
|
<tr>
|
|
97
97
|
<td class="file high" data-value="sdk-node/lib"><a href="sdk-node/lib/index.html">sdk-node/lib</a></td>
|
|
98
|
-
<td data-value="
|
|
99
|
-
<div class="chart"><div class="cover-fill" style="width:
|
|
98
|
+
<td data-value="100" class="pic high">
|
|
99
|
+
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
|
|
100
100
|
</td>
|
|
101
|
-
<td data-value="94.73" class="pct high">94.73%</td>
|
|
102
|
-
<td data-value="114" class="abs high">108/114</td>
|
|
103
|
-
<td data-value="88.88" class="pct high">88.88%</td>
|
|
104
|
-
<td data-value="18" class="abs high">16/18</td>
|
|
105
101
|
<td data-value="100" class="pct high">100%</td>
|
|
106
|
-
<td data-value="
|
|
107
|
-
<td data-value="
|
|
108
|
-
<td data-value="
|
|
102
|
+
<td data-value="163" class="abs high">163/163</td>
|
|
103
|
+
<td data-value="100" class="pct high">100%</td>
|
|
104
|
+
<td data-value="37" class="abs high">37/37</td>
|
|
105
|
+
<td data-value="100" class="pct high">100%</td>
|
|
106
|
+
<td data-value="15" class="abs high">15/15</td>
|
|
107
|
+
<td data-value="100" class="pct high">100%</td>
|
|
108
|
+
<td data-value="163" class="abs high">163/163</td>
|
|
109
109
|
</tr>
|
|
110
110
|
|
|
111
111
|
</tbody>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
117
117
|
Code coverage generated by
|
|
118
118
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
119
|
-
at
|
|
119
|
+
at 2025-01-28T15:28:22.401Z
|
|
120
120
|
</div>
|
|
121
121
|
<script src="prettify.js"></script>
|
|
122
122
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at 2025-01-28T15:28:22.401Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -70,7 +70,11 @@
|
|
|
70
70
|
<a name='L5'></a><a href='#L5'>5</a>
|
|
71
71
|
<a name='L6'></a><a href='#L6'>6</a>
|
|
72
72
|
<a name='L7'></a><a href='#L7'>7</a>
|
|
73
|
-
<a name='L8'></a><a href='#L8'>8</a
|
|
73
|
+
<a name='L8'></a><a href='#L8'>8</a>
|
|
74
|
+
<a name='L9'></a><a href='#L9'>9</a>
|
|
75
|
+
<a name='L10'></a><a href='#L10'>10</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
|
76
|
+
<span class="cline-any cline-neutral"> </span>
|
|
77
|
+
<span class="cline-any cline-neutral"> </span>
|
|
74
78
|
<span class="cline-any cline-neutral"> </span>
|
|
75
79
|
<span class="cline-any cline-neutral"> </span>
|
|
76
80
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -84,6 +88,8 @@ import buildNodeInstrumentation from "./lib/instrumentation.node.js";
|
|
|
84
88
|
export type * from "./lib/index.js";
|
|
85
89
|
export type { NodeSDKConfig, NodeSDK };
|
|
86
90
|
export { buildNodeInstrumentation as instrumentNode };
|
|
91
|
+
|
|
92
|
+
export * from "./lib/metrics.js";
|
|
87
93
|
</pre></td></tr></table></pre>
|
|
88
94
|
|
|
89
95
|
<div class='push'></div><!-- for sticky footer -->
|
|
@@ -91,7 +97,7 @@ export { buildNodeInstrumentation as instrumentNode };
|
|
|
91
97
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
92
98
|
Code coverage generated by
|
|
93
99
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
94
|
-
at
|
|
100
|
+
at 2025-01-28T15:28:22.401Z
|
|
95
101
|
</div>
|
|
96
102
|
<script src="../prettify.js"></script>
|
|
97
103
|
<script>
|