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

thoughtspot / mcp-server / 25346430008
86%

Build:
DEFAULT BRANCH: main
Ran 04 May 2026 10:15PM UTC
Jobs 1
Files 32
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:14PM UTC coverage: 87.981% (-0.07%) from 88.055%
25346430008

push

github

web-flow
SCAL-308279 Add Grafana OTLP metrics sink (#126)

* SCAL-308279 Add Grafana OTLP metrics sink

Add the direct Grafana OTLP/HTTP sink for low-cardinality MCP service metrics.
This keeps PR 3 independent from the Analytics Engine sink so it can be
reviewed and merged in parallel.

- add a Grafana OTLP metrics sink that emits OTLP JSON over HTTP
- convert counters, gauges, and histograms into OTLP metric datapoints
- normalize OTLP endpoints to `/v1/metrics`
- support Grafana Cloud Basic auth and explicit OTLP auth headers
- wire request metrics to build the Grafana sink from env config
- test payload mapping, endpoint config, auth headers, and failure behavior

The sink sends delta sums and histograms because request-scoped observations
are emitted as per-flush deltas. Export failures are surfaced to the recorder,
where the existing metrics flush isolation logs and drops them without changing
business responses.

- `npm run lint`
- focused runtime metrics tests for Grafana sink and request metrics

* SCAL-308279 Aggregate OTLP metric datapoints

## Summary

Address review feedback for the Grafana OTLP payload shape and timestamp precision.
OTLP requires each metric to contain at most one datapoint for a given attribute set.

## What Changed

- aggregate same-metric and same-label observations before creating OTLP datapoints
- sum counters and histogram count, sum, and bucket counts per attribute set
- keep the latest gauge value per attribute set
- convert millisecond timestamps to nanoseconds with `BigInt` precision
- add regression coverage for duplicate attributes and fractional millisecond timestamps

## Validation

- `npm run lint`
- focused runtime metrics tests
- `npm test`

* SCAL-308279 Avoid counter bucket allocation

## Summary

Avoid allocating histogram bucket storage for non-histogram OTLP datapoints.

## Validation

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

* SCAL-308279 Hard... (continued)

536 of 631 branches covered (84.94%)

Branch coverage included in aggregate %.

107 of 119 new or added lines in 2 files covered. (89.92%)

1294 of 1449 relevant lines covered (89.3%)

349.52 hits per line

Uncovered Changes

Lines Coverage ∆ File
12
85.63
src/metrics/runtime/grafana-otlp-sink.ts
Jobs
ID Job ID Ran Files Coverage
1 25346430008.1 04 May 2026 10:15PM UTC 32
87.98
GitHub Action Run
Source Files on build 25346430008
  • Tree
  • List 32
  • 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 #25346430008
  • 53068111 on github
  • Prev Build on main (#25239417692)
  • Next Build on main (#25346856351)
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