UNPKG

@uyu423/pinpoint-node-agent

Version:

Pinpoint node agent provided by NAVER (Personalized version)

71 lines (53 loc) 1.25 kB
/** * Pinpoint Node.js Agent * Copyright 2020-present NAVER Corp. * Apache License v2.0 */ 'use strict' const AsyncId = require('./async-id') const asyncIdGenerator = require('./sequence-generator').asyncIdGenerator class DisableSpanEventRecorder { constructor() { this.nextAsyncId = null this.ended = false this.error = null } recordStartTime(startTime) { } recordServiceType(code, ...properties) { } recordDestinationId(id) { } recordEndPoint(endPoint) { } recordNextSpanId(nextSpanId) { } recordNextAsyncId() { let asyncId if (this.nextAsyncId === null) { asyncId = asyncIdGenerator.next this.nextAsyncId = asyncId } else { asyncId = this.nextAsyncId } return new AsyncId(asyncId) } recordApiId(apiId) { } recordApi(methodDescriptor) { } recordApiDesc(desc) { } recordHTTPURL(url) { } recordApiArguments(key, desc, valueType) { } recordAttribute(key, value, valueType) { } recordException(error, isError) { } recordEnd() { this.ended = true } } module.exports = DisableSpanEventRecorder