@vymalo/opencode-otel 0.14.1 → 0.15.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/dist/lib.d.ts +1 -11
- package/dist/lib.js +1 -10
- package/dist/lib.js.map +1 -1
- package/dist/opencode.d.ts +1 -3
- package/dist/opencode.js +1 -7
- package/dist/opencode.js.map +1 -1
- package/package.json +4 -12
- package/dist/config.d.ts +0 -39
- package/dist/config.js +0 -237
- package/dist/config.js.map +0 -1
- package/dist/deferred.d.ts +0 -22
- package/dist/deferred.js +0 -29
- package/dist/deferred.js.map +0 -1
- package/dist/export-logging.d.ts +0 -28
- package/dist/export-logging.js +0 -74
- package/dist/export-logging.js.map +0 -1
- package/dist/instruments.d.ts +0 -29
- package/dist/instruments.js +0 -103
- package/dist/instruments.js.map +0 -1
- package/dist/logging.d.ts +0 -16
- package/dist/logging.js +0 -69
- package/dist/logging.js.map +0 -1
- package/dist/propagation.d.ts +0 -22
- package/dist/propagation.js +0 -57
- package/dist/propagation.js.map +0 -1
- package/dist/providers.d.ts +0 -66
- package/dist/providers.js +0 -238
- package/dist/providers.js.map +0 -1
- package/dist/recorder.d.ts +0 -166
- package/dist/recorder.js +0 -795
- package/dist/recorder.js.map +0 -1
- package/dist/token-source.d.ts +0 -59
- package/dist/token-source.js +0 -125
- package/dist/token-source.js.map +0 -1
- package/dist/types.d.ts +0 -104
- package/dist/types.js +0 -3
- package/dist/types.js.map +0 -1
- package/dist/vcs.d.ts +0 -63
- package/dist/vcs.js +0 -188
- package/dist/vcs.js.map +0 -1
package/dist/instruments.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
export function createInstruments(meter) {
|
|
2
|
-
return {
|
|
3
|
-
cost: meter.createCounter("opencode.cost.usage", {
|
|
4
|
-
description: "Cost of model usage, as reported by the OpenCode host",
|
|
5
|
-
unit: "USD"
|
|
6
|
-
}),
|
|
7
|
-
tokens: meter.createHistogram("gen_ai.client.token.usage", {
|
|
8
|
-
description: "Tokens consumed per assistant message, by token type",
|
|
9
|
-
unit: "{token}"
|
|
10
|
-
}),
|
|
11
|
-
duration: meter.createHistogram("gen_ai.client.operation.duration", {
|
|
12
|
-
description: "Duration of a model operation",
|
|
13
|
-
unit: "s"
|
|
14
|
-
}),
|
|
15
|
-
sessions: meter.createCounter("opencode.session.count", {
|
|
16
|
-
description: "Sessions started",
|
|
17
|
-
unit: "{session}"
|
|
18
|
-
}),
|
|
19
|
-
requests: meter.createCounter("opencode.session.request.count", {
|
|
20
|
-
description: "Assistant messages completed",
|
|
21
|
-
unit: "{request}"
|
|
22
|
-
}),
|
|
23
|
-
compactions: meter.createCounter("opencode.session.compaction.count", {
|
|
24
|
-
description: "Context compactions performed",
|
|
25
|
-
unit: "{compaction}"
|
|
26
|
-
}),
|
|
27
|
-
activeTime: meter.createCounter("opencode.active_time.total", {
|
|
28
|
-
description: "Wall time sessions spent busy",
|
|
29
|
-
unit: "s"
|
|
30
|
-
}),
|
|
31
|
-
linesOfCode: meter.createCounter("opencode.lines_of_code.count", {
|
|
32
|
-
description: "Lines added or removed across session diffs",
|
|
33
|
-
unit: "{line}"
|
|
34
|
-
}),
|
|
35
|
-
toolInvocations: meter.createCounter("opencode.tool.invocations", {
|
|
36
|
-
description: "Tool executions",
|
|
37
|
-
unit: "{invocation}"
|
|
38
|
-
}),
|
|
39
|
-
permissionDecisions: meter.createCounter("opencode.permission.decision.count", {
|
|
40
|
-
description: "Permission prompts resolved",
|
|
41
|
-
unit: "{decision}"
|
|
42
|
-
}),
|
|
43
|
-
commands: meter.createCounter("opencode.command.executed.count", {
|
|
44
|
-
description: "Slash commands executed",
|
|
45
|
-
unit: "{command}"
|
|
46
|
-
})
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
const EXTENSION_LANGUAGES = {
|
|
50
|
-
ts: "typescript",
|
|
51
|
-
tsx: "typescript",
|
|
52
|
-
mts: "typescript",
|
|
53
|
-
cts: "typescript",
|
|
54
|
-
js: "javascript",
|
|
55
|
-
jsx: "javascript",
|
|
56
|
-
mjs: "javascript",
|
|
57
|
-
cjs: "javascript",
|
|
58
|
-
py: "python",
|
|
59
|
-
rs: "rust",
|
|
60
|
-
go: "go",
|
|
61
|
-
java: "java",
|
|
62
|
-
kt: "kotlin",
|
|
63
|
-
kts: "kotlin",
|
|
64
|
-
swift: "swift",
|
|
65
|
-
dart: "dart",
|
|
66
|
-
rb: "ruby",
|
|
67
|
-
php: "php",
|
|
68
|
-
cs: "csharp",
|
|
69
|
-
c: "c",
|
|
70
|
-
h: "c",
|
|
71
|
-
cc: "cpp",
|
|
72
|
-
cpp: "cpp",
|
|
73
|
-
hpp: "cpp",
|
|
74
|
-
m: "objective-c",
|
|
75
|
-
mm: "objective-c",
|
|
76
|
-
scala: "scala",
|
|
77
|
-
ex: "elixir",
|
|
78
|
-
exs: "elixir",
|
|
79
|
-
sh: "shell",
|
|
80
|
-
bash: "shell",
|
|
81
|
-
zsh: "shell",
|
|
82
|
-
sql: "sql",
|
|
83
|
-
html: "html",
|
|
84
|
-
css: "css",
|
|
85
|
-
scss: "scss",
|
|
86
|
-
json: "json",
|
|
87
|
-
yaml: "yaml",
|
|
88
|
-
yml: "yaml",
|
|
89
|
-
toml: "toml",
|
|
90
|
-
md: "markdown",
|
|
91
|
-
tf: "terraform"
|
|
92
|
-
};
|
|
93
|
-
/** Best-effort language for a path, by extension. `undefined` when unknown. */
|
|
94
|
-
export function detectLanguage(file) {
|
|
95
|
-
const base = file.slice(file.lastIndexOf("/") + 1);
|
|
96
|
-
const dot = base.lastIndexOf(".");
|
|
97
|
-
if (dot <= 0) {
|
|
98
|
-
return undefined;
|
|
99
|
-
}
|
|
100
|
-
return EXTENSION_LANGUAGES[base.slice(dot + 1).toLowerCase()];
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
//# sourceMappingURL=instruments.js.map
|
package/dist/instruments.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AA4B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;CACN,KAAK;CACL,MAAM;CACN,IAAI;CACJ,IAAI;AACN;;AAGA,OAAO,SAAS,eAAe,MAAkC;CAC/D,MAAM,OAAO,KAAK,MAAM,KAAK,YAAY,GAAG,IAAI,CAAC;CACjD,MAAM,MAAM,KAAK,YAAY,GAAG;CAChC,IAAI,OAAO,GAAG;EACZ,OAAO;CACT;CACA,OAAO,oBAAoB,KAAK,MAAM,MAAM,CAAC,CAAC,CAAC,YAAY;AAC7D","names":[],"sources":["../src/instruments.ts"],"version":3,"file":"instruments.js","sourceRoot":""}
|
package/dist/logging.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { LogLevel } from "./types.js";
|
|
2
|
-
export type { LogLevel } from "./types.js";
|
|
3
|
-
export declare const LOG_LEVEL_PRIORITY: Record<LogLevel, number>;
|
|
4
|
-
export declare const DEFAULT_LOG_LEVEL: LogLevel;
|
|
5
|
-
export interface LogFields {
|
|
6
|
-
[key: string]: unknown;
|
|
7
|
-
}
|
|
8
|
-
export interface Logger {
|
|
9
|
-
trace(event: string, fields?: LogFields): void;
|
|
10
|
-
debug(event: string, fields?: LogFields): void;
|
|
11
|
-
info(event: string, fields?: LogFields): void;
|
|
12
|
-
warn(event: string, fields?: LogFields): void;
|
|
13
|
-
error(event: string, fields?: LogFields): void;
|
|
14
|
-
}
|
|
15
|
-
export declare function createJsonConsoleLogger(minLevel?: LogLevel): Logger;
|
|
16
|
-
export declare function fromOpenCodeLogLevel(value: unknown): LogLevel | undefined;
|
package/dist/logging.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
export const LOG_LEVEL_PRIORITY = {
|
|
2
|
-
trace: 5,
|
|
3
|
-
debug: 10,
|
|
4
|
-
info: 20,
|
|
5
|
-
warn: 30,
|
|
6
|
-
error: 40
|
|
7
|
-
};
|
|
8
|
-
export const DEFAULT_LOG_LEVEL = "info";
|
|
9
|
-
function redactFields(fields) {
|
|
10
|
-
if (!fields) {
|
|
11
|
-
return undefined;
|
|
12
|
-
}
|
|
13
|
-
const redacted = {};
|
|
14
|
-
for (const [key, value] of Object.entries(fields)) {
|
|
15
|
-
if (/token|secret|password|authorization/i.test(key)) {
|
|
16
|
-
redacted[key] = "[redacted]";
|
|
17
|
-
continue;
|
|
18
|
-
}
|
|
19
|
-
redacted[key] = value;
|
|
20
|
-
}
|
|
21
|
-
return redacted;
|
|
22
|
-
}
|
|
23
|
-
export function createJsonConsoleLogger(minLevel = DEFAULT_LOG_LEVEL) {
|
|
24
|
-
const minPriority = LOG_LEVEL_PRIORITY[minLevel];
|
|
25
|
-
const write = (level, event, fields) => {
|
|
26
|
-
if (LOG_LEVEL_PRIORITY[level] < minPriority) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
const payload = {
|
|
30
|
-
ts: new Date().toISOString(),
|
|
31
|
-
level,
|
|
32
|
-
event,
|
|
33
|
-
...redactFields(fields) ?? {}
|
|
34
|
-
};
|
|
35
|
-
const line = JSON.stringify(payload);
|
|
36
|
-
if (level === "error") {
|
|
37
|
-
console.error(line);
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
if (level === "warn") {
|
|
41
|
-
console.warn(line);
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
console.log(line);
|
|
45
|
-
};
|
|
46
|
-
return {
|
|
47
|
-
trace: (event, fields) => write("trace", event, fields),
|
|
48
|
-
debug: (event, fields) => write("debug", event, fields),
|
|
49
|
-
info: (event, fields) => write("info", event, fields),
|
|
50
|
-
warn: (event, fields) => write("warn", event, fields),
|
|
51
|
-
error: (event, fields) => write("error", event, fields)
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
export function fromOpenCodeLogLevel(value) {
|
|
55
|
-
if (typeof value !== "string") {
|
|
56
|
-
return undefined;
|
|
57
|
-
}
|
|
58
|
-
switch (value.toUpperCase()) {
|
|
59
|
-
case "DEBUG":
|
|
60
|
-
// Host DEBUG unlocks our most-verbose internal tier (trace).
|
|
61
|
-
return "trace";
|
|
62
|
-
case "INFO": return "info";
|
|
63
|
-
case "WARN": return "warn";
|
|
64
|
-
case "ERROR": return "error";
|
|
65
|
-
default: return undefined;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
//# sourceMappingURL=logging.js.map
|
package/dist/logging.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAIA,OAAO,MAAM,qBAA+C;CAC1D,OAAO;CACP,OAAO;CACP,MAAM;CACN,MAAM;CACN,OAAO;AACT;AAEA,OAAO,MAAM,oBAA8B;AAc3C,SAAS,aAAa,QAA2C;CAC/D,IAAI,CAAC,QAAQ;EACX,OAAO;CACT;CACA,MAAM,WAAsB,CAAC;CAC7B,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,MAAM,GAAG;EACjD,IAAI,uCAAuC,KAAK,GAAG,GAAG;GACpD,SAAS,OAAO;GAChB;EACF;EACA,SAAS,OAAO;CAClB;CACA,OAAO;AACT;AAEA,OAAO,SAAS,wBAAwB,WAAqB,mBAA2B;CACtF,MAAM,cAAc,mBAAmB;CAEvC,MAAM,SAAS,OAAiB,OAAe,WAA6B;EAC1E,IAAI,mBAAmB,SAAS,aAAa;GAC3C;EACF;EACA,MAAM,UAAU;GACd,IAAI,IAAI,KAAK,CAAC,CAAC,YAAY;GAC3B;GACA;GACA,GAAI,aAAa,MAAM,KAAK,CAAC;EAC/B;EACA,MAAM,OAAO,KAAK,UAAU,OAAO;EACnC,IAAI,UAAU,SAAS;GACrB,QAAQ,MAAM,IAAI;GAClB;EACF;EACA,IAAI,UAAU,QAAQ;GACpB,QAAQ,KAAK,IAAI;GACjB;EACF;EACA,QAAQ,IAAI,IAAI;CAClB;CAEA,OAAO;EACL,QAAQ,OAAO,WAAW,MAAM,SAAS,OAAO,MAAM;EACtD,QAAQ,OAAO,WAAW,MAAM,SAAS,OAAO,MAAM;EACtD,OAAO,OAAO,WAAW,MAAM,QAAQ,OAAO,MAAM;EACpD,OAAO,OAAO,WAAW,MAAM,QAAQ,OAAO,MAAM;EACpD,QAAQ,OAAO,WAAW,MAAM,SAAS,OAAO,MAAM;CACxD;AACF;AAEA,OAAO,SAAS,qBAAqB,OAAsC;CACzE,IAAI,OAAO,UAAU,UAAU;EAC7B,OAAO;CACT;CACA,QAAQ,MAAM,YAAY,GAA1B;EACE,KAAK;;EAEH,OAAO;EACT,KAAK,QACH,OAAO;EACT,KAAK,QACH,OAAO;EACT,KAAK,SACH,OAAO;EACT,SACE,OAAO;CACX;AACF","names":[],"sources":["../src/logging.ts"],"version":3,"file":"logging.js","sourceRoot":""}
|
package/dist/propagation.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Context } from "@opentelemetry/api";
|
|
2
|
-
import type { Logger } from "./logging.js";
|
|
3
|
-
export interface ProviderConfigLike {
|
|
4
|
-
options?: Record<string, unknown>;
|
|
5
|
-
}
|
|
6
|
-
export interface PropagationConfigInput {
|
|
7
|
-
provider?: Record<string, ProviderConfigLike | undefined>;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Wrap every provider's `options.fetch` so outgoing model requests carry W3C
|
|
11
|
-
* trace context, joining an OpenCode session and its gateway-side spans into
|
|
12
|
-
* one trace.
|
|
13
|
-
*
|
|
14
|
-
* This is the same interception seam `@vymalo/opencode-ratelimit` uses — and it
|
|
15
|
-
* composes the same way: the existing fetch is captured at install time and
|
|
16
|
-
* delegated to, so stacking the two plugins in either order works.
|
|
17
|
-
*/
|
|
18
|
-
export declare function installTracePropagation(input: PropagationConfigInput, deps: {
|
|
19
|
-
getContext: () => Context | undefined;
|
|
20
|
-
logger: Logger;
|
|
21
|
-
fetchImpl?: typeof fetch;
|
|
22
|
-
}): number;
|
package/dist/propagation.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { defaultTextMapSetter } from "@opentelemetry/api";
|
|
2
|
-
import { W3CTraceContextPropagator } from "@opentelemetry/core";
|
|
3
|
-
const propagator = new W3CTraceContextPropagator();
|
|
4
|
-
/**
|
|
5
|
-
* Wrap every provider's `options.fetch` so outgoing model requests carry W3C
|
|
6
|
-
* trace context, joining an OpenCode session and its gateway-side spans into
|
|
7
|
-
* one trace.
|
|
8
|
-
*
|
|
9
|
-
* This is the same interception seam `@vymalo/opencode-ratelimit` uses — and it
|
|
10
|
-
* composes the same way: the existing fetch is captured at install time and
|
|
11
|
-
* delegated to, so stacking the two plugins in either order works.
|
|
12
|
-
*/
|
|
13
|
-
export function installTracePropagation(input, deps) {
|
|
14
|
-
const providers = input.provider;
|
|
15
|
-
if (!providers) {
|
|
16
|
-
return 0;
|
|
17
|
-
}
|
|
18
|
-
let wrapped = 0;
|
|
19
|
-
for (const [providerId, providerConfig] of Object.entries(providers)) {
|
|
20
|
-
if (!providerConfig) {
|
|
21
|
-
continue;
|
|
22
|
-
}
|
|
23
|
-
const options = providerConfig.options ??= {};
|
|
24
|
-
const delegate = typeof options.fetch === "function" ? options.fetch : deps.fetchImpl ?? globalThis.fetch;
|
|
25
|
-
if (typeof delegate !== "function") {
|
|
26
|
-
continue;
|
|
27
|
-
}
|
|
28
|
-
options.fetch = async (input_, init) => {
|
|
29
|
-
const context = deps.getContext();
|
|
30
|
-
if (!context) {
|
|
31
|
-
return delegate(input_, init);
|
|
32
|
-
}
|
|
33
|
-
const carrier = {};
|
|
34
|
-
propagator.inject(context, carrier, defaultTextMapSetter);
|
|
35
|
-
if (Object.keys(carrier).length === 0) {
|
|
36
|
-
return delegate(input_, init);
|
|
37
|
-
}
|
|
38
|
-
const headers = new Headers(init?.headers ?? {});
|
|
39
|
-
// Never clobber an upstream traceparent — if something already set one,
|
|
40
|
-
// it knows more about the request than we do.
|
|
41
|
-
for (const [key, value] of Object.entries(carrier)) {
|
|
42
|
-
if (!headers.has(key)) {
|
|
43
|
-
headers.set(key, value);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return delegate(input_, {
|
|
47
|
-
...init,
|
|
48
|
-
headers
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
wrapped += 1;
|
|
52
|
-
deps.logger.trace("otel_trace_propagation_installed", { providerId });
|
|
53
|
-
}
|
|
54
|
-
return wrapped;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
//# sourceMappingURL=propagation.js.map
|
package/dist/propagation.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AACA,SAAS,4BAA4B;AACrC,SAAS,iCAAiC;AAY1C,MAAM,aAAa,IAAI,0BAA0B;;;;;;;;;;AAWjD,OAAO,SAAS,wBACd,OACA,MACQ;CACR,MAAM,YAAY,MAAM;CACxB,IAAI,CAAC,WAAW;EACd,OAAO;CACT;CAEA,IAAI,UAAU;CACd,KAAK,MAAM,CAAC,YAAY,mBAAmB,OAAO,QAAQ,SAAS,GAAG;EACpE,IAAI,CAAC,gBAAgB;GACnB;EACF;EACA,MAAM,UAAW,eAAe,YAAY,CAAC;EAC7C,MAAM,WACJ,OAAO,QAAQ,UAAU,aACpB,QAAQ,QACR,KAAK,aAAa,WAAW;EACpC,IAAI,OAAO,aAAa,YAAY;GAClC;EACF;EAEA,QAAQ,QAAQ,OACd,QACA,SACsB;GACtB,MAAM,UAAU,KAAK,WAAW;GAChC,IAAI,CAAC,SAAS;IACZ,OAAO,SAAS,QAAQ,IAAI;GAC9B;GACA,MAAM,UAAkC,CAAC;GACzC,WAAW,OAAO,SAAS,SAAS,oBAAoB;GACxD,IAAI,OAAO,KAAK,OAAO,CAAC,CAAC,WAAW,GAAG;IACrC,OAAO,SAAS,QAAQ,IAAI;GAC9B;GACA,MAAM,UAAU,IAAI,QAAQ,MAAM,WAAW,CAAC,CAAC;;;GAG/C,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,OAAO,GAAG;IAClD,IAAI,CAAC,QAAQ,IAAI,GAAG,GAAG;KACrB,QAAQ,IAAI,KAAK,KAAK;IACxB;GACF;GACA,OAAO,SAAS,QAAQ;IAAE,GAAG;IAAM;GAAQ,CAAC;EAC9C;EACA,WAAW;EACX,KAAK,OAAO,MAAM,oCAAoC,EAAE,WAAW,CAAC;CACtE;CAEA,OAAO;AACT","names":[],"sources":["../src/propagation.ts"],"version":3,"file":"propagation.js","sourceRoot":""}
|
package/dist/providers.d.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import type { Logger as OtelLogger } from "@opentelemetry/api-logs";
|
|
2
|
-
import { type MaybePromise, type Resource } from "@opentelemetry/resources";
|
|
3
|
-
import { type LogRecordExporter } from "@opentelemetry/sdk-logs";
|
|
4
|
-
import { type PushMetricExporter } from "@opentelemetry/sdk-metrics";
|
|
5
|
-
import { type SpanExporter } from "@opentelemetry/sdk-trace";
|
|
6
|
-
import type { Tracer } from "@opentelemetry/api";
|
|
7
|
-
import type { Meter } from "@opentelemetry/api";
|
|
8
|
-
import type { Logger } from "./logging.js";
|
|
9
|
-
import { type TokenSource } from "./token-source.js";
|
|
10
|
-
import type { VcsInfo } from "./vcs.js";
|
|
11
|
-
import type { ResolvedOtelConfig } from "./types.js";
|
|
12
|
-
/**
|
|
13
|
-
* The three provider handles the recorder needs, plus lifecycle. `undefined`
|
|
14
|
-
* for a signal whose exporter is `none` — the recorder no-ops on it rather
|
|
15
|
-
* than branching on config everywhere.
|
|
16
|
-
*/
|
|
17
|
-
export interface TelemetryProviders {
|
|
18
|
-
tracer?: Tracer;
|
|
19
|
-
meter?: Meter;
|
|
20
|
-
otelLogger?: OtelLogger;
|
|
21
|
-
/** Push everything buffered. Called on `session.idle` and on process exit. */
|
|
22
|
-
forceFlush(): Promise<void>;
|
|
23
|
-
/** Flush and tear down. */
|
|
24
|
-
shutdown(): Promise<void>;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Exporter factories, injectable so tests can substitute in-memory exporters
|
|
28
|
-
* without reaching the network or constructing real OTLP clients.
|
|
29
|
-
*/
|
|
30
|
-
export interface ExporterFactories {
|
|
31
|
-
trace?: (config: ResolvedOtelConfig, tokenSource?: TokenSource) => SpanExporter | undefined;
|
|
32
|
-
metric?: (config: ResolvedOtelConfig, tokenSource?: TokenSource) => PushMetricExporter | undefined;
|
|
33
|
-
log?: (config: ResolvedOtelConfig, tokenSource?: TokenSource) => LogRecordExporter | undefined;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Build the resource every signal is stamped with.
|
|
37
|
-
*
|
|
38
|
-
* Deliberately identifies the **machine and the project**, never the developer:
|
|
39
|
-
* no git author email, no account id. An operator who wants per-person
|
|
40
|
-
* attribution adds it explicitly via `resourceAttributes` /
|
|
41
|
-
* `OTEL_RESOURCE_ATTRIBUTES`, which keeps that choice visible in config.
|
|
42
|
-
*/
|
|
43
|
-
export declare function buildResource(config: ResolvedOtelConfig, context: {
|
|
44
|
-
/**
|
|
45
|
-
* May be a promise: OpenCode reports the host version as an
|
|
46
|
-
* `installation.updated` *event*, after the resource is already built. The
|
|
47
|
-
* OTel resource API awaits promise-valued attributes before the first
|
|
48
|
-
* export — see `deferred.ts` for why the deferral is always bounded.
|
|
49
|
-
*/
|
|
50
|
-
version?: MaybePromise<string | undefined>;
|
|
51
|
-
hostname?: string;
|
|
52
|
-
projectName?: string;
|
|
53
|
-
directory?: string;
|
|
54
|
-
worktree?: string;
|
|
55
|
-
/** May be a promise, for the same reason as `version` (`vcs.branch.updated`). */
|
|
56
|
-
branch?: MaybePromise<string | undefined>;
|
|
57
|
-
/** Repository metadata read off disk — see `vcs.ts`. */
|
|
58
|
-
vcs?: VcsInfo;
|
|
59
|
-
}): Resource;
|
|
60
|
-
/**
|
|
61
|
-
* Construct the enabled providers. Each signal is independent: a failure to
|
|
62
|
-
* build one leaves the others running, because partial telemetry is strictly
|
|
63
|
-
* better than an exception escaping into the host's plugin loader.
|
|
64
|
-
*/
|
|
65
|
-
export declare function createProviders(config: ResolvedOtelConfig, resource: Resource, logger: Logger, factories?: ExporterFactories): TelemetryProviders;
|
|
66
|
-
export declare function describeError(error: unknown): string;
|
package/dist/providers.js
DELETED
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
import { OTLPLogExporter } from "@opentelemetry/exporter-logs-otlp-proto";
|
|
2
|
-
import { OTLPMetricExporter } from "@opentelemetry/exporter-metrics-otlp-proto";
|
|
3
|
-
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-proto";
|
|
4
|
-
import { resourceFromAttributes } from "@opentelemetry/resources";
|
|
5
|
-
import { BatchLogRecordProcessor, ConsoleLogRecordExporter, LoggerProvider } from "@opentelemetry/sdk-logs";
|
|
6
|
-
import { AggregationTemporality, ConsoleMetricExporter, MeterProvider, PeriodicExportingMetricReader } from "@opentelemetry/sdk-metrics";
|
|
7
|
-
import { BatchSpanProcessor, ConsoleSpanExporter, TracerProvider } from "@opentelemetry/sdk-trace";
|
|
8
|
-
import { signalUrl } from "./config.js";
|
|
9
|
-
import { withFailureLogging } from "./export-logging.js";
|
|
10
|
-
import { createTokenSource } from "./token-source.js";
|
|
11
|
-
const INSTRUMENTATION_SCOPE = "@vymalo/opencode-otel";
|
|
12
|
-
/**
|
|
13
|
-
* Build the exporter's `url` + `headers`. With a credential helper configured,
|
|
14
|
-
* `headers` is an async factory the exporter calls before every export — which
|
|
15
|
-
* is what lets a five-minute OIDC token be refreshed underneath a long-running
|
|
16
|
-
* session instead of going stale at the first expiry.
|
|
17
|
-
*/
|
|
18
|
-
function otlpArgs(config, signal, tokenSource) {
|
|
19
|
-
const url = signalUrl(config, signal);
|
|
20
|
-
if (!url) {
|
|
21
|
-
return undefined;
|
|
22
|
-
}
|
|
23
|
-
if (!tokenSource) {
|
|
24
|
-
return {
|
|
25
|
-
url,
|
|
26
|
-
headers: config.headers
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
return {
|
|
30
|
-
url,
|
|
31
|
-
headers: async () => ({
|
|
32
|
-
...config.headers,
|
|
33
|
-
...await tokenSource.headers()
|
|
34
|
-
})
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
const defaultFactories = {
|
|
38
|
-
trace: (config, tokenSource) => {
|
|
39
|
-
if (config.exporters.traces === "console") {
|
|
40
|
-
return new ConsoleSpanExporter();
|
|
41
|
-
}
|
|
42
|
-
const args = otlpArgs(config, "traces", tokenSource);
|
|
43
|
-
return args ? new OTLPTraceExporter(args) : undefined;
|
|
44
|
-
},
|
|
45
|
-
metric: (config, tokenSource) => {
|
|
46
|
-
if (config.exporters.metrics === "console") {
|
|
47
|
-
return new ConsoleMetricExporter();
|
|
48
|
-
}
|
|
49
|
-
const args = otlpArgs(config, "metrics", tokenSource);
|
|
50
|
-
return args ? new OTLPMetricExporter({
|
|
51
|
-
...args,
|
|
52
|
-
temporalityPreference: config.metricTemporality === "cumulative" ? AggregationTemporality.CUMULATIVE : AggregationTemporality.DELTA
|
|
53
|
-
}) : undefined;
|
|
54
|
-
},
|
|
55
|
-
log: (config, tokenSource) => {
|
|
56
|
-
if (config.exporters.logs === "console") {
|
|
57
|
-
return new ConsoleLogRecordExporter();
|
|
58
|
-
}
|
|
59
|
-
const args = otlpArgs(config, "logs", tokenSource);
|
|
60
|
-
return args ? new OTLPLogExporter(args) : undefined;
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* Build the resource every signal is stamped with.
|
|
65
|
-
*
|
|
66
|
-
* Deliberately identifies the **machine and the project**, never the developer:
|
|
67
|
-
* no git author email, no account id. An operator who wants per-person
|
|
68
|
-
* attribution adds it explicitly via `resourceAttributes` /
|
|
69
|
-
* `OTEL_RESOURCE_ATTRIBUTES`, which keeps that choice visible in config.
|
|
70
|
-
*/
|
|
71
|
-
export function buildResource(config, context) {
|
|
72
|
-
const attributes = {
|
|
73
|
-
"service.name": config.serviceName,
|
|
74
|
-
"telemetry.sdk.language": "nodejs"
|
|
75
|
-
};
|
|
76
|
-
if (context.version) {
|
|
77
|
-
attributes["service.version"] = context.version;
|
|
78
|
-
}
|
|
79
|
-
if (config.environment) {
|
|
80
|
-
attributes["deployment.environment.name"] = config.environment;
|
|
81
|
-
}
|
|
82
|
-
if (context.hostname) {
|
|
83
|
-
attributes["host.name"] = context.hostname;
|
|
84
|
-
}
|
|
85
|
-
if (context.projectName) {
|
|
86
|
-
attributes["opencode.project.name"] = context.projectName;
|
|
87
|
-
}
|
|
88
|
-
if (context.directory) {
|
|
89
|
-
attributes["opencode.directory"] = context.directory;
|
|
90
|
-
}
|
|
91
|
-
if (context.worktree) {
|
|
92
|
-
attributes["opencode.worktree"] = context.worktree;
|
|
93
|
-
}
|
|
94
|
-
if (context.branch) {
|
|
95
|
-
attributes["vcs.ref.head.name"] = context.branch;
|
|
96
|
-
// Deprecated in semconv 1.43 in favour of `vcs.ref.head.name`, but it is
|
|
97
|
-
// what `opencode-otel-plugin` emits and what existing dashboards key on.
|
|
98
|
-
// Kept as an alias so a collector receiving both plugins stays coherent;
|
|
99
|
-
// due for removal once those dashboards move.
|
|
100
|
-
attributes["vcs.repository.ref.name"] = context.branch;
|
|
101
|
-
}
|
|
102
|
-
const vcs = context.vcs;
|
|
103
|
-
if (vcs) {
|
|
104
|
-
if (vcs.url) {
|
|
105
|
-
attributes["vcs.repository.url.full"] = vcs.url;
|
|
106
|
-
}
|
|
107
|
-
if (vcs.name) {
|
|
108
|
-
attributes["vcs.repository.name"] = vcs.name;
|
|
109
|
-
}
|
|
110
|
-
if (vcs.owner) {
|
|
111
|
-
attributes["vcs.owner.name"] = vcs.owner;
|
|
112
|
-
}
|
|
113
|
-
if (vcs.provider) {
|
|
114
|
-
attributes["vcs.provider.name"] = vcs.provider;
|
|
115
|
-
}
|
|
116
|
-
if (vcs.revision) {
|
|
117
|
-
attributes["vcs.ref.head.revision"] = vcs.revision;
|
|
118
|
-
}
|
|
119
|
-
if (vcs.refType) {
|
|
120
|
-
attributes["vcs.ref.head.type"] = vcs.refType;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
// Operator-supplied attributes win — they are the escape hatch, and silently
|
|
124
|
-
// ignoring them would make the escape hatch useless.
|
|
125
|
-
return resourceFromAttributes({
|
|
126
|
-
...attributes,
|
|
127
|
-
...config.resourceAttributes
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Construct the enabled providers. Each signal is independent: a failure to
|
|
132
|
-
* build one leaves the others running, because partial telemetry is strictly
|
|
133
|
-
* better than an exception escaping into the host's plugin loader.
|
|
134
|
-
*/
|
|
135
|
-
export function createProviders(config, resource, logger, factories = {}) {
|
|
136
|
-
const make = {
|
|
137
|
-
...defaultFactories,
|
|
138
|
-
...factories
|
|
139
|
-
};
|
|
140
|
-
const flushers = [];
|
|
141
|
-
const shutdowns = [];
|
|
142
|
-
const tokenSource = config.tokenCommand.length > 0 ? createTokenSource({
|
|
143
|
-
command: config.tokenCommand,
|
|
144
|
-
header: config.tokenHeader,
|
|
145
|
-
prefix: config.tokenPrefix,
|
|
146
|
-
refreshMs: config.tokenRefreshMs,
|
|
147
|
-
timeoutMs: config.tokenTimeoutMs,
|
|
148
|
-
logger
|
|
149
|
-
}) : undefined;
|
|
150
|
-
// A rejected export is the symptom of a dead credential, so drop the cached
|
|
151
|
-
// token and let the next export re-run the helper rather than retrying with
|
|
152
|
-
// something the collector has already refused.
|
|
153
|
-
const onFailure = tokenSource ? () => tokenSource.invalidate() : undefined;
|
|
154
|
-
const observe = (exporter, signal) => withFailureLogging(exporter, signal, logger, { onFailure });
|
|
155
|
-
let tracer;
|
|
156
|
-
let meter;
|
|
157
|
-
let otelLogger;
|
|
158
|
-
if (config.exporters.traces !== "none") {
|
|
159
|
-
try {
|
|
160
|
-
const built = make.trace(config, tokenSource);
|
|
161
|
-
if (built) {
|
|
162
|
-
const exporter = observe(built, "traces");
|
|
163
|
-
const provider = new TracerProvider({
|
|
164
|
-
resource,
|
|
165
|
-
spanProcessors: [new BatchSpanProcessor({
|
|
166
|
-
exporter,
|
|
167
|
-
scheduledDelayMillis: config.traceExportIntervalMs
|
|
168
|
-
})]
|
|
169
|
-
});
|
|
170
|
-
tracer = provider.getTracer(INSTRUMENTATION_SCOPE);
|
|
171
|
-
flushers.push(() => provider.forceFlush());
|
|
172
|
-
shutdowns.push(() => provider.shutdown());
|
|
173
|
-
}
|
|
174
|
-
} catch (error) {
|
|
175
|
-
logger.warn("otel_traces_init_failed", { error: describeError(error) });
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
if (config.exporters.metrics !== "none") {
|
|
179
|
-
try {
|
|
180
|
-
const built = make.metric(config, tokenSource);
|
|
181
|
-
if (built) {
|
|
182
|
-
const exporter = observe(built, "metrics");
|
|
183
|
-
const provider = new MeterProvider({
|
|
184
|
-
resource,
|
|
185
|
-
readers: [new PeriodicExportingMetricReader({
|
|
186
|
-
exporter,
|
|
187
|
-
exportIntervalMillis: config.metricExportIntervalMs
|
|
188
|
-
})]
|
|
189
|
-
});
|
|
190
|
-
meter = provider.getMeter(INSTRUMENTATION_SCOPE);
|
|
191
|
-
flushers.push(() => provider.forceFlush());
|
|
192
|
-
shutdowns.push(() => provider.shutdown());
|
|
193
|
-
}
|
|
194
|
-
} catch (error) {
|
|
195
|
-
logger.warn("otel_metrics_init_failed", { error: describeError(error) });
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
if (config.exporters.logs !== "none") {
|
|
199
|
-
try {
|
|
200
|
-
const built = make.log(config, tokenSource);
|
|
201
|
-
if (built) {
|
|
202
|
-
const exporter = observe(built, "logs");
|
|
203
|
-
const provider = new LoggerProvider({
|
|
204
|
-
resource,
|
|
205
|
-
processors: [new BatchLogRecordProcessor({
|
|
206
|
-
exporter,
|
|
207
|
-
scheduledDelayMillis: config.logExportIntervalMs
|
|
208
|
-
})]
|
|
209
|
-
});
|
|
210
|
-
otelLogger = provider.getLogger(INSTRUMENTATION_SCOPE);
|
|
211
|
-
flushers.push(() => provider.forceFlush());
|
|
212
|
-
shutdowns.push(() => provider.shutdown());
|
|
213
|
-
}
|
|
214
|
-
} catch (error) {
|
|
215
|
-
logger.warn("otel_logs_init_failed", { error: describeError(error) });
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
const runAll = async (tasks) => {
|
|
219
|
-
// `allSettled`, not `all`: one unreachable collector must not stop the
|
|
220
|
-
// other signals from draining.
|
|
221
|
-
await Promise.allSettled(tasks.map((task) => task()));
|
|
222
|
-
};
|
|
223
|
-
return {
|
|
224
|
-
tracer,
|
|
225
|
-
meter,
|
|
226
|
-
otelLogger,
|
|
227
|
-
forceFlush: () => runAll(flushers),
|
|
228
|
-
shutdown: () => runAll(shutdowns)
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
export function describeError(error) {
|
|
232
|
-
if (error instanceof Error) {
|
|
233
|
-
return error.message;
|
|
234
|
-
}
|
|
235
|
-
return String(error);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
//# sourceMappingURL=providers.js.map
|
package/dist/providers.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AACA,SAAS,uBAAuB;AAChC,SAAS,0BAA0B;AACnC,SAAS,yBAAyB;AAClC,SAIE,8BACK;AACP,SACE,yBACA,0BAEA,sBACK;AACP,SACE,wBACA,uBACA,eACA,qCAEK;AACP,SACE,oBACA,qBAEA,sBACK;AAIP,SAAS,iBAAiB;AAC1B,SAA4B,0BAA0B;AAEtD,SAAS,yBAA2C;AAIpD,MAAM,wBAAwB;;;;;;;AAoC9B,SAAS,SAAS,QAA4B,QAAoB,aAA2B;CAC3F,MAAM,MAAM,UAAU,QAAQ,MAAM;CACpC,IAAI,CAAC,KAAK;EACR,OAAO;CACT;CACA,IAAI,CAAC,aAAa;EAChB,OAAO;GAAE;GAAK,SAAS,OAAO;EAAQ;CACxC;CACA,OAAO;EACL;EACA,SAAS,aAAa;GAAE,GAAG,OAAO;GAAS,GAAI,MAAM,YAAY,QAAQ;EAAG;CAC9E;AACF;AAEA,MAAM,mBAAgD;CACpD,QAAQ,QAAQ,gBAAgB;EAC9B,IAAI,OAAO,UAAU,WAAW,WAAW;GACzC,O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