|
| 1 | +--- |
| 2 | +title: "Metadata Audit - JavaScript Instrumentation" |
| 3 | +issue: 9 |
| 4 | +type: audit |
| 5 | +phase: 1 |
| 6 | +status: in-progress |
| 7 | +last_updated: "2026-05-17" |
| 8 | +--- |
| 9 | + |
| 10 | +Analysis of the `opentelemetry-js-contrib` repository at HEAD `8fe14a9`(2026-05-08). All findings |
| 11 | +are from actual file contents. |
| 12 | + |
| 13 | +## Repository overview |
| 14 | + |
| 15 | +- 47 directories matching `instrumentation-*` under `packages/` |
| 16 | +- 46 active `package.json` files |
| 17 | +- 1 deprecated directory (`instrumentation-redis-4`) - README only, no `package.json` |
| 18 | + |
| 19 | +## What is machine-readable today |
| 20 | + |
| 21 | +Every active `package.json` has: |
| 22 | + |
| 23 | +| Field | Source | Notes | |
| 24 | +| ---------------------- | ----------------------------------------- | -------------------------------- | |
| 25 | +| `name` | `package.json` | npm package name | |
| 26 | +| `version` | `package.json` | Independent per package | |
| 27 | +| `description` | `package.json` | Consistently worded | |
| 28 | +| `engines.node` | `package.json` | Structured Node.js version range | |
| 29 | +| `repository.directory` | `package.json` | Present in 44/46 packages | |
| 30 | +| `homepage` | `package.json` | Links to package subdirectory | |
| 31 | +| `component_owners` | `.github/component_owners.yml` | Per package path, 46 entries | |
| 32 | +| `bundle_membership` | `auto-instrumentations-node/package.json` | Recoverable from dep list | |
| 33 | +| `package_version` | `.release-please-manifest.json` | Per package | |
| 34 | + |
| 35 | +## What exists but is inconsistent |
| 36 | + |
| 37 | +### Supported versions |
| 38 | + |
| 39 | +- 41/47 READMEs have a `### Supported Versions` heading |
| 40 | +- 6 packages have no supported versions heading: browser-navigation, document-load, long-task, |
| 41 | + redis-4, user-interaction, web-exception |
| 42 | +- `.tav.yml` exists for 31/47 packages with tested version ranges |
| 43 | +- README and `.tav.yml` don't always agree - Express README says `>=4.0.0 <6` but `.tav.yml` tests |
| 44 | + `>=4.16.2 <6` |
| 45 | + |
| 46 | +### Telemetry data |
| 47 | + |
| 48 | +All 47 READMEs mention telemetry somewhere but only **8/47** have any structured span or attribute |
| 49 | +section under a dedicated heading: |
| 50 | + |
| 51 | +- `instrumentation-aws-sdk` |
| 52 | +- `instrumentation-cassandra-driver` |
| 53 | +- `instrumentation-dataloader` |
| 54 | +- `instrumentation-hapi` |
| 55 | +- `instrumentation-kafkajs` |
| 56 | +- `instrumentation-nestjs-core` |
| 57 | +- `instrumentation-pg` |
| 58 | +- `instrumentation-web-exception` |
| 59 | + |
| 60 | +The remaining 39 packages reference telemetry in prose only, no structured tables or lists that can |
| 61 | +be parsed reliably. |
| 62 | + |
| 63 | +#### Heading inconsistency |
| 64 | + |
| 65 | +No standard heading exists across the 8 that do have structured data: |
| 66 | + |
| 67 | +| Heading used | Count | |
| 68 | +| -------------------------- | ----- | |
| 69 | +| `## Span Attributes` | 1 | |
| 70 | +| `## Emitted Spans` | 1 | |
| 71 | +| `## Semantic Attributes` | 1 | |
| 72 | +| `### Spans Emitted` | 1 | |
| 73 | +| `### Spans created` | 1 | |
| 74 | +| `### Span Types Created` | 1 | |
| 75 | +| `### Attributes Collected` | 1 | |
| 76 | +| `### Attributes collected` | 1 | |
| 77 | + |
| 78 | +The best example is `instrumentation-aws-sdk` which has a proper markdown table with attribute |
| 79 | +names, types, descriptions, and examples. Most others use bullet lists or prose. |
| 80 | + |
| 81 | +### Configuration options |
| 82 | + |
| 83 | +- 29/47 READMEs have an Options/Configuration section |
| 84 | +- Format varies - markdown tables, bullet lists, prose |
| 85 | +- Types often reference TypeScript interfaces rather than primitives |
| 86 | + |
| 87 | +### Semantic conventions |
| 88 | + |
| 89 | +- 41/47 READMEs mention semantic conventions |
| 90 | +- Usually as a version string or a link - not structured data |
| 91 | + |
| 92 | +## What is missing entirely |
| 93 | + |
| 94 | +- Stability level - not tracked in any structured field |
| 95 | +- Log telemetry - some packages emit logs (e.g. browser-navigation) but there is no structured field |
| 96 | + for this anywhere |
| 97 | +- Unmaintained status - recorded as a YAML comment in `component_owners.yml`, not a field |
| 98 | + |
| 99 | +## Proposed registry schema |
| 100 | + |
| 101 | +Based on what is machine-readable today, a Phase 1 registry entry would look like this: |
| 102 | + |
| 103 | +```yaml |
| 104 | +name: instrumentation-express |
| 105 | +npm_package: "@opentelemetry/instrumentation-express" |
| 106 | +version: "0.66.0" |
| 107 | +description: "OpenTelemetry instrumentation for `express` http web application framework" |
| 108 | +source_path: packages/instrumentation-express |
| 109 | +repository: open-telemetry/opentelemetry-js-contrib |
| 110 | +node_engine: "^18.19.0 || >=20.6.0" |
| 111 | +in_auto_instrumentations_node: true |
| 112 | +component_owners: |
| 113 | + - JamieDanielson |
| 114 | + - pkanal |
| 115 | + - raphael-theriault-swi |
| 116 | +supported_versions: |
| 117 | + - package: express |
| 118 | + version_range: ">=4.0.0 <6" |
| 119 | + source: README.md |
| 120 | +tested_versions: |
| 121 | + - package: express |
| 122 | + range: ">=4.16.2 <6" |
| 123 | + mode: latest-minors |
| 124 | + source: .tav.yml |
| 125 | +``` |
| 126 | +
|
| 127 | +## What requires upstream work |
| 128 | +
|
| 129 | +For full parity with the Java instrumentation schema, the following would need to be added upstream |
| 130 | +in js-contrib: |
| 131 | +
|
| 132 | +1. **Structured telemetry data** - spans, metrics, attributes per instrumentation. Only 8/47 |
| 133 | + packages have any structured data today, and none use a consistent format. A standardized heading |
| 134 | + convention or a `metadata.yaml` file per package would be needed. |
| 135 | + |
| 136 | +2. **Stability level** - currently undocumented in structured form. |
| 137 | + |
| 138 | +3. **Log telemetry** - the current Java schema has no `logs` field. JS packages that emit logs would |
| 139 | + need a schema extension. |
| 140 | + |
| 141 | +4. **Configuration options** - 29/47 have some documentation but formats are inconsistent and types |
| 142 | + reference TypeScript interfaces. |
| 143 | + |
| 144 | +## Versioning model |
| 145 | + |
| 146 | +JS packages version independently, there is no single "js agent version" to key the registry off. |
| 147 | +The registry layout should be per package: |
| 148 | + |
| 149 | +```text |
| 150 | +ecosystem-registry/javascript/instrumentation-express/v0.66.0/instrumentation.yaml |
| 151 | +ecosystem-registry/javascript/instrumentation-mongoose/v0.64.0.yaml |
| 152 | +``` |
0 commit comments