@glasstrace/sdk 1.7.0 → 1.8.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/{capture-error-BmQz7xF6.d.cts → capture-error-C95zvSvF.d.cts} +38 -0
- package/dist/{capture-error-CTgSYxek.d.ts → capture-error-Dzz7_-v4.d.ts} +38 -0
- package/dist/{chunk-OWPA7GHV.js → chunk-JJL2M64Z.js} +1385 -1033
- package/dist/chunk-JJL2M64Z.js.map +1 -0
- package/dist/cli/init.cjs +4 -4
- package/dist/cli/init.js +2 -2
- package/dist/cli/mcp-add.cjs +1 -1
- package/dist/cli/mcp-add.js +1 -1
- package/dist/cli/upgrade-instructions.cjs +1 -1
- package/dist/cli/upgrade-instructions.js +1 -1
- package/dist/index.cjs +3545 -3193
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/node-entry.cjs +3545 -3193
- package/dist/node-entry.cjs.map +1 -1
- package/dist/node-entry.d.cts +1 -1
- package/dist/node-entry.d.ts +1 -1
- package/dist/node-entry.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-OWPA7GHV.js.map +0 -1
|
@@ -190,7 +190,40 @@ declare class GlasstraceExporter implements SpanExporter {
|
|
|
190
190
|
private pendingBatches;
|
|
191
191
|
private pendingSpanCount;
|
|
192
192
|
private overflowLogged;
|
|
193
|
+
/**
|
|
194
|
+
* Lazily-bound reference to the export-path circuit breaker
|
|
195
|
+
* (DISC-1568 / Wave 15C). Resolved on first export so this
|
|
196
|
+
* constructor stays side-effect-free. The breaker is a module-
|
|
197
|
+
* singleton — every `GlasstraceExporter` instance shares the same
|
|
198
|
+
* one so a rotation event observed in `init-client.ts` reaches
|
|
199
|
+
* every active exporter.
|
|
200
|
+
*/
|
|
201
|
+
private circuitBreaker;
|
|
193
202
|
constructor(options: GlasstraceExporterOptions);
|
|
203
|
+
/**
|
|
204
|
+
* Returns the export-path circuit breaker, lazily wiring it on
|
|
205
|
+
* first call. The breaker is a module-singleton so all exporter
|
|
206
|
+
* instances share state — a credential rotation observed once
|
|
207
|
+
* resets the breaker for every active exporter, and a single
|
|
208
|
+
* outage at the OTLP endpoint trips a single breaker rather than
|
|
209
|
+
* one per exporter copy.
|
|
210
|
+
*
|
|
211
|
+
* The wiring binds:
|
|
212
|
+
* - the lifecycle event sink to the SDK's lifecycle bus
|
|
213
|
+
* (`emitLifecycleEvent`) so the `otel:circuit_*` events surface
|
|
214
|
+
* to runtime-state, the CLI bridge, and any user-installed
|
|
215
|
+
* subscribers.
|
|
216
|
+
* - the dropped-span counter to {@link recordSpansDropped} so OPEN-
|
|
217
|
+
* state drops show up in the existing health surface.
|
|
218
|
+
* - the FSM hooks to {@link pushDegradationSource} /
|
|
219
|
+
* {@link clearDegradationSource} keyed on `"export-circuit"`,
|
|
220
|
+
* which routes the OPEN/CLOSED transitions through the
|
|
221
|
+
* centralised `recomputeCoreFromDegradationSources()` helper.
|
|
222
|
+
* That helper guards `ACTIVE ↔ ACTIVE_DEGRADED` so a circuit
|
|
223
|
+
* recovery never clobbers an unrelated `OtelState.COEXISTENCE_FAILED`
|
|
224
|
+
* degradation source.
|
|
225
|
+
*/
|
|
226
|
+
private getCircuitBreaker;
|
|
194
227
|
export(spans: ReadableSpan[], resultCallback: (result: ExportResult) => void): void;
|
|
195
228
|
/**
|
|
196
229
|
* Called when the API key transitions from "pending" to a resolved value.
|
|
@@ -234,6 +267,11 @@ declare class GlasstraceExporter implements SpanExporter {
|
|
|
234
267
|
* Flushes all buffered spans through the delegate exporter.
|
|
235
268
|
* Enriches spans at flush time (not buffer time) so that session IDs
|
|
236
269
|
* are computed with the resolved API key instead of the "pending" sentinel.
|
|
270
|
+
*
|
|
271
|
+
* Honors the circuit breaker symmetrically with {@link export}: if the
|
|
272
|
+
* breaker is OPEN at flush time, every buffered batch is dropped via
|
|
273
|
+
* `recordSpansDropped` and its callback completed with `{ code: 0 }`,
|
|
274
|
+
* preserving the bounded-memory contract during outages.
|
|
237
275
|
*/
|
|
238
276
|
private flushPending;
|
|
239
277
|
}
|
|
@@ -190,7 +190,40 @@ declare class GlasstraceExporter implements SpanExporter {
|
|
|
190
190
|
private pendingBatches;
|
|
191
191
|
private pendingSpanCount;
|
|
192
192
|
private overflowLogged;
|
|
193
|
+
/**
|
|
194
|
+
* Lazily-bound reference to the export-path circuit breaker
|
|
195
|
+
* (DISC-1568 / Wave 15C). Resolved on first export so this
|
|
196
|
+
* constructor stays side-effect-free. The breaker is a module-
|
|
197
|
+
* singleton — every `GlasstraceExporter` instance shares the same
|
|
198
|
+
* one so a rotation event observed in `init-client.ts` reaches
|
|
199
|
+
* every active exporter.
|
|
200
|
+
*/
|
|
201
|
+
private circuitBreaker;
|
|
193
202
|
constructor(options: GlasstraceExporterOptions);
|
|
203
|
+
/**
|
|
204
|
+
* Returns the export-path circuit breaker, lazily wiring it on
|
|
205
|
+
* first call. The breaker is a module-singleton so all exporter
|
|
206
|
+
* instances share state — a credential rotation observed once
|
|
207
|
+
* resets the breaker for every active exporter, and a single
|
|
208
|
+
* outage at the OTLP endpoint trips a single breaker rather than
|
|
209
|
+
* one per exporter copy.
|
|
210
|
+
*
|
|
211
|
+
* The wiring binds:
|
|
212
|
+
* - the lifecycle event sink to the SDK's lifecycle bus
|
|
213
|
+
* (`emitLifecycleEvent`) so the `otel:circuit_*` events surface
|
|
214
|
+
* to runtime-state, the CLI bridge, and any user-installed
|
|
215
|
+
* subscribers.
|
|
216
|
+
* - the dropped-span counter to {@link recordSpansDropped} so OPEN-
|
|
217
|
+
* state drops show up in the existing health surface.
|
|
218
|
+
* - the FSM hooks to {@link pushDegradationSource} /
|
|
219
|
+
* {@link clearDegradationSource} keyed on `"export-circuit"`,
|
|
220
|
+
* which routes the OPEN/CLOSED transitions through the
|
|
221
|
+
* centralised `recomputeCoreFromDegradationSources()` helper.
|
|
222
|
+
* That helper guards `ACTIVE ↔ ACTIVE_DEGRADED` so a circuit
|
|
223
|
+
* recovery never clobbers an unrelated `OtelState.COEXISTENCE_FAILED`
|
|
224
|
+
* degradation source.
|
|
225
|
+
*/
|
|
226
|
+
private getCircuitBreaker;
|
|
194
227
|
export(spans: ReadableSpan[], resultCallback: (result: ExportResult) => void): void;
|
|
195
228
|
/**
|
|
196
229
|
* Called when the API key transitions from "pending" to a resolved value.
|
|
@@ -234,6 +267,11 @@ declare class GlasstraceExporter implements SpanExporter {
|
|
|
234
267
|
* Flushes all buffered spans through the delegate exporter.
|
|
235
268
|
* Enriches spans at flush time (not buffer time) so that session IDs
|
|
236
269
|
* are computed with the resolved API key instead of the "pending" sentinel.
|
|
270
|
+
*
|
|
271
|
+
* Honors the circuit breaker symmetrically with {@link export}: if the
|
|
272
|
+
* breaker is OPEN at flush time, every buffered batch is dropped via
|
|
273
|
+
* `recordSpansDropped` and its callback completed with `{ code: 0 }`,
|
|
274
|
+
* preserving the bounded-memory contract during outages.
|
|
237
275
|
*/
|
|
238
276
|
private flushPending;
|
|
239
277
|
}
|