autotel-terminal 45.0.0 → 45.0.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.
package/README.md CHANGED
@@ -442,7 +442,7 @@ stream.onSpanEnd((event) => {
442
442
 
443
443
  ## Integration with autotel
444
444
 
445
- `autotel-terminal` is built for **autotel**. It auto-wires to the global tracer provider and expects `StreamingSpanProcessor` in your `spanProcessors` array:
445
+ `autotel-terminal` is built for **autotel**. Create the `StreamingSpanProcessor` before `init()`, pass it in `spanProcessors`, and hand its stream to `renderTerminal()`:
446
446
 
447
447
  ```typescript
448
448
  import { init } from 'autotel';
package/dist/cli.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- const require_src = require('./src-CNlZVetJ.cjs');
2
+ const require_src = require('./src-DxJ67W66.cjs');
3
3
  let node_fs = require("node:fs");
4
4
  let node_http = require("node:http");
5
5
  let node_path = require("node:path");
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as getTerminalLogStream, i as renderTerminal } from "./src-C8UWgifK.js";
2
+ import { a as getTerminalLogStream, i as renderTerminal } from "./src-rYqHu0JC.js";
3
3
  import { readFileSync } from "node:fs";
4
4
  import { createServer } from "node:http";
5
5
  import path from "node:path";
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_src = require('./src-CNlZVetJ.cjs');
2
+ const require_src = require('./src-DxJ67W66.cjs');
3
3
  let autotel_exporters = require("autotel/exporters");
4
4
  let autotel = require("autotel");
5
5
 
package/dist/index.d.cts CHANGED
@@ -249,29 +249,23 @@ interface TerminalOptions {
249
249
  /**
250
250
  * Render the terminal dashboard
251
251
  *
252
- * Automatically wires up a streaming processor from the current tracer provider
253
- * if no stream is provided. Otherwise uses the provided stream.
252
+ * Pass the stream of a `StreamingSpanProcessor` that was given to `init()`.
253
+ * Without a stream this falls back to `provider.addSpanProcessor()`, which the
254
+ * API's `ProxyTracerProvider` does not have and OpenTelemetry SDK 2.x removed
255
+ * from the real provider, so on 2.x the fallback logs an error and renders
256
+ * nothing.
254
257
  *
255
258
  * @param options - Dashboard configuration options
256
- * @param stream - Optional manual stream (for advanced use cases)
259
+ * @param stream - Stream from `createTerminalSpanStream(processor)`
257
260
  *
258
- * @example Auto-wire (recommended)
261
+ * @example
259
262
  * ```typescript
260
263
  * import { init } from 'autotel'
261
- * import { renderTerminal } from 'autotel-terminal'
262
- *
263
- * init({ service: 'my-app' })
264
- * renderTerminal() // Automatically creates stream from current tracer provider
265
- * ```
264
+ * import { StreamingSpanProcessor, createTerminalSpanStream, renderTerminal } from 'autotel-terminal'
266
265
  *
267
- * @example Manual stream
268
- * ```typescript
269
- * import { StreamingSpanProcessor } from 'autotel-terminal'
270
- * import { createTerminalSpanStream } from 'autotel-terminal'
271
- *
272
- * const processor = new StreamingSpanProcessor(baseProcessor)
273
- * const stream = createTerminalSpanStream(processor)
274
- * renderTerminal({}, stream)
266
+ * const processor = new StreamingSpanProcessor(null)
267
+ * init({ service: 'my-app', spanProcessors: [processor] })
268
+ * renderTerminal({ title: 'my-app' }, createTerminalSpanStream(processor))
275
269
  * ```
276
270
  */
277
271
  declare function renderTerminal(options?: TerminalOptions, stream?: TerminalSpanStream): void;
package/dist/index.d.ts CHANGED
@@ -249,29 +249,23 @@ interface TerminalOptions {
249
249
  /**
250
250
  * Render the terminal dashboard
251
251
  *
252
- * Automatically wires up a streaming processor from the current tracer provider
253
- * if no stream is provided. Otherwise uses the provided stream.
252
+ * Pass the stream of a `StreamingSpanProcessor` that was given to `init()`.
253
+ * Without a stream this falls back to `provider.addSpanProcessor()`, which the
254
+ * API's `ProxyTracerProvider` does not have and OpenTelemetry SDK 2.x removed
255
+ * from the real provider, so on 2.x the fallback logs an error and renders
256
+ * nothing.
254
257
  *
255
258
  * @param options - Dashboard configuration options
256
- * @param stream - Optional manual stream (for advanced use cases)
259
+ * @param stream - Stream from `createTerminalSpanStream(processor)`
257
260
  *
258
- * @example Auto-wire (recommended)
261
+ * @example
259
262
  * ```typescript
260
263
  * import { init } from 'autotel'
261
- * import { renderTerminal } from 'autotel-terminal'
262
- *
263
- * init({ service: 'my-app' })
264
- * renderTerminal() // Automatically creates stream from current tracer provider
265
- * ```
264
+ * import { StreamingSpanProcessor, createTerminalSpanStream, renderTerminal } from 'autotel-terminal'
266
265
  *
267
- * @example Manual stream
268
- * ```typescript
269
- * import { StreamingSpanProcessor } from 'autotel-terminal'
270
- * import { createTerminalSpanStream } from 'autotel-terminal'
271
- *
272
- * const processor = new StreamingSpanProcessor(baseProcessor)
273
- * const stream = createTerminalSpanStream(processor)
274
- * renderTerminal({}, stream)
266
+ * const processor = new StreamingSpanProcessor(null)
267
+ * init({ service: 'my-app', spanProcessors: [processor] })
268
+ * renderTerminal({ title: 'my-app' }, createTerminalSpanStream(processor))
275
269
  * ```
276
270
  */
277
271
  declare function renderTerminal(options?: TerminalOptions, stream?: TerminalSpanStream): void;
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { a as getTerminalLogStream, i as renderTerminal, n as SpanKind, o as createTerminalSpanStream, r as SpanStatusCode, s as StreamingSpanProcessor, t as PrettyConsoleExporter } from "./src-C8UWgifK.js";
1
+ import { a as getTerminalLogStream, i as renderTerminal, n as SpanKind, o as createTerminalSpanStream, r as SpanStatusCode, s as StreamingSpanProcessor, t as PrettyConsoleExporter } from "./src-rYqHu0JC.js";
2
2
 
3
3
  export { PrettyConsoleExporter, SpanKind, SpanStatusCode, StreamingSpanProcessor, createTerminalSpanStream, getTerminalLogStream, renderTerminal };
@@ -3119,29 +3119,23 @@ function canAddSpanProcessor(provider) {
3119
3119
  /**
3120
3120
  * Render the terminal dashboard
3121
3121
  *
3122
- * Automatically wires up a streaming processor from the current tracer provider
3123
- * if no stream is provided. Otherwise uses the provided stream.
3122
+ * Pass the stream of a `StreamingSpanProcessor` that was given to `init()`.
3123
+ * Without a stream this falls back to `provider.addSpanProcessor()`, which the
3124
+ * API's `ProxyTracerProvider` does not have and OpenTelemetry SDK 2.x removed
3125
+ * from the real provider, so on 2.x the fallback logs an error and renders
3126
+ * nothing.
3124
3127
  *
3125
3128
  * @param options - Dashboard configuration options
3126
- * @param stream - Optional manual stream (for advanced use cases)
3129
+ * @param stream - Stream from `createTerminalSpanStream(processor)`
3127
3130
  *
3128
- * @example Auto-wire (recommended)
3131
+ * @example
3129
3132
  * ```typescript
3130
3133
  * import { init } from 'autotel'
3131
- * import { renderTerminal } from 'autotel-terminal'
3134
+ * import { StreamingSpanProcessor, createTerminalSpanStream, renderTerminal } from 'autotel-terminal'
3132
3135
  *
3133
- * init({ service: 'my-app' })
3134
- * renderTerminal() // Automatically creates stream from current tracer provider
3135
- * ```
3136
- *
3137
- * @example Manual stream
3138
- * ```typescript
3139
- * import { StreamingSpanProcessor } from 'autotel-terminal'
3140
- * import { createTerminalSpanStream } from 'autotel-terminal'
3141
- *
3142
- * const processor = new StreamingSpanProcessor(baseProcessor)
3143
- * const stream = createTerminalSpanStream(processor)
3144
- * renderTerminal({}, stream)
3136
+ * const processor = new StreamingSpanProcessor(null)
3137
+ * init({ service: 'my-app', spanProcessors: [processor] })
3138
+ * renderTerminal({ title: 'my-app' }, createTerminalSpanStream(processor))
3145
3139
  * ```
3146
3140
  */
3147
3141
  function renderTerminal(options = {}, stream) {
@@ -3091,29 +3091,23 @@ function canAddSpanProcessor(provider) {
3091
3091
  /**
3092
3092
  * Render the terminal dashboard
3093
3093
  *
3094
- * Automatically wires up a streaming processor from the current tracer provider
3095
- * if no stream is provided. Otherwise uses the provided stream.
3094
+ * Pass the stream of a `StreamingSpanProcessor` that was given to `init()`.
3095
+ * Without a stream this falls back to `provider.addSpanProcessor()`, which the
3096
+ * API's `ProxyTracerProvider` does not have and OpenTelemetry SDK 2.x removed
3097
+ * from the real provider, so on 2.x the fallback logs an error and renders
3098
+ * nothing.
3096
3099
  *
3097
3100
  * @param options - Dashboard configuration options
3098
- * @param stream - Optional manual stream (for advanced use cases)
3101
+ * @param stream - Stream from `createTerminalSpanStream(processor)`
3099
3102
  *
3100
- * @example Auto-wire (recommended)
3103
+ * @example
3101
3104
  * ```typescript
3102
3105
  * import { init } from 'autotel'
3103
- * import { renderTerminal } from 'autotel-terminal'
3106
+ * import { StreamingSpanProcessor, createTerminalSpanStream, renderTerminal } from 'autotel-terminal'
3104
3107
  *
3105
- * init({ service: 'my-app' })
3106
- * renderTerminal() // Automatically creates stream from current tracer provider
3107
- * ```
3108
- *
3109
- * @example Manual stream
3110
- * ```typescript
3111
- * import { StreamingSpanProcessor } from 'autotel-terminal'
3112
- * import { createTerminalSpanStream } from 'autotel-terminal'
3113
- *
3114
- * const processor = new StreamingSpanProcessor(baseProcessor)
3115
- * const stream = createTerminalSpanStream(processor)
3116
- * renderTerminal({}, stream)
3108
+ * const processor = new StreamingSpanProcessor(null)
3109
+ * init({ service: 'my-app', spanProcessors: [processor] })
3110
+ * renderTerminal({ title: 'my-app' }, createTerminalSpanStream(processor))
3117
3111
  * ```
3118
3112
  */
3119
3113
  function renderTerminal(options = {}, stream) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autotel-terminal",
3
- "version": "45.0.0",
3
+ "version": "45.0.1",
4
4
  "description": "Terminal dashboard for autotel traces using react-ink",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -55,7 +55,7 @@
55
55
  "peerDependencies": {
56
56
  "@opentelemetry/api": "^1.9.1",
57
57
  "@opentelemetry/sdk-trace-base": "^2.11.0",
58
- "autotel": "7.7.0"
58
+ "autotel": "7.7.1"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@arethetypeswrong/cli": "^0.18.5",
@@ -64,7 +64,7 @@
64
64
  "@types/react": "^19.2.17",
65
65
  "@typescript-eslint/eslint-plugin": "^8.65.0",
66
66
  "@typescript-eslint/parser": "^8.65.0",
67
- "autotel": "7.7.0",
67
+ "autotel": "7.7.1",
68
68
  "eslint-config-prettier": "^10.1.8",
69
69
  "eslint-plugin-unicorn": "^64.0.0",
70
70
  "prettier": "^3.9.6",