• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

thoughtspot / mcp-server / 25346856351
86%

Build:
DEFAULT BRANCH: main
Ran 04 May 2026 10:25PM UTC
Jobs 1
Files 33
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 May 2026 10:24PM UTC coverage: 88.254% (+0.3%) from 87.981%
25346856351

push

github

web-flow
SCAL-308278 Add Analytics Engine metrics sink (#125)

* SCAL-308278 Add Analytics Engine metrics sink

Add the Analytics Engine sink for the metrics runtime so PM and tenant event
observations can be written to the existing Cloudflare `ANALYTICS` binding.

- add an Analytics Engine sink that writes one datapoint per metric observation
- define the positional Analytics Engine schema for indexes, blobs, and doubles
- classify metric names into stable event families for PM-oriented querying
- wire request metrics to use `env.ANALYTICS` when the analytics sink is enabled
- keep missing bindings as noop through the existing sink selection path
- cover datapoint mapping, binding detection, and default sink wiring in tests

The schema reserves index positions for tenant and user identity. This PR wires
the sink and raw event shape; later instrumentation PRs will populate those
identity fields from ThoughtSpot session context where available.

- `npm run lint`
- `npm test -- --coverage.enabled=false test/metrics/runtime/analytics-engine-sink.spec.ts test/metrics/runtime/request-metrics.spec.ts test/metrics/runtime/runtime-config.spec.ts test/metrics/runtime/sinks.spec.ts`
- `npm test`

* SCAL-308278 Cover all Analytics Engine metric families

## Summary

Make Analytics Engine metric family classification exhaustive and cover all
current metric names in tests.

## What Changed

- map `sessionsStartedTotal` into the auth event family
- add an exhaustive check for future metric additions
- verify every `METRIC_NAMES` value resolves to a valid Analytics Engine family

## Validation

- `npm run lint`
- `npm test -- --coverage.enabled=false test/metrics/runtime/analytics-engine-sink.spec.ts`

* SCAL-308278 Isolate Analytics Engine write failures

## Summary

Keep one failed Analytics Engine write from aborting the rest of a metrics flush.

## What Changed

- allow Analytics Engine bindings to return either sync or async write results
- await each data point write d... (continued)

576 of 672 branches covered (85.71%)

Branch coverage included in aggregate %.

32 of 34 new or added lines in 2 files covered. (94.12%)

1325 of 1482 relevant lines covered (89.41%)

363.06 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
95.83
src/metrics/runtime/analytics-engine-sink.ts
Jobs
ID Job ID Ran Files Coverage
1 25346856351.1 04 May 2026 10:25PM UTC 33
88.25
GitHub Action Run
Source Files on build 25346856351
  • Tree
  • List 33
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #25346856351
  • 28a9f18e on github
  • Prev Build on main (#25346430008)
  • Next Build on main (#25397941180)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc