@smthrs/observability 1.0.0-rc.5 → 1.0.0-rc.7

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/esm/Otlp.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * `Metric` counters on their hot paths; what they deliberately do not do is
6
6
  * ship an exporter. This module is that exporter: one layer that installs
7
7
  * Effect's own OTLP logger, metrics exporter, and tracer
8
- * (`effect/unstable/observability/Otlp`) against a collector endpoint, with
8
+ * (`effect/observability/Otlp`) against a collector endpoint, with
9
9
  * the flows service identity filled in. Nothing beyond `effect` is involved;
10
10
  * no OpenTelemetry SDK dependency.
11
11
  *
@@ -23,19 +23,19 @@ import { Clock } from "effect/Clock";
23
23
  import * as ConfigProvider from "effect/ConfigProvider";
24
24
  import * as Effect from "effect/Effect";
25
25
  import * as Exit from "effect/Exit";
26
+ import * as FetchHttpClient from "effect/http/FetchHttpClient";
27
+ import * as Headers from "effect/http/Headers";
28
+ import * as HttpClient from "effect/http/HttpClient";
29
+ import * as HttpClientResponse from "effect/http/HttpClientResponse";
26
30
  import * as Layer from "effect/Layer";
27
31
  import * as Logger from "effect/Logger";
28
32
  import * as Metric from "effect/Metric";
33
+ import * as Otlp from "effect/observability/Otlp";
29
34
  import * as Option from "effect/Option";
30
35
  import * as References from "effect/References";
31
36
  import * as Schema from "effect/Schema";
32
37
  import * as Semaphore from "effect/Semaphore";
33
38
  import * as Tracer from "effect/Tracer";
34
- import * as FetchHttpClient from "effect/unstable/http/FetchHttpClient";
35
- import * as Headers from "effect/unstable/http/Headers";
36
- import * as HttpClient from "effect/unstable/http/HttpClient";
37
- import * as HttpClientResponse from "effect/unstable/http/HttpClientResponse";
38
- import * as Otlp from "effect/unstable/observability/Otlp";
39
39
  import * as Endpoint from "./Endpoint.js";
40
40
  import * as Resource from "./Resource.js";
41
41
  /**
@@ -60,7 +60,7 @@ export const defaultServiceName = "flows";
60
60
  * @category resource
61
61
  * @since 0.1.0
62
62
  */
63
- export const defaultServiceVersion = "1.0.0-rc.5";
63
+ export const defaultServiceVersion = "1.0.0-rc.7";
64
64
  // The upstream logger and tracer each buffer at most one 1,000-record batch.
65
65
  // Do not queue at the transport: upstream forks every full batch independently.
66
66
  const maxBatchSize = 1000;
@@ -73,9 +73,11 @@ const maxInFlight = 4;
73
73
  export const maxRequestBytes = 1024 * 1024;
74
74
  const requestTimeout = "10 seconds";
75
75
  const diagnosticIntervalMillis = 60_000;
76
- // The envelope around the resource in every request repeats `service.name` as
77
- // the instrumentation scope name: at most 1,024 code units, at most six bytes
78
- // each once JSON-escaped, so under 8 KiB together with the envelope's own keys.
76
+ // The envelope around the resource in a metrics request repeats `service.name`
77
+ // as the instrumentation scope name: at most 1,024 code units, at most six
78
+ // bytes each once JSON-escaped, so under 8 KiB together with the envelope's own
79
+ // keys. Log and trace requests name their scope `effect` with the Effect
80
+ // version instead, which is smaller.
79
81
  /**
80
82
  * Reserved bytes for request wrappers and the escaped instrumentation scope.
81
83
  * @category transport
@@ -87,8 +89,9 @@ export const maximumEnvelopeBytes = 8 * 1024;
87
89
  *
88
90
  * The transport discards a request over 1 MiB, and the resource rides in every
89
91
  * request, so the largest resource `Resource.decode` admits
90
- * (`Resource.maximumResourceBytes`, 128 KiB) and the envelope that repeats the
91
- * service name (under 8 KiB) come off the top. The 888 KiB left gives each
92
+ * (`Resource.maximumResourceBytes`, 128 KiB) and the envelope, which in a
93
+ * metrics request repeats the service name (under 8 KiB), come off the top.
94
+ * The 888 KiB left gives each
92
95
  * record of a full 1,000-record logger or tracer batch about 900 bytes, three
93
96
  * to four times a bare log record or span, and gives the metrics snapshot room
94
97
  * for several thousand series. Every resource the decoder accepts therefore
@@ -100,8 +103,37 @@ export const maximumEnvelopeBytes = 8 * 1024;
100
103
  * @since 1.0.0-rc.0
101
104
  */
102
105
  export const reservedBatchBytes = maxRequestBytes - Resource.maximumResourceBytes - maximumEnvelopeBytes;
106
+ /**
107
+ * A collector's answer reduced to what the exporter acts on: its status and
108
+ * its `retry-after` delay, with no body.
109
+ *
110
+ * `Response` refuses a status outside 200 to 599 and a malformed header value.
111
+ * Neither is a collector's answer, so `Response.error()` reports it as status
112
+ * 0, which the exporter fails without retrying. A browser already reports a
113
+ * refused redirect that way.
114
+ */
115
+ const withoutBody = (response) => {
116
+ const retryAfter = response.headers["retry-after"];
117
+ let answer;
118
+ try {
119
+ answer = new Response(null, {
120
+ status: response.status,
121
+ headers: retryAfter === undefined ? {} : { "retry-after": retryAfter }
122
+ });
123
+ }
124
+ catch {
125
+ answer = Response.error();
126
+ }
127
+ return HttpClientResponse.fromWeb(response.request, answer);
128
+ };
103
129
  const boundedClient = Layer.effect(HttpClient.HttpClient, Effect.gen(function* () {
104
- const client = yield* HttpClient.HttpClient;
130
+ // The exporter reads every response body to its end, after the deadline
131
+ // and the in-flight limit below have let the request go. A collector that
132
+ // never ended its answer would stall that signal and grow the buffered
133
+ // body without bound. So the exchange ends here: the exporter receives the
134
+ // status and retry delay, and closing the scope aborts the transport with
135
+ // the body unread.
136
+ const client = HttpClient.transformResponse(HttpClient.withScope(yield* HttpClient.HttpClient), (exchange) => exchange.pipe(Effect.map(withoutBody), Effect.scoped));
105
137
  const clock = yield* Clock;
106
138
  // The loggers installed when this transport is acquired. The OTLP logger
107
139
  // the same acquisition installs does not exist yet, so a diagnostic pinned
@@ -235,6 +267,8 @@ const redactedSpans = Layer.effect(Tracer.Tracer)(Effect.map(Effect.tracer, (tra
235
267
  * once a minute a `Warn` record with code `otlp_export_discarded` names the
236
268
  * reason, the request size, and the running total through the loggers that
237
269
  * were installed when the layer was acquired, never through this exporter.
270
+ * A collector's response body is never read: the exporter acts on the status
271
+ * and the `retry-after` header, and the exchange ends when they arrive.
238
272
  *
239
273
  * **Details**
240
274
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Otlp.js","sourceRoot":"","sources":["../../src/Otlp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KA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AAI,CAAC;YACH,OAAO,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAA;QACnC,CAAC;QAAC,MAAM,CAAC,CAAC,0CAA0C,CAAC,CAAC;QACtD,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAA;IACxB,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,WAAyD,EACzD,UAAgD,EAAE,EAClB,EAAE;IAClC,MAAM,QAAQ,GAAG,WAAW,CAAC,6BAA6B,CAAC,EAAE,IAAI,EAAE,CAAA;IACnE,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,EAAE;QAAE,OAAO,SAAS,CAAA;IAC/D,OAAO,UAAU,CAAC,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,CAAC,WAAW,CAAC,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAA;AACxH,CAAC,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,SAAS,GAAuB,KAAK,CAAC,KAAK,CAAA"}
@@ -48,11 +48,12 @@ export declare const maximumAttributes = 256;
48
48
  *
49
49
  * The measure is the OTLP `Resource` message the exporters place in every
50
50
  * request, `{"attributes":[{"key":…,"value":{…}}],"droppedAttributesCount":0}`
51
- * with service identity and SDK-added `telemetry.sdk.name` and
52
- * `telemetry.sdk.language` included, after JSON escaping and UTF-8 encoding.
53
- * These SDK fields are conservatively reserved even for the default Effect
54
- * exporter. Caller attributes overwritten by SDK identity or metadata are
55
- * still counted. It is the bound the per-field limits cannot express: 256
51
+ * with service identity and SDK-added `telemetry.sdk.name`,
52
+ * `telemetry.sdk.language` and `telemetry.sdk.version` included, after JSON
53
+ * escaping and UTF-8 encoding. The SDK's own values are reserved even for the
54
+ * default Effect exporter, whose values are shorter. A caller attribute that
55
+ * replaces an SDK field, or that service identity overwrites, is counted
56
+ * beside it. It is the bound the per-field limits cannot express: 256
56
57
  * attributes at the string ceiling would encode to 16 MiB, and the resource
57
58
  * rides in every export request, so the default transport, which discards a
58
59
  * request over 1 MiB, would deliver nothing at all. 128 KiB admits one
@@ -1 +1 @@
1
- {"version":3,"file":"Resource.d.ts","sourceRoot":"","sources":["../../src/Resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,YAAY,MAAM,gCAAgC,CAAA;AAC9D,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACtE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAIvC;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,OAAQ,CAAA;AAE1C;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,OAAQ,CAAA;AAE9C;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,QAAS,CAAA;AAElD;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,MAAM,CAAA;AAE9C;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,MAAM,CAAA;AAEpC;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,oBAAoB,SAAU,CAAA;AAqB3C;;;;;GAKG;AACH,eAAO,MAAM,cAAc,kKAgB1B,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,iMAYtB,CAAA;AA0CD;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;;;EAqBzB,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,IAAI,CAAA;;;;;;AAErD;;;;;GAKG;AACH,qBAAa,4BAA6B,SAAQ,iCAOjD;CAAG;AAWJ;;;;;GAKG;AACH,eAAO,MAAM,MAAM,GACjB,eAAe,OAAO,KACrB,MAAM,CAAC,MAAM,CAAC,aA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;;;;;;;;;GAmBG;AACH,eAAO,MAAM,oBAAoB,SAAU,CAAA;AAqB3C;;;;;GAKG;AACH,eAAO,MAAM,cAAc,kKAgB1B,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,iMAYtB,CAAA;AA0CD;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;;;EAqBzB,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,IAAI,CAAA;;;;;;AAErD;;;;;GAKG;AACH,qBAAa,4BAA6B,SAAQ,iCAOjD;CAAG;AAWJ;;;;;GAKG;AACH,eAAO,MAAM,MAAM,GACjB,eAAe,OAAO,KACrB,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,4BAA4B,CAC6B,CAAA;AAEzF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,eAAe,OAAO,KAAG,aAMnD,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,GACvC,eAAe,aAAa,KAC3B;IACD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAA;IAChC,QAAQ,CAAC,UAAU,CAAC,EAAE,cAAc,CAAA;CAcpC,CAAA;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,GAAI,eAAe,aAAa,KAAG,cACwB,CAAA;AAE1F;;;;;GAKG;AACH,eAAO,MAAM,KAAK,GAChB,eAAe,aAAa,KAC3B,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ,EAAE,4BAA4B,CAG/D,CAAA;AAEH;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,8BAAwB,CAAA"}
@@ -6,8 +6,8 @@
6
6
  import * as OtelResource from "@effect/opentelemetry/Resource";
7
7
  import * as Effect from "effect/Effect";
8
8
  import * as Layer from "effect/Layer";
9
+ import * as OtlpResource from "effect/observability/OtlpResource";
9
10
  import * as Schema from "effect/Schema";
10
- import * as OtlpResource from "effect/unstable/observability/OtlpResource";
11
11
  import { schemaIssueMessage, schemaIssuePath } from "./internal/schemaIssuePath.js";
12
12
  /**
13
13
  * Largest service-name or service-version field accepted by a resource.
@@ -49,11 +49,12 @@ export const maximumAttributes = 256;
49
49
  *
50
50
  * The measure is the OTLP `Resource` message the exporters place in every
51
51
  * request, `{"attributes":[{"key":…,"value":{…}}],"droppedAttributesCount":0}`
52
- * with service identity and SDK-added `telemetry.sdk.name` and
53
- * `telemetry.sdk.language` included, after JSON escaping and UTF-8 encoding.
54
- * These SDK fields are conservatively reserved even for the default Effect
55
- * exporter. Caller attributes overwritten by SDK identity or metadata are
56
- * still counted. It is the bound the per-field limits cannot express: 256
52
+ * with service identity and SDK-added `telemetry.sdk.name`,
53
+ * `telemetry.sdk.language` and `telemetry.sdk.version` included, after JSON
54
+ * escaping and UTF-8 encoding. The SDK's own values are reserved even for the
55
+ * default Effect exporter, whose values are shorter. A caller attribute that
56
+ * replaces an SDK field, or that service identity overwrites, is counted
57
+ * beside it. It is the bound the per-field limits cannot express: 256
57
58
  * attributes at the string ceiling would encode to 16 MiB, and the resource
58
59
  * rides in every export request, so the default transport, which discards a
59
60
  * request over 1 MiB, would deliver nothing at all. 128 KiB admits one
@@ -1 +1 @@
1
- {"version":3,"file":"Resource.js","sourceRoot":"","sources":["../../src/Resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,YAAY,MAAM,gCAAgC,CAAA;AAE9D,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,YAAY,MAAM,4CAA4C,CAAA;AAC1E,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAEnF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAA;AAE1C;;;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AC,aAAa,CAAC,UAAU,KAAK,SAAS;QACxC,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC;YACA,UAAU,EAAE,MAAM,CAAC,WAAW,CAC5B,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;gBAC7D,GAAG;gBACH,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK;aAC1C,CAAC,CACe;SACpB,CAAC;CACL,CAAC,CAAA;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,aAA4B,EAAkB,EAAE,CACjF,YAAY,CAAC,kBAAkB,CAAC,4BAA4B,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAA;AAE1F;;;;;GAKG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CACnB,aAA4B,EACsC,EAAE,CACpE,KAAK,CAAC,MAAM,CACV,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,4BAA4B,CAAC,OAAO,CAAC,CAAC,CAAC,CAC1G,CAAA;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAQ,CAAA"}
package/docs/api.md CHANGED
@@ -21,7 +21,7 @@ OpenTelemetry SDK. `@smthrs/observability/package.json` is exported.
21
21
  | `@smthrs/observability/NodeOtel` | [src/NodeOtel.ts](https://github.com/smithersai/smithers/blob/main/packages/smithers/flows/observability/src/NodeOtel.ts) | Node |
22
22
  | `@smthrs/observability/BrowserOtel` | [src/BrowserOtel.ts](https://github.com/smithersai/smithers/blob/main/packages/smithers/flows/observability/src/BrowserOtel.ts) | browser |
23
23
 
24
- The package is tested with `effect@4.0.0-rc.115`. Layers, services, and schemas
24
+ The package is tested with `effect@4.0.4` and accepts `^4.0.4`. Layers, services, and schemas
25
25
  are Effect constructs: a `Layer` provides services, a scoped layer releases on
26
26
  scope close, and a schema decodes to an `Effect`.
27
27
 
@@ -38,7 +38,7 @@ await Effect.runPromise(program.pipe(Effect.provide(telemetry), Effect.orDie, Ef
38
38
 
39
39
  ## Otlp
40
40
 
41
- The default exporter. `Otlp` composes `effect/unstable/observability/Otlp` and
41
+ The default exporter. `Otlp` composes `effect/observability/Otlp` and
42
42
  nothing else, so it allocates no OpenTelemetry SDK and never resolves a `node:`
43
43
  built-in. All three signals are JSON-serialized and posted below the configured
44
44
  base URL at `/v1/logs`, `/v1/metrics`, and `/v1/traces`.
@@ -115,8 +115,9 @@ const reservedBatchBytes: number // 909312 (888 KiB)
115
115
  ```
116
116
 
117
117
  The resource ceiling is 128 KiB. Another 8 KiB covers JSON wrappers and the
118
- instrumentation scope, which repeats the service name (at most 6 KiB after
119
- escaping). The remaining 888 KiB gives each record in the upstream 1,000-record
118
+ instrumentation scope. A metrics request repeats the service name as its scope
119
+ name (at most 6 KiB after escaping). Log and trace requests name their scope
120
+ `effect` with the Effect version. The remaining 888 KiB gives each record in the upstream 1,000-record
120
121
  log or span batch about 909 bytes, several times a bare record. This guarantees
121
122
  room for ordinary signal batches, not arbitrary record sizes or metric registry
122
123
  cardinality.
@@ -192,10 +193,18 @@ package cannot read its own manifest on every runtime it supports.
192
193
  ### Delivery behavior
193
194
 
194
195
  Effect's exporter retries a transient failure three times, honoring a
195
- `retry-after` response header when one is present, then disables that exporter
196
- for 60 seconds and logs a `Debug` record. Export failure never fails the
197
- application effect and never surfaces as an unhandled rejection. Closing the
198
- layer's scope performs the final flush, bounded by `shutdownTimeout`.
196
+ `retry-after` response header on any retried status when one is present, then
197
+ disables that exporter for 60 seconds and logs a `Debug` record. Export failure
198
+ never fails the application effect and never surfaces as an unhandled
199
+ rejection. Closing the layer's scope performs the final flush, bounded by
200
+ `shutdownTimeout`.
201
+
202
+ The exporter acts on a response's status and `retry-after` header only. It
203
+ never reads the response body: each exchange ends when the status arrives, so
204
+ a collector that never finishes its answer cannot stall a signal.
205
+
206
+ The shape of what a collector receives is in
207
+ [Export to an OTLP collector](./guides/export-to-a-collector.md#what-the-collector-receives).
199
208
 
200
209
  ## Endpoint
201
210
 
@@ -317,10 +326,11 @@ const maximumResourceBytes: number // 131072 (128 KiB)
317
326
  ```
318
327
 
319
328
  The resource byte limit counts the complete OTLP JSON resource, including
320
- identity, SDK-added `telemetry.sdk.name` and `telemetry.sdk.language`, attribute
321
- keys, scalar and array wrappers, escaping, and UTF-8. SDK fields are reserved
322
- even for the default Effect exporter, and caller attributes that the SDK
323
- overwrites are conservatively counted too.
329
+ identity, SDK-added `telemetry.sdk.name`, `telemetry.sdk.language` and
330
+ `telemetry.sdk.version`, attribute keys, scalar and array wrappers, escaping,
331
+ and UTF-8. The SDK's own values are reserved even for the default Effect
332
+ exporter, and a caller attribute that replaces one of them is conservatively
333
+ counted beside it.
324
334
  Counting stops at the first fragment over budget to bound intermediate
325
335
  allocations; the error reports the measured lower bound and byte limit at path
326
336
  `attributes`. Array-length errors report the measured element count and limit
@@ -678,6 +688,8 @@ const layerOtel: (options: Options) => Layer.Layer<never, Resource.InvalidResour
678
688
 
679
689
  Bridges Effect's tracer, logger, and metrics onto the supplied providers and
680
690
  the readers the `metricReader` factory returns, over the validated resource.
691
+ Spans and log records carry the instrumentation scope `effect` with the Effect
692
+ version.
681
693
  Each bridge is installed only when its provider or factory is supplied, and a
682
694
  factory that returns an empty array registers no reader at all.
683
695
 
@@ -12,7 +12,7 @@ different packages on purpose.
12
12
 
13
13
  A flow execution opens spans without being asked. The flow lifecycle, the
14
14
  engine dispatch, a run claim, a heartbeat, a journal write, down to individual
15
- `sql.execute` statements: each is a span on Effect's own tracer. Alongside
15
+ SQL statements: each is a span on Effect's own tracer. Alongside
16
16
  them, each store package declares and updates its own metric handles on its hot
17
17
  paths: `JournalMetrics` in [`@smthrs/journal`](/api/journal), `RunStoreMetrics`
18
18
  in [`@smthrs/run-store`](/api/run-store), `CacheStoreMetrics` in
@@ -24,6 +24,36 @@ None of those packages allocates an exporter. Effect's tracer and metric
24
24
  registry are collection points; with no exporter installed they collect and
25
25
  discard, at a cost close to zero.
26
26
 
27
+ ## Spans Effect names
28
+
29
+ A Smithers package names its own spans for the operation, such as
30
+ `RunStore.claim` or `Journal.emitDurable`. Effect names the spans of the SQL,
31
+ HTTP and RPC clients those packages use:
32
+
33
+ | Span | Name | Kind | What it carries |
34
+ | --------------- | -------------------------------------------------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
35
+ | SQL statement | The database system: `sqlite` or `postgresql` | `client` | `db.system.name`, `db.query.text` and `effect.sql.method` |
36
+ | SQL transaction | `sql.transaction` | `internal` | The events `effect.sql.transaction.commit`, `effect.sql.transaction.savepoint` and `effect.sql.transaction.rollback` |
37
+ | HTTP request | The request method, such as `POST` | `client` | `http.request.method`, `url.full`, `url.path`, `url.scheme`, `server.address`, `server.port` and `http.response.status_code` |
38
+ | RPC call | The procedure's tag, such as `Projection.Snapshot` | `client`, `server` | `rpc.system.name` (`effect_rpc`) and `rpc.method` |
39
+
40
+ On an HTTP request span, `server.address` is the host name without the scheme,
41
+ and `server.port` is always present, as the scheme's default when the URL names
42
+ none.
43
+
44
+ An HTTP request span records no request or response header. A host that wants
45
+ them provides `HttpClient.TracerHeaderFilter`. The model, artifact and
46
+ step-cache packages add their credential header names to
47
+ `Headers.CurrentRedactedNames`, so a recorded credential header of theirs reads
48
+ `<redacted>`. Every other recorded header keeps its value, apart from the names
49
+ Effect redacts itself, such as `authorization`, `cookie`, `set-cookie` and
50
+ `x-api-key`.
51
+
52
+ A `4xx` or `5xx` answer ends an HTTP request span as failed, with the status in
53
+ `error.type`. That holds even where the calling package treats the status as an
54
+ ordinary answer: a shared-cache miss is a failed `GET` span with `error.type`
55
+ `404` inside a lookup span that succeeded.
56
+
27
57
  ## This package is the exporter
28
58
 
29
59
  `Otlp.layerFetch` installs Effect's OTLP logger, metrics exporter, and tracer
@@ -24,7 +24,7 @@ switches layers instead of branching around a missing one.
24
24
 
25
25
  ## Why `Otlp` is the default
26
26
 
27
- `Otlp` composes only `effect/unstable/observability/Otlp`, so it adds no
27
+ `Otlp` composes only `effect/observability/Otlp`, so it adds no
28
28
  OpenTelemetry SDK to the process, and it delivers over Effect's `HttpClient`
29
29
  rather than a platform transport. That makes it the cheapest wiring and the
30
30
  only one that runs unchanged in Node, in Bun, and in a browser.
@@ -59,9 +59,10 @@ passes that validated resource to provider factories and the metric producer;
59
59
  factories must use it when constructing tracer and logger providers.
60
60
 
61
61
  Already-created providers retain their own resources. For those providers,
62
- `Otel.layerOtel`'s resource option sets only the metric resource and tracer
63
- instrumentation scope. Construct them with the intended resource before
64
- injection to give all three signals the same service identity.
62
+ `Otel.layerOtel`'s resource option sets only the metric resource. Construct
63
+ them with the intended resource before injection to give all three signals the
64
+ same service identity. Spans and log records carry the instrumentation scope
65
+ `effect` with the Effect version, whatever the resource.
65
66
 
66
67
  `Resource.layer` provides the resource on its own, for a composition that
67
68
  assembles the rest itself.
@@ -73,15 +73,16 @@ an unencodable payload later:
73
73
  elements (`Resource.maximumAttributeArrayLength`).
74
74
  - The complete OTLP JSON resource is at most 128 KiB
75
75
  (`Resource.maximumResourceBytes`), including identity, SDK-added
76
- `telemetry.sdk.name` and `telemetry.sdk.language`, keys, values, array wrappers,
77
- escaping and UTF-8. SDK fields are reserved even for the default Effect
76
+ `telemetry.sdk.name`, `telemetry.sdk.language` and `telemetry.sdk.version`,
77
+ keys, values, array wrappers, escaping and UTF-8. SDK fields are reserved even for the default Effect
78
78
  exporter. Counting stops as soon as the budget is exceeded;
79
79
  the value-free refusal names `attributes`, the measured lower bound and limit.
80
80
  Per-field limits alone cannot guarantee this cumulative bound.
81
81
  - Resource metadata is explicit. The default OTLP and Node SDK layers isolate
82
82
  ambient resource configuration so it cannot enlarge metadata after admission.
83
83
  - The 1 MiB transport reserves 8 KiB for the JSON envelope and escaped scope
84
- name, leaving 888 KiB (`Otlp.reservedBatchBytes`) for a signal batch. This is
84
+ name, which in a metrics request repeats the service name, leaving 888 KiB
85
+ (`Otlp.reservedBatchBytes`) for a signal batch. This is
85
86
  about 909 bytes per record at the upstream 1,000-record log or span limit,
86
87
  enough for ordinary batches; application records can still be too large.
87
88
  - NUL and unpaired UTF-16 surrogates are refused anywhere. Valid astral Unicode
@@ -96,7 +96,7 @@ For fetch options such as `credentials: "omit"`, provide
96
96
  `FetchHttpClient.RequestInit` around the whole exporting effect:
97
97
 
98
98
  ```ts
99
- import * as FetchHttpClient from "effect/unstable/http/FetchHttpClient"
99
+ import * as FetchHttpClient from "effect/http/FetchHttpClient"
100
100
 
101
101
  const outcome = program.pipe(
102
102
  Effect.provide(telemetry),
@@ -141,13 +141,36 @@ const telemetry = collectorUrl === undefined
141
141
  : Otlp.layerFetch({ baseUrl: collectorUrl, serviceName: "deploy-status" })
142
142
  ```
143
143
 
144
+ ## What the collector receives
145
+
146
+ Every request is OTLP/HTTP JSON. Its `user-agent` is
147
+ `OTel-OTLP-Exporter-JavaScript-Effect-OtlpTracer/` and the Effect version, with
148
+ `OtlpLogger` or `OtlpMetrics` for the other two signals, after any `user-agent`
149
+ you set in `headers`.
150
+
151
+ | Part | What it carries |
152
+ | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
153
+ | Resource | `telemetry.sdk.name` (`effect`), `telemetry.sdk.language` (`nodejs` or `webjs`) and `telemetry.sdk.version` (the Effect version), then your `attributes`, `service.name` and `service.version`. |
154
+ | Scope | Spans and log records name their scope `effect`, with the Effect version. Metrics name their scope for your service. |
155
+ | Spans | Status `1` on success. Status `2` on failure, with the first error's message and one `exception` event per error. Status `0` and the attribute `effect.fiber.interrupted` on interruption. Failure text and string attributes are redacted before they leave. |
156
+ | Log records | Your annotations as attributes, plus `effect.fiberId` and, for each log span, `effect.log_span.<label>` holding the elapsed milliseconds as a number. A record logged with a cause adds `exception.type`, `exception.message` and `exception.stacktrace`. |
157
+ | Metrics | Counters, gauges and histograms under the names the producing package declares. A timer's unit is `ms`. A histogram lists every boundary it declares in `explicitBounds` and counts values above the last one in a final bucket. |
158
+
159
+ The names of the spans themselves are in
160
+ [Instrumentation and export](../concepts/instrumentation-and-export.md#spans-effect-names).
161
+
144
162
  ## What happens when the collector is down
145
163
 
146
164
  Export failure never fails your program, and it never surfaces as a rejected
147
165
  promise. Effect's exporter retries a transient failure three times, honoring a
148
- `retry-after` response header when one is present, then disables that exporter
149
- for 60 seconds and logs a `Debug` record saying so. Spans and records produced
150
- inside that window are dropped, and delivery resumes afterwards.
166
+ `retry-after` response header on any retried status when one is present, then
167
+ disables that exporter for 60 seconds and logs a `Debug` record saying so.
168
+ Spans and records produced inside that window are dropped, and delivery resumes
169
+ afterwards.
170
+
171
+ The exporter reads a response's status and `retry-after` header and nothing
172
+ else. Each exchange ends when the status arrives, so a collector that accepts a
173
+ batch and never finishes its answer does not hold up the next one.
151
174
 
152
175
  Two consequences worth planning for:
153
176
 
@@ -18,8 +18,8 @@ network:
18
18
  ```ts
19
19
  import * as Otlp from "@smthrs/observability/Otlp"
20
20
  import * as Effect from "effect/Effect"
21
+ import * as FetchHttpClient from "effect/http/FetchHttpClient"
21
22
  import * as Metric from "effect/Metric"
22
- import * as FetchHttpClient from "effect/unstable/http/FetchHttpClient"
23
23
 
24
24
  const recordingFetch = () => {
25
25
  const requests: Array<{ url: string; body: string }> = []
@@ -140,8 +140,11 @@ your exporters and give them to the provider you build.
140
140
 
141
141
  You can still pass existing providers directly. The layer cannot change the
142
142
  resource they captured at construction. In that form, the resource option
143
- controls only metrics and tracer instrumentation scope, not log or span resource
144
- attributes. Construct both providers with the intended resource before injection,
143
+ controls only the metric resource, not log or span resource attributes.
144
+ Whichever form you use, spans and log records carry the instrumentation scope
145
+ `effect` with the Effect version, and the span status and log attributes
146
+ described in
147
+ [What the collector receives](./export-to-a-collector.md#what-the-collector-receives). Construct both providers with the intended resource before injection,
145
148
  or use the factories above to receive the validated resource.
146
149
 
147
150
  Each of the three is optional and each is bridged only when supplied, so a
@@ -173,14 +176,17 @@ const resource = Resource.layer({
173
176
  `Resource.configToAttributes` is the pure projection of the same configuration
174
177
  into OpenTelemetry attributes, for code that needs the attribute record rather
175
178
  than a layer. It reads no environment variables: attributes come from your
176
- configuration and the SDK's fixed `telemetry.sdk.name` and
177
- `telemetry.sdk.language` fields, which are included in the admission budget.
179
+ configuration and the SDK's `telemetry.sdk.name`, `telemetry.sdk.language` and
180
+ `telemetry.sdk.version` fields, which are included in the admission budget. An
181
+ attribute of yours with one of those three names replaces the SDK's value.
178
182
 
179
183
  ## Default OTLP export limits
180
184
 
181
185
  `Otlp.layer` and `Otlp.layerFetch` share a limit of four active HTTP requests
182
186
  across logs, traces, and metrics within each layer acquisition. Each request has
183
187
  a ten-second timeout that interrupts the transport and aborts a stalled fetch.
188
+ A request ends when the collector's status arrives: the response body is not
189
+ read, so a collector that never finishes its answer holds no slot.
184
190
  `shutdownTimeout` separately bounds the final scope flush.
185
191
 
186
192
  Logs and traces flush at 1,000 records or the export interval. The transport has
@@ -12,18 +12,18 @@ Not on npm yet; see [Installation](https://github.com/smithersai/smithers/blob/m
12
12
  The package requires Node.js 26.4.0 or later and ships as both ESM and
13
13
  CommonJS with TypeScript declarations.
14
14
 
15
- ## Pin the same Effect release
15
+ ## Install one Effect release
16
16
 
17
17
  Effect services are identified by module identity, so a composition that
18
18
  resolves two copies of `effect` splits its context and a provided layer stops
19
- satisfying a requirement. Pin `effect` at exactly `4.0.0-rc.115`.
19
+ satisfying a requirement. Install one `effect` in the range `^4.0.4`.
20
20
 
21
21
  `Otlp` is written entirely against `effect`, including its HTTP client and its
22
- `effect/unstable/observability/Otlp` exporters. The required peers
23
- `@effect/opentelemetry@4.0.0-rc.115` and `@opentelemetry/api@1.9.1`, plus
24
- the logs and metrics dependencies, support
25
- the root `Otel` and `Resource` modules. They install with ordinary peer-aware
26
- package managers. The default install includes no HTTP exporters or trace SDK.
22
+ `effect/observability/Otlp` exporters. The `@effect/opentelemetry@4.0.4`
23
+ dependency, the required `@opentelemetry/api@1.9.1` peer, and the logs and
24
+ metrics dependencies support the root `Otel` and `Resource` modules. They
25
+ install with ordinary peer-aware package managers. `@effect/opentelemetry`
26
+ 4.0.4 accepts any `effect` in `^4.0.4`. The default install includes no HTTP exporters or trace SDK.
27
27
 
28
28
  `NodeOtel` selects the optional Node trace SDK and three HTTP exporters:
29
29
 
@@ -84,7 +84,7 @@ Effect's `HttpClient` and never touches a `node:` built-in.
84
84
  The exporter alone needs nothing else. Two features have a dependency:
85
85
 
86
86
  - `Otlp.layer` requires an Effect `HttpClient` from
87
- `effect/unstable/http/HttpClient`. `Otlp.layerFetch` supplies the host's
87
+ `effect/http/HttpClient`. `Otlp.layerFetch` supplies the host's
88
88
  global `fetch` and is the usual choice; a Node host that wants Undici instead
89
89
  provides `NodeHttpClient.layerUndici`, re-exported by
90
90
  [`@smthrs/platform-node`](/api/platform-node) as `NodeHost.NodeHttpClient`.
@@ -38,8 +38,8 @@ name and version of at most 1,024 UTF-16 code units, at most 256 attributes,
38
38
  attribute values that are strings of at most 65,536 code units, finite numbers,
39
39
  booleans, or homogeneous arrays of those with at most 256 elements. The complete
40
40
  resource must fit 128 KiB of OTLP JSON, including keys, identity, the SDK-added
41
- `telemetry.sdk.name` and `telemetry.sdk.language` fields, wrappers,
42
- escaping and UTF-8. Many individually valid values can exceed this budget;
41
+ `telemetry.sdk.name`, `telemetry.sdk.language` and `telemetry.sdk.version`
42
+ fields, wrappers, escaping and UTF-8. Many individually valid values can exceed this budget;
43
43
  remove or shorten attributes. The refusal names `attributes`, the measured
44
44
  lower bound in bytes and the limit, without retaining values. NUL and unpaired surrogates are
45
45
  refused anywhere. An empty `serviceName` is the common one, usually an
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@smthrs/observability",
3
3
  "type": "module",
4
- "version": "1.0.0-rc.5",
4
+ "version": "1.0.0-rc.7",
5
5
  "license": "MIT",
6
6
  "smthrs": {
7
7
  "group": "engine"
@@ -165,12 +165,13 @@
165
165
  "dependencies": {
166
166
  "@opentelemetry/sdk-logs": "0.222.0",
167
167
  "@opentelemetry/sdk-metrics": "2.11.0",
168
- "@smthrs/journal": "1.0.0-rc.5"
168
+ "@smthrs/journal": "1.0.0-rc.7",
169
+ "@effect/opentelemetry": "4.0.4"
169
170
  },
170
171
  "devDependencies": {
171
172
  "@effect/language-service": "0.87.2",
172
- "@effect/opentelemetry": "4.0.0-rc.115",
173
- "@effect/vitest": "4.0.0-rc.115",
173
+ "@effect/opentelemetry": "4.0.4",
174
+ "@effect/vitest": "4.0.4",
174
175
  "@eslint/js": "9.39.5",
175
176
  "@opentelemetry/api": "1.9.1",
176
177
  "@opentelemetry/exporter-logs-otlp-http": "0.222.0",
@@ -182,7 +183,7 @@
182
183
  "@types/node": "26.4.1",
183
184
  "@vitest/coverage-v8": "5.0.0",
184
185
  "dprint": "0.57.1",
185
- "effect": "4.0.0-rc.115",
186
+ "effect": "4.0.4",
186
187
  "esbuild": "0.28.2",
187
188
  "eslint": "9.39.5",
188
189
  "eslint-import-resolver-typescript": "4.4.5",
@@ -195,7 +196,6 @@
195
196
  "vitest": "5.0.0"
196
197
  },
197
198
  "peerDependencies": {
198
- "@effect/opentelemetry": "4.0.0-rc.115",
199
199
  "@opentelemetry/api": ">=1.9.1 <2.0.0",
200
200
  "@opentelemetry/exporter-logs-otlp-http": ">=0.222.0 <0.300.0",
201
201
  "@opentelemetry/exporter-metrics-otlp-http": ">=0.222.0 <0.300.0",
@@ -203,7 +203,7 @@
203
203
  "@opentelemetry/sdk-trace-base": ">=2.11.0 <3.0.0",
204
204
  "@opentelemetry/sdk-trace-node": ">=2.11.0 <3.0.0",
205
205
  "@opentelemetry/sdk-trace-web": ">=2.11.0 <3.0.0",
206
- "effect": "4.0.0-rc.115"
206
+ "effect": "^4.0.4"
207
207
  },
208
208
  "peerDependenciesMeta": {
209
209
  "@opentelemetry/exporter-logs-otlp-http": {