Skip to content

Commit fa0aecb

Browse files
committed
feat(api): document the Observability group (Wave 2)
Ships generated references for @imqueue/async-logger 3.2.0, @imqueue/opentelemetry-instrumentation-imqueue 3.3.1 and @imqueue/dd-trace 3.1.0 — 142 pages, all three at 100% summary coverage, following the doc-block passes released in those versions. The /api/ landing page and llms.txt gain an Observability section from the package config; no template edit per package. sitemap-api.xml 176 -> 239 URLs, and /api/search-index.json 530 -> 672 entries with zero empty summaries. Two smaller changes ride along: * The exclusive-tag chip dropped its "one of" suffix. `tracing & APM` is the first exclusive tag to render — Wave 1's `events & caching` is not one — so this markup had never been seen. The rule stays in the hover tooltip and in llms.txt, where it reads as a sentence rather than two words crammed into a pill. * The three placeholder blurbs ("OpenTelemetry instrumentation for @imqueue.") are replaced with ones that say what each package does. They show on the landing page and in llms.txt.
1 parent 5b197c0 commit fa0aecb

152 files changed

Lines changed: 8026 additions & 8 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// GENERATED by scripts/build-api-docs.js — do not edit by hand.
2+
// Cloudflare Pages Function — /api/async-logger/*
3+
// Resolves retired @imqueue/async-logger version URLs onto the kept version trees.
4+
// See lib/api-redirects.js for the policy and why this is not in _redirects.
5+
import { handleApiRequest } from "../../../lib/api-handler.js";
6+
7+
export const onRequest = handleApiRequest;

functions/api/dd-trace/[[path]].js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// GENERATED by scripts/build-api-docs.js — do not edit by hand.
2+
// Cloudflare Pages Function — /api/dd-trace/*
3+
// Resolves retired @imqueue/dd-trace version URLs onto the kept version trees.
4+
// See lib/api-redirects.js for the policy and why this is not in _redirects.
5+
import { handleApiRequest } from "../../../lib/api-handler.js";
6+
7+
export const onRequest = handleApiRequest;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// GENERATED by scripts/build-api-docs.js — do not edit by hand.
2+
// Cloudflare Pages Function — /api/opentelemetry-instrumentation-imqueue/*
3+
// Resolves retired @imqueue/opentelemetry-instrumentation-imqueue version URLs onto the kept version trees.
4+
// See lib/api-redirects.js for the policy and why this is not in _redirects.
5+
import { handleApiRequest } from "../../../lib/api-handler.js";
6+
7+
export const onRequest = handleApiRequest;

lib/api-versions.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@ export const API_VERSIONS = {
88
"rpc": { "latest": "3.5.1", "archives": ["2.1.0","1.17.1"] },
99
"pg-pubsub": { "latest": "3.0.4", "archives": [] },
1010
"pg-cache": { "latest": "5.0.4", "archives": [] },
11-
"tag-cache": { "latest": "3.0.3", "archives": [] }
11+
"tag-cache": { "latest": "3.0.3", "archives": [] },
12+
"async-logger": { "latest": "3.2.0", "archives": [] },
13+
"opentelemetry-instrumentation-imqueue": { "latest": "3.3.1", "archives": [] },
14+
"dd-trace": { "latest": "3.1.0", "archives": [] }
1215
};

scripts/lib/api-packages.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,32 +161,35 @@ const PACKAGES = [
161161
// Untagged on purpose: not part of the CLI's exclusive tracing pair, and a
162162
// service can run it alongside either tracer.
163163
tags: [],
164-
blurb: 'Configurable async logger over winston for @imqueue services.',
164+
blurb: 'Non-blocking logger over winston, with file and HTTP transports '
165+
+ 'configured from the environment.',
165166
cliId: null,
166167
latestOnly: true,
167-
status: 'planned',
168+
status: 'shipped',
168169
wave: 2,
169170
},
170171
{
171172
name: 'opentelemetry-instrumentation-imqueue',
172173
tier: 2,
173174
group: 'Observability',
174175
tags: ['tracing & APM'],
175-
blurb: 'OpenTelemetry instrumentation for @imqueue.',
176+
blurb: 'OpenTelemetry instrumentation for @imqueue/rpc — every RPC traced, '
177+
+ 'with no changes to service or client code.',
176178
cliId: 'opentelemetry',
177179
latestOnly: true,
178-
status: 'planned',
180+
status: 'shipped',
179181
wave: 2,
180182
},
181183
{
182184
name: 'dd-trace',
183185
tier: 2,
184186
group: 'Observability',
185187
tags: ['tracing & APM'],
186-
blurb: 'Datadog tracing integration for @imqueue.',
188+
blurb: 'Datadog APM tracing for @imqueue/rpc — a drop-in dd-trace '
189+
+ 'replacement that traces every RPC.',
187190
cliId: 'dd-trace',
188191
latestOnly: true,
189-
status: 'planned',
192+
status: 'shipped',
190193
wave: 2,
191194
},
192195

src/_data/apiVersions.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,17 @@
2424
"tag-cache": {
2525
"latest": "3.0.3",
2626
"archives": []
27+
},
28+
"async-logger": {
29+
"latest": "3.2.0",
30+
"archives": []
31+
},
32+
"opentelemetry-instrumentation-imqueue": {
33+
"latest": "3.3.1",
34+
"archives": []
35+
},
36+
"dd-trace": {
37+
"latest": "3.1.0",
38+
"archives": []
2739
}
2840
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: "_default variable · @imqueue/async-logger"
3+
description: "A Logger configured from the environment, constructed at import time."
4+
apiCrumbs: [{"name":"API reference","url":"/api/"},{"name":"@imqueue/async-logger","url":"/api/async-logger/latest/"},{"name":"_default","url":"/api/async-logger/latest/async-logger._default/"}]
5+
---
6+
7+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
8+
9+
# \_default variable
10+
11+
A [Logger](/api/async-logger/latest/async-logger.logger/) configured from the environment, constructed at import time.
12+
13+
**Signature:**
14+
15+
```typescript
16+
_default: Logger
17+
```
18+
19+
## Remarks
20+
21+
Shared by every module that imports it, which is normally what you want — one set of transports per process. Construct [Logger](/api/async-logger/latest/async-logger.logger/) directly instead when you need different metadata or transports for a particular subsystem.
22+
23+
Because it is built at import time, `LOGGER_TRANSPORTS` and `LOGGER_METADATA` must already be set when this module is first imported; changing them later has no effect on this instance.
24+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: "AnyJson type · @imqueue/async-logger"
3+
description: "Any value that survives JSON.stringify unchanged."
4+
apiCrumbs: [{"name":"API reference","url":"/api/"},{"name":"@imqueue/async-logger","url":"/api/async-logger/latest/"},{"name":"AnyJson","url":"/api/async-logger/latest/async-logger.anyjson/"}]
5+
---
6+
7+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
8+
9+
# AnyJson type
10+
11+
Any value that survives `JSON.stringify` unchanged.
12+
13+
**Signature:**
14+
15+
```typescript
16+
export type AnyJson = boolean | number | string | null | undefined | JsonArray | JsonObject;
17+
```
18+
**References:** [JsonArray](/api/async-logger/latest/async-logger.jsonarray/)<!-- -->, [JsonObject](/api/async-logger/latest/async-logger.jsonobject/)
19+
20+
## Remarks
21+
22+
A structural copy of the type in `@imqueue/core`<!-- -->, declared here so the logger needs no runtime dependency on the queue library. The shapes match exactly, so values remain assignable in both directions.
23+
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
title: "AsyncLoggerOptions interface · @imqueue/async-logger"
3+
description: "Explicit configuration for a Logger, replacing what it would otherwise read from the environment."
4+
apiCrumbs: [{"name":"API reference","url":"/api/"},{"name":"@imqueue/async-logger","url":"/api/async-logger/latest/"},{"name":"AsyncLoggerOptions","url":"/api/async-logger/latest/async-logger.asyncloggeroptions/"}]
5+
---
6+
7+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
8+
9+
# AsyncLoggerOptions interface
10+
11+
Explicit configuration for a [Logger](/api/async-logger/latest/async-logger.logger/)<!-- -->, replacing what it would otherwise read from the environment.
12+
13+
**Signature:**
14+
15+
```typescript
16+
export interface AsyncLoggerOptions
17+
```
18+
19+
## Remarks
20+
21+
Both fields are read independently: pass only `metadata` and the transports still come from `LOGGER_TRANSPORTS`<!-- -->, and vice versa. Passing an empty `transports` array is not the same as omitting itan empty array means "console only", while omitting it falls back to the environment.
22+
23+
## Properties
24+
25+
<table><thead><tr><th>
26+
27+
Property
28+
29+
30+
</th><th>
31+
32+
Modifiers
33+
34+
35+
</th><th>
36+
37+
Type
38+
39+
40+
</th><th>
41+
42+
Description
43+
44+
45+
</th></tr></thead>
46+
<tbody><tr><td>
47+
48+
[metadata](/api/async-logger/latest/async-logger.asyncloggeroptions.metadata/)
49+
50+
51+
</td><td>
52+
53+
54+
</td><td>
55+
56+
[JsonObject](/api/async-logger/latest/async-logger.jsonobject/)
57+
58+
59+
</td><td>
60+
61+
Fields attached to every record sent to a transport, such as a source or environment tag. Does not affect console output.
62+
63+
64+
</td></tr>
65+
<tr><td>
66+
67+
[transports](/api/async-logger/latest/async-logger.asyncloggeroptions.transports/)
68+
69+
70+
</td><td>
71+
72+
73+
</td><td>
74+
75+
[TransportOptions](/api/async-logger/latest/async-logger.transportoptions/)<!-- -->\[\]
76+
77+
78+
</td><td>
79+
80+
Transports to log through. Each entry is created and attached at construction time; entries with `enabled: false` are skipped.
81+
82+
83+
</td></tr>
84+
</tbody></table>
85+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: "AsyncLoggerOptions.metadata property · @imqueue/async-logger"
3+
description: "Fields attached to every record sent to a transport, such as a source or environment tag. Does not affect console output."
4+
apiCrumbs: [{"name":"API reference","url":"/api/"},{"name":"@imqueue/async-logger","url":"/api/async-logger/latest/"},{"name":"AsyncLoggerOptions","url":"/api/async-logger/latest/async-logger.asyncloggeroptions/"},{"name":"metadata","url":"/api/async-logger/latest/async-logger.asyncloggeroptions.metadata/"}]
5+
sitemap: false
6+
---
7+
8+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
9+
10+
# AsyncLoggerOptions.metadata property
11+
12+
Fields attached to every record sent to a transport, such as a source or environment tag. Does not affect console output.
13+
14+
**Signature:**
15+
16+
```typescript
17+
metadata: JsonObject;
18+
```

0 commit comments

Comments
 (0)