@ogcio/o11y-sdk-node 0.1.0-beta.1 → 0.1.0-beta.11
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 +81 -0
- package/README.md +222 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -0
- package/dist/lib/exporter/console.d.ts +3 -0
- package/dist/lib/exporter/console.js +20 -0
- package/dist/lib/exporter/grpc.d.ts +3 -0
- package/dist/lib/exporter/grpc.js +41 -0
- package/dist/lib/exporter/http.d.ts +3 -0
- package/dist/lib/{http.js → exporter/http.js} +15 -9
- package/dist/lib/exporter/index.d.ts +8 -0
- package/dist/lib/index.d.ts +36 -6
- package/dist/lib/instrumentation.node.d.ts +1 -1
- package/dist/lib/instrumentation.node.js +47 -23
- package/dist/lib/metrics.d.ts +18 -0
- package/dist/lib/metrics.js +24 -0
- package/dist/lib/processor/enrich-logger-processor.d.ts +10 -0
- package/dist/lib/processor/enrich-logger-processor.js +19 -0
- package/dist/lib/processor/enrich-span-processor.d.ts +11 -0
- package/dist/lib/processor/enrich-span-processor.js +22 -0
- package/dist/lib/resource.d.ts +7 -0
- package/dist/lib/resource.js +18 -0
- package/dist/lib/traces.d.ts +1 -0
- package/dist/lib/traces.js +4 -0
- package/dist/lib/url-sampler.d.ts +10 -0
- package/dist/lib/url-sampler.js +25 -0
- package/dist/lib/utils.d.ts +4 -2
- package/dist/lib/utils.js +8 -3
- package/dist/package.json +58 -0
- package/dist/vitest.config.js +15 -1
- package/index.ts +4 -2
- package/lib/exporter/console.ts +31 -0
- package/lib/exporter/grpc.ts +52 -0
- package/lib/{http.ts → exporter/http.ts} +19 -11
- package/lib/exporter/index.ts +9 -0
- package/lib/index.ts +46 -5
- package/lib/instrumentation.node.ts +61 -28
- package/lib/metrics.ts +75 -0
- package/lib/processor/enrich-logger-processor.ts +34 -0
- package/lib/processor/enrich-span-processor.ts +39 -0
- package/lib/resource.ts +30 -0
- package/lib/traces.ts +5 -0
- package/lib/url-sampler.ts +52 -0
- package/lib/utils.ts +16 -4
- package/package.json +33 -25
- package/test/index.test.ts +22 -12
- package/test/integration/README.md +26 -0
- package/test/integration/integration.test.ts +58 -0
- package/test/integration/run.sh +88 -0
- package/test/metrics.test.ts +142 -0
- package/test/node-config.test.ts +76 -44
- package/test/processor/enrich-logger-processor.test.ts +58 -0
- package/test/processor/enrich-span-processor.test.ts +104 -0
- package/test/resource.test.ts +33 -0
- package/test/url-sampler.test.ts +215 -0
- package/test/utils/alloy-log-parser.ts +46 -0
- package/test/validation.test.ts +48 -11
- package/tsconfig.json +2 -1
- package/vitest.config.ts +15 -1
- package/coverage/cobertura-coverage.xml +0 -199
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -131
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sdk-node/index.html +0 -116
- package/coverage/lcov-report/sdk-node/index.ts.html +0 -106
- package/coverage/lcov-report/sdk-node/lib/grpc.ts.html +0 -178
- package/coverage/lcov-report/sdk-node/lib/http.ts.html +0 -190
- package/coverage/lcov-report/sdk-node/lib/index.html +0 -191
- package/coverage/lcov-report/sdk-node/lib/index.ts.html +0 -265
- package/coverage/lcov-report/sdk-node/lib/instrumentation.node.ts.html +0 -310
- package/coverage/lcov-report/sdk-node/lib/options.ts.html +0 -109
- package/coverage/lcov-report/sdk-node/lib/utils.ts.html +0 -115
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov.info +0 -206
- package/dist/lib/grpc.d.ts +0 -3
- package/dist/lib/grpc.js +0 -26
- package/dist/lib/http.d.ts +0 -3
- package/dist/lib/options.d.ts +0 -7
- package/lib/grpc.ts +0 -31
- package/lib/options.ts +0 -8
- package/test-report.xml +0 -39
- /package/dist/lib/{options.js → exporter/index.js} +0 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { Context } from "@opentelemetry/api";
|
|
2
|
+
import {
|
|
3
|
+
SamplingDecision,
|
|
4
|
+
SamplingResult,
|
|
5
|
+
} from "@opentelemetry/sdk-trace-base";
|
|
6
|
+
import { describe, expect, test, vi } from "vitest";
|
|
7
|
+
import { UrlSampler } from "../lib/url-sampler";
|
|
8
|
+
|
|
9
|
+
describe("url sampler", () => {
|
|
10
|
+
// mock sampler to be sure every trace after UrlSamper has RECORD status
|
|
11
|
+
const mockSampler = {
|
|
12
|
+
shouldSample: vi
|
|
13
|
+
.fn()
|
|
14
|
+
.mockImplementation(
|
|
15
|
+
(_context, _traceId, _spanName, _spanKind, attributes, _links) => {
|
|
16
|
+
return {
|
|
17
|
+
decision: SamplingDecision.RECORD,
|
|
18
|
+
attributes: attributes,
|
|
19
|
+
} as SamplingResult;
|
|
20
|
+
},
|
|
21
|
+
),
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
test("should add custom span attributes to trace", async () => {
|
|
25
|
+
const sampler: UrlSampler = new UrlSampler(
|
|
26
|
+
[
|
|
27
|
+
{
|
|
28
|
+
type: "endsWith",
|
|
29
|
+
url: "/health",
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
mockSampler,
|
|
33
|
+
{
|
|
34
|
+
"signal.namespace": "unittest",
|
|
35
|
+
"signal.callback.result": () => "test",
|
|
36
|
+
},
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
expect(sampler).not.toBeNull();
|
|
40
|
+
|
|
41
|
+
const result = sampler.shouldSample(
|
|
42
|
+
{} as Context,
|
|
43
|
+
"traceId",
|
|
44
|
+
"span",
|
|
45
|
+
0,
|
|
46
|
+
{ "http.target": "/track" },
|
|
47
|
+
[],
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
expect(sampler.toString()).toBe("UrlSampler");
|
|
51
|
+
expect(result.decision).toBe(SamplingDecision.RECORD);
|
|
52
|
+
expect(result.attributes).not.toBeNull();
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
test("should not record trace about /health api", async () => {
|
|
56
|
+
const sampler: UrlSampler = new UrlSampler(
|
|
57
|
+
[
|
|
58
|
+
{
|
|
59
|
+
type: "endsWith",
|
|
60
|
+
url: "/health",
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
mockSampler,
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
const result = sampler.shouldSample(
|
|
67
|
+
{} as Context,
|
|
68
|
+
"traceId",
|
|
69
|
+
"span",
|
|
70
|
+
0,
|
|
71
|
+
{ "http.target": "/health" },
|
|
72
|
+
[],
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
expect(sampler.toString()).toBe("UrlSampler");
|
|
76
|
+
expect(result.decision).toBe(SamplingDecision.NOT_RECORD);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
test("should record every other trace which is not /health api", async () => {
|
|
80
|
+
const sampler: UrlSampler = new UrlSampler(
|
|
81
|
+
[
|
|
82
|
+
{
|
|
83
|
+
type: "endsWith",
|
|
84
|
+
url: "/health",
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
mockSampler,
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
let result = sampler.shouldSample(
|
|
91
|
+
{} as Context,
|
|
92
|
+
"traceId",
|
|
93
|
+
"span",
|
|
94
|
+
0,
|
|
95
|
+
{ "http.target": "/test" },
|
|
96
|
+
[],
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
expect(result.decision).toBe(SamplingDecision.RECORD);
|
|
100
|
+
|
|
101
|
+
result = sampler.shouldSample(
|
|
102
|
+
{} as Context,
|
|
103
|
+
"traceId",
|
|
104
|
+
"span",
|
|
105
|
+
0,
|
|
106
|
+
{ "http.target": "/another/url" },
|
|
107
|
+
[],
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
expect(result.decision).toBe(SamplingDecision.RECORD);
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
test("operator 'includes', should not record every trace which include /block in url", async () => {
|
|
114
|
+
const sampler: UrlSampler = new UrlSampler(
|
|
115
|
+
[
|
|
116
|
+
{
|
|
117
|
+
type: "includes",
|
|
118
|
+
url: "/block",
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
mockSampler,
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
expect(sampler).not.toBeNull();
|
|
125
|
+
|
|
126
|
+
const result = sampler.shouldSample(
|
|
127
|
+
{} as Context,
|
|
128
|
+
"traceId",
|
|
129
|
+
"span",
|
|
130
|
+
0,
|
|
131
|
+
{ "http.target": "/namespace/block/example/12" },
|
|
132
|
+
[],
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
expect(sampler.toString()).toBe("UrlSampler");
|
|
136
|
+
expect(result.decision).toBe(SamplingDecision.NOT_RECORD);
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
test("operator 'endsWith', should not record only trace which ends with /block in url", async () => {
|
|
140
|
+
const sampler: UrlSampler = new UrlSampler(
|
|
141
|
+
[
|
|
142
|
+
{
|
|
143
|
+
type: "endsWith",
|
|
144
|
+
url: "/block",
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
mockSampler,
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
expect(sampler).not.toBeNull();
|
|
151
|
+
|
|
152
|
+
// expect traced with block in the URL middle
|
|
153
|
+
let result = sampler.shouldSample(
|
|
154
|
+
{} as Context,
|
|
155
|
+
"traceId",
|
|
156
|
+
"span",
|
|
157
|
+
0,
|
|
158
|
+
{ "http.target": "/namespace/block/example/12" },
|
|
159
|
+
[],
|
|
160
|
+
);
|
|
161
|
+
|
|
162
|
+
expect(sampler.toString()).toBe("UrlSampler");
|
|
163
|
+
expect(result.decision).toBe(SamplingDecision.RECORD);
|
|
164
|
+
|
|
165
|
+
// should stop trace with block at the end
|
|
166
|
+
result = sampler.shouldSample(
|
|
167
|
+
{} as Context,
|
|
168
|
+
"traceId",
|
|
169
|
+
"span",
|
|
170
|
+
0,
|
|
171
|
+
{ "http.target": "/namespace/example/block" },
|
|
172
|
+
[],
|
|
173
|
+
);
|
|
174
|
+
|
|
175
|
+
expect(sampler.toString()).toBe("UrlSampler");
|
|
176
|
+
expect(result.decision).toBe(SamplingDecision.NOT_RECORD);
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
test("operator 'equals', should not record trace which is equal to /block in url", async () => {
|
|
180
|
+
const sampler: UrlSampler = new UrlSampler(
|
|
181
|
+
[
|
|
182
|
+
{
|
|
183
|
+
type: "equals",
|
|
184
|
+
url: "/block",
|
|
185
|
+
},
|
|
186
|
+
],
|
|
187
|
+
mockSampler,
|
|
188
|
+
);
|
|
189
|
+
|
|
190
|
+
expect(sampler).not.toBeNull();
|
|
191
|
+
|
|
192
|
+
let result = sampler.shouldSample(
|
|
193
|
+
{} as Context,
|
|
194
|
+
"traceId",
|
|
195
|
+
"span",
|
|
196
|
+
0,
|
|
197
|
+
{ "http.target": "/namespace/block/example/12" },
|
|
198
|
+
[],
|
|
199
|
+
);
|
|
200
|
+
|
|
201
|
+
expect(sampler.toString()).toBe("UrlSampler");
|
|
202
|
+
expect(result.decision).toBe(SamplingDecision.RECORD);
|
|
203
|
+
|
|
204
|
+
result = sampler.shouldSample(
|
|
205
|
+
{} as Context,
|
|
206
|
+
"traceId",
|
|
207
|
+
"span",
|
|
208
|
+
0,
|
|
209
|
+
{ "http.target": "/block" },
|
|
210
|
+
[],
|
|
211
|
+
);
|
|
212
|
+
|
|
213
|
+
expect(result.decision).toBe(SamplingDecision.NOT_RECORD);
|
|
214
|
+
});
|
|
215
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export function parseLog(
|
|
2
|
+
log: string,
|
|
3
|
+
): Record<string, object | string | number> {
|
|
4
|
+
const logArray = log
|
|
5
|
+
.split("\\n")
|
|
6
|
+
.map((line) => line.trim())
|
|
7
|
+
.filter((line) => line);
|
|
8
|
+
|
|
9
|
+
const jsonObject: Record<string, object | string | number> = {};
|
|
10
|
+
let currentSection: Record<string, object | string | number> = jsonObject;
|
|
11
|
+
const sectionStack: Record<string, object | string | number>[] = [];
|
|
12
|
+
|
|
13
|
+
logArray.forEach((line) => {
|
|
14
|
+
line = line.trim();
|
|
15
|
+
|
|
16
|
+
if (line.startsWith("->")) {
|
|
17
|
+
const match = line.match(/->\s+([^:]+):\s+(Str|Int)\((.+)\)/);
|
|
18
|
+
if (match) {
|
|
19
|
+
const [, key, type, value] = match;
|
|
20
|
+
const parsedValue = type === "Int" ? parseInt(value, 10) : value;
|
|
21
|
+
|
|
22
|
+
if (typeof currentSection === "object") {
|
|
23
|
+
currentSection[key] = parsedValue;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
} else if (line.endsWith(":")) {
|
|
27
|
+
// new section
|
|
28
|
+
const sectionName = line
|
|
29
|
+
.slice(0, -1)
|
|
30
|
+
.trim()
|
|
31
|
+
.toLowerCase()
|
|
32
|
+
.replace(" ", "_");
|
|
33
|
+
jsonObject[sectionName] = {};
|
|
34
|
+
currentSection = jsonObject[sectionName] as Record<
|
|
35
|
+
string,
|
|
36
|
+
object | string | number
|
|
37
|
+
>;
|
|
38
|
+
sectionStack.push(currentSection);
|
|
39
|
+
} else if (line.startsWith('"')) {
|
|
40
|
+
// Additional metadata at the end, store it separately
|
|
41
|
+
jsonObject["metadata"] = line;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
return jsonObject;
|
|
46
|
+
}
|
package/test/validation.test.ts
CHANGED
|
@@ -10,7 +10,7 @@ describe("validation config: should return without breaking the execution", () =
|
|
|
10
10
|
.spyOn(console, "warn")
|
|
11
11
|
.mockImplementation(vi.fn());
|
|
12
12
|
|
|
13
|
-
instrumentNode();
|
|
13
|
+
await instrumentNode();
|
|
14
14
|
|
|
15
15
|
expect(consoleWarnSpy).toHaveBeenCalled();
|
|
16
16
|
expect(consoleWarnSpy).toHaveBeenCalledWith(
|
|
@@ -26,11 +26,13 @@ describe("validation config: should return without breaking the execution", () =
|
|
|
26
26
|
.mockImplementation(vi.fn());
|
|
27
27
|
const consoleLogSpy = vi.spyOn(console, "log").mockImplementation(vi.fn());
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
collectorUrl: undefined
|
|
32
|
-
})
|
|
33
|
-
|
|
29
|
+
await expect(
|
|
30
|
+
buildNodeInstrumentation({
|
|
31
|
+
collectorUrl: undefined,
|
|
32
|
+
}).then((result) => {
|
|
33
|
+
sdk = result;
|
|
34
|
+
}),
|
|
35
|
+
).resolves.not.toThrowError();
|
|
34
36
|
|
|
35
37
|
assert.equal(sdk, undefined);
|
|
36
38
|
|
|
@@ -41,7 +43,7 @@ describe("validation config: should return without breaking the execution", () =
|
|
|
41
43
|
expect(consoleLogSpy).not.toHaveBeenCalled();
|
|
42
44
|
});
|
|
43
45
|
|
|
44
|
-
test("node instrumentation: invalid url", () => {
|
|
46
|
+
test("node instrumentation: invalid url", async () => {
|
|
45
47
|
let sdk: NodeSDK | undefined = undefined;
|
|
46
48
|
|
|
47
49
|
const consoleErrorSpy = vi
|
|
@@ -49,11 +51,13 @@ describe("validation config: should return without breaking the execution", () =
|
|
|
49
51
|
.mockImplementation(vi.fn());
|
|
50
52
|
const consoleLogSpy = vi.spyOn(console, "log").mockImplementation(vi.fn());
|
|
51
53
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
await expect(
|
|
55
|
+
buildNodeInstrumentation({
|
|
54
56
|
collectorUrl: "notavalidURL",
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
+
}).then((result) => {
|
|
58
|
+
sdk = result;
|
|
59
|
+
}),
|
|
60
|
+
).resolves.not.toThrowError();
|
|
57
61
|
|
|
58
62
|
assert.equal(sdk, undefined);
|
|
59
63
|
|
|
@@ -63,4 +67,37 @@ describe("validation config: should return without breaking the execution", () =
|
|
|
63
67
|
);
|
|
64
68
|
expect(consoleLogSpy).not.toHaveBeenCalled();
|
|
65
69
|
});
|
|
70
|
+
|
|
71
|
+
test("node instrumentation: verify no instrumentation if exception occurs", async () => {
|
|
72
|
+
let sdk: NodeSDK | undefined = undefined;
|
|
73
|
+
|
|
74
|
+
const consoleErrorSpy = vi
|
|
75
|
+
.spyOn(console, "error")
|
|
76
|
+
.mockImplementation(vi.fn());
|
|
77
|
+
const consoleLogSpy = vi.spyOn(console, "log").mockImplementation(vi.fn());
|
|
78
|
+
|
|
79
|
+
vi.mock("@opentelemetry/auto-instrumentations-node", () => ({
|
|
80
|
+
getNodeAutoInstrumentations: vi.fn(() => {
|
|
81
|
+
throw new Error("Wanted error");
|
|
82
|
+
}),
|
|
83
|
+
}));
|
|
84
|
+
|
|
85
|
+
await expect(
|
|
86
|
+
buildNodeInstrumentation({
|
|
87
|
+
collectorUrl: "https://testurl.com",
|
|
88
|
+
serviceName: "test",
|
|
89
|
+
}).then((result) => {
|
|
90
|
+
sdk = result;
|
|
91
|
+
}),
|
|
92
|
+
).resolves.not.toThrowError();
|
|
93
|
+
|
|
94
|
+
assert.equal(sdk, undefined);
|
|
95
|
+
|
|
96
|
+
expect(consoleErrorSpy).toHaveBeenCalled();
|
|
97
|
+
expect(consoleErrorSpy).toHaveBeenCalledWith(
|
|
98
|
+
"Error starting NodeJS OpenTelemetry instrumentation:",
|
|
99
|
+
new Error("Wanted error"),
|
|
100
|
+
);
|
|
101
|
+
expect(consoleLogSpy).not.toHaveBeenCalled();
|
|
102
|
+
});
|
|
66
103
|
});
|
package/tsconfig.json
CHANGED
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
|
|
9
9
|
"strict": true /* Enable all strict type-checking options. */,
|
|
10
10
|
"skipLibCheck": true /* Skip type checking all .d.ts files. */,
|
|
11
|
-
"declaration": true
|
|
11
|
+
"declaration": true,
|
|
12
|
+
"resolveJsonModule": true
|
|
12
13
|
},
|
|
13
14
|
"exclude": ["**/test/**"]
|
|
14
15
|
}
|
package/vitest.config.ts
CHANGED
|
@@ -4,7 +4,6 @@ export default defineConfig({
|
|
|
4
4
|
test: {
|
|
5
5
|
globals: true,
|
|
6
6
|
watch: false,
|
|
7
|
-
include: ["**/test/*.test.ts"],
|
|
8
7
|
exclude: ["**/fixtures/**", "**/dist/**"],
|
|
9
8
|
poolOptions: {
|
|
10
9
|
threads: {
|
|
@@ -22,5 +21,20 @@ export default defineConfig({
|
|
|
22
21
|
},
|
|
23
22
|
reporters: ["default", ["junit", { outputFile: "test-report.xml" }]],
|
|
24
23
|
environment: "node",
|
|
24
|
+
pool: "threads",
|
|
25
|
+
workspace: [
|
|
26
|
+
{
|
|
27
|
+
test: {
|
|
28
|
+
include: ["**/test/*.test.ts", "**/test/processor/*.test.ts"],
|
|
29
|
+
name: "unit",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
test: {
|
|
34
|
+
include: ["**/test/integration/*.test.ts"],
|
|
35
|
+
name: "integration",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
],
|
|
25
39
|
},
|
|
26
40
|
});
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" ?>
|
|
2
|
-
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
|
|
3
|
-
<coverage lines-valid="115" lines-covered="109" line-rate="0.9478" branches-valid="18" branches-covered="16" branch-rate="0.8887999999999999" timestamp="1732613125604" complexity="0" version="0.1">
|
|
4
|
-
<sources>
|
|
5
|
-
<source>/Users/andreabozzelli/Projects/o11y/packages/sdk-node</source>
|
|
6
|
-
</sources>
|
|
7
|
-
<packages>
|
|
8
|
-
<package name="sdk-node" line-rate="1" branch-rate="1">
|
|
9
|
-
<classes>
|
|
10
|
-
<class name="index.ts" filename="index.ts" line-rate="1" branch-rate="1">
|
|
11
|
-
<methods>
|
|
12
|
-
</methods>
|
|
13
|
-
<lines>
|
|
14
|
-
<line number="1" hits="1" branch="false"/>
|
|
15
|
-
</lines>
|
|
16
|
-
</class>
|
|
17
|
-
</classes>
|
|
18
|
-
</package>
|
|
19
|
-
<package name="sdk-node.lib" line-rate="0.9473" branch-rate="0.8887999999999999">
|
|
20
|
-
<classes>
|
|
21
|
-
<class name="grpc.ts" filename="lib/grpc.ts" line-rate="1" branch-rate="1">
|
|
22
|
-
<methods>
|
|
23
|
-
<method name="buildGrpcExporters" hits="2" signature="()V">
|
|
24
|
-
<lines>
|
|
25
|
-
<line number="10" hits="2"/>
|
|
26
|
-
</lines>
|
|
27
|
-
</method>
|
|
28
|
-
</methods>
|
|
29
|
-
<lines>
|
|
30
|
-
<line number="1" hits="1" branch="false"/>
|
|
31
|
-
<line number="10" hits="2" branch="true" condition-coverage="100% (1/1)"/>
|
|
32
|
-
<line number="11" hits="2" branch="false"/>
|
|
33
|
-
<line number="12" hits="2" branch="false"/>
|
|
34
|
-
<line number="13" hits="2" branch="false"/>
|
|
35
|
-
<line number="14" hits="2" branch="false"/>
|
|
36
|
-
<line number="15" hits="2" branch="false"/>
|
|
37
|
-
<line number="16" hits="2" branch="false"/>
|
|
38
|
-
<line number="17" hits="2" branch="false"/>
|
|
39
|
-
<line number="18" hits="2" branch="false"/>
|
|
40
|
-
<line number="19" hits="2" branch="false"/>
|
|
41
|
-
<line number="20" hits="2" branch="false"/>
|
|
42
|
-
<line number="21" hits="2" branch="false"/>
|
|
43
|
-
<line number="22" hits="2" branch="false"/>
|
|
44
|
-
<line number="23" hits="2" branch="true" condition-coverage="100% (1/1)"/>
|
|
45
|
-
<line number="24" hits="2" branch="false"/>
|
|
46
|
-
<line number="25" hits="2" branch="false"/>
|
|
47
|
-
<line number="26" hits="2" branch="false"/>
|
|
48
|
-
<line number="27" hits="2" branch="false"/>
|
|
49
|
-
<line number="28" hits="2" branch="false"/>
|
|
50
|
-
<line number="29" hits="2" branch="false"/>
|
|
51
|
-
<line number="30" hits="2" branch="false"/>
|
|
52
|
-
<line number="31" hits="2" branch="false"/>
|
|
53
|
-
</lines>
|
|
54
|
-
</class>
|
|
55
|
-
<class name="http.ts" filename="lib/http.ts" line-rate="1" branch-rate="1">
|
|
56
|
-
<methods>
|
|
57
|
-
<method name="buildHttpExporters" hits="2" signature="()V">
|
|
58
|
-
<lines>
|
|
59
|
-
<line number="10" hits="2"/>
|
|
60
|
-
</lines>
|
|
61
|
-
</method>
|
|
62
|
-
</methods>
|
|
63
|
-
<lines>
|
|
64
|
-
<line number="1" hits="1" branch="false"/>
|
|
65
|
-
<line number="10" hits="2" branch="true" condition-coverage="100% (1/1)"/>
|
|
66
|
-
<line number="11" hits="2" branch="true" condition-coverage="100% (1/1)"/>
|
|
67
|
-
<line number="12" hits="1" branch="false"/>
|
|
68
|
-
<line number="13" hits="1" branch="false"/>
|
|
69
|
-
<line number="15" hits="2" branch="false"/>
|
|
70
|
-
<line number="16" hits="2" branch="false"/>
|
|
71
|
-
<line number="17" hits="2" branch="false"/>
|
|
72
|
-
<line number="18" hits="2" branch="false"/>
|
|
73
|
-
<line number="19" hits="2" branch="false"/>
|
|
74
|
-
<line number="20" hits="2" branch="false"/>
|
|
75
|
-
<line number="21" hits="2" branch="false"/>
|
|
76
|
-
<line number="22" hits="2" branch="false"/>
|
|
77
|
-
<line number="23" hits="2" branch="false"/>
|
|
78
|
-
<line number="24" hits="2" branch="false"/>
|
|
79
|
-
<line number="25" hits="2" branch="false"/>
|
|
80
|
-
<line number="26" hits="2" branch="false"/>
|
|
81
|
-
<line number="27" hits="2" branch="false"/>
|
|
82
|
-
<line number="28" hits="2" branch="false"/>
|
|
83
|
-
<line number="29" hits="2" branch="false"/>
|
|
84
|
-
<line number="30" hits="2" branch="false"/>
|
|
85
|
-
<line number="31" hits="2" branch="false"/>
|
|
86
|
-
<line number="32" hits="2" branch="false"/>
|
|
87
|
-
<line number="33" hits="2" branch="false"/>
|
|
88
|
-
<line number="34" hits="2" branch="false"/>
|
|
89
|
-
<line number="35" hits="2" branch="false"/>
|
|
90
|
-
</lines>
|
|
91
|
-
</class>
|
|
92
|
-
<class name="index.ts" filename="lib/index.ts" line-rate="0" branch-rate="0">
|
|
93
|
-
<methods>
|
|
94
|
-
<method name="(empty-report)" hits="1" signature="()V">
|
|
95
|
-
<lines>
|
|
96
|
-
<line number="1" hits="1"/>
|
|
97
|
-
</lines>
|
|
98
|
-
</method>
|
|
99
|
-
</methods>
|
|
100
|
-
<lines>
|
|
101
|
-
</lines>
|
|
102
|
-
</class>
|
|
103
|
-
<class name="instrumentation.node.ts" filename="lib/instrumentation.node.ts" line-rate="0.8983" branch-rate="0.8332999999999999">
|
|
104
|
-
<methods>
|
|
105
|
-
<method name="buildNodeInstrumentation" hits="6" signature="()V">
|
|
106
|
-
<lines>
|
|
107
|
-
<line number="11" hits="6"/>
|
|
108
|
-
</lines>
|
|
109
|
-
</method>
|
|
110
|
-
</methods>
|
|
111
|
-
<lines>
|
|
112
|
-
<line number="1" hits="1" branch="false"/>
|
|
113
|
-
<line number="11" hits="6" branch="true" condition-coverage="100% (1/1)"/>
|
|
114
|
-
<line number="12" hits="6" branch="false"/>
|
|
115
|
-
<line number="13" hits="6" branch="false"/>
|
|
116
|
-
<line number="14" hits="6" branch="true" condition-coverage="100% (1/1)"/>
|
|
117
|
-
<line number="15" hits="1" branch="false"/>
|
|
118
|
-
<line number="16" hits="1" branch="false"/>
|
|
119
|
-
<line number="17" hits="1" branch="false"/>
|
|
120
|
-
<line number="18" hits="1" branch="false"/>
|
|
121
|
-
<line number="19" hits="1" branch="true" condition-coverage="100% (1/1)"/>
|
|
122
|
-
<line number="21" hits="6" branch="true" condition-coverage="100% (2/2)"/>
|
|
123
|
-
<line number="22" hits="1" branch="false"/>
|
|
124
|
-
<line number="23" hits="1" branch="false"/>
|
|
125
|
-
<line number="24" hits="1" branch="false"/>
|
|
126
|
-
<line number="25" hits="1" branch="false"/>
|
|
127
|
-
<line number="26" hits="1" branch="false"/>
|
|
128
|
-
<line number="28" hits="4" branch="true" condition-coverage="100% (1/1)"/>
|
|
129
|
-
<line number="29" hits="1" branch="false"/>
|
|
130
|
-
<line number="30" hits="1" branch="false"/>
|
|
131
|
-
<line number="31" hits="1" branch="false"/>
|
|
132
|
-
<line number="32" hits="1" branch="false"/>
|
|
133
|
-
<line number="33" hits="1" branch="true" condition-coverage="100% (1/1)"/>
|
|
134
|
-
<line number="35" hits="3" branch="false"/>
|
|
135
|
-
<line number="37" hits="3" branch="true" condition-coverage="100% (1/1)"/>
|
|
136
|
-
<line number="38" hits="1" branch="false"/>
|
|
137
|
-
<line number="39" hits="3" branch="true" condition-coverage="100% (1/1)"/>
|
|
138
|
-
<line number="40" hits="2" branch="false"/>
|
|
139
|
-
<line number="41" hits="2" branch="false"/>
|
|
140
|
-
<line number="43" hits="3" branch="false"/>
|
|
141
|
-
<line number="44" hits="3" branch="false"/>
|
|
142
|
-
<line number="45" hits="3" branch="false"/>
|
|
143
|
-
<line number="46" hits="3" branch="false"/>
|
|
144
|
-
<line number="47" hits="3" branch="true" condition-coverage="0% (0/1)"/>
|
|
145
|
-
<line number="48" hits="0" branch="false"/>
|
|
146
|
-
<line number="49" hits="6" branch="false"/>
|
|
147
|
-
<line number="51" hits="6" branch="false"/>
|
|
148
|
-
<line number="52" hits="6" branch="false"/>
|
|
149
|
-
<line number="53" hits="6" branch="false"/>
|
|
150
|
-
<line number="54" hits="6" branch="false"/>
|
|
151
|
-
<line number="55" hits="6" branch="false"/>
|
|
152
|
-
<line number="56" hits="6" branch="false"/>
|
|
153
|
-
<line number="57" hits="6" branch="false"/>
|
|
154
|
-
<line number="58" hits="6" branch="false"/>
|
|
155
|
-
<line number="59" hits="6" branch="false"/>
|
|
156
|
-
<line number="60" hits="6" branch="true" condition-coverage="100% (1/1)"/>
|
|
157
|
-
<line number="61" hits="6" branch="false"/>
|
|
158
|
-
<line number="62" hits="6" branch="false"/>
|
|
159
|
-
<line number="63" hits="6" branch="false"/>
|
|
160
|
-
<line number="64" hits="6" branch="false"/>
|
|
161
|
-
<line number="66" hits="6" branch="false"/>
|
|
162
|
-
<line number="67" hits="6" branch="false"/>
|
|
163
|
-
<line number="68" hits="6" branch="false"/>
|
|
164
|
-
<line number="69" hits="6" branch="true" condition-coverage="0% (0/1)"/>
|
|
165
|
-
<line number="70" hits="0" branch="false"/>
|
|
166
|
-
<line number="71" hits="0" branch="false"/>
|
|
167
|
-
<line number="72" hits="0" branch="false"/>
|
|
168
|
-
<line number="73" hits="0" branch="false"/>
|
|
169
|
-
<line number="74" hits="0" branch="false"/>
|
|
170
|
-
<line number="75" hits="6" branch="false"/>
|
|
171
|
-
</lines>
|
|
172
|
-
</class>
|
|
173
|
-
<class name="options.ts" filename="lib/options.ts" line-rate="0" branch-rate="0">
|
|
174
|
-
<methods>
|
|
175
|
-
<method name="(empty-report)" hits="1" signature="()V">
|
|
176
|
-
<lines>
|
|
177
|
-
<line number="1" hits="1"/>
|
|
178
|
-
</lines>
|
|
179
|
-
</method>
|
|
180
|
-
</methods>
|
|
181
|
-
<lines>
|
|
182
|
-
</lines>
|
|
183
|
-
</class>
|
|
184
|
-
<class name="utils.ts" filename="lib/utils.ts" line-rate="1" branch-rate="1">
|
|
185
|
-
<methods>
|
|
186
|
-
</methods>
|
|
187
|
-
<lines>
|
|
188
|
-
<line number="1" hits="1" branch="false"/>
|
|
189
|
-
<line number="4" hits="1" branch="false"/>
|
|
190
|
-
<line number="7" hits="1" branch="false"/>
|
|
191
|
-
<line number="8" hits="1" branch="false"/>
|
|
192
|
-
<line number="9" hits="1" branch="false"/>
|
|
193
|
-
<line number="10" hits="1" branch="false"/>
|
|
194
|
-
</lines>
|
|
195
|
-
</class>
|
|
196
|
-
</classes>
|
|
197
|
-
</package>
|
|
198
|
-
</packages>
|
|
199
|
-
</coverage>
|