@webex/internal-plugin-metrics 3.12.0-next.54 → 3.12.0-next.56

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.
@@ -0,0 +1,131 @@
1
+ ---
2
+ type: Getting Started
3
+ title: Getting started
4
+ description: Local setup, build, run, and test routing for @webex/internal-plugin-metrics.
5
+ tags: [onboarding]
6
+ ---
7
+ <!-- sdd-generated-metadata
8
+ doc_kind: standing-doc
9
+ generated_from: getting-started@0.3.0
10
+ generated_by: claude-code
11
+ approved_by: rarajes2@cisco.com
12
+ updated_at: 2026-10-07T04:50:31Z
13
+ validation_status: pass
14
+ -->
15
+
16
+ # Getting started
17
+
18
+ Onboarding for **@webex/internal-plugin-metrics**, a workspace package of the `webex-js-sdk`
19
+ monorepo. Every command below is run from the monorepo root.
20
+
21
+ ## Prerequisites
22
+
23
+ | Tool or access | Version or requirement |
24
+ | -------------------------------------- | ----------------------------------------------------------------------------- |
25
+ | Node.js | `22.14` for building and testing, as declared by the repository owner in `.sdd/manifest.json` `toolchain`; `>=18` from `engines` in `package.json` is the consumer runtime floor |
26
+ | Yarn | The monorepo's Yarn workspaces; dependencies use the `workspace:*` protocol |
27
+ | Registry or VPN access | Public npm only. The package declares no `.npmrc` and no authenticated registry |
28
+
29
+ ## Install
30
+
31
+ ```bash
32
+ git clone https://github.com/webex/webex-js-sdk.git
33
+ yarn install
34
+ ```
35
+
36
+ Consumers outside the monorepo install the published package with:
37
+
38
+ ```bash
39
+ npm install --save @webex/internal-plugin-metrics
40
+ ```
41
+
42
+ ## Build
43
+
44
+ ```bash
45
+ yarn workspace @webex/internal-plugin-metrics build:src
46
+ ```
47
+
48
+ `build:src` transpiles `src/` to `dist/` and then runs `build`, which emits type declarations to
49
+ `dist/types`. Run `yarn workspace @webex/internal-plugin-metrics build` alone for declarations only.
50
+
51
+ ## Run
52
+
53
+ Not applicable. This package is a library plugin with no runnable entry point. It becomes active by
54
+ being imported before a `WebexCore` instance is constructed, which registers
55
+ `webex.internal.metrics` and `webex.internal.newMetrics`:
56
+
57
+ ```js
58
+ import '@webex/internal-plugin-metrics';
59
+
60
+ import WebexCore from '@webex/webex-core';
61
+
62
+ const webex = new WebexCore();
63
+ ```
64
+
65
+ ## Tests
66
+
67
+ ```bash
68
+ yarn workspace @webex/internal-plugin-metrics test:unit
69
+ ```
70
+
71
+ Use the table as the repository-level test router. List only tiers that
72
+ actually exist; behavioral intent belongs in the owning module specifications and exact
73
+ cases remain in the repository's native test sources.
74
+
75
+ | Tier | Command | Test location | Framework | External dependencies |
76
+ | ------------ | ------------------------------------------------------------------ | ----------------- | --------- | --------------------- |
77
+ | Unit | `yarn workspace @webex/internal-plugin-metrics test:unit` | `test/unit/spec` | Mocha | None |
78
+ | Integration | Not applicable — the package defines no `test:integration` script and has no `test/integration` directory | — | — | — |
79
+ | System / E2E | Not applicable — the package defines no `test:browser` script | — | — | — |
80
+
81
+ Run one spec with `--targets`, relative to `test/unit/spec/`. Run the focused unit tests with
82
+ Node.js 22.14, the declared toolchain version; with nvm, switch first using `nvm use 22.14`:
83
+
84
+ ```bash
85
+ yarn workspace @webex/internal-plugin-metrics test:unit --targets network-telemetry.ts
86
+ ```
87
+
88
+ - Coverage or quality gate: none. The package's Mocha run enforces no threshold and defines no
89
+ `test:coverage` script, so the monorepo CI coverage job never reaches this workspace.
90
+ `.sdd/manifest.json` records this as `quality_gates.code_coverage.origin: none`.
91
+ - Enforcement source: lint only, through `test:style` (`eslint ./src/**/*.*`) configured by
92
+ `.eslintrc.js`.
93
+ - Test environment or QA dependencies: none. Every spec runs in-process against
94
+ `@webex/test-helper-mock-webex`.
95
+
96
+ The `test` script in `package.json` is not a working gate: it chains `test:integration` and
97
+ `test:browser`, which this package does not define. `.sdd/manifest.json` records `commands.build`
98
+ as an unresolved owner decision for that reason.
99
+
100
+ ## Configuration and secrets
101
+
102
+ - Required configuration: none to build or test. At runtime the plugin reads its own defaults from
103
+ `src/config.js`; both telemetry features it gates (`metrics.unhandledExceptionTelemetry.enabled`
104
+ and `metrics.networkTelemetry.enabled`) default to `false`.
105
+ - Secret source: none. The package holds no credentials and reads only
106
+ `process.env.METRICS_SERVICE_URL`, an optional pre-discovery service override in `src/config.js`.
107
+ - Package or artifact access: public npm. `@webex/event-dictionary-ts` is the one external runtime
108
+ dependency pinned in `package.json`.
109
+ - Required neighboring repositories or workspace layout: none beyond the monorepo itself. The
110
+ package depends on the `@webex/webex-core`, `@webex/common` and `@webex/common-timers` workspace
111
+ siblings, which `yarn install` links.
112
+ - Platform, simulator, device, or SDK setup: none. Browser-only behavior is guarded at runtime, so
113
+ the unit suite runs under Node.js.
114
+ - Never commit credentials or copy production secrets into a local config.
115
+
116
+ ## First-run verification
117
+
118
+ 1. Run `yarn workspace @webex/internal-plugin-metrics build:src`.
119
+ 2. Check that `dist/index.js` and `dist/types/index.d.ts` exist, matching the `main` and `types`
120
+ fields in `package.json`.
121
+ 3. Run `yarn workspace @webex/internal-plugin-metrics test:unit --targets network-telemetry.ts`.
122
+
123
+ Expected result: the build emits `dist/` without errors and the focused spec passes, exercising the
124
+ request-outcome collector end to end against the mocked SDK.
125
+
126
+ ## Next steps
127
+
128
+ - [Repository architecture](architecture.md)
129
+ - Service specification — not applicable for this package
130
+ - [Specification registry](specs/README.md)
131
+ - [Documentation index](index.md)
package/docs/index.md ADDED
@@ -0,0 +1,52 @@
1
+ ---
2
+ okf_version: '0.1'
3
+ ---
4
+ <!-- sdd-generated-metadata
5
+ doc_kind: standing-doc
6
+ generated_from: docs-index@0.3.0
7
+ generated_by: claude-code
8
+ approved_by: rarajes2@cisco.com
9
+ updated_at: 2026-10-07T04:50:31Z
10
+ validation_status: pass
11
+ -->
12
+
13
+ # @webex/internal-plugin-metrics documentation
14
+
15
+ Doc map for developers and agents working on the Webex JS SDK metrics plugin: the package that
16
+ collects, enriches, batches and submits every SDK-owned telemetry family to the Webex metrics and
17
+ unified telemetry services.
18
+
19
+ ## Start here
20
+
21
+ - [Getting started](getting-started.md)
22
+ - [Repository architecture](architecture.md)
23
+ - Service specification — not applicable; this package is a library plugin with no deployable
24
+ service, recorded as `docs/service.md: omit` in `.sdd/manifest.json`.
25
+ - API specification — not applicable; the package owns no HTTP surface, recorded as
26
+ `api-specs/openapi.yaml: omit` in `.sdd/manifest.json`.
27
+
28
+ ## Decisions
29
+
30
+ - [adr/](adr/) — architectural decision records
31
+
32
+ ## Specifications and contracts
33
+
34
+ - [architecture.md](architecture.md) — canonical repository-wide architecture and the contract index
35
+ - [specs/README.md](specs/README.md) — manifest-backed module and contract registry
36
+ - `<module-path>/docs/README.md` — the owning specification beside each module's code, one per
37
+ module in the registry
38
+ - [adr/](adr/) — concrete architectural decisions; blank ADR templates remain under `.sdd/`
39
+
40
+ Use the manifest-linked native source for exact contract details: the ecosystem-native SDK exports
41
+ in `package.json` and `src/index.ts` for the published package surface, the TypeScript declarations
42
+ in `src/metrics.types.ts` for every event envelope, and the externally owned
43
+ `@webex/event-dictionary-ts` schema for Call Analyzer event names and payload fields. Register and
44
+ link those sources from the architecture index and the owning module spec instead of copying them
45
+ into Markdown.
46
+
47
+ ## Related repository resources
48
+
49
+ - [README.md](../README.md) — the published npm landing page for this package. It is owner-authored
50
+ and retained in place; it is not generated and is not a canonical specification.
51
+ - Monorepo-level contribution, security and release governance lives at the `webex-js-sdk`
52
+ repository root rather than in this package.
@@ -0,0 +1,88 @@
1
+ ---
2
+ type: Reference
3
+ title: Specification registry
4
+ description: Canonical specification registry and change-routing guide.
5
+ tags: [specifications, registry]
6
+ ---
7
+ <!-- sdd-generated-metadata
8
+ doc_kind: standing-doc
9
+ generated_from: spec-index@0.3.0
10
+ generated_by: claude-code
11
+ approved_by: rarajes2@cisco.com
12
+ updated_at: 2026-10-07T04:50:31Z
13
+ validation_status: pass
14
+ -->
15
+
16
+ # Specification registry
17
+
18
+ Use this page to find the canonical repository architecture and every
19
+ instantiated module specification plus native contract. Keep technical facts
20
+ in one owning document and use this page only for navigation, ownership,
21
+ status, and change/test routing.
22
+
23
+ Start with the [repository architecture](../architecture.md). No service
24
+ specification exists: this package is a library plugin with no deployable
25
+ service, recorded as `docs/service.md: omit` in `.sdd/manifest.json`.
26
+
27
+ ## Document roles
28
+
29
+ | Document | Canonical ownership |
30
+ | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
31
+ | [Repository architecture](../architecture.md) | Repository boundaries, resource inventory, interactions, dependency topology, and cross-cutting architecture |
32
+ | Service specification | Not applicable — no deployable service in this package |
33
+ | Module specifications | Stable behavior and design at each manifest-routed `<module-path>/docs/README.md` |
34
+ | [ADR](../adr/) | A durable decision, its deciders, rationale, consequences, and supersession lineage |
35
+
36
+ ## Instantiated specification registry
37
+
38
+ | Resource | Role | Canonical path | Owner | Status | Last verified |
39
+ | -------------------------------------------- | ------------ | --------------------------------------------------------------- | --------------------------------- | ------ | ------------- |
40
+ | Repository | Architecture | `docs/architecture.md` | Cisco Webex JS SDK — telemetry | Active | 2026-10-05 |
41
+ | Metrics plugin root | Module | `src/docs/README.md` | Cisco Webex JS SDK — telemetry | Active | 2026-10-05 |
42
+ | Call Analyzer diagnostics | Module | `src/call-diagnostic/docs/README.md` | Cisco Webex JS SDK — telemetry | Active | 2026-10-05 |
43
+ | Privacy and security permission enrichment | Module | `src/privacy-and-security-permission-enricher/docs/README.md` | Cisco Webex JS SDK — telemetry | Active | 2026-10-05 |
44
+ | WebRTC stats telemetry | Module | `src/rtcMetrics/docs/README.md` | Cisco Webex JS SDK — telemetry | Active | 2026-10-05 |
45
+ | Unhandled exception telemetry | Module | `src/unhandled-exception-telemetry/docs/README.md` | Cisco Webex JS SDK — telemetry | Active | 2026-10-05 |
46
+ | Published SDK surface | Contract | `src/index.ts` | Cisco Webex JS SDK — telemetry | Active | 2026-10-05 |
47
+ | Call Analyzer event schema | Contract | `@webex/event-dictionary-ts`, pinned in `package.json` | Webex Call Analyzer (external) | Active | 2026-10-05 |
48
+
49
+ ### Module registry
50
+
51
+ One row per module in `.sdd/manifest.json`, which stays authoritative; this table is its
52
+ human-readable mirror and the reconciliation surface for `scripts/check_spec_index.py`.
53
+
54
+ | Module | Responsibility | Manifest coverage state | Start here |
55
+ | --- | --- | --- | --- |
56
+ | `src/` | Plugin registration, the legacy `metrics` and current `newMetrics` façades, the batcher family, tagged-event metrics and SDK network telemetry | Partial | `src/docs/README.md` |
57
+ | ↳ `src/call-diagnostic/` | Call Analyzer client, feature and media-quality events, the latency ledger, error-code mapping and its own batcher | Partial | `src/call-diagnostic/docs/README.md` |
58
+ | ↳ `src/privacy-and-security-permission-enricher/` | Permission-change enrichment policy applied to Call Analyzer client events | Partial | `src/privacy-and-security-permission-enricher/docs/README.md` |
59
+ | ↳ `src/rtcMetrics/` | WebRTC stats telemetry submitted to the unified telemetry service | Partial | `src/rtcMetrics/docs/README.md` |
60
+ | ↳ `src/unhandled-exception-telemetry/` | Browser uncaught error and promise-rejection reporter | Partial | `src/unhandled-exception-telemetry/docs/README.md` |
61
+
62
+ Every module carries a generated canonical spec. All five are held at `Partial` because the first
63
+ generator-side coverage measurement has not yet produced a score; promotion to `Specced` is a
64
+ coverage-review decision recorded in `.sdd/manifest.json`, not a generation decision. Independent
65
+ semantic validation is a separate gate and is deferred to another runtime by explicit owner
66
+ instruction.
67
+
68
+ ## Change and verification routing
69
+
70
+ | Change affects | Load and update | Verification route |
71
+ | ------------------------------------------------------- | --------------------------------------------------------------------------------- | ------------------------------------------------ |
72
+ | Repository boundaries or cross-cutting architecture | `docs/architecture.md` and applicable ADRs | `test:unit` plus the affected owner specs |
73
+ | A submitted payload, metric name or event name | The owning module spec's `Protocol and wire format`, plus `src/metrics.types.ts` | `test:unit` for the owning module's spec file |
74
+ | A stable code, package, or component boundary | Its module spec | Module tests plus affected contracts |
75
+ | A public API, event, command, package, or file contract | The owning architecture/module section plus the native declaration | `test:unit` and `build` for declaration output |
76
+
77
+ ## Module and contract registration
78
+
79
+ Generate each module specification directly at the exact `modules[].canonical_spec` path recorded in
80
+ `.sdd/manifest.json` (default `<module-path>/docs/README.md`). Never copy a visible module starter or
81
+ reconstruct a path from an example. Register every module and submodule in the Module registry above
82
+ in manifest tree order.
83
+
84
+ Register each contract with a stable identity, `published` or `internal` publication state, canonical
85
+ native source, and owning-module link. This package owns no HTTP surface, so no OpenAPI document is
86
+ selected; its published surface is the ecosystem-native SDK export declared in `package.json` and
87
+ `src/index.ts`, and the upstream Webex metrics and unified telemetry HTTP contracts are externally
88
+ owned. This page provides navigation and ownership rather than a copied contract.
package/package.json CHANGED
@@ -40,7 +40,7 @@
40
40
  "@webex/event-dictionary-ts": "^1.0.2220",
41
41
  "@webex/test-helper-chai": "3.12.0-next.9",
42
42
  "@webex/test-helper-mock-webex": "3.12.0-next.9",
43
- "@webex/webex-core": "3.12.0-next.54",
43
+ "@webex/webex-core": "3.12.0-next.60",
44
44
  "ip-anonymize": "^0.1.0",
45
45
  "isbot": "5.2.1",
46
46
  "lodash": "^4.17.21",
@@ -54,5 +54,5 @@
54
54
  "test:style": "eslint ./src/**/*.*",
55
55
  "test:unit": "webex-legacy-tools test --unit --runner mocha"
56
56
  },
57
- "version": "3.12.0-next.54"
57
+ "version": "3.12.0-next.56"
58
58
  }