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
  • Loading branch information
feelform committed Sep 12, 2023
1 parent ddac37c commit 4276f24
Show file tree
Hide file tree
Showing 200 changed files with 24,783 additions and 2,892 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ name: CI
# Controls when the action will run.
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:
# This workflow contains a single job called "build"
Expand All @@ -14,14 +17,13 @@ jobs:
strategy:
matrix:
node_version:
- 12
- 14
- 10.10.0
- 16
- 18

name: Node ${{ matrix.node_version }} on ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: setup node environment
uses: actions/setup-node@v2
with:
Expand All @@ -33,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 }}
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ packages/**/.npmrc

.vscode

package-lock.json

yarn.lock

.node-version
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "grpc/grpc-idl"]
path = grpc/grpc-idl
url = https://github.com/feelform/pinpoint-grpc-idl.git
2 changes: 1 addition & 1 deletion .nycrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"exclude": ["lib/data/grpc/**/*", "test/**/*"]
"exclude": ["lib/data/v1/**/*", "test/**/*"]
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
# Changelog
All notable changes to Pinpoint Node.js agent will be documented in this file.

## [0.9.0-next.1] - 2021-06-10
### Added
- #86 Express with method name
- #101 middleware code level visibility
<img width="1241" alt="Screen Shot 2021-12-13 at 11 15 20 PM" src="https://user-images.githubusercontent.com/616895/145830104-07774978-f56b-4090-b6e9-eeff0d880945.png">

>>>>>>> 7d1ec7d (#87 Express with method name)
## [0.9.0-next.0] - 2021-05-27
### Added
- #87 HTTP param
>>>>>>> 685d7b7 (#87 v0.9.0-next.0)
## [0.8.3] - 2021-11-19
### Fixed
- #93 Fix Agent ID length validator
- HTTP param

## [0.8.2] - 2021-05-10
### Fixed
Expand Down
10 changes: 10 additions & 0 deletions demo/express-ts/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
PINPOINT_COLLECTOR_IP=localhost
PINPOINT_CONTAINER=true
PINPOINT_APPLICATION_NAME=express-node-sample-name
PINPOINT_AGENT_ID=express-node-sample-id
PINPOINT_SAMPLING_RATE=1
PINPOINT_LOG_LEVEL=WARN
_PINPOINT_TRACE_EXCLUSION_URL_PATTERN=/api
_PINPOINT_TRACE_EXCLUSION_URL_CACHE_SIZE=3
_GRPC_VERBOSITY=DEBUG
_GRPC_TRACE=call_stream
8 changes: 8 additions & 0 deletions demo/express-ts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package-lock.json
.vscode
.node-version

# dependencies
node_modules

*.log
63 changes: 63 additions & 0 deletions demo/express-ts/build.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/**
* Remove old files, copy front-end ones.
*/

import fs from 'fs-extra';
import Logger from 'jet-logger';
import childProcess from 'child_process';

// Setup logger
const logger = new Logger();
logger.timestamp = false;




(async () => {
try {
// Remove current build
await remove('./dist/');
// Copy front-end files
await copy('./src/public', './dist/public');
await copy('./src/views', './dist/views');
// Copy production env file
await copy('./src/pre-start/env/production.env', './dist/pre-start/env/production.env');
// Copy back-end files
await exec('tsc --build tsconfig.prod.json', './')
} catch (err) {
logger.err(err);
}
})();


function remove(loc: string): Promise<void> {
return new Promise((res, rej) => {
return fs.remove(loc, (err) => {
return (!!err ? rej(err) : res());
});
});
}


function copy(src: string, dest: string): Promise<void> {
return new Promise((res, rej) => {
return fs.copy(src, dest, (err) => {
return (!!err ? rej(err) : res());
});
});
}


function exec(cmd: string, loc: string): Promise<void> {
return new Promise((res, rej) => {
return childProcess.exec(cmd, {cwd: loc}, (err, stdout, stderr) => {
if (!!stdout) {
logger.info(stdout);
}
if (!!stderr) {
logger.warn(stderr);
}
return (!!err ? rej(err) : res());
});
});
}
98 changes: 98 additions & 0 deletions demo/express-ts/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"name": "express-ts",
"version": "0.0.0",
"scripts": {
"build": "./node_modules/.bin/ts-node build.ts",
"lint": "eslint . --ext .ts",
"start": "node -r module-alias/register ./dist --env=production",
"start:dev": "nodemon",
"test": "nodemon --config ./spec/nodemon.json",
"test:no-reloading": "./node_modules/.bin/ts-node -r tsconfig-paths/register ./spec"
},
"nodemonConfig": {
"watch": [
"src"
],
"ext": "ts, html",
"ignore": [
"src/public"
],
"exec": "./node_modules/.bin/ts-node -r tsconfig-paths/register ./src"
},
"_moduleAliases": {
"@daos": "dist/daos",
"@entities": "dist/entities",
"@shared": "dist/shared",
"@server": "dist/Server"
},
"eslintConfig": {
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
"max-len": [
"error",
{
"code": 100
}
],
"no-console": 1,
"no-extra-boolean-cast": 0,
"@typescript-eslint/restrict-plus-operands": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-floating-promises": 0,
"@typescript-eslint/no-unsafe-member-access": 0,
"@typescript-eslint/no-unsafe-assignment": 0
}
},
"eslintIgnore": [
"src/public/",
"build.ts"
],
"dependencies": {
"command-line-args": "^5.2.0",
"cookie-parser": "^1.4.6",
"dotenv": "^10.0.0",
"express": "^4.17.2",
"express-async-errors": "^3.1.1",
"helmet": "^4.6.0",
"http-status-codes": "^2.1.4",
"jet-logger": "^1.0.6",
"jsonfile": "^6.1.0",
"module-alias": "^2.2.2",
"morgan": "^1.10.0"
},
"devDependencies": {
"@types/command-line-args": "^5.2.0",
"@types/cookie-parser": "^1.4.2",
"@types/express": "^4.17.13",
"@types/find": "^0.2.1",
"@types/fs-extra": "^9.0.13",
"@types/jasmine": "^3.10.2",
"@types/jsonfile": "^6.0.1",
"@types/morgan": "^1.9.3",
"@types/node": "^17.0.4",
"@types/supertest": "^2.0.11",
"@typescript-eslint/eslint-plugin": "^5.8.0",
"@typescript-eslint/parser": "^5.8.0",
"eslint": "^8.5.0",
"find": "^0.3.0",
"fs-extra": "^10.0.0",
"jasmine": "^3.10.0",
"nodemon": "^2.0.15",
"supertest": "^6.1.6",
"ts-node": "^10.4.0",
"tsconfig-paths": "^3.12.0",
"typescript": "^4.5.4"
}
}
55 changes: 55 additions & 0 deletions demo/express-ts/spec/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import './loadEnv';
import find from 'find';
import Jasmine from 'jasmine';
import commandLineArgs from 'command-line-args';
import logger from '@shared/Logger';



// Setup command line options
const options = commandLineArgs([
{
name: 'testFile',
alias: 'f',
type: String,
},
]);


// Init Jasmine
const jasmine = new Jasmine(null);

// Set location of test files
jasmine.loadConfig({
random: true,
spec_dir: 'spec',
spec_files: [
'./tests/**/*.spec.ts',
],
stopSpecOnExpectationFailure: false,
});

// On complete callback function
jasmine.onComplete((passed: boolean) => {
if (passed) {
logger.info('All tests have passed :)');
} else {
logger.err('At least one test has failed :(');
}
jasmine.exitCodeCompletion(passed);
});

// Run all or a single unit-test
if (options.testFile) {
const testFile = options.testFile as string;
find.file(testFile + '.spec.ts', './spec', (files: string[]) => {
if (files.length === 1) {
jasmine.specFiles = [files[0]];
jasmine.execute();
} else {
logger.err('Test file not found!');
}
});
} else {
jasmine.execute();
}
10 changes: 10 additions & 0 deletions demo/express-ts/spec/loadEnv.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Set the env file, must be first
import dotenv from 'dotenv';

const result2 = dotenv.config({
path: `./src/pre-start/env/test.env`,
});

if (result2.error) {
throw result2.error;
}
6 changes: 6 additions & 0 deletions demo/express-ts/spec/nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"watch": ["spec"],
"ext": "spec.ts",
"ignore": ["spec/support"],
"exec": "./node_modules/.bin/ts-node -r tsconfig-paths/register ./spec"
}
11 changes: 11 additions & 0 deletions demo/express-ts/spec/support/jasmine.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"spec_dir": "spec",
"spec_files": [
"**/*[sS]pec.ts"
],
"helpers": [
"helpers/**/*.js"
],
"stopSpecOnExpectationFailure": false,
"random": true
}
14 changes: 14 additions & 0 deletions demo/express-ts/spec/support/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Response } from 'supertest';
import { IUser } from '@entities/User';


export interface IResponse extends Response {
body: {
users: IUser[];
error: string;
};
}

export interface IReqBody {
user?: IUser;
}
Loading

3 comments on commit 4276f24

@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

70.34%

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

70.34%

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

70.34%

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.