pinpoint-node-agent
Version:
Pinpoint node agent provided by NAVER
20 lines (17 loc) • 578 B
JavaScript
/**
* Pinpoint Node.js Agent
* Copyright 2020-present NAVER Corp.
* Apache License v2.0
*/
class MySQLRecorder {
static recordDatabaseInfo(recorder, databaseInfo) {
if (recorder && databaseInfo && databaseInfo.host && typeof databaseInfo.host === 'string') {
recorder.recordEndPoint(databaseInfo.host)
}
if (recorder && databaseInfo && databaseInfo.database && typeof databaseInfo.database === 'string') {
recorder.recordDestinationId(databaseInfo.database)
}
}
}
module.exports = MySQLRecorder