Skip to content

Commit

Permalink
[pinpoint-apm#125] mysql module support
Browse files Browse the repository at this point in the history
* pinpoint node agent development db modules fixtures
* MysqlContainer withCopyFilesToContainer for fixtures
* Fix `ERROR 1064 (42000) at line 16: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3`
* testcontainer docker-entrypoint-initdb.d learning test
* Support SQL_ID AnnotationKey
* createConnection endPoint SpanEvent
* MySQL connect SpanEvent
* MySQL connect async callback SpanEvent
* Declare MySQL Service Type
* Java agent InstrumentMethod, addScopedInterceptor implementation
* MySQL createConnection Interceptor
* MySQLConnectionInterceptor
* We know hook method API. we need to translate *stack name to human understanding information.
Fix wrong Class name for connection test
* Query Hook
* databaseInfo to MySQLStatementExecuteQueryInterceptor
* transformation sql string to normalizedSql
* SQL Meta Data gRPC API
* DefaultAnnotationKey is no needs. I think it is better to remove it.
* If object uses JSON.stringify, It's right. But other cases, It's wrong. ex) string '123' -> '"123"' It is wrong
* Fix test failure
* annotation
* Support Java agent annotationValue and data type annotation to Node Agent
* fix async spanevent
* Fix audit warning
*  update testcontainer version
* DefaultPredefinedMethodDescriptorRegistry rename refactoring
* delete no used commented code
* AsyncId must have sequence
* recordHTTPURL no standard pinpoint spanevent API
* method descriptor builder needs ApiDescriptor Setter method
* trace.traceBlockEnd needs log.error('spanevent does not exists in call-stack') guard
* Support SQL Bind Value
* fix express test failure
* mysql query matcher
* createPool interceptor
* Support mysql Pool query and  query with getConnection
* MySQL PoolConnection Support
* Scope in interceptor like java agent
* mysql service type and execute query
* Upgrade nodejs engine version matrix version
* mysql2 fixtures

Logger Adaptor pattern
   * The Logger must implements pinpoint.json config loading status and a  log level.
    * support integration test
    * if adaptor doesn't have adaptor outer method, Agent outs logs to console
[pinpoint-apm#117] loglevel default logger integration test
[pinpoint-apm#117] loglevel default logger
[pinpoint-apm#119] Fix "SequenceGenerator is not a constructor" error
[pinpoint-apm#121] Fix testcontainer `It was resolved to update testcontainer v9`
[pinpoint-apm#122] Fix testContainer test failure
[pinpoint-apm#117] make Agent d.ts in repository
[pinpoint-apm#117] node-agent index.d.ts
[pinpoint-apm#122] Fix test failure
[pinpoint-apm#122] fix github action failure
[pinpoint-apm#123] Fix Github action test failure
#2 formatting
#2 express get function name
pinpoint-apm#86 expectedStackString
pinpoint-apm#86 Fix test failure
pinpoint-apm#86 trace
pinpoint-apm#87 HTTP param annotation key
pinpoint-apm#87 url.parse exception guard
pinpoint-apm#87 setAttribute search Param
pinpoint-apm#87 annotation key
pinpoint-apm#87 remove no needs callstack
pinpoint-apm#87 Express with method name
pinpoint-apm#86 express callstack
pinpoint-apm#86 parse stack trace
pinpoint-apm#86 express method name matcher
pinpoint-apm#86 route name
pinpoint-apm#86 use layer symbol
pinpoint-apm#86 use layer symbol
pinpoint-apm#86 extract method refactoring
pinpoint-apm#86 method descriptor
pinpoint-apm#86 method descriptor Builder
pinpoint-apm#86 method name matcher
pinpoint-apm#86 express API Meta cache
pinpoint-apm#86 extract class refactoring
pinpoint-apm#86 callstack extract method refactoring pattern
pinpoint-apm#86 rename refactoring
pinpoint-apm#86 linenumber
pinpoint-apm#86 methodDescriptorBuilder
pinpoint-apm#86 makeMethodDescriptorBuilder
pinpoint-apm#86 method descriptor builder
pinpoint-apm#86 at Type.functionName [as methodName] (location) and at Type.name (location) in https://v8.dev/docs/stack-trace-api
pinpoint-apm#86 fullName
pinpoint-apm#86 post test
 [pinpoint-apm#98] Fix no details error case informations to  Error callstack
By using the string return value of the stack in the toString method of Error, the developer can check the error information in detail.
Fix redis 4.0 redis connection error
   - upgrade testcontainer to v7
[pinpoint-apm#101] The middleware should be displayed with the same depth as next, but the bug was fixed in the hierarchical display incorrectly.
Provides Middleware Code level visibility
Fixed a bug where Error Handler's location was displayed as anonymous Middleware
 [pinpoint-apm#101] TypeScript Express Demo app
 [pinpoint-apm#101] react app sample
 [pinpoint-apm#101] When using React as the front end and Express as the back end, the react sample is unnecessary because it is the same environment as express.
[pinpoint-apm#104] make koa example
[pinpoint-apm#104] koa support code level visibility
[pinpoint-apm#104] remove no used module hook
[pinpoint-apm#104] koa support code level visibility
[pinpoint-apm#104] koa wrap guard
[pinpoint-apm#104] koa module parameter descriptor
https://github.com/koajs/router/blob/master/API.md
router.get('/', (ctx, next) => {
  // ctx.router available
});

[pinpoint-apm#104] remove no needs files
[pinpoint-apm#104] koa module
https://github.com/koajs/router/blob/1aead99e0e0fdb8666e9c6fa2f52b0463c622025/lib/layer.js#L25
[pinpoint-apm#104] koa moudle callstack parsing
[pinpoint-apm#104] Support call stack `Router.<computed> [as get]` with `Function.app.<computed> [as get]`
[pinpoint-apm#104] koa module MethodDescriptorBuilder
[pinpoint-apm#104] koa support code level visibility
[pinpoint-apm#104] koa and express module status code 200 verification

[pinpoint-apm#104] remove no needs match wrap
[pinpoint-apm#111] When a large number of grpc streams occur, the subChannelPool running test has different results depending on the server environment and is deleted

[pinpoint-apm#117] Support logger, authentication adaptor pattern

typescript tools support for .d.ts
    * https://nodejs.org/api/modules.html#enabling
    * fix license convention by https://docs.npmjs.com/cli/v8/configuring-npm/package-json#license
ddac37
  • Loading branch information
feelform committed Sep 12, 2023
1 parent 48ca8ea commit ff001d3
Show file tree
Hide file tree
Showing 118 changed files with 7,023 additions and 2,543 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
name: CI

# Controls when the action will run.
on: [push, pull_request]
on: [push, pull_request_target]

permissions:
checks: write # needed for coverage

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand All @@ -14,13 +17,13 @@ jobs:
strategy:
matrix:
node_version:
- 12
- 14
- 16
- 18

name: Node ${{ matrix.node_version }} on ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: setup node environment
uses: actions/setup-node@v2
with:
Expand All @@ -32,11 +35,11 @@ jobs:
- uses: jwgmeligmeyling/checkstyle-github-action@master
with:
path: '**/checkstyle-result.xml'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Coverage
run: npm run coverage

- name: Report coverage
uses: romeovs/lcov-reporter-action@v0.2.21
uses: romeovs/lcov-reporter-action@2a28ec3e25fb7eae9cb537e9141603486f810d1a
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
lcov-file: ./coverage/lcov.info
github-token: ${{ secrets.ACTIONS_TOKEN }}
3 changes: 0 additions & 3 deletions .nycrc

This file was deleted.

2 changes: 1 addition & 1 deletion demo/express/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ router.get('/', function(req, res, next) {
console.log(`${callcount} ioredis data ${data}`)
})

axios.get(`https://eonet.sci.gsfc.nasa.gov/api/v2.1/categories`)
axios.get(`https://naver.com`)
.then(function (response) {
console.log(`response ${response}`)
res.render('index', { title: 'Express' });
Expand Down
9 changes: 9 additions & 0 deletions demo/http-server/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
PINPOINT_COLLECTOR_IP=localhost
PINPOINT_APPLICATION_NAME=http-node-sample-name
PINPOINT_AGENT_ID=http-node-sample-id
PINPOINT_SAMPLING_RATE=1
PINPOINT_LOG_LEVEL=DEBUG
_PINPOINT_TRACE_EXCLUSION_URL_PATTERN=/api
_PINPOINT_TRACE_EXCLUSION_URL_CACHE_SIZE=3
_GRPC_VERBOSITY=DEBUG
_GRPC_TRACE=call_stream
37 changes: 37 additions & 0 deletions demo/http-server/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import 'dotenv/config'
import 'pinpoint-node-agent';
import http from 'http';
import axios from 'axios';

const host = 'localhost';
const port = 8000;

const requestListener = function (req, res) {
(async () => {
try {
axios.get('http://localhost:7010/api')
.then(function (response) {
// handle success
console.log(response);
res.writeHead(200);
res.end(response.data);
})
.catch(function (error) {
// handle error
console.log(error);
})
.finally(function () {
// always executed
});
} catch (error) {
res.status(500).send(response);
res.writeHead(500);
res.end("My first server!");
}
})();
};

const server = http.createServer(requestListener);
server.listen(port, host, () => {
console.log(`Server is running on http://${host}:${port}`);
});
17 changes: 17 additions & 0 deletions demo/http-server/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "http-server",
"version": "1.0.0",
"description": "HTTP module Test",
"type": "module",
"main": "index.js",
"scripts": {
"test": "npm test"
},
"author": "",
"license": "ISC",
"dependencies": {
"axios": "^1.3.2",
"dotenv": "^16.0.3",
"node-fetch": "^2.6.11"
}
}
2 changes: 1 addition & 1 deletion demo/springboot/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@

server.port = 7010
4 changes: 2 additions & 2 deletions demo/springboot/start.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

AGENT_PATH=~/Downloads/pinpoint-agent-2.1.0
SPRING_BOOT_OPT="-javaagent:$AGENT_PATH/pinpoint-bootstrap-2.1.0.jar -Dpinpoint.agentId=express-spring-sampleid -Dpinpoint.applicationName=express-spring-sample"
AGENT_PATH=~/Downloads/pinpoint-agent-2.5.1
SPRING_BOOT_OPT="-javaagent:$AGENT_PATH/pinpoint-bootstrap-2.5.1.jar -Dpinpoint.agentId=express-spring-sampleid -Dpinpoint.applicationName=express-spring-sample"

# echo $AGENT_PATH
# echo $GRADLE_OPTS
Expand Down
44 changes: 0 additions & 44 deletions lib/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,50 +76,6 @@ class Agent {

completeTraceObject(trace) {
this.traceContext.completeTraceObject(trace)
if (trace.span) {
/*
const spanEvent = []
// step1. 우선 비동기 코드 (추후 더미코드) 를 먼저 가져오도록 한다.
const dummyEventMap = trace.span.spanEventList.reduce((map, dummyEvent) => {
if (dummyEvent.serviceType === ServiceTypeCode.callback_dummy) {
map[dummyEvent.nextDummyId] = dummyEvent
}
return map
}, {})
// step2. 콜백코드로 저장된 걸 가져오도록 한다. (순서가 보장 안되기 때문에 해당 과정이 필요하다.. )
const callEvent = trace.span.spanEventList.reduce((map, callbackEvent) => {
if (callbackEvent.dummyId !== null) {
map.push(callbackEvent)
}
return map
}, [])
// step3. 비동기 코드를 순차적으로 우회하며 돌도록 한다.
callEvent.forEach((event) => {
const dummyRecoder = dummyEventMap[event.dummyId]
if (dummyRecoder) {
event.sequence = dummyRecoder.sequence
event.depth = dummyRecoder.depth
//TODO. agent view 에서 문제가 있기에 우선 임의로 넣어둔다. (paas와 논의 필요)
// event.startElapsed = dummyRecoder.startElapsed
// event.elapsedTime = dummyRecoder.elapsedTime
if (event.nextDummyId !== null) {
//TODO. event chaiing인 경우 depth 등을 조정해야한다. 순서가 보장안될 수 있으니.. 차순 변경 후 가도 될 듯
dummyEventMap[event.nextDummyId].sequence = event.sequence + 1
dummyEventMap[event.nextDummyId].depth = event.depth + 1
}
}
})
trace.span.spanEventList.forEach((event) => {
if (event.serviceType !== ServiceTypeCode.callback_dummy) {
spanEvent.push(event)
}
})
trace.span.spanEventList = spanEvent
log.debug('finally->\n', trace.span)
*/
}
}

createAgentInfo(config, agentStartTime) {
Expand Down
29 changes: 27 additions & 2 deletions lib/client/data-sender-factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,42 @@
const GrpcDataSender = require('./grpc-data-sender')
const DataSender = require('./data-sender')

let dataSender
const create = (config, agentInfo) => {
return new DataSender(config, new GrpcDataSender(
dataSender = new DataSender(config, new GrpcDataSender(
config.collectorIp,
config.collectorTcpPort,
config.collectorStatPort,
config.collectorSpanPort,
agentInfo,
config
))
join()
return dataSender
}

const services = []
const join = (service) => {
if (service) {
services.push(service)
}

if (!dataSender) {
return
}

services.forEach((service) => {
service.dataSender = dataSender
})
}

const setDataSender = (sender) => {
dataSender = sender
join()
}

module.exports = {
create
create,
join,
setDataSender
}
3 changes: 3 additions & 0 deletions lib/client/data-sender.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const ApiMetaInfo = require('../data/dto/api-meta-info')
const StringMetaInfo = require('../data/dto/string-meta-info')
const Span = require('../context/span')
const SpanChunk = require('../context/span-chunk')
const SqlMetaData = require('./sql-meta-data')

class DataSender {
constructor(config, dataSender) {
Expand Down Expand Up @@ -42,6 +43,8 @@ class DataSender {
this.dataSender.sendSpan(data)
} else if (data instanceof SpanChunk) {
this.dataSender.sendSpanChunk(data)
} else if (data instanceof SqlMetaData) {
this.dataSender.sendSqlMetaInfo(data)
}
}

Expand Down
26 changes: 21 additions & 5 deletions lib/client/grpc-data-sender.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class GrpcDataSender {
this.metadataClient = new services.MetadataClient(collectorIp + ":" + collectorTcpPort, grpc.credentials.createInsecure(), { interceptors: [headerInterceptor] })
this.requestApiMetaData = new GrpcUnaryRPC('requestApiMetaData', this.metadataClient, this.metadataClient.requestApiMetaData, DEFAULT_METADATA_RETRY_DELAY_MILLIS, DEFAULT_METADATA_RETRY_MAX_COUNT)
this.requestStringMetaData = new GrpcUnaryRPC('requestStringMetaData', this.metadataClient, this.metadataClient.requestStringMetaData, DEFAULT_METADATA_RETRY_DELAY_MILLIS, DEFAULT_METADATA_RETRY_MAX_COUNT)
this.requestSqlMetaData = new GrpcUnaryRPC('requestSqlMetaData', this.metadataClient, this.metadataClient.requestSqlMetaData, DEFAULT_METADATA_RETRY_DELAY_MILLIS, DEFAULT_METADATA_RETRY_MAX_COUNT)
}

initializeSpanStream(collectorIp, collectorSpanPort, headerInterceptor, config) {
Expand Down Expand Up @@ -111,7 +112,7 @@ class GrpcDataSender {
sendAgentInfo(agentInfo, callback) {
const pAgentInfo = dataConvertor.convertAgentInfo(agentInfo)
if (log.isDebug()) {
log.debug(`sendAgentInfo pAgentInfo: ${JSON.stringify(pAgentInfo.toObject())}`)
log.debug(`sendAgentInfo pAgentInfo: ${pAgentInfo}`)
}
this.requestAgentInfo.request(pAgentInfo, (err, response) => {
if (callback) {
Expand Down Expand Up @@ -162,11 +163,26 @@ class GrpcDataSender {
})
}

sendSqlMetaInfo(sqlMetaData, callback) {
const pSqlMetaData = sqlMetaData.valueOfProtocolBuffer()
if (log.isDebug()) {
log.debug(`sendSqlMetaInfo sqlMetaData: ${JSON.stringify(pSqlMetaData.toObject())}`)
}
this.requestSqlMetaData.request(pSqlMetaData, (err, response) => {
if (err) {
log.error(err)
}
if (callback) {
callback(err, response)
}
})
}

sendSpan(span) {
try {
const pSpan = span.spanMessage
if (log.isDebug()) {
log.debug(`sendSpan pSpan: ${JSON.stringify(pSpan.toObject())}`)
log.debug(`sendSpan pSpan: ${pSpan}`)
}
this.spanStream.write(pSpan)
} catch (e) {
Expand All @@ -180,7 +196,7 @@ class GrpcDataSender {
try {
const pSpanChunk = spanChunk.spanMessage
if (log.isDebug()) {
log.debug(`sendSpanChunk pSpanChunk: ${JSON.stringify(pSpanChunk.toObject())}`)
log.debug(`sendSpanChunk pSpanChunk: ${pSpanChunk}`)
}
this.spanStream.write(pSpanChunk)
} catch (e) {
Expand All @@ -194,7 +210,7 @@ class GrpcDataSender {
try {
const pStatMessage = dataConvertor.convertStat(stat)
if (log.isDebug()) {
log.debug(`sendStats pStatMessage: ${JSON.stringify(stat)}`)
log.debug(`sendStats pStatMessage: ${stat}`)
}
this.statStream.write(pStatMessage)
} catch (e) {
Expand All @@ -215,7 +231,7 @@ class GrpcDataSender {
sendPing() {
const pPing = dataConvertor.convertPing()
if (log.isDebug()) {
log.debug(`sendPing pPing: ${JSON.stringify(pPing)}`)
log.debug(`sendPing pPing: ${JSON.stringify(pPing.toObject())}`)
}
this.pingStream.write(pPing)
}
Expand Down
23 changes: 23 additions & 0 deletions lib/client/sql-meta-data.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Pinpoint Node.js Agent
* Copyright 2023-present NAVER Corp.
* Apache License v2.0
*/

'use strict'
const spanMessages = require('../data/v1/Span_pb')
class SqlMetaData {
constructor(parsingResult) {
this.sqlId = parsingResult.getId()
this.sql = parsingResult.getSql()
}

valueOfProtocolBuffer() {
const pSqlMetaData = new spanMessages.PSqlMetaData()
pSqlMetaData.setSqlid(this.sqlId)
pSqlMetaData.setSql(this.sql)
return pSqlMetaData
}
}

module.exports = SqlMetaData
15 changes: 5 additions & 10 deletions lib/constant/annotation-key.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@
const AnnotationKey = require('../context/annotation-key')
const AnnotationKeyProperty = require('./annotation').AnnotationKeyProperty

const DefaultAnnotationKey = {
module.exports = {
API: new AnnotationKey(12, 'API'),
API_METADATA: new AnnotationKey(13, 'API-METADATA'),

SQL_ID: new AnnotationKey(20, "SQL-ID"),
SQL_BINDVALUE: new AnnotationKey(24, "SQL-BindValue", AnnotationKeyProperty.VIEW_IN_RECORD_SET),

HTTP_URL: new AnnotationKey(40, 'http.url'),
HTTP_PARAM: new AnnotationKey(41, 'http.param', AnnotationKeyProperty.VIEW_IN_RECORD_SET),
HTTP_STATUS_CODE: new AnnotationKey(46, 'http.status.code'),
Expand All @@ -29,12 +33,3 @@ const DefaultAnnotationKey = {
ARGS9: new AnnotationKey(-10, 'args[9]'),
ARGSN: new AnnotationKey(-11, 'args[N]'),
}

const EventAnnotationKey = {
MONGO_JSON_DATA: new AnnotationKey(150, "MONGO-JSON-Data")
}

module.exports = {
DefaultAnnotationKey,
EventAnnotationKey,
}
Loading

3 comments on commit ff001d3

@feelform
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage for this commit

50.93%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
lib
   agent.js75%64.29%75%77.78%29–32, 57–58, 86, 86, 86–90, 92, 96, 98–99
   config.js87.31%85%100%85.32%107, 118–121, 124–127, 130–133, 178–179, 197–199, 203, 206, 210–211, 217, 239, 249
   supports.js21.74%0%16.67%30.77%14, 14, 14–15, 18, 18, 18–19, 22, 25, 28, 31, 35
lib/client
   data-sender-factory.js100%100%100%100%
   data-sender.js59.38%50%42.86%69.70%25, 29, 29, 29–30, 44, 46, 46, 46–47, 52, 52, 52–53, 58, 58, 58–59, 64, 64, 64–65
   grpc-bidirectional-stream.js53.33%31.58%71.43%68.42%17, 17, 17, 17, 17, 17–18, 22, 22–23, 27, 27, 27–28, 32, 32, 32–33, 41
   grpc-client-side-stream.js73.13%57.14%87.50%83.87%22–23, 25–27, 38, 38, 38, 38, 38, 38–39, 43, 43, 43–44, 65
   grpc-data-sender.js65.55%45.31%81.48%72.88%114–115, 118, 127, 127, 127–128, 138–139, 145, 153–154, 160, 167–168, 168, 168–169, 171–172, 172, 172–173, 175, 175, 175–176, 184–185, 189, 189, 189, 189, 189–190, 198–199, 203, 203, 203, 203, 203–204, 212–213, 217, 217, 217, 217, 217–218, 224–225, 225, 225–226, 228, 232–233, 233, 233–234, 236, 82–83, 91–92
   grpc-stream.js95.18%88.89%100%97.83%37–38, 78, 96
   grpc-unary-rpc.js97.44%90.91%100%100%36
   pinpoint-client.js58.33%100%33.33%66.67%20, 23, 27
   sql-meta-data.js20%100%0%25%11–12, 16–19
lib/constant
   annotation-key.js100%100%100%100%
   annotation.js100%100%100%100%
   commaned-type.js100%100%100%100%
   default-predefined-method-descriptor-registry.js100%100%100%100%
   http-header.js100%100%100%100%
   method-type.js100%100%100%100%
   service-type.js100%100%100%100%
   valued-type.js100%100%100%100%
lib/context
   annotation-key-utils.js7.69%0%0%14.29%14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36
   annotation-key.js80%66.67%66.67%87.50%21, 39, 43
   annotation.js40%100%0%50%13–14
   api-meta-service.js91.30%62.50%100%96.97%27, 32, 42, 61
   async-id.js60%50%60%61.54%14–15, 31, 35–37
   async-trace.js90%75%83.33%93.33%44, 57–58
   buffered-storage.js93.88%76.92%100%100%23, 34, 63
   context-manager.js94.29%75%100%100%14, 27
   disable-async-trace.js25%100%0%50%13, 21
   disable-span-event-recorder.js30%0%18.75%50%36, 36, 36–38, 40, 42, 70
   disable-trace.js45.71%0%50%61.11%33, 33, 33–35, 40, 40, 40–41, 50, 50, 50, 50, 54
   express-method-descriptor-builder.js71.43%70%100%70%11–12, 16–18, 22
   id-generator.js100%100%100%100%
   koa-method-descriptor-builder.js71.43%50%100%75%11–12
   make-method-descriptor-builder.js91.15%86.36%100%93.22%16, 22, 25, 29, 40–41, 64–65, 97–98
   method-descriptor-builder.js82.38%85.53%75%82.35%110, 119, 128, 138–139, 146–147, 149, 149–150, 158–159, 206–207, 210–211, 29, 32, 46, 53–54, 73, 77, 81–82, 86–87, 96–97
   method-descriptor-builder2.js63.49%58.82%68.42%64.38%100–101, 106–107, 110–113, 117, 121–122, 125, 125–127, 139, 40, 44–45, 49–50, 54–55, 74, 78, 80, 80, 80–81, 84, 84, 84–85, 87, 91–94, 98–99
   method-descriptor.js95.74%100%92.86%96.30%43
   sequence-generator.js86.67%75%100%87.50%17–18
   sequence-generators.js100%100%100%100%
   service-type.js83.33%40%100%87.88%41, 43, 43, 48–49, 54–55
   span-chunk.js91.53%70%100%95%15–16, 58, 68–69
   span-event-recorder.js45.76%39.19%55%49.40%100, 100–101, 106–107, 111, 111, 111, 111, 111–112, 115–119, 122, 127, 134, 134, 134, 134, 134–136, 141, 148, 148, 148, 148, 148–149, 149, 149–150, 150, 150, 150, 150–151, 155, 155, 155, 155, 155–157, 163, 163, 163, 163, 163–164, 167–169, 173, 173, 173–174, 177, 177, 177–178, 181, 185–186, 190, 29, 33–34, 36–37, 39–40, 46, 52, 58, 65, 69, 79, 86–87, 90–91, 94–95
   span-event.js93.02%80%100%96.30%10–11, 36
   span-events.js95.56%87.50%100%96.67%22, 25
   span-recorder.js59.52%51.16%72.73%66.67%20, 26, 26, 26, 26, 26–27, 32–33, 36–37, 48, 54, 60, 66, 72, 72, 72, 72, 72–73, 73, 73–74, 78, 83, 83, 83, 83,

@feelform
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage for this commit

50.93%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
lib
   agent.js75%64.29%75%77.78%29–32, 57–58, 86, 86, 86–90, 92, 96, 98–99
   config.js87.31%85%100%85.32%107, 118–121, 124–127, 130–133, 178–179, 197–199, 203, 206, 210–211, 217, 239, 249
   supports.js21.74%0%16.67%30.77%14, 14, 14–15, 18, 18, 18–19, 22, 25, 28, 31, 35
lib/client
   data-sender-factory.js100%100%100%100%
   data-sender.js59.38%50%42.86%69.70%25, 29, 29, 29–30, 44, 46, 46, 46–47, 52, 52, 52–53, 58, 58, 58–59, 64, 64, 64–65
   grpc-bidirectional-stream.js53.33%31.58%71.43%68.42%17, 17, 17, 17, 17, 17–18, 22, 22–23, 27, 27, 27–28, 32, 32, 32–33, 41
   grpc-client-side-stream.js73.13%57.14%87.50%83.87%22–23, 25–27, 38, 38, 38, 38, 38, 38–39, 43, 43, 43–44, 65
   grpc-data-sender.js65.55%45.31%81.48%72.88%114–115, 118, 127, 127, 127–128, 138–139, 145, 153–154, 160, 167–168, 168, 168–169, 171–172, 172, 172–173, 175, 175, 175–176, 184–185, 189, 189, 189, 189, 189–190, 198–199, 203, 203, 203, 203, 203–204, 212–213, 217, 217, 217, 217, 217–218, 224–225, 225, 225–226, 228, 232–233, 233, 233–234, 236, 82–83, 91–92
   grpc-stream.js95.18%88.89%100%97.83%37–38, 78, 96
   grpc-unary-rpc.js97.44%90.91%100%100%36
   pinpoint-client.js58.33%100%33.33%66.67%20, 23, 27
   sql-meta-data.js20%100%0%25%11–12, 16–19
lib/constant
   annotation-key.js100%100%100%100%
   annotation.js100%100%100%100%
   commaned-type.js100%100%100%100%
   default-predefined-method-descriptor-registry.js100%100%100%100%
   http-header.js100%100%100%100%
   method-type.js100%100%100%100%
   service-type.js100%100%100%100%
   valued-type.js100%100%100%100%
lib/context
   annotation-key-utils.js7.69%0%0%14.29%14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36
   annotation-key.js80%66.67%66.67%87.50%21, 39, 43
   annotation.js40%100%0%50%13–14
   api-meta-service.js91.30%62.50%100%96.97%27, 32, 42, 61
   async-id.js60%50%60%61.54%14–15, 31, 35–37
   async-trace.js90%75%83.33%93.33%44, 57–58
   buffered-storage.js93.88%76.92%100%100%23, 34, 63
   context-manager.js94.29%75%100%100%14, 27
   disable-async-trace.js25%100%0%50%13, 21
   disable-span-event-recorder.js30%0%18.75%50%36, 36, 36–38, 40, 42, 70
   disable-trace.js45.71%0%50%61.11%33, 33, 33–35, 40, 40, 40–41, 50, 50, 50, 50, 54
   express-method-descriptor-builder.js71.43%70%100%70%11–12, 16–18, 22
   id-generator.js100%100%100%100%
   koa-method-descriptor-builder.js71.43%50%100%75%11–12
   make-method-descriptor-builder.js91.15%86.36%100%93.22%16, 22, 25, 29, 40–41, 64–65, 97–98
   method-descriptor-builder.js82.38%85.53%75%82.35%110, 119, 128, 138–139, 146–147, 149, 149–150, 158–159, 206–207, 210–211, 29, 32, 46, 53–54, 73, 77, 81–82, 86–87, 96–97
   method-descriptor-builder2.js63.49%58.82%68.42%64.38%100–101, 106–107, 110–113, 117, 121–122, 125, 125–127, 139, 40, 44–45, 49–50, 54–55, 74, 78, 80, 80, 80–81, 84, 84, 84–85, 87, 91–94, 98–99
   method-descriptor.js95.74%100%92.86%96.30%43
   sequence-generator.js86.67%75%100%87.50%17–18
   sequence-generators.js100%100%100%100%
   service-type.js83.33%40%100%87.88%41, 43, 43, 48–49, 54–55
   span-chunk.js91.53%70%100%95%15–16, 58, 68–69
   span-event-recorder.js45.76%39.19%55%49.40%100, 100–101, 106–107, 111, 111, 111, 111, 111–112, 115–119, 122, 127, 134, 134, 134, 134, 134–136, 141, 148, 148, 148, 148, 148–149, 149, 149–150, 150, 150, 150, 150–151, 155, 155, 155, 155, 155–157, 163, 163, 163, 163, 163–164, 167–169, 173, 173, 173–174, 177, 177, 177–178, 181, 185–186, 190, 29, 33–34, 36–37, 39–40, 46, 52, 58, 65, 69, 79, 86–87, 90–91, 94–95
   span-event.js93.02%80%100%96.30%10–11, 36
   span-events.js95.56%87.50%100%96.67%22, 25
   span-recorder.js59.52%51.16%72.73%66.67%20, 26, 26, 26, 26, 26–27, 32–33, 36–37, 48, 54, 60, 66, 72, 72, 72, 72, 72–73, 73, 73–74, 78, 83, 83, 83, 83,

@feelform
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage for this commit

50.93%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
lib
   agent.js75%64.29%75%77.78%29–32, 57–58, 86, 86, 86–90, 92, 96, 98–99
   config.js87.31%85%100%85.32%107, 118–121, 124–127, 130–133, 178–179, 197–199, 203, 206, 210–211, 217, 239, 249
   supports.js21.74%0%16.67%30.77%14, 14, 14–15, 18, 18, 18–19, 22, 25, 28, 31, 35
lib/client
   data-sender-factory.js100%100%100%100%
   data-sender.js59.38%50%42.86%69.70%25, 29, 29, 29–30, 44, 46, 46, 46–47, 52, 52, 52–53, 58, 58, 58–59, 64, 64, 64–65
   grpc-bidirectional-stream.js53.33%31.58%71.43%68.42%17, 17, 17, 17, 17, 17–18, 22, 22–23, 27, 27, 27–28, 32, 32, 32–33, 41
   grpc-client-side-stream.js73.13%57.14%87.50%83.87%22–23, 25–27, 38, 38, 38, 38, 38, 38–39, 43, 43, 43–44, 65
   grpc-data-sender.js65.55%45.31%81.48%72.88%114–115, 118, 127, 127, 127–128, 138–139, 145, 153–154, 160, 167–168, 168, 168–169, 171–172, 172, 172–173, 175, 175, 175–176, 184–185, 189, 189, 189, 189, 189–190, 198–199, 203, 203, 203, 203, 203–204, 212–213, 217, 217, 217, 217, 217–218, 224–225, 225, 225–226, 228, 232–233, 233, 233–234, 236, 82–83, 91–92
   grpc-stream.js95.18%88.89%100%97.83%37–38, 78, 96
   grpc-unary-rpc.js97.44%90.91%100%100%36
   pinpoint-client.js58.33%100%33.33%66.67%20, 23, 27
   sql-meta-data.js20%100%0%25%11–12, 16–19
lib/constant
   annotation-key.js100%100%100%100%
   annotation.js100%100%100%100%
   commaned-type.js100%100%100%100%
   default-predefined-method-descriptor-registry.js100%100%100%100%
   http-header.js100%100%100%100%
   method-type.js100%100%100%100%
   service-type.js100%100%100%100%
   valued-type.js100%100%100%100%
lib/context
   annotation-key-utils.js7.69%0%0%14.29%14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36
   annotation-key.js80%66.67%66.67%87.50%21, 39, 43
   annotation.js40%100%0%50%13–14
   api-meta-service.js91.30%62.50%100%96.97%27, 32, 42, 61
   async-id.js60%50%60%61.54%14–15, 31, 35–37
   async-trace.js90%75%83.33%93.33%44, 57–58
   buffered-storage.js93.88%76.92%100%100%23, 34, 63
   context-manager.js94.29%75%100%100%14, 27
   disable-async-trace.js25%100%0%50%13, 21
   disable-span-event-recorder.js30%0%18.75%50%36, 36, 36–38, 40, 42, 70
   disable-trace.js45.71%0%50%61.11%33, 33, 33–35, 40, 40, 40–41, 50, 50, 50, 50, 54
   express-method-descriptor-builder.js71.43%70%100%70%11–12, 16–18, 22
   id-generator.js100%100%100%100%
   koa-method-descriptor-builder.js71.43%50%100%75%11–12
   make-method-descriptor-builder.js91.15%86.36%100%93.22%16, 22, 25, 29, 40–41, 64–65, 97–98
   method-descriptor-builder.js82.38%85.53%75%82.35%110, 119, 128, 138–139, 146–147, 149, 149–150, 158–159, 206–207, 210–211, 29, 32, 46, 53–54, 73, 77, 81–82, 86–87, 96–97
   method-descriptor-builder2.js63.49%58.82%68.42%64.38%100–101, 106–107, 110–113, 117, 121–122, 125, 125–127, 139, 40, 44–45, 49–50, 54–55, 74, 78, 80, 80, 80–81, 84, 84, 84–85, 87, 91–94, 98–99
   method-descriptor.js95.74%100%92.86%96.30%43
   sequence-generator.js86.67%75%100%87.50%17–18
   sequence-generators.js100%100%100%100%
   service-type.js83.33%40%100%87.88%41, 43, 43, 48–49, 54–55
   span-chunk.js91.53%70%100%95%15–16, 58, 68–69
   span-event-recorder.js45.76%39.19%55%49.40%100, 100–101, 106–107, 111, 111, 111, 111, 111–112, 115–119, 122, 127, 134, 134, 134, 134, 134–136, 141, 148, 148, 148, 148, 148–149, 149, 149–150, 150, 150, 150, 150–151, 155, 155, 155, 155, 155–157, 163, 163, 163, 163, 163–164, 167–169, 173, 173, 173–174, 177, 177, 177–178, 181, 185–186, 190, 29, 33–34, 36–37, 39–40, 46, 52, 58, 65, 69, 79, 86–87, 90–91, 94–95
   span-event.js93.02%80%100%96.30%10–11, 36
   span-events.js95.56%87.50%100%96.67%22, 25
   span-recorder.js59.52%51.16%72.73%66.67%20, 26, 26, 26, 26, 26–27, 32–33, 36–37, 48, 54, 60, 66, 72, 72, 72, 72, 72–73, 73, 73–74, 78, 83, 83, 83, 83,

Please sign in to comment.