Skip to content

Commit

Permalink
fix bug in sqlalchemyPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
eeliu committed Nov 9, 2023
1 parent 9642191 commit 498e022
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,6 @@ USER root
COPY go1.18.10.linux-amd64.tar.gz /home/pinpoint/go1.18.10.linux-amd64.tar.gz
RUN rm -rf /usr/local/go && cd /home/pinpoint/ && tar -C /usr/local -xzf go1.18.10.linux-amd64.tar.gz
ENV PATH=$PATH:/usr/local/go/bin
ENV PATH=$PATH:$GO_PATH/bin
ENV
ENV PATH=$PATH:/home/pinpoint/go/bin
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 && go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
3 changes: 1 addition & 2 deletions collector-agent/agent/AgentRouter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestGetAgentInfo(t *testing.T) {
}

func TestTspan(t *testing.T) {
msg := `{"E":1,"FT":1500,":FT":1500,"ptype":1500,"pname":"abc_d","psid":"23563","NP":"t=1617083759.535 D=0.000","S":1617083759798,"appid":"app-2",":appid":"app-2",
msg := `{"E":1,"FT":1500,":FT":1500,"ptype":"1500","pname":"abc_d","psid":"23563","NP":"t=1617083759.535 D=0.000","S":1617083759798,"appid":"app-2",":appid":"app-2",
":appname":"APP-2","appname":"APP-2","calls":[{"E":1,"calls":[{"E":1,"S":0,"clues":["-1:input parameters","14:return value"],"name":"abc"}],"S":0,"clues":["-1:input parameters","14:return value"],"name":"app\\AppDate::abc","SQL":"select* from abc"}],"client":"10.34.135.145","clues":["46:200"],"name":"PHP Request: fpm-fcgi","server":"10.34.130.152:8000","sid":"726125302","stp":"1500","tid":"app-2^1617083747^5506","uri":"/index.php?type=get_date","Ah":"123.35.36.3/host","EXP":"exp","ERR":{"msg":"error_msg","file":"file.cc","line":123}}`
var tspan TSpan

Expand Down Expand Up @@ -79,5 +79,4 @@ func TestTspan(t *testing.T) {

}

t.Log(tspan)
}
3 changes: 1 addition & 2 deletions plugins/PY/pinpointPy/Fastapi/_sqlalchemy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@

from pinpointPy.Interceptor import intercept_once, Interceptor
from pinpointPy import logger
from .sqlalchemyPlugin import CreateEnginePlugin


@intercept_once
def monkey_patch():
try:
import sqlalchemy

from .sqlalchemyPlugin import CreateEnginePlugin
Interceptors = [
Interceptor(sqlalchemy, 'create_engine', CreateEnginePlugin)
]
Expand Down

0 comments on commit 498e022

Please sign in to comment.