-
Notifications
You must be signed in to change notification settings - Fork 399
/
instrumentations.js
64 lines (60 loc) · 3.29 KB
/
instrumentations.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* Copyright 2020 New Relic Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/
'use strict'
const InstrumentationDescriptor = require('./instrumentation-descriptor')
// Return a new copy of this array every time we're called
module.exports = function instrumentations() {
return {
'@elastic/elasticsearch': { type: InstrumentationDescriptor.TYPE_DATASTORE },
'@grpc/grpc-js': { module: './instrumentation/grpc-js' },
'@hapi/hapi': { type: InstrumentationDescriptor.TYPE_WEB_FRAMEWORK },
'@hapi/vision': { type: InstrumentationDescriptor.TYPE_WEB_FRAMEWORK },
'@nestjs/core': { type: InstrumentationDescriptor.TYPE_WEB_FRAMEWORK },
'@node-redis/client': { type: InstrumentationDescriptor.TYPE_DATASTORE },
'@prisma/client': { type: InstrumentationDescriptor.TYPE_DATASTORE },
'@redis/client': { type: InstrumentationDescriptor.TYPE_DATASTORE },
'amqplib': { module: './instrumentation/amqplib' },
'aws-sdk': { module: './instrumentation/aws-sdk' },
'bluebird': { type: InstrumentationDescriptor.TYPE_PROMISE },
'bunyan': { type: InstrumentationDescriptor.TYPE_GENERIC },
'cassandra-driver': { type: InstrumentationDescriptor.TYPE_DATASTORE },
'connect': { type: InstrumentationDescriptor.TYPE_WEB_FRAMEWORK },
'express': { type: InstrumentationDescriptor.TYPE_WEB_FRAMEWORK },
'fastify': { type: InstrumentationDescriptor.TYPE_WEB_FRAMEWORK },
'generic-pool': { type: InstrumentationDescriptor.TYPE_GENERIC },
'ioredis': { type: InstrumentationDescriptor.TYPE_DATASTORE },
'kafkajs': { type: InstrumentationDescriptor.TYPE_MESSAGE },
'koa': { module: './instrumentation/koa' },
'langchain': { module: './instrumentation/langchain' },
'memcached': { type: InstrumentationDescriptor.TYPE_DATASTORE },
'mongodb': { type: InstrumentationDescriptor.TYPE_DATASTORE },
'mysql': { module: './instrumentation/mysql' },
'next': { module: './instrumentation/nextjs' },
'openai': { type: InstrumentationDescriptor.TYPE_GENERIC },
'pg': { type: InstrumentationDescriptor.TYPE_DATASTORE },
'pino': { module: './instrumentation/pino' },
'q': { type: null },
'redis': { type: InstrumentationDescriptor.TYPE_DATASTORE },
'restify': { type: InstrumentationDescriptor.TYPE_WEB_FRAMEWORK },
'superagent': { type: InstrumentationDescriptor.TYPE_GENERIC },
'when': { module: './instrumentation/when' },
'winston': { type: InstrumentationDescriptor.TYPE_GENERIC },
/**
* The modules below are listed here purely to take
* advantage of the Supportability/Features/onRequire/<module>
* metrics for libraries we want to track for some reason or another.
* The big uses cases are:
* Logging libraries we want to instrument in the future
* Libraries that have OpenTelemetry instrumentation we want to register
* or have already registered.
*/
'@azure/openai': { type: InstrumentationDescriptor.TYPE_TRACKING },
'@langchain/community/llms/bedrock': { type: InstrumentationDescriptor.TYPE_TRACKING },
'fancy-log': { type: InstrumentationDescriptor.TYPE_TRACKING },
'knex': { type: InstrumentationDescriptor.TYPE_TRACKING },
'loglevel': { type: InstrumentationDescriptor.TYPE_TRACKING },
'npmlog': { type: InstrumentationDescriptor.TYPE_TRACKING }
}
}