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

supabase / storage / 25738155938

12 May 2026 01:38PM UTC coverage: 39.251% (-35.1%) from 74.366%
25738155938

Pull #1094

github

web-flow
Merge 0f3efcca0 into defbbb616
Pull Request #1094: feat: embedded vector store

2188 of 6152 branches covered (35.57%)

Branch coverage included in aggregate %.

88 of 280 new or added lines in 6 files covered. (31.43%)

3689 existing lines in 165 files now uncovered.

4312 of 10408 relevant lines covered (41.43%)

34.74 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

6.45
/src/http/plugins/tracing.ts
1
import { getTenantConfig } from '@internal/database'
2
import { logSchema } from '@internal/monitoring'
3
import fastifyPlugin from 'fastify-plugin'
4
import { getConfig } from '../../config'
5

6
declare module 'fastify' {
7
  interface FastifyRequest {
8
    tracingMode?: string
9
    serverTimings?: { spanName: string; duration: number }[]
10
  }
11
}
12

13
const { isMultitenant, tracingEnabled, tracingMode: defaultTracingMode } = getConfig()
3✔
14

15
export const tracing = fastifyPlugin(
3✔
16
  async function tracingMode(fastify) {
UNCOV
17
    if (!tracingEnabled) {
×
UNCOV
18
      return
×
19
    }
20

21
    fastify.addHook('onRequest', async (request) => {
×
22
      try {
×
23
        if (isMultitenant && request.tenantId) {
×
24
          const tenantConfig = await getTenantConfig(request.tenantId)
×
25
          request.tracingMode = tenantConfig.tracingMode
×
26
        } else {
27
          request.tracingMode = defaultTracingMode
×
28
        }
29

30
        // Use request.opentelemetry().span to get the root request span,
31
        // not trace.getActiveSpan() which returns a child hook span.
32
        const span =
33
          typeof request.opentelemetry === 'function' ? request.opentelemetry()?.span : undefined
×
34
        if (span) {
×
35
          if (request.tenantId) {
×
36
            span.setAttribute('tenant.ref', request.tenantId)
×
37
          }
38
          if (request.tracingMode) {
×
39
            span.setAttribute('trace.mode', request.tracingMode)
×
40
          }
41
        }
42
      } catch (e) {
43
        logSchema.error(request.log, 'failed setting tracing mode', {
×
44
          error: e,
45
          type: 'tracing',
46
          tenantId: request.tenantId,
47
          project: request.tenantId,
48
          reqId: request.id,
49
          sbReqId: request.sbReqId,
50
        })
51
      }
52
    })
53
  },
54
  { name: 'tracing-mode' }
55
)
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