forked from pinpoint-apm/pinpoint-node-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pinpoint-apm#125] mysql module support
* 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
Showing
118 changed files
with
7,023 additions
and
2,543 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}`); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
|
||
server.port = 7010 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
ff001d3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage for this commit
Coverage Report
ff001d3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage for this commit
Coverage Report
ff001d3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage for this commit
Coverage Report