@vymalo/opencode-otel 0.12.0 → 0.14.1

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.
@@ -1,55 +1,66 @@
1
1
  import type { Logger as OtelLogger } from "@opentelemetry/api-logs";
2
- import { type Resource } from "@opentelemetry/resources";
2
+ import { type MaybePromise, type Resource } from "@opentelemetry/resources";
3
3
  import { type LogRecordExporter } from "@opentelemetry/sdk-logs";
4
4
  import { type PushMetricExporter } from "@opentelemetry/sdk-metrics";
5
5
  import { type SpanExporter } from "@opentelemetry/sdk-trace";
6
6
  import type { Tracer } from "@opentelemetry/api";
7
7
  import type { Meter } from "@opentelemetry/api";
8
8
  import type { Logger } from "./logging.js";
9
+ import { type TokenSource } from "./token-source.js";
10
+ import type { VcsInfo } from "./vcs.js";
9
11
  import type { ResolvedOtelConfig } from "./types.js";
10
12
  /**
11
- * The three provider handles the recorder needs, plus lifecycle. `undefined`
12
- * for a signal whose exporter is `none` — the recorder no-ops on it rather
13
- * than branching on config everywhere.
14
- */
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
+ */
15
17
  export interface TelemetryProviders {
16
- tracer?: Tracer;
17
- meter?: Meter;
18
- otelLogger?: OtelLogger;
19
- /** Push everything buffered. Called on `session.idle` and on process exit. */
20
- forceFlush(): Promise<void>;
21
- /** Flush and tear down. */
22
- shutdown(): Promise<void>;
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>;
23
25
  }
24
26
  /**
25
- * Exporter factories, injectable so tests can substitute in-memory exporters
26
- * without reaching the network or constructing real OTLP clients.
27
- */
27
+ * Exporter factories, injectable so tests can substitute in-memory exporters
28
+ * without reaching the network or constructing real OTLP clients.
29
+ */
28
30
  export interface ExporterFactories {
29
- trace?: (config: ResolvedOtelConfig) => SpanExporter | undefined;
30
- metric?: (config: ResolvedOtelConfig) => PushMetricExporter | undefined;
31
- log?: (config: ResolvedOtelConfig) => LogRecordExporter | undefined;
31
+ trace?: (config: ResolvedOtelConfig, tokenSource?: TokenSource) => SpanExporter | undefined;
32
+ metric?: (config: ResolvedOtelConfig, tokenSource?: TokenSource) => PushMetricExporter | undefined;
33
+ log?: (config: ResolvedOtelConfig, tokenSource?: TokenSource) => LogRecordExporter | undefined;
32
34
  }
33
35
  /**
34
- * Build the resource every signal is stamped with.
35
- *
36
- * Deliberately identifies the **machine and the project**, never the developer:
37
- * no git author email, no account id. An operator who wants per-person
38
- * attribution adds it explicitly via `resourceAttributes` /
39
- * `OTEL_RESOURCE_ATTRIBUTES`, which keeps that choice visible in config.
40
- */
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
+ */
41
43
  export declare function buildResource(config: ResolvedOtelConfig, context: {
42
- version?: string;
43
- hostname?: string;
44
- projectName?: string;
45
- directory?: string;
46
- worktree?: string;
47
- branch?: string;
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;
48
59
  }): Resource;
49
60
  /**
50
- * Construct the enabled providers. Each signal is independent: a failure to
51
- * build one leaves the others running, because partial telemetry is strictly
52
- * better than an exception escaping into the host's plugin loader.
53
- */
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
+ */
54
65
  export declare function createProviders(config: ResolvedOtelConfig, resource: Resource, logger: Logger, factories?: ExporterFactories): TelemetryProviders;
55
66
  export declare function describeError(error: unknown): string;
package/dist/providers.js CHANGED
@@ -6,174 +6,233 @@ import { BatchLogRecordProcessor, ConsoleLogRecordExporter, LoggerProvider } fro
6
6
  import { AggregationTemporality, ConsoleMetricExporter, MeterProvider, PeriodicExportingMetricReader } from "@opentelemetry/sdk-metrics";
7
7
  import { BatchSpanProcessor, ConsoleSpanExporter, TracerProvider } from "@opentelemetry/sdk-trace";
8
8
  import { signalUrl } from "./config.js";
9
+ import { withFailureLogging } from "./export-logging.js";
10
+ import { createTokenSource } from "./token-source.js";
9
11
  const INSTRUMENTATION_SCOPE = "@vymalo/opencode-otel";
10
- function otlpArgs(config, signal) {
11
- const url = signalUrl(config, signal);
12
- return url ? { url, headers: config.headers } : undefined;
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
+ };
13
36
  }
14
37
  const defaultFactories = {
15
- trace: (config) => {
16
- if (config.exporters.traces === "console") {
17
- return new ConsoleSpanExporter();
18
- }
19
- const args = otlpArgs(config, "traces");
20
- return args ? new OTLPTraceExporter(args) : undefined;
21
- },
22
- metric: (config) => {
23
- if (config.exporters.metrics === "console") {
24
- return new ConsoleMetricExporter();
25
- }
26
- const args = otlpArgs(config, "metrics");
27
- return args
28
- ? new OTLPMetricExporter({
29
- ...args,
30
- temporalityPreference: config.metricTemporality === "cumulative"
31
- ? AggregationTemporality.CUMULATIVE
32
- : AggregationTemporality.DELTA
33
- })
34
- : undefined;
35
- },
36
- log: (config) => {
37
- if (config.exporters.logs === "console") {
38
- return new ConsoleLogRecordExporter();
39
- }
40
- const args = otlpArgs(config, "logs");
41
- return args ? new OTLPLogExporter(args) : undefined;
42
- }
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
+ }
43
62
  };
44
63
  /**
45
- * Build the resource every signal is stamped with.
46
- *
47
- * Deliberately identifies the **machine and the project**, never the developer:
48
- * no git author email, no account id. An operator who wants per-person
49
- * attribution adds it explicitly via `resourceAttributes` /
50
- * `OTEL_RESOURCE_ATTRIBUTES`, which keeps that choice visible in config.
51
- */
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
+ */
52
71
  export function buildResource(config, context) {
53
- const attributes = {
54
- "service.name": config.serviceName,
55
- "telemetry.sdk.language": "nodejs"
56
- };
57
- if (context.version) {
58
- attributes["service.version"] = context.version;
59
- }
60
- if (config.environment) {
61
- attributes["deployment.environment.name"] = config.environment;
62
- }
63
- if (context.hostname) {
64
- attributes["host.name"] = context.hostname;
65
- }
66
- if (context.projectName) {
67
- attributes["opencode.project.name"] = context.projectName;
68
- }
69
- if (context.directory) {
70
- attributes["opencode.directory"] = context.directory;
71
- }
72
- if (context.worktree) {
73
- attributes["opencode.worktree"] = context.worktree;
74
- }
75
- if (context.branch) {
76
- attributes["vcs.repository.ref.name"] = context.branch;
77
- }
78
- // Operator-supplied attributes win they are the escape hatch, and silently
79
- // ignoring them would make the escape hatch useless.
80
- return resourceFromAttributes({ ...attributes, ...config.resourceAttributes });
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
+ });
81
129
  }
82
130
  /**
83
- * Construct the enabled providers. Each signal is independent: a failure to
84
- * build one leaves the others running, because partial telemetry is strictly
85
- * better than an exception escaping into the host's plugin loader.
86
- */
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
+ */
87
135
  export function createProviders(config, resource, logger, factories = {}) {
88
- const make = { ...defaultFactories, ...factories };
89
- const flushers = [];
90
- const shutdowns = [];
91
- let tracer;
92
- let meter;
93
- let otelLogger;
94
- if (config.exporters.traces !== "none") {
95
- try {
96
- const exporter = make.trace(config);
97
- if (exporter) {
98
- const provider = new TracerProvider({
99
- resource,
100
- spanProcessors: [
101
- new BatchSpanProcessor({
102
- exporter,
103
- scheduledDelayMillis: config.traceExportIntervalMs
104
- })
105
- ]
106
- });
107
- tracer = provider.getTracer(INSTRUMENTATION_SCOPE);
108
- flushers.push(() => provider.forceFlush());
109
- shutdowns.push(() => provider.shutdown());
110
- }
111
- }
112
- catch (error) {
113
- logger.warn("otel_traces_init_failed", { error: describeError(error) });
114
- }
115
- }
116
- if (config.exporters.metrics !== "none") {
117
- try {
118
- const exporter = make.metric(config);
119
- if (exporter) {
120
- const provider = new MeterProvider({
121
- resource,
122
- readers: [
123
- new PeriodicExportingMetricReader({
124
- exporter,
125
- exportIntervalMillis: config.metricExportIntervalMs
126
- })
127
- ]
128
- });
129
- meter = provider.getMeter(INSTRUMENTATION_SCOPE);
130
- flushers.push(() => provider.forceFlush());
131
- shutdowns.push(() => provider.shutdown());
132
- }
133
- }
134
- catch (error) {
135
- logger.warn("otel_metrics_init_failed", { error: describeError(error) });
136
- }
137
- }
138
- if (config.exporters.logs !== "none") {
139
- try {
140
- const exporter = make.log(config);
141
- if (exporter) {
142
- const provider = new LoggerProvider({
143
- resource,
144
- processors: [
145
- new BatchLogRecordProcessor({
146
- exporter,
147
- scheduledDelayMillis: config.logExportIntervalMs
148
- })
149
- ]
150
- });
151
- otelLogger = provider.getLogger(INSTRUMENTATION_SCOPE);
152
- flushers.push(() => provider.forceFlush());
153
- shutdowns.push(() => provider.shutdown());
154
- }
155
- }
156
- catch (error) {
157
- logger.warn("otel_logs_init_failed", { error: describeError(error) });
158
- }
159
- }
160
- const runAll = async (tasks) => {
161
- // `allSettled`, not `all`: one unreachable collector must not stop the
162
- // other signals from draining.
163
- await Promise.allSettled(tasks.map((task) => task()));
164
- };
165
- return {
166
- tracer,
167
- meter,
168
- otelLogger,
169
- forceFlush: () => runAll(flushers),
170
- shutdown: () => runAll(shutdowns)
171
- };
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
+ };
172
230
  }
173
231
  export function describeError(error) {
174
- if (error instanceof Error) {
175
- return error.message;
176
- }
177
- return String(error);
232
+ if (error instanceof Error) {
233
+ return error.message;
234
+ }
235
+ return String(error);
178
236
  }
237
+
179
238
  //# sourceMappingURL=providers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"providers.js","sourceRoot":"","sources":["../src/providers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EAAiB,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACjF,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EAExB,cAAc,EACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,aAAa,EACb,6BAA6B,EAE9B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EAEnB,cAAc,EACf,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AA2BtD,SAAS,QAAQ,CAAC,MAA0B,EAAE,MAAqC;IACjF,MAAM,GAAG,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,SAAS,CA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