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

teableio / teable / 10160390019

30 Jul 2024 10:08AM CUT coverage: 81.98% (+64.3%) from 17.697%
10160390019

Pull #779

github

web-flow
Merge a160876c8 into 521460d76
Pull Request #779: fix: skip duplicate index

4272 of 4471 branches covered (95.55%)

28270 of 34484 relevant lines covered (81.98%)

1219.86 hits per line

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

0.0
/apps/nestjs-backend/src/tracing.ts
1
import * as os from 'os';
×
2
import { AsyncLocalStorageContextManager } from '@opentelemetry/context-async-hooks';
×
3
import { ExpressInstrumentation } from '@opentelemetry/instrumentation-express';
×
4
import { HttpInstrumentation } from '@opentelemetry/instrumentation-http';
×
5
import { PinoInstrumentation } from '@opentelemetry/instrumentation-pino';
×
6
import { Resource } from '@opentelemetry/resources';
×
7
import { NodeSDK } from '@opentelemetry/sdk-node';
×
8
import {
×
9
  SEMRESATTRS_HOST_NAME,
×
10
  SEMRESATTRS_SERVICE_NAME,
×
11
  SEMRESATTRS_SERVICE_VERSION,
×
12
  SEMRESATTRS_DEPLOYMENT_ENVIRONMENT,
×
13
} from '@opentelemetry/semantic-conventions';
×
14
import { PrismaInstrumentation } from '@prisma/instrumentation';
×
15

×
16
const otelSDK = new NodeSDK({
×
17
  // traceExporter: new OTLPTraceExporter({
×
18
  //   url: 'http://localhost:4318/v1/traces',
×
19
  // }),
×
20
  contextManager: new AsyncLocalStorageContextManager(),
×
21
  instrumentations: [
×
22
    new HttpInstrumentation(),
×
23
    new ExpressInstrumentation(),
×
24
    new PrismaInstrumentation(),
×
25
    new PinoInstrumentation(),
×
26
  ],
×
27
  resource: new Resource({
×
28
    [SEMRESATTRS_HOST_NAME]: os.hostname(),
×
29
    [SEMRESATTRS_SERVICE_NAME]: 'teable',
×
30
    [SEMRESATTRS_SERVICE_VERSION]: 'v1.0.0',
×
31
    [SEMRESATTRS_DEPLOYMENT_ENVIRONMENT]: process.env.NODE_ENV || 'development',
×
32
  }),
×
33
});
×
34

×
35
export default otelSDK;
×
36

×
37
process.on('SIGTERM', () => {
×
38
  otelSDK
×
39
    .shutdown()
×
40
    .then(
×
41
      () => console.log('SDK shut down successfully'),
×
42
      (err) => console.log('Error shutting down SDK', err)
×
43
    )
×
44
    .finally(() => process.exit(0));
×
45
});
×
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

© 2025 Coveralls, Inc