diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index d17c1cce2..53522ef45 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -28,12 +28,12 @@ RUN groupadd --gid $USER_GID $USERNAME \ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -RUN apt update && apt install -y gcc g++ gdb pkg-config libxml2-dev libsqlite3-dev libcurl4-openssl-dev zlib1g-dev make cmake wget autoconf git clangd python3-pip clang-format +RUN apt update && apt install -y gcc g++ gdb pkg-config libxml2-dev libsqlite3-dev libcurl4-openssl-dev zlib1g-dev make cmake wget autoconf git clangd python3-pip clang-format protobuf-compiler vim ## enable php-7.4 ENV PHP_VESION=php-7.4.33 RUN cd ~ && wget https://www.php.net/distributions/${PHP_VESION}.tar.gz && tar xvf ${PHP_VESION}.tar.gz && cd ${PHP_VESION} && ./configure --prefix=/opt/${PHP_VESION} --enable-fpm --enable-opcache --enable-debug && make -j && make install ENV PATH="$PATH:/opt/php/bin/:/opt/php/sbin/" -COPY php.ini /opt/ +COPY php.ini /opt/$PHP_VESION/lib ### Build php module ### curl @@ -57,4 +57,13 @@ COPY php.ini /opt/ # RUN cd ~ && wget https://www.php.net/distributions/${PHP_VESION}.tar.gz && tar xvf ${PHP_VESION}.tar.gz && cd ${PHP_VESION} && ./configure --prefix=/opt/${PHP_VESION} --enable-fpm --enable-opcache --enable-debug && make -j && make install # ENV PHP_VESION=php-8.2.10 -# RUN cd ~ && wget https://www.php.net/distributions/${PHP_VESION}.tar.gz && tar xvf ${PHP_VESION}.tar.gz && cd ${PHP_VESION} && ./configure --prefix=/opt/${PHP_VESION} --enable-fpm --enable-opcache --enable-debug && make -j && make install \ No newline at end of file +# RUN cd ~ && wget https://www.php.net/distributions/${PHP_VESION}.tar.gz && tar xvf ${PHP_VESION}.tar.gz && cd ${PHP_VESION} && ./configure --prefix=/opt/${PHP_VESION} --enable-fpm --enable-opcache --enable-debug && make -j && make install + + +# install golang 1.18 + +RUN wget https://go.dev/dl/go1.18.10.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.10.linux-amd64.tar.gz +ENV PATH=$PATH:/usr/local/go/bin +ENV GO_PATH=~/go +ENV PATH=$PATH:/$GO_PATH/bin +RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@latest && go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index db5b1068c..ffbbe52db 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -35,13 +35,20 @@ "containerUser": "pinpoint", "postCreateCommand": ".devcontainer/setup.sh", "extensions": [ - "zxh404.vscode-proto3", - "llvm-vs-code-extensions.vscode-clangd", - "vadimcn.vscode-lldb", - "webfreak.debug", - "ms-python.python", - "xaver.clang-format", - "zxh404.vscode-proto3", - "Gruntfuggly.todo-tree" - ] + "zxh404.vscode-proto3", + "llvm-vs-code-extensions.vscode-clangd", + "vadimcn.vscode-lldb", + "webfreak.debug", + "ms-python.python", + "xaver.clang-format", + "zxh404.vscode-proto3", + "Gruntfuggly.todo-tree", + "msyrus.go-doc", + "golang.go", + "bierner.github-markdown-preview", + "bierner.markdown-emoji", + "ms-vscode.cmake-tools", + "matepek.vscode-catch2-test-adapter", + "adam-bender.commit-message-editor" + ] } \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 37902ca60..bfe73f1fc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -53,27 +53,28 @@ jobs: with: name: valgrind-out path: common/build/valgrind-out.txt - PHP5: - runs-on: ubuntu-latest - strategy: - matrix: - php-versions: ["5.6", "5.4", "5.5"] - steps: - - uses: actions/checkout@v2 - - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - - run: | - phpize - ./configure - make - make test TESTS=src/PHP/tests5/ + # PHP5: + # runs-on: ubuntu-latest + # strategy: + # matrix: + # php-versions: ["5.6", "5.4", "5.5"] + # steps: + # - uses: actions/checkout@v2 + # - uses: shivammathur/setup-php@v2 + # with: + # php-version: ${{ matrix.php-versions }} + # - run: | + # phpize + # ./configure + # make + # make test TESTS=src/PHP/tests5/ PHP7: runs-on: ubuntu-latest strategy: matrix: - php-versions: ["7.0", "7.1", "7.2", "7.3", "7.4", "8.0"] + # php-versions: ["7.0", "7.1", "7.2", "7.3", "7.4", "8.0"] + php-versions: ["7.0"] steps: - uses: actions/checkout@v2 # - name: set mysql @@ -101,23 +102,7 @@ jobs: # composer install # cp tests/think . # php think unit -v - - PHP8: - runs-on: ubuntu-latest - strategy: - matrix: - php-versions: ["8.1"] - steps: - - uses: actions/checkout@v2 - - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - - run: | - phpize - ./configure - make - make test TESTS=src/PHP/tests/ - + Python: strategy: matrix: @@ -142,7 +127,7 @@ jobs: Collector-agent: strategy: matrix: - go-version: [1.16.x] + go-version: [1.18.x] os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: @@ -152,8 +137,16 @@ jobs: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 + with: + submodules: 'true' + + - name: Setup protoc + uses: arduino/setup-protoc@v2.1.0 + - run: | - cd collector-agent - go mod download - go build - go test ./... -v + go install google.golang.org/protobuf/cmd/protoc-gen-go@latest && go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest + # cd collector-agent + # go mod download + # go build + # go test ./... -v + cd collector-agent && make && go test ./... -v \ No newline at end of file diff --git a/.gitignore b/.gitignore index 411a31c83..6917d67f1 100644 --- a/.gitignore +++ b/.gitignore @@ -73,4 +73,5 @@ common/include/common.h .cache compile_commands.json wheelhouse/ -.clangd \ No newline at end of file +.clangd +collector-agent/pinpoint-grpc-idl/ diff --git a/.gitmodules b/.gitmodules index e69de29bb..67b33228f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "collector-agent/pinpoint-grpc-idl"] + path = collector-agent/pinpoint-grpc-idl + url = https://github.com/pinpoint-apm/pinpoint-grpc-idl.git diff --git a/collector-agent/.gitignore b/collector-agent/.gitignore index 3998ec69b..ac8da4f4a 100644 --- a/collector-agent/.gitignore +++ b/collector-agent/.gitignore @@ -4,3 +4,5 @@ *.exe *.log CollectorAgent +collector-agent +pinpoint-grpc-idl \ No newline at end of file diff --git a/collector-agent/Dockerfile b/collector-agent/Dockerfile index 3a2388951..8116b9bdd 100644 --- a/collector-agent/Dockerfile +++ b/collector-agent/Dockerfile @@ -1,8 +1,8 @@ -FROM golang:1.16.5-alpine3.13 as builder +FROM golang:1.18-alpine3.17 as builder WORKDIR /apps COPY collector-agent /apps/collector-agent -RUN cd /apps/collector-agent && go build -o CollectorAgent server.go +RUN cd /apps/collector-agent && go mod tidy && go build -o CollectorAgent -FROM alpine:3.14 +FROM alpine:3.17 COPY --from=builder /apps/collector-agent/CollectorAgent /usr/local/bin ENTRYPOINT [ "CollectorAgent" ] \ No newline at end of file diff --git a/collector-agent/agent/AgentRouter.go b/collector-agent/agent/AgentRouter.go index c261928d9..16cd93dc2 100644 --- a/collector-agent/agent/AgentRouter.go +++ b/collector-agent/agent/AgentRouter.go @@ -32,6 +32,114 @@ type AgentRouter struct { rwMutex sync.RWMutex } +type TSpanEvent struct { + Name string `json:"name"` + ExceptionInfo string `json:"EXP,omitempty"` + DestinationId string `json:"dst,omitempty"` + NextSpanId int64 `json:"nsid,string,omitempty"` + EndPoint string `json:"server,omitempty"` + StartElapsed int32 `json:"S"` + EndElapsed int32 `json:"E"` + StartElapsedV2 int32 `json:":S"` + EndElapsedV2 int32 `json:":E"` + ServiceType int32 `json:"stp,string"` + Clues []string `json:"clues,omitempty"` + Calls []TSpanEvent `json:"calls,omitempty"` + SqlMeta string `json:"SQL,omitempty"` +} + +func (spanEv *TSpanEvent) GetEndElapsed() int32 { + if spanEv.EndElapsedV2 != 0 { + return spanEv.EndElapsedV2 + } else { + return spanEv.EndElapsed + } +} + +func (spanEv *TSpanEvent) GetStartElapsed() int32 { + if spanEv.StartElapsedV2 != 0 { + return spanEv.StartElapsedV2 + } else { + return spanEv.StartElapsed + } +} + +type TErrorInfo struct { + Msg string `json:"msg"` + File string `json:"file"` + Line int `json:"line"` +} + +type TSpan struct { + AppServerType int32 `json:"FT"` + AppServerTypeV2 int32 `json:":FT"` + ParentAppServerType int `json:"ptype"` + ParentSpanId int64 `json:"psid,string"` + ParentApplicationName string `json:"pname"` + StartTime int64 `json:"S"` + StartTimeV2 int64 `json:":S"` + ElapsedTime int32 `json:"E"` + ElapsedTimeV2 int32 `json:":E"` + AppId string `json:"appid"` + AppIdV2 string `json:":appid"` + AppName string `json:"appname"` + AppNameV2 string `json:":appname"` + Calls []TSpanEvent `json:"calls"` + Clues []string `json:"clues,omitempty"` + SpanName string `json:"name"` + SpanId int64 `json:"sid,string"` + ServerType int32 `json:"stp,string"` + TransactionId string `json:"tid"` + Uri string `json:"uri"` + EndPoint string `json:"server"` + RemoteAddr string `json:"client"` + AcceptorHost string `json:"Ah"` + ExceptionInfo string `json:"EXP,omitempty"` + ErrorInfo *TErrorInfo `json:"ERR,omitempty"` + NginxHeader string `json:"NP,omitempty"` + ApacheHeader string `json:"AP,omitempty"` +} + +func (span *TSpan) GetAppServerType() int32 { + if span.AppServerTypeV2 != 0 { + return span.AppServerTypeV2 + } else { + return span.AppServerType + } +} + +func (span *TSpan) GetElapsedTime() int32 { + if span.ElapsedTimeV2 != 0 { + return span.ElapsedTimeV2 + } else { + return span.ElapsedTime + } +} + +func (span *TSpan) GetStartTime() int64 { + if span.StartTimeV2 != 0 { + return span.StartTimeV2 + } else { + return span.StartTime + } +} + +func (span *TSpan) GetAppid() string { + if len(span.AppIdV2) > 0 { + return span.AppIdV2 + } else { + return span.AppId + } +} + +func (span *TSpan) GetAppname() string { + if len(span.AppNameV2) > 0 { + return span.AppNameV2 + } else { + return span.AppName + } +} + func (manager *AgentRouter) Clean() { config := common.GetConfig() ctime := time.Now().Unix() @@ -50,7 +158,8 @@ func (manager *AgentRouter) Clean() { manager.rwMutex.RUnlock() } -func (manager *AgentRouter) _createAgent(id, name string, agentType int32, startTime string) *GrpcAgent { +//todo rename createAgent +func (manager *AgentRouter) createAgent(id, name string, agentType int32, startTime string) *GrpcAgent { agent := GrpcAgent{PingId: manager.PingId, AgentOnLine: false} manager.PingId += 1 agent.Init(id, name, agentType, startTime) @@ -60,66 +169,67 @@ func (manager *AgentRouter) _createAgent(id, name string, agentType int32, start return &agent } -func GetAgentInfo(span map[string]interface{}) (id, name string, ft int32, startTime string, err error) { - if value, OK := span["appid"].(string); !OK { +func GetAgentInfo(span *TSpan) (appid, appname string, appServerType int32, startTime string, err error) { + + // new feat: get current startTime + startTime = strconv.FormatInt(common.GetConfig().StartTime, 10) + "000" + holder := strings.Split(span.TransactionId, "^") + if len(holder) < 3 { + log.Warn("tid in wrong format") + } else if len(holder[1]) == 10 { // seconds format + startTime = holder[1] + "000" + } else { // miliseconds format + startTime = holder[1] + } + + appid = span.GetAppid() + if len(appid) == 0 { return "", "", 0, "", errors.New("no appid") - } else { - id = value } - if value, OK := span["appname"].(string); !OK { + appname = span.GetAppname() + + if len(appname) == 0 { return "", "", 0, "", errors.New("no appname") - } else { - name = value } - if value, OK := span["FT"].(float64); !OK { - return "", "", 0, "", errors.New("no FT") - } else { - ft = int32(value) - } + appServerType = span.GetAppServerType() - // new feat: get current startTime - startTime = strconv.FormatInt(common.GetConfig().StartTime, 10) + "000" - if value, OK := span["tid"].(string); OK { - holder := strings.Split(value, "^") - if len(holder) < 3 { - log.Warn("tid in wrong format") - }else if len(holder[1]) == 10 { // seconds format - startTime = holder[1] + "000" - }else { // miliseconds format - startTime = holder[1] - } + if appServerType == 0 { + return "", "", 0, "", errors.New("no AppServerType(FT)") } - return id, name, ft, startTime, nil + return appid, appname, appServerType, startTime, nil } func (manager *AgentRouter) DispatchPacket(packet *RawPacket) error { - var span map[string]interface{} - if err := json.Unmarshal(packet.RawData, &span); err != nil { - log.Warnf("Catches unjson-serialized data %s", packet.RawData) + //note: set default var of TSpan + span := &TSpan{ + // ParentSpanId: -1, + } + + if err := json.Unmarshal(packet.RawData, span); err != nil { + log.Warnf("json.Unmarshal err:%v", err) goto PACKET_INVALIED } - if id, name, ft, startTime, err := GetAgentInfo(span); err == nil { + if appid, appname, serverType, startTime, err := GetAgentInfo(span); err == nil { manager.rwMutex.RLock() log.Debug("Read-lock is holding") - agent, OK := manager.AgentMap[id] + agent, OK := manager.AgentMap[appid] if !OK { // create a new agent manager.rwMutex.RUnlock() - log.Infof("agent:%s not find, create a new agent.", id) + log.Infof("agent:%s not find, create a new agent.", appid) log.Debug("Try to get write-lock") manager.rwMutex.Lock() log.Debug("Write-lock is holding") - if _t, OK := manager.AgentMap[id]; OK { + if _t, OK := manager.AgentMap[appid]; OK { agent = _t } else { - agent = manager._createAgent(id, name, ft, startTime) + agent = manager.createAgent(appid, appname, serverType, startTime) } - manager.AgentMap[id] = agent - + manager.AgentMap[appid] = agent manager.rwMutex.Unlock() log.Debug("Write-lock is release") } else { @@ -127,7 +237,7 @@ func (manager *AgentRouter) DispatchPacket(packet *RawPacket) error { log.Debug("Read-lock is release") } - agent.CheckValid(name, ft) // CA just checking the name and ft + agent.CheckValid(appname, serverType) // CA just checking the name and ft agent.SendSpan(span) return nil @@ -137,5 +247,5 @@ func (manager *AgentRouter) DispatchPacket(packet *RawPacket) error { } PACKET_INVALIED: - return errors.New(fmt.Sprintf("input packet invalid %s", packet.RawData)) + return fmt.Errorf("input packet invalid %s", packet.RawData) } diff --git a/collector-agent/agent/AgentRouter_test.go b/collector-agent/agent/AgentRouter_test.go index 4f34c1ae1..2256f23f0 100644 --- a/collector-agent/agent/AgentRouter_test.go +++ b/collector-agent/agent/AgentRouter_test.go @@ -1,32 +1,83 @@ package agent -import "testing" +import ( + "encoding/json" + "testing" +) -func BenchmarkGetAgentInfo(b *testing.B) { - spanMap := map[string]interface{}{ - "appid": "sfdaefe", - "appname": "sfdaefe", - "FT": 23412, - "tid": "234123424^41234^2333", +func TestGetAgentInfo(t *testing.T) { + // spanMap := map[string]interface{}{ + // "appid": "sfdaefe", + // "appname": "sfdaefe", + // "FT": float64(23412), + // "tid": "234123424^41234^2333", + // } + + spanMap := &TSpan{ + AppId: "sfdaefe", + AppName: "sfdaefe", + AppServerTypeV2: 23412, + + TransactionId: "234123424^41234^2333", } - for i := 0; i < b.N; i++ { - GetAgentInfo(spanMap) + id, name, ft, startTime, err := GetAgentInfo(spanMap) + + if id != "sfdaefe" && name != "sfdaefe" && ft != 23412 && startTime != "234123424" && err != nil { + t.Error(spanMap) } + } -func TestGetAgentInfo(t *testing.T) { - spanMap := map[string]interface{}{ - "appid": "sfdaefe", - "appname": "sfdaefe", - "FT": float64(23412), - "tid": "234123424^41234^2333", +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", + ":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 + + err := json.Unmarshal([]byte(msg), &tspan) + if err != nil { + t.Error(err) } - id, name, ft, startTime, err := GetAgentInfo(spanMap) + if tspan.GetStartTime() != 1617083759798 { + t.Error(tspan.GetStartTime()) + } + + if tspan.GetAppname() != "APP-2" { + t.Error(tspan.GetAppname()) + + } + + if tspan.SpanId != 726125302 { + t.Error(tspan.SpanId) + } + + if tspan.ServerType != 1500 { + t.Error(tspan.ServerType) + } + + if tspan.ExceptionInfo != "exp" { + t.Error(tspan.ExceptionInfo) + } + + if tspan.ErrorInfo == nil { + t.Error("no error info") + } + + if len(tspan.Calls) == 0 { + t.Error("no calls") + } + + for _, ev := range tspan.Calls { + evCalls := ev.Calls + if len(evCalls) == 0 { + t.Error("no calls") + } + if evCalls[0].Name == "app\\AppDate::abc" { + t.Error("calls no name") + } - if id != "sfdaefe" && name != "sfdaefe" && ft != 23412 && startTime != "234123424" && err != nil { - t.Fail() } + t.Log(tspan) } diff --git a/collector-agent/agent/Filter.go b/collector-agent/agent/Filter.go index fa18f95f9..cef2a98fc 100644 --- a/collector-agent/agent/Filter.go +++ b/collector-agent/agent/Filter.go @@ -1,5 +1,5 @@ package agent type Filter interface { - Interceptor(map[string]interface{}) bool + Interceptor(span *TSpan) bool } diff --git a/collector-agent/agent/GrpcAgent.go b/collector-agent/agent/GrpcAgent.go index b669cc3f7..8c310197d 100644 --- a/collector-agent/agent/GrpcAgent.go +++ b/collector-agent/agent/GrpcAgent.go @@ -9,7 +9,7 @@ import ( "time" "github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/common" - v1 "github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/protocol" + v1 "github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/pinpoint-grpc-idl/proto/v1" log "github.com/sirupsen/logrus" "google.golang.org/grpc" @@ -30,19 +30,18 @@ type GrpcAgent struct { AgentOnLine bool requestCounter RequestProfiler tasksGroup sync.WaitGroup - jsonSpan chan map[string]interface{} + tSpanCh chan *TSpan ExitCh chan bool log *log.Entry } -func (agent *GrpcAgent) SendSpan(span map[string]interface{}) { +func (agent *GrpcAgent) SendSpan(span *TSpan) { defer func() { if r := recover(); r != nil { log.Warnf("sendSpan met:%s", r) } }() - - agent.jsonSpan <- span + agent.tSpanCh <- span } func (agent *GrpcAgent) GetLastBusyTime() int64 { @@ -51,7 +50,7 @@ func (agent *GrpcAgent) GetLastBusyTime() int64 { func (agent *GrpcAgent) Stop() { agent.log.Warn("I'm exiting") - close(agent.jsonSpan) + close(agent.tSpanCh) close(agent.ExitCh) agent.tasksGroup.Wait() agent.log.Warn("I'm exit") @@ -61,7 +60,10 @@ func (agent *GrpcAgent) AddFilter(filter Filter) { agent.spanFilter = append(agent.spanFilter, filter) } -func (agent *GrpcAgent) Interceptor(map[string]interface{}) bool { +func (agent *GrpcAgent) Interceptor(_ *TSpan) bool { + if !agent.AgentOnLine { + agent.log.Debugf("span dropped,as agent offline") + } return agent.AgentOnLine } @@ -95,7 +97,7 @@ func (agent *GrpcAgent) agentOnline() error { defer cancel() pbAgentInfo := common.GetPBAgentInfo(agent.agentType) agent.log.Debugf("RequestAgentInfo pbAgentInfo:%v", pbAgentInfo) - if res, err := client.RequestAgentInfo(ctx, &pbAgentInfo); err != nil { + if res, err := client.RequestAgentInfo(ctx, pbAgentInfo); err != nil { errorMsg := fmt.Sprintf("RequestAgentInfo failed. %s", err) agent.log.Warn(errorMsg) return errors.New(errorMsg) @@ -108,9 +110,7 @@ func (agent *GrpcAgent) agentOnline() error { stream, err := client.PingSession(pingCtx) if err != nil { - errorMsg := fmt.Sprintf("Get PingSession Failed:%s", err) - agent.log.Error(errorMsg) - return errors.New(errorMsg) + return err } defer func() { @@ -129,7 +129,7 @@ func (agent *GrpcAgent) agentOnline() error { ping := v1.PPing{} for { // send ping - agent.log.Infof("ping %s %v", agent, agent.pingMd) + agent.log.Infof("ping %s %v", agent.AgentId, agent.pingMd) if err := stream.Send(&ping); err != nil { agent.log.Warnf("agentOnline Send ping failed. %s", err) return err @@ -260,7 +260,7 @@ func (agent *GrpcAgent) Init(id, _name string, _type int32, StartTime string) { config := common.GetConfig() - agent.jsonSpan = make(chan map[string]interface{}, config.AgentChannelSize) + agent.tSpanCh = make(chan *TSpan, config.AgentChannelSize) agent.ExitCh = make(chan bool) agent.spanSender = SpanSender{Md: agent.BaseMD, ExitCh: agent.ExitCh} agent.spanSender.Init() @@ -347,15 +347,6 @@ func (agent *GrpcAgent) handleCommand(conn *grpc.ClientConn, wg *sync.WaitGroup) cmdWg := sync.WaitGroup{} defer cmdWg.Wait() - // - //config := common.GetConfig() - //agent.log.Debugf("connect AgentChannel:%s for agentOnline", config.AgentAddress) - //conn, err := grpc.Dial(config.AgentAddress, common.GetDialOption()...) - //if err != nil { - // errorMsg := fmt.Sprintf("Dail %s failed", config.AgentAddress) - // agent.log.Warn(errorMsg) - //} - client := v1.NewProfilerCommandServiceClient(conn) //config.AgentReTryTimeout ctx, _ := common.BuildPinpointCtx(-1, agent.pingMd) @@ -422,13 +413,14 @@ func (agent *GrpcAgent) consumeJsonSpan() { defer agent.tasksGroup.Done() agent.tasksGroup.Add(1) - for span := range agent.jsonSpan { + for span := range agent.tSpanCh { if span == nil { agent.log.Infof("agent:%v get EOF", agent) return } - for i := range agent.spanFilter { - if !agent.spanFilter[i].Interceptor(span) { + + for _, filter := range agent.spanFilter { + if !filter.Interceptor(span) { break } } diff --git a/collector-agent/agent/RequestCounter.go b/collector-agent/agent/RequestCounter.go index 2065e0377..e1b7640a0 100644 --- a/collector-agent/agent/RequestCounter.go +++ b/collector-agent/agent/RequestCounter.go @@ -5,8 +5,6 @@ import ( "time" "github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/common" - - log "github.com/sirupsen/logrus" ) type RequestProfiler struct { @@ -16,7 +14,7 @@ type RequestProfiler struct { } // exp in seconds -func (self *RequestProfiler) getReqLevel(exp uint32) int32 { +func (*RequestProfiler) getReqLevel(exp uint32) int32 { if exp <= 1 { return 0 } else if exp <= 3 { @@ -28,64 +26,59 @@ func (self *RequestProfiler) getReqLevel(exp uint32) int32 { } } -func (self *RequestProfiler) updateReqTimeProfile(exp uint32) { - if self.reqProfileLastTime != self.CTime { - for i, _ := range self.reqProfiler { - self.reqProfiler[i] = 0 +func (reqProf *RequestProfiler) updateReqTimeProfile(exp uint32) { + if reqProf.reqProfileLastTime != reqProf.CTime { + for i, _ := range reqProf.reqProfiler { + reqProf.reqProfiler[i] = 0 } } - self.reqProfiler[self.getReqLevel(exp)] += 1 - self.reqProfileLastTime = self.CTime + reqProf.reqProfiler[reqProf.getReqLevel(exp)] += 1 + reqProf.reqProfileLastTime = reqProf.CTime } -func (self *RequestProfiler) updateReqTop1TimeSummary(exp uint32) { +func (reqProf *RequestProfiler) updateReqTop1TimeSummary(exp uint32) { config := common.GetConfig() - if self.CTime >= (self.reqTop1LastTime + int64(config.StatInterval) + 1) { // reset response time summary - self.reqTop1LastTime = self.CTime - self.total = 0 - self.times = 0 - self.max = 0 + if reqProf.CTime >= (reqProf.reqTop1LastTime + int64(config.StatInterval) + 1) { // reset response time summary + reqProf.reqTop1LastTime = reqProf.CTime + reqProf.total = 0 + reqProf.times = 0 + reqProf.max = 0 } - if self.max < exp { - self.max = exp + if reqProf.max < exp { + reqProf.max = exp } - self.total += exp - self.times += 1 + reqProf.total += exp + reqProf.times += 1 } -func (self *RequestProfiler) GetMaxAvg() (max, avg uint32) { +func (reqProf *RequestProfiler) GetMaxAvg() (max, avg uint32) { config := common.GetConfig() - if time.Now().Unix() < (self.reqTop1LastTime + int64(config.StatInterval) + 1) { - return self.max, self.total / self.times + if time.Now().Unix() < (reqProf.reqTop1LastTime + int64(config.StatInterval) + 1) { + return reqProf.max, reqProf.total / reqProf.times } else { return 0, 0 } } -func (self *RequestProfiler) GetReqTimeProfiler() [4]uint16 { +func (reqProf *RequestProfiler) GetReqTimeProfiler() [4]uint16 { now := time.Now().Unix() - if now < self.reqProfileLastTime+2 { - return self.reqProfiler + if now < reqProf.reqProfileLastTime+2 { + return reqProf.reqProfiler } else { return [4]uint16{0, 0, 0, 0} } } -func (self *RequestProfiler) Interceptor(span map[string]interface{}) bool { - if exp, OK := span["E"]; OK { - self.CTime = time.Now().Unix() - if iexp, OK := exp.(float64); OK { +func (reqProf *RequestProfiler) Interceptor(span *TSpan) bool { + reqProf.CTime = time.Now().Unix() + iexp := span.GetElapsedTime() - self.updateReqTop1TimeSummary(uint32(iexp)) - exp := uint32(math.Ceil(iexp / 1000.0)) - self.updateReqTimeProfile(exp) + reqProf.updateReqTop1TimeSummary(uint32(iexp)) + exp := uint32(math.Ceil(float64(iexp) * 1.0 / 1000.0)) + reqProf.updateReqTimeProfile(exp) - } else { - log.Warnf("Convert exp to float64 failed.Reason %s", exp) - } - } return true } diff --git a/collector-agent/agent/RequestCounter_test.go b/collector-agent/agent/RequestCounter_test.go index 93c38e0ed..3dc2084de 100644 --- a/collector-agent/agent/RequestCounter_test.go +++ b/collector-agent/agent/RequestCounter_test.go @@ -11,19 +11,19 @@ func TestRequestProfiler_Interceptor(t *testing.T) { profiler := RequestProfiler{} config := common.GetConfig() config.StatInterval = 30 - spans := []map[string]interface{}{ - {"E": 10.0}, - {"E": 2568.0}, - {"E": 100.0}, - {"E": 520.0}, - {"E": 0.0}, + spans := []TSpan{ + {ElapsedTime: 10}, + {ElapsedTime: 2568}, + {ElapsedTime: 100}, + {ElapsedTime: 520}, + {ElapsedTime: 0}, } for _, v := range spans { - profiler.Interceptor(v) + profiler.Interceptor(&v) } time.Sleep(1 * time.Second) - profiler.Interceptor(spans[2]) + profiler.Interceptor(&spans[2]) targ := profiler.GetReqTimeProfiler() if targ[0] != 1 { @@ -39,11 +39,11 @@ func TestRequestProfiler_Interceptor(t *testing.T) { } func BenchmarkRequestProfiler_Interceptor(b *testing.B) { - spanMap := map[string]interface{}{ - "E": float64(234), + spanMap := TSpan{ + ElapsedTime: 234, } req := RequestProfiler{} for i := 0; i < b.N; i++ { - req.Interceptor(spanMap) + req.Interceptor(&spanMap) } } diff --git a/collector-agent/agent/SpanSender.go b/collector-agent/agent/SpanSender.go index 167e186fa..87d4c781d 100644 --- a/collector-agent/agent/SpanSender.go +++ b/collector-agent/agent/SpanSender.go @@ -8,8 +8,9 @@ import ( "sync" "time" + "github.com/golang/protobuf/ptypes/wrappers" "github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/common" - v1 "github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/protocol" + v1 "github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/pinpoint-grpc-idl/proto/v1" log "github.com/sirupsen/logrus" "google.golang.org/grpc/metadata" @@ -56,10 +57,7 @@ func (spanSender *SpanSender) senderMain() { defer stream.CloseSend() for span := range spanSender.spanMessageCh { - log.Debugf("send Main send:%v", span) - //if rand.Intn(100000) != 1 { - // continue - //} + log.Debugf("send %v", span) if err := stream.Send(span); err != nil { log.Warnf("send span failed with:%s", err) @@ -105,296 +103,196 @@ func (spanSender *SpanSender) cleanAllMetaData() { spanSender.stringMeta.ResetMeta() } -func (spanSender *SpanSender) makePinpointSpanEv(genSpan *v1.PSpan, ISpan interface{}, depth int32) error { - if span, OK := ISpan.(map[string]interface{}); OK { - if spanEv, err := spanSender.createPinpointSpanEv(span); err == nil { - spanEv.Sequence = spanSender.sequenceId - spanSender.sequenceId += 1 - spanEv.Depth = depth - genSpan.SpanEvent = append(genSpan.SpanEvent, spanEv) - if calls, OK := span["calls"].([]interface{}); OK { - for _, call := range calls { - spanSender.makePinpointSpanEv(genSpan, call, depth+1) - } - } - return nil - } else { - return err +func (spanSender *SpanSender) makePinpointSpanEv(genSpan *v1.PSpan, spanEv *TSpanEvent, depth int32) error { + if pbSpanEv, err := spanSender.createPinpointSpanEv(spanEv); err == nil { + pbSpanEv.Sequence = spanSender.sequenceId + spanSender.sequenceId += 1 + pbSpanEv.Depth = depth + genSpan.SpanEvent = append(genSpan.SpanEvent, pbSpanEv) + for _, call := range spanEv.Calls { + spanSender.makePinpointSpanEv(genSpan, &call, depth+1) } - } - log.Warn("input invalid, packet dropped") - return nil -} - -func (spanSender *SpanSender) createPinpointSpanEv(span map[string]interface{}) (*v1.PSpanEvent, error) { - pspanEv := v1.PSpanEvent{} - if name, OK := span["name"].(string); OK { - pspanEv.ApiId = int32(spanSender.apiMeta.GetId(name, PARAMS_TYPE{"type": common.API_DEFAULT})) + return nil } else { - return nil, errors.New("no name") + return err } +} - if value, OK := span["EXP"].(string); OK { - id := spanSender.stringMeta.GetId("EXP", nil) - pspanEv.ExceptionInfo = &v1.PIntStringValue{} - pspanEv.ExceptionInfo.IntValue = id - stringValue := wrapperspb.StringValue{Value: value} - pspanEv.ExceptionInfo.StringValue = &stringValue - } +func (spanSender *SpanSender) createPinpointSpanEv(spanEv *TSpanEvent) (*v1.PSpanEvent, error) { + pbSpanEv := &v1.PSpanEvent{} - nextEv := v1.PMessageEvent{} + pbSpanEv.ApiId = int32(spanSender.apiMeta.GetId(spanEv.Name, PARAMS_TYPE{"type": common.API_DEFAULT})) - if value, OK := span["dst"].(string); OK { - nextEv.DestinationId = value + if len(spanEv.ExceptionInfo) > 0 { + id := spanSender.stringMeta.GetId("EXP", nil) + pbSpanEv.ExceptionInfo = &v1.PIntStringValue{} + pbSpanEv.ExceptionInfo.IntValue = id + stringValue := wrapperspb.StringValue{Value: spanEv.ExceptionInfo} + pbSpanEv.ExceptionInfo.StringValue = &stringValue } - if value, OK := span["nsid"].(string); OK { - if value, err := strconv.ParseInt(value, 10, 64); err == nil { - nextEv.NextSpanId = value - } + nextEv := v1.PMessageEvent{ + DestinationId: spanEv.DestinationId, + NextSpanId: spanEv.NextSpanId, + EndPoint: spanEv.EndPoint, } - if value, OK := span["server"].(string); OK { - nextEv.EndPoint = value - } - pspanEv.NextEvent = &v1.PNextEvent{ + pbSpanEv.NextEvent = &v1.PNextEvent{ Field: &v1.PNextEvent_MessageEvent{ MessageEvent: &nextEv}, } - if value, OK := span["S"].(float64); OK { - //if value, err := strconv.ParseInt(value, 10, 32); err == nil { - //} - pspanEv.StartElapsed = int32(value) - } + pbSpanEv.StartElapsed = spanEv.GetStartElapsed() - if value, OK := span["E"].(float64); OK { - pspanEv.EndElapsed = int32(value) - } + pbSpanEv.EndElapsed = spanEv.GetEndElapsed() - if value, OK := span["stp"].(string); OK { - if itype, err := strconv.ParseInt(value, 10, 32); err == nil { - pspanEv.ServiceType = int32(itype) - } - } else { - pspanEv.ServiceType = 1501 - } - - //pspanEv.AsyncEvent = 1 - - if value, OK := span["clues"].([]interface{}); OK { - - for _, ann := range value { - if annStr, OK := ann.(string); OK { - iColon := strings.Index(annStr, ":") - if value, err := strconv.ParseInt(annStr[0:iColon], 10, 32); err == nil { - stringValue := v1.PAnnotationValue_StringValue{StringValue: annStr[iColon+1:]} + pbSpanEv.ServiceType = spanEv.ServiceType + for _, ann := range spanEv.Clues { + iColon := strings.Index(ann, ":") + if value, err := strconv.ParseInt(ann[0:iColon], 10, 32); err == nil { + stringValue := v1.PAnnotationValue_StringValue{StringValue: ann[iColon+1:]} - pAnvalue := v1.PAnnotationValue{ - Field: &stringValue, - } - ann := v1.PAnnotation{ - Key: int32(value), - Value: &pAnvalue, - } - pspanEv.Annotation = append(pspanEv.Annotation, &ann) - } + pAnvalue := v1.PAnnotationValue{ + Field: &stringValue, + } + ann := v1.PAnnotation{ + Key: int32(value), + Value: &pAnvalue, } + pbSpanEv.Annotation = append(pbSpanEv.Annotation, &ann) } } - if value, OK := span["SQL"].(string); OK { - id := spanSender.sqlMeta.GetId(value, nil) + if len(spanEv.SqlMeta) > 0 { + id := spanSender.sqlMeta.GetId(spanEv.SqlMeta, nil) sqlvalue := v1.PIntStringStringValue{ IntValue: id, + StringValue1: &wrappers.StringValue{ + Value: spanEv.SqlMeta, + }, } - pspanEv.Annotation = append(pspanEv.Annotation, &v1.PAnnotation{ + pbSpanEv.Annotation = append(pbSpanEv.Annotation, &v1.PAnnotation{ Key: 20, Value: &v1.PAnnotationValue{ Field: &v1.PAnnotationValue_IntStringStringValue{ - &sqlvalue, + IntStringStringValue: &sqlvalue, }, }, }) } - return &pspanEv, nil + return pbSpanEv, nil } -func (spanSender *SpanSender) makePinpointSpan(span map[string]interface{}) (*v1.PSpan, error) { +func (spanSender *SpanSender) makePinpointSpan(span *TSpan) (*v1.PSpan, error) { spanSender.sequenceId = 0 - pspan := v1.PSpan{} - pspan.Version = 1 - if name, OK := span["name"].(string); OK { - pspan.ApiId = spanSender.apiMeta.GetId(name, PARAMS_TYPE{"type": int32(common.API_WEB_REQUEST)}) - } else { - return nil, errors.New("no name") - } + pbSpan := &v1.PSpan{} + pbSpan.Version = 1 + pbSpan.ApiId = spanSender.apiMeta.GetId(span.GetAppid(), PARAMS_TYPE{"type": int32(common.API_WEB_REQUEST)}) - if value, OK := span["stp"].(string); OK { - if itype, err := strconv.ParseInt(value, 10, 32); err == nil { - pspan.ServiceType = int32(itype) - } - } else { - pspan.ServiceType = 1500 - } + pbSpan.ServiceType = span.ServerType - if value, OK := span["FT"].(float64); OK { - pspan.ApplicationServiceType = int32(value) - } else { - pspan.ServiceType = 1500 - } + pbSpan.ApplicationServiceType = span.GetAppServerType() - if _type, OK := span["psid"].(string); OK { - if itype, err := strconv.ParseInt(_type, 10, 64); err == nil { - pspan.ParentSpanId = itype - } - } else { - pspan.ParentSpanId = -1 - } - - if value, OK := span["tid"].(string); OK { - strholder := strings.Split(value, "^") - agentId, startTime, seqenceid := strholder[0], strholder[1], strholder[2] - transactionId := v1.PTransactionId{AgentId: agentId} - - if value, err := strconv.ParseInt(startTime, 10, 64); err == nil { - transactionId.AgentStartTime = value - } + pbSpan.ParentSpanId = span.ParentSpanId - if value, err := strconv.ParseInt(seqenceid, 10, 64); err == nil { - transactionId.Sequence = value - } - pspan.TransactionId = &transactionId - } else { - return nil, errors.New("no tid") - } - - if value, OK := span["sid"].(string); OK { - if value, err := strconv.ParseInt(value, 10, 64); err == nil { - pspan.SpanId = value - } - } else { - return nil, errors.New("no sid") - } - - if value, OK := span["S"].(float64); OK { - pspan.StartTime = int64(value) - } else { - pspan.StartTime = 0 - } + tidFormat := strings.Split(span.TransactionId, "^") + agentId, startTime, seqenceid := tidFormat[0], tidFormat[1], tidFormat[2] + transactionId := v1.PTransactionId{AgentId: agentId} - if value, OK := span["E"].(float64); OK { - pspan.Elapsed = int32(value) - } - acceptEv := v1.PAcceptEvent{} - if value, OK := span["uri"].(string); OK { - acceptEv.Rpc = value + if value, err := strconv.ParseInt(startTime, 10, 64); err == nil { + transactionId.AgentStartTime = value } - if value, OK := span["server"].(string); OK { - acceptEv.EndPoint = value + if value, err := strconv.ParseInt(seqenceid, 10, 64); err == nil { + transactionId.Sequence = value } + pbSpan.TransactionId = &transactionId - if value, OK := span["client"].(string); OK { - acceptEv.RemoteAddr = value - } + pbSpan.SpanId = span.SpanId - parentInfo := v1.PParentInfo{} + pbSpan.StartTime = span.GetStartTime() - if value, OK := span["pname"].(string); OK { - parentInfo.ParentApplicationName = value - } + pbSpan.Elapsed = span.GetElapsedTime() - if value, OK := span["ptype"].(string); OK { - if value, err := strconv.ParseInt(value, 10, 32); err == nil { - parentInfo.ParentApplicationType = int32(value) - } + parentInfo := v1.PParentInfo{ + ParentApplicationName: span.ParentApplicationName, + ParentApplicationType: int32(span.ParentAppServerType), + AcceptorHost: span.AcceptorHost, } - if value, OK := span["Ah"].(string); OK { - parentInfo.AcceptorHost = value - } - acceptEv.ParentInfo = &parentInfo + acceptEv := v1.PAcceptEvent{Rpc: span.Uri, EndPoint: span.EndPoint, RemoteAddr: span.RemoteAddr, + ParentInfo: &parentInfo} - pspan.AcceptEvent = &acceptEv + pbSpan.AcceptEvent = &acceptEv // changes: ERRs's priority bigger EXP, so ERR will replace EXP - if value, OK := span["EXP"].(string); OK { + if len(span.ExceptionInfo) > 0 { id := spanSender.stringMeta.GetId("EXP", nil) - pspan.ExceptionInfo = &v1.PIntStringValue{} - pspan.ExceptionInfo.IntValue = id - stringValue := wrapperspb.StringValue{Value: value} - pspan.ExceptionInfo.StringValue = &stringValue + stringValue := wrapperspb.StringValue{Value: span.ExceptionInfo} + pbSpan.ExceptionInfo = &v1.PIntStringValue{IntValue: id, + StringValue: &stringValue} } - if value, OK := span["ERR"]; OK { + if span.ErrorInfo != nil { id := spanSender.stringMeta.GetId("ERR", nil) - pspan.ExceptionInfo = &v1.PIntStringValue{} - pspan.ExceptionInfo.IntValue = id - pspan.Err = 1 // mark as an error - if value, OK := value.(map[string]interface{}); OK { - if value, OK := value["msg"].(string); OK { - stringValue := wrapperspb.StringValue{Value: value} - pspan.ExceptionInfo.StringValue = &stringValue - } - } + pbSpan.Err = 1 // mark as an error + pbSpan.ExceptionInfo = &v1.PIntStringValue{ + IntValue: id, + StringValue: &wrapperspb.StringValue{ + Value: span.ErrorInfo.Msg}} + } - if value, OK := span["clues"].([]interface{}); OK { - for _, ann := range value { - if annStr, OK := ann.(string); OK { - iColon := strings.Index(annStr, ":") - if iColon > 0 { - if value, err := strconv.ParseInt(annStr[0:iColon], 10, 32); err == nil { - stringValue := v1.PAnnotationValue_StringValue{StringValue: annStr[iColon+1:]} - pAnn := v1.PAnnotationValue{ - Field: &stringValue, - } - ann := v1.PAnnotation{ - Key: int32(value), - Value: &pAnn, - } - pspan.Annotation = append(pspan.Annotation, &ann) - } + for _, annotation := range span.Clues { + iColon := strings.Index(annotation, ":") + if iColon > 0 { + if value, err := strconv.ParseInt(annotation[0:iColon], 10, 32); err == nil { + stringValue := v1.PAnnotationValue_StringValue{StringValue: annotation[iColon+1:]} + pAnn := v1.PAnnotationValue{ + Field: &stringValue, } - + ann := v1.PAnnotation{ + Key: int32(value), + Value: &pAnn, + } + pbSpan.Annotation = append(pbSpan.Annotation, &ann) } } } // collector data from nginx-header - if value, OK := span["NP"].(string); OK { + if len(span.NginxHeader) > 0 { pvalue := v1.PAnnotationValue_LongIntIntByteByteStringValue{ LongIntIntByteByteStringValue: &v1.PLongIntIntByteByteStringValue{}, } pvalue.LongIntIntByteByteStringValue.IntValue1 = 2 - npAr := common.ParseStringField(value) - if value, OK := npAr["D"]; OK { + ngFormat := common.ParseStringField(span.NginxHeader) + if value, OK := ngFormat["D"]; OK { if value, err := common.ParseDotFormatToTime(value); err == nil { pvalue.LongIntIntByteByteStringValue.IntValue2 = int32(value) } } - if value, OK := npAr["t"]; OK { + if value, OK := ngFormat["t"]; OK { if value, err := common.ParseDotFormatToTime(value); err == nil { pvalue.LongIntIntByteByteStringValue.LongValue = value } } - ann := v1.PAnnotation{ + annotation := v1.PAnnotation{ Key: 300, Value: &v1.PAnnotationValue{ Field: &pvalue, }, } - pspan.Annotation = append(pspan.Annotation, &ann) + pbSpan.Annotation = append(pbSpan.Annotation, &annotation) } // collect data from apache-header - if value, OK := span["AP"].(string); OK { + if len(span.ApacheHeader) > 0 { pvalue := v1.PAnnotationValue_LongIntIntByteByteStringValue{ LongIntIntByteByteStringValue: &v1.PLongIntIntByteByteStringValue{}, } pvalue.LongIntIntByteByteStringValue.IntValue1 = 3 - npAr := common.ParseStringField(value) + npAr := common.ParseStringField(span.ApacheHeader) if value, OK := npAr["i"]; OK { if value, err := strconv.ParseInt(value, 10, 32); err == nil { pvalue.LongIntIntByteByteStringValue.ByteValue1 = int32(value) @@ -423,18 +321,16 @@ func (spanSender *SpanSender) makePinpointSpan(span map[string]interface{}) (*v1 }, } - pspan.Annotation = append(pspan.Annotation, &ann) + pbSpan.Annotation = append(pbSpan.Annotation, &ann) } - return &pspan, nil + return pbSpan, nil } -func (spanSender *SpanSender) makeSpan(span map[string]interface{}) (*v1.PSpan, error) { +func (spanSender *SpanSender) makeSpan(span *TSpan) (*v1.PSpan, error) { if pspan, err := spanSender.makePinpointSpan(span); err == nil { - if calls, OK := span["calls"].([]interface{}); OK { - for _, call := range calls { - spanSender.makePinpointSpanEv(pspan, call, 1) - } + for _, call := range span.Calls { + spanSender.makePinpointSpanEv(pspan, &call, 1) } return pspan, nil } else { @@ -442,13 +338,13 @@ func (spanSender *SpanSender) makeSpan(span map[string]interface{}) (*v1.PSpan, } } -func (spanSender *SpanSender) Interceptor(span map[string]interface{}) bool { +func (spanSender *SpanSender) Interceptor(span *TSpan) bool { log.Debug("span spanSender interceptor") - if span, err := spanSender.makeSpan(span); err == nil { + if pbSpan, err := spanSender.makeSpan(span); err == nil { // send channel spanSender.spanMessageCh <- &v1.PSpanMessage{ Field: &v1.PSpanMessage_Span{ - Span: span, + Span: pbSpan, }, } // recv the channel status @@ -489,9 +385,6 @@ func (spanSender *SpanSender) SenderGrpcMetaData(name string, id int32, Type int _type = value } - //if value, OK := params["line"]; OK { - // line = value - //} } // disable line apiMeta := v1.PApiMetaData{ApiId: id, ApiInfo: name, Type: _type} @@ -529,6 +422,6 @@ func (spanSender *SpanSender) SenderGrpcMetaData(name string, id int32, Type int log.Warnf("SenderGrpcMetaData: No such Type:%d", Type) } - log.Debugf("send metaData:type:%d,Id:%d,value:%s para:%v", Type, id, name, params) + log.Debugf("send metaData type:%d,Id:%d,value:%s para:%v", Type, id, name, params) return nil } diff --git a/collector-agent/agent/Stat.go b/collector-agent/agent/Stat.go index 9da10b404..f9f690d0c 100644 --- a/collector-agent/agent/Stat.go +++ b/collector-agent/agent/Stat.go @@ -4,7 +4,7 @@ import ( "time" "github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/common" - v1 "github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/protocol" + v1 "github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/pinpoint-grpc-idl/proto/v1" "github.com/shirou/gopsutil/cpu" "github.com/shirou/gopsutil/v3/mem" diff --git a/collector-agent/common/config.go b/collector-agent/common/config.go index 26a8383df..b22a49ed0 100644 --- a/collector-agent/common/config.go +++ b/collector-agent/common/config.go @@ -6,8 +6,7 @@ import ( "os" "time" - v1 "github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/protocol" - + v1 "github.com/pinpoint-apm/pinpoint-c-agent/collector-agent/pinpoint-grpc-idl/proto/v1" "google.golang.org/grpc" ) @@ -116,8 +115,8 @@ func GetDialOption() []grpc.DialOption { return opts } -func GetPBAgentInfo(serverType int32) v1.PAgentInfo { - agentInfo := v1.PAgentInfo{ +func GetPBAgentInfo(serverType int32) *v1.PAgentInfo { + agentInfo := &v1.PAgentInfo{ Hostname: config.HostName, Ip: config.HostIp, Pid: config.Pid, diff --git a/collector-agent/go.mod b/collector-agent/go.mod index 1f936e40f..14bc67460 100644 --- a/collector-agent/go.mod +++ b/collector-agent/go.mod @@ -3,7 +3,7 @@ module github.com/pinpoint-apm/pinpoint-c-agent/collector-agent go 1.15 require ( - github.com/golang/protobuf v1.5.2 + github.com/golang/protobuf v1.5.3 github.com/mattn/go-colorable v0.1.8 // indirect github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect github.com/onsi/gomega v1.14.0 // indirect @@ -13,7 +13,7 @@ require ( github.com/x-cray/logrus-prefixed-formatter v0.5.2 google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98 // indirect google.golang.org/grpc v1.36.0 - google.golang.org/protobuf v1.26.0 + google.golang.org/protobuf v1.31.0 gopkg.in/natefinch/lumberjack.v2 v2.0.0 gopkg.in/yaml.v3 v3.0.0 // indirect ) diff --git a/collector-agent/go.sum b/collector-agent/go.sum index e045cd197..8fdc9049b 100644 --- a/collector-agent/go.sum +++ b/collector-agent/go.sum @@ -1,34 +1,25 @@ -cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403 h1:cqQfy1jclcSy/FwLjemeg3SR1yaINm74aQyupQ0Bl8M= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad h1:EmNYJhPYy0pOFjCx2PrgtaBXmee0iUX9hLlxE1xHOJE= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI= github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1 h1:G5FRp8JnTd7RQH5kemVNlMeyXQAztQ3mOWV95KxsXH8= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -40,8 +31,9 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -49,9 +41,7 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -72,7 +62,6 @@ github.com/onsi/gomega v1.14.0 h1:ep6kpPVwmr/nTbklSx2nrLNSIO62DoYAhnPNIMhK8gI= github.com/onsi/gomega v1.14.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/shirou/gopsutil v3.21.2+incompatible h1:U+YvJfjCh6MslYlIAXvPtzhW3YZEtc9uncueUNpD/0A= github.com/shirou/gopsutil v3.21.2+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= @@ -80,7 +69,6 @@ github.com/shirou/gopsutil/v3 v3.21.2 h1:fIOk3hyqV1oGKogfGNjUZa0lUbtlkx3+ZT0IoJt github.com/shirou/gopsutil/v3 v3.21.2/go.mod h1:ghfMypLDrFSWN2c9cDYFLHyynQ+QUht0cv/18ZqVczw= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= @@ -92,19 +80,15 @@ github.com/tklauser/numcpus v0.2.1 h1:ct88eFm+Q7m2ZfXJdan1xYoXKlmwsfP+k88q05KvlZ github.com/tklauser/numcpus v0.2.1/go.mod h1:9aU+wOc6WjUIZEwWMP62PL/41d65P+iks1gBkr4QyP8= github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg= github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= -github.com/yuin/goldmark v1.2.1 h1:ruQGxdhGHe7FWOJPT0mKs5+pD2Xs1Bm/kdGlHO04FmM= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4 h1:c2HOrn5iMezYjSlGPncknSEr/8x5LELb/ilJbXi9DEA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3 h1:XQyxROzUlZH+WIQwySDgnISgOivlhjIEwaQaJEJrrN0= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -117,12 +101,10 @@ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 h1:DzZ89McO9/gWPsQXS/FVKAlG02ZjaQ6AlZRBimEYOd0= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -141,7 +123,6 @@ golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210217105451-b926d437f341/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da h1:b3NXsE2LusjYGGjL5bxEVZZORm/YEFFrWFjR8eFrw/c= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -153,7 +134,6 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3 golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e h1:4nW4NLDYnU28ojHaHO8OVxFHk/aQ33U01a9cjED+pzE= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -161,7 +141,6 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= @@ -185,11 +164,11 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= @@ -200,10 +179,8 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA= gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc h1:/hemPrYIhOhy8zYrNj+069zDB68us2sMGsfkFJO0iZs= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/collector-agent/makefile b/collector-agent/makefile new file mode 100644 index 000000000..2817359a0 --- /dev/null +++ b/collector-agent/makefile @@ -0,0 +1,21 @@ + +TAG=${tag} + +.PHONY: default +default: server ; + +protoc: + # fixme + # protoc --go_out=pinpoint-grpc-idl/proto/ --go-grpc_out=pinpoint-grpc-idl/proto --proto_path=pinpoint-grpc-idl/proto/ --go-grpc_opt=paths=source_relative pinpoint-grpc-idl/proto/v1/*.proto + protoc --go_out=pinpoint-grpc-idl/proto/ --go-grpc_out=pinpoint-grpc-idl/proto --proto_path=pinpoint-grpc-idl/proto/ --go-grpc_opt=paths=source_relative v1/Annotation.proto v1/Cmd.proto v1/CustomMetric.proto v1/Service.proto v1/Span.proto v1/Stat.proto v1/ThreadDump.proto + +server: protoc + go mod tidy + go build . + +clean: + rm -rf pinpoint-grpc-idl/proto/v1/*.go + rm collector-agent + +docker: + docker build -f Dockerfile -t ${TAG} . \ No newline at end of file diff --git a/collector-agent/pinpoint-grpc-idl b/collector-agent/pinpoint-grpc-idl new file mode 160000 index 000000000..e68bc3963 --- /dev/null +++ b/collector-agent/pinpoint-grpc-idl @@ -0,0 +1 @@ +Subproject commit e68bc3963e7ba6f5c7e33f380f45111fddaaf938 diff --git a/collector-agent/protocol/Annotation.pb.go b/collector-agent/protocol/Annotation.pb.go deleted file mode 100644 index 5c2262c20..000000000 --- a/collector-agent/protocol/Annotation.pb.go +++ /dev/null @@ -1,661 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: Annotation.proto - -package v1 - -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type PIntStringValue struct { - IntValue int32 `protobuf:"varint,1,opt,name=intValue,proto3" json:"intValue,omitempty"` - StringValue *wrappers.StringValue `protobuf:"bytes,2,opt,name=stringValue,proto3" json:"stringValue,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PIntStringValue) Reset() { *m = PIntStringValue{} } -func (m *PIntStringValue) String() string { return proto.CompactTextString(m) } -func (*PIntStringValue) ProtoMessage() {} -func (*PIntStringValue) Descriptor() ([]byte, []int) { - return fileDescriptor_22207ca389a047ff, []int{0} -} - -func (m *PIntStringValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PIntStringValue.Unmarshal(m, b) -} -func (m *PIntStringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PIntStringValue.Marshal(b, m, deterministic) -} -func (m *PIntStringValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_PIntStringValue.Merge(m, src) -} -func (m *PIntStringValue) XXX_Size() int { - return xxx_messageInfo_PIntStringValue.Size(m) -} -func (m *PIntStringValue) XXX_DiscardUnknown() { - xxx_messageInfo_PIntStringValue.DiscardUnknown(m) -} - -var xxx_messageInfo_PIntStringValue proto.InternalMessageInfo - -func (m *PIntStringValue) GetIntValue() int32 { - if m != nil { - return m.IntValue - } - return 0 -} - -func (m *PIntStringValue) GetStringValue() *wrappers.StringValue { - if m != nil { - return m.StringValue - } - return nil -} - -type PIntStringStringValue struct { - IntValue int32 `protobuf:"varint,1,opt,name=intValue,proto3" json:"intValue,omitempty"` - StringValue1 *wrappers.StringValue `protobuf:"bytes,2,opt,name=stringValue1,proto3" json:"stringValue1,omitempty"` - StringValue2 *wrappers.StringValue `protobuf:"bytes,3,opt,name=stringValue2,proto3" json:"stringValue2,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PIntStringStringValue) Reset() { *m = PIntStringStringValue{} } -func (m *PIntStringStringValue) String() string { return proto.CompactTextString(m) } -func (*PIntStringStringValue) ProtoMessage() {} -func (*PIntStringStringValue) Descriptor() ([]byte, []int) { - return fileDescriptor_22207ca389a047ff, []int{1} -} - -func (m *PIntStringStringValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PIntStringStringValue.Unmarshal(m, b) -} -func (m *PIntStringStringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PIntStringStringValue.Marshal(b, m, deterministic) -} -func (m *PIntStringStringValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_PIntStringStringValue.Merge(m, src) -} -func (m *PIntStringStringValue) XXX_Size() int { - return xxx_messageInfo_PIntStringStringValue.Size(m) -} -func (m *PIntStringStringValue) XXX_DiscardUnknown() { - xxx_messageInfo_PIntStringStringValue.DiscardUnknown(m) -} - -var xxx_messageInfo_PIntStringStringValue proto.InternalMessageInfo - -func (m *PIntStringStringValue) GetIntValue() int32 { - if m != nil { - return m.IntValue - } - return 0 -} - -func (m *PIntStringStringValue) GetStringValue1() *wrappers.StringValue { - if m != nil { - return m.StringValue1 - } - return nil -} - -func (m *PIntStringStringValue) GetStringValue2() *wrappers.StringValue { - if m != nil { - return m.StringValue2 - } - return nil -} - -type PLongIntIntByteByteStringValue struct { - LongValue int64 `protobuf:"varint,1,opt,name=longValue,proto3" json:"longValue,omitempty"` - IntValue1 int32 `protobuf:"varint,2,opt,name=intValue1,proto3" json:"intValue1,omitempty"` - IntValue2 int32 `protobuf:"varint,3,opt,name=intValue2,proto3" json:"intValue2,omitempty"` - ByteValue1 int32 `protobuf:"zigzag32,4,opt,name=byteValue1,proto3" json:"byteValue1,omitempty"` - ByteValue2 int32 `protobuf:"zigzag32,5,opt,name=byteValue2,proto3" json:"byteValue2,omitempty"` - StringValue *wrappers.StringValue `protobuf:"bytes,6,opt,name=stringValue,proto3" json:"stringValue,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PLongIntIntByteByteStringValue) Reset() { *m = PLongIntIntByteByteStringValue{} } -func (m *PLongIntIntByteByteStringValue) String() string { return proto.CompactTextString(m) } -func (*PLongIntIntByteByteStringValue) ProtoMessage() {} -func (*PLongIntIntByteByteStringValue) Descriptor() ([]byte, []int) { - return fileDescriptor_22207ca389a047ff, []int{2} -} - -func (m *PLongIntIntByteByteStringValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PLongIntIntByteByteStringValue.Unmarshal(m, b) -} -func (m *PLongIntIntByteByteStringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PLongIntIntByteByteStringValue.Marshal(b, m, deterministic) -} -func (m *PLongIntIntByteByteStringValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_PLongIntIntByteByteStringValue.Merge(m, src) -} -func (m *PLongIntIntByteByteStringValue) XXX_Size() int { - return xxx_messageInfo_PLongIntIntByteByteStringValue.Size(m) -} -func (m *PLongIntIntByteByteStringValue) XXX_DiscardUnknown() { - xxx_messageInfo_PLongIntIntByteByteStringValue.DiscardUnknown(m) -} - -var xxx_messageInfo_PLongIntIntByteByteStringValue proto.InternalMessageInfo - -func (m *PLongIntIntByteByteStringValue) GetLongValue() int64 { - if m != nil { - return m.LongValue - } - return 0 -} - -func (m *PLongIntIntByteByteStringValue) GetIntValue1() int32 { - if m != nil { - return m.IntValue1 - } - return 0 -} - -func (m *PLongIntIntByteByteStringValue) GetIntValue2() int32 { - if m != nil { - return m.IntValue2 - } - return 0 -} - -func (m *PLongIntIntByteByteStringValue) GetByteValue1() int32 { - if m != nil { - return m.ByteValue1 - } - return 0 -} - -func (m *PLongIntIntByteByteStringValue) GetByteValue2() int32 { - if m != nil { - return m.ByteValue2 - } - return 0 -} - -func (m *PLongIntIntByteByteStringValue) GetStringValue() *wrappers.StringValue { - if m != nil { - return m.StringValue - } - return nil -} - -type PIntBooleanIntBooleanValue struct { - IntValue1 int32 `protobuf:"varint,1,opt,name=intValue1,proto3" json:"intValue1,omitempty"` - BoolValue1 bool `protobuf:"varint,2,opt,name=boolValue1,proto3" json:"boolValue1,omitempty"` - IntValue2 int32 `protobuf:"varint,3,opt,name=intValue2,proto3" json:"intValue2,omitempty"` - BoolValue2 bool `protobuf:"varint,4,opt,name=boolValue2,proto3" json:"boolValue2,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PIntBooleanIntBooleanValue) Reset() { *m = PIntBooleanIntBooleanValue{} } -func (m *PIntBooleanIntBooleanValue) String() string { return proto.CompactTextString(m) } -func (*PIntBooleanIntBooleanValue) ProtoMessage() {} -func (*PIntBooleanIntBooleanValue) Descriptor() ([]byte, []int) { - return fileDescriptor_22207ca389a047ff, []int{3} -} - -func (m *PIntBooleanIntBooleanValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PIntBooleanIntBooleanValue.Unmarshal(m, b) -} -func (m *PIntBooleanIntBooleanValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PIntBooleanIntBooleanValue.Marshal(b, m, deterministic) -} -func (m *PIntBooleanIntBooleanValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_PIntBooleanIntBooleanValue.Merge(m, src) -} -func (m *PIntBooleanIntBooleanValue) XXX_Size() int { - return xxx_messageInfo_PIntBooleanIntBooleanValue.Size(m) -} -func (m *PIntBooleanIntBooleanValue) XXX_DiscardUnknown() { - xxx_messageInfo_PIntBooleanIntBooleanValue.DiscardUnknown(m) -} - -var xxx_messageInfo_PIntBooleanIntBooleanValue proto.InternalMessageInfo - -func (m *PIntBooleanIntBooleanValue) GetIntValue1() int32 { - if m != nil { - return m.IntValue1 - } - return 0 -} - -func (m *PIntBooleanIntBooleanValue) GetBoolValue1() bool { - if m != nil { - return m.BoolValue1 - } - return false -} - -func (m *PIntBooleanIntBooleanValue) GetIntValue2() int32 { - if m != nil { - return m.IntValue2 - } - return 0 -} - -func (m *PIntBooleanIntBooleanValue) GetBoolValue2() bool { - if m != nil { - return m.BoolValue2 - } - return false -} - -type PStringStringValue struct { - StringValue1 *wrappers.StringValue `protobuf:"bytes,1,opt,name=stringValue1,proto3" json:"stringValue1,omitempty"` - StringValue2 *wrappers.StringValue `protobuf:"bytes,2,opt,name=stringValue2,proto3" json:"stringValue2,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PStringStringValue) Reset() { *m = PStringStringValue{} } -func (m *PStringStringValue) String() string { return proto.CompactTextString(m) } -func (*PStringStringValue) ProtoMessage() {} -func (*PStringStringValue) Descriptor() ([]byte, []int) { - return fileDescriptor_22207ca389a047ff, []int{4} -} - -func (m *PStringStringValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PStringStringValue.Unmarshal(m, b) -} -func (m *PStringStringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PStringStringValue.Marshal(b, m, deterministic) -} -func (m *PStringStringValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_PStringStringValue.Merge(m, src) -} -func (m *PStringStringValue) XXX_Size() int { - return xxx_messageInfo_PStringStringValue.Size(m) -} -func (m *PStringStringValue) XXX_DiscardUnknown() { - xxx_messageInfo_PStringStringValue.DiscardUnknown(m) -} - -var xxx_messageInfo_PStringStringValue proto.InternalMessageInfo - -func (m *PStringStringValue) GetStringValue1() *wrappers.StringValue { - if m != nil { - return m.StringValue1 - } - return nil -} - -func (m *PStringStringValue) GetStringValue2() *wrappers.StringValue { - if m != nil { - return m.StringValue2 - } - return nil -} - -type PAnnotationValue struct { - // Types that are valid to be assigned to Field: - // *PAnnotationValue_StringValue - // *PAnnotationValue_BoolValue - // *PAnnotationValue_IntValue - // *PAnnotationValue_LongValue - // *PAnnotationValue_ShortValue - // *PAnnotationValue_DoubleValue - // *PAnnotationValue_BinaryValue - // *PAnnotationValue_ByteValue - // *PAnnotationValue_IntStringValue - // *PAnnotationValue_StringStringValue - // *PAnnotationValue_IntStringStringValue - // *PAnnotationValue_LongIntIntByteByteStringValue - // *PAnnotationValue_IntBooleanIntBooleanValue - Field isPAnnotationValue_Field `protobuf_oneof:"field"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PAnnotationValue) Reset() { *m = PAnnotationValue{} } -func (m *PAnnotationValue) String() string { return proto.CompactTextString(m) } -func (*PAnnotationValue) ProtoMessage() {} -func (*PAnnotationValue) Descriptor() ([]byte, []int) { - return fileDescriptor_22207ca389a047ff, []int{5} -} - -func (m *PAnnotationValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PAnnotationValue.Unmarshal(m, b) -} -func (m *PAnnotationValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PAnnotationValue.Marshal(b, m, deterministic) -} -func (m *PAnnotationValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_PAnnotationValue.Merge(m, src) -} -func (m *PAnnotationValue) XXX_Size() int { - return xxx_messageInfo_PAnnotationValue.Size(m) -} -func (m *PAnnotationValue) XXX_DiscardUnknown() { - xxx_messageInfo_PAnnotationValue.DiscardUnknown(m) -} - -var xxx_messageInfo_PAnnotationValue proto.InternalMessageInfo - -type isPAnnotationValue_Field interface { - isPAnnotationValue_Field() -} - -type PAnnotationValue_StringValue struct { - StringValue string `protobuf:"bytes,1,opt,name=stringValue,proto3,oneof"` -} - -type PAnnotationValue_BoolValue struct { - BoolValue bool `protobuf:"varint,2,opt,name=boolValue,proto3,oneof"` -} - -type PAnnotationValue_IntValue struct { - IntValue int32 `protobuf:"varint,3,opt,name=intValue,proto3,oneof"` -} - -type PAnnotationValue_LongValue struct { - LongValue int64 `protobuf:"varint,4,opt,name=longValue,proto3,oneof"` -} - -type PAnnotationValue_ShortValue struct { - ShortValue int32 `protobuf:"zigzag32,5,opt,name=shortValue,proto3,oneof"` -} - -type PAnnotationValue_DoubleValue struct { - DoubleValue float64 `protobuf:"fixed64,6,opt,name=doubleValue,proto3,oneof"` -} - -type PAnnotationValue_BinaryValue struct { - BinaryValue []byte `protobuf:"bytes,7,opt,name=binaryValue,proto3,oneof"` -} - -type PAnnotationValue_ByteValue struct { - ByteValue int32 `protobuf:"zigzag32,8,opt,name=byteValue,proto3,oneof"` -} - -type PAnnotationValue_IntStringValue struct { - IntStringValue *PIntStringValue `protobuf:"bytes,9,opt,name=intStringValue,proto3,oneof"` -} - -type PAnnotationValue_StringStringValue struct { - StringStringValue *PStringStringValue `protobuf:"bytes,10,opt,name=stringStringValue,proto3,oneof"` -} - -type PAnnotationValue_IntStringStringValue struct { - IntStringStringValue *PIntStringStringValue `protobuf:"bytes,11,opt,name=intStringStringValue,proto3,oneof"` -} - -type PAnnotationValue_LongIntIntByteByteStringValue struct { - LongIntIntByteByteStringValue *PLongIntIntByteByteStringValue `protobuf:"bytes,12,opt,name=longIntIntByteByteStringValue,proto3,oneof"` -} - -type PAnnotationValue_IntBooleanIntBooleanValue struct { - IntBooleanIntBooleanValue *PIntBooleanIntBooleanValue `protobuf:"bytes,13,opt,name=intBooleanIntBooleanValue,proto3,oneof"` -} - -func (*PAnnotationValue_StringValue) isPAnnotationValue_Field() {} - -func (*PAnnotationValue_BoolValue) isPAnnotationValue_Field() {} - -func (*PAnnotationValue_IntValue) isPAnnotationValue_Field() {} - -func (*PAnnotationValue_LongValue) isPAnnotationValue_Field() {} - -func (*PAnnotationValue_ShortValue) isPAnnotationValue_Field() {} - -func (*PAnnotationValue_DoubleValue) isPAnnotationValue_Field() {} - -func (*PAnnotationValue_BinaryValue) isPAnnotationValue_Field() {} - -func (*PAnnotationValue_ByteValue) isPAnnotationValue_Field() {} - -func (*PAnnotationValue_IntStringValue) isPAnnotationValue_Field() {} - -func (*PAnnotationValue_StringStringValue) isPAnnotationValue_Field() {} - -func (*PAnnotationValue_IntStringStringValue) isPAnnotationValue_Field() {} - -func (*PAnnotationValue_LongIntIntByteByteStringValue) isPAnnotationValue_Field() {} - -func (*PAnnotationValue_IntBooleanIntBooleanValue) isPAnnotationValue_Field() {} - -func (m *PAnnotationValue) GetField() isPAnnotationValue_Field { - if m != nil { - return m.Field - } - return nil -} - -func (m *PAnnotationValue) GetStringValue() string { - if x, ok := m.GetField().(*PAnnotationValue_StringValue); ok { - return x.StringValue - } - return "" -} - -func (m *PAnnotationValue) GetBoolValue() bool { - if x, ok := m.GetField().(*PAnnotationValue_BoolValue); ok { - return x.BoolValue - } - return false -} - -func (m *PAnnotationValue) GetIntValue() int32 { - if x, ok := m.GetField().(*PAnnotationValue_IntValue); ok { - return x.IntValue - } - return 0 -} - -func (m *PAnnotationValue) GetLongValue() int64 { - if x, ok := m.GetField().(*PAnnotationValue_LongValue); ok { - return x.LongValue - } - return 0 -} - -func (m *PAnnotationValue) GetShortValue() int32 { - if x, ok := m.GetField().(*PAnnotationValue_ShortValue); ok { - return x.ShortValue - } - return 0 -} - -func (m *PAnnotationValue) GetDoubleValue() float64 { - if x, ok := m.GetField().(*PAnnotationValue_DoubleValue); ok { - return x.DoubleValue - } - return 0 -} - -func (m *PAnnotationValue) GetBinaryValue() []byte { - if x, ok := m.GetField().(*PAnnotationValue_BinaryValue); ok { - return x.BinaryValue - } - return nil -} - -func (m *PAnnotationValue) GetByteValue() int32 { - if x, ok := m.GetField().(*PAnnotationValue_ByteValue); ok { - return x.ByteValue - } - return 0 -} - -func (m *PAnnotationValue) GetIntStringValue() *PIntStringValue { - if x, ok := m.GetField().(*PAnnotationValue_IntStringValue); ok { - return x.IntStringValue - } - return nil -} - -func (m *PAnnotationValue) GetStringStringValue() *PStringStringValue { - if x, ok := m.GetField().(*PAnnotationValue_StringStringValue); ok { - return x.StringStringValue - } - return nil -} - -func (m *PAnnotationValue) GetIntStringStringValue() *PIntStringStringValue { - if x, ok := m.GetField().(*PAnnotationValue_IntStringStringValue); ok { - return x.IntStringStringValue - } - return nil -} - -func (m *PAnnotationValue) GetLongIntIntByteByteStringValue() *PLongIntIntByteByteStringValue { - if x, ok := m.GetField().(*PAnnotationValue_LongIntIntByteByteStringValue); ok { - return x.LongIntIntByteByteStringValue - } - return nil -} - -func (m *PAnnotationValue) GetIntBooleanIntBooleanValue() *PIntBooleanIntBooleanValue { - if x, ok := m.GetField().(*PAnnotationValue_IntBooleanIntBooleanValue); ok { - return x.IntBooleanIntBooleanValue - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*PAnnotationValue) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*PAnnotationValue_StringValue)(nil), - (*PAnnotationValue_BoolValue)(nil), - (*PAnnotationValue_IntValue)(nil), - (*PAnnotationValue_LongValue)(nil), - (*PAnnotationValue_ShortValue)(nil), - (*PAnnotationValue_DoubleValue)(nil), - (*PAnnotationValue_BinaryValue)(nil), - (*PAnnotationValue_ByteValue)(nil), - (*PAnnotationValue_IntStringValue)(nil), - (*PAnnotationValue_StringStringValue)(nil), - (*PAnnotationValue_IntStringStringValue)(nil), - (*PAnnotationValue_LongIntIntByteByteStringValue)(nil), - (*PAnnotationValue_IntBooleanIntBooleanValue)(nil), - } -} - -type PAnnotation struct { - Key int32 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"` - Value *PAnnotationValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PAnnotation) Reset() { *m = PAnnotation{} } -func (m *PAnnotation) String() string { return proto.CompactTextString(m) } -func (*PAnnotation) ProtoMessage() {} -func (*PAnnotation) Descriptor() ([]byte, []int) { - return fileDescriptor_22207ca389a047ff, []int{6} -} - -func (m *PAnnotation) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PAnnotation.Unmarshal(m, b) -} -func (m *PAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PAnnotation.Marshal(b, m, deterministic) -} -func (m *PAnnotation) XXX_Merge(src proto.Message) { - xxx_messageInfo_PAnnotation.Merge(m, src) -} -func (m *PAnnotation) XXX_Size() int { - return xxx_messageInfo_PAnnotation.Size(m) -} -func (m *PAnnotation) XXX_DiscardUnknown() { - xxx_messageInfo_PAnnotation.DiscardUnknown(m) -} - -var xxx_messageInfo_PAnnotation proto.InternalMessageInfo - -func (m *PAnnotation) GetKey() int32 { - if m != nil { - return m.Key - } - return 0 -} - -func (m *PAnnotation) GetValue() *PAnnotationValue { - if m != nil { - return m.Value - } - return nil -} - -func init() { - proto.RegisterType((*PIntStringValue)(nil), "v1.PIntStringValue") - proto.RegisterType((*PIntStringStringValue)(nil), "v1.PIntStringStringValue") - proto.RegisterType((*PLongIntIntByteByteStringValue)(nil), "v1.PLongIntIntByteByteStringValue") - proto.RegisterType((*PIntBooleanIntBooleanValue)(nil), "v1.PIntBooleanIntBooleanValue") - proto.RegisterType((*PStringStringValue)(nil), "v1.PStringStringValue") - proto.RegisterType((*PAnnotationValue)(nil), "v1.PAnnotationValue") - proto.RegisterType((*PAnnotation)(nil), "v1.PAnnotation") -} - -func init() { - proto.RegisterFile("Annotation.proto", fileDescriptor_22207ca389a047ff) -} - -var fileDescriptor_22207ca389a047ff = []byte{ - // 599 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x51, 0x6f, 0xd3, 0x30, - 0x10, 0x8e, 0x57, 0xb2, 0xad, 0xd7, 0xc2, 0x3a, 0x33, 0x50, 0x56, 0x95, 0xa8, 0xe4, 0xa9, 0xe2, - 0x21, 0x53, 0x83, 0xc4, 0x1b, 0x08, 0xfa, 0x80, 0x52, 0x81, 0x44, 0x64, 0x24, 0x1e, 0x91, 0xd2, - 0xce, 0x2b, 0x81, 0xcc, 0x8e, 0x52, 0xb7, 0xa8, 0xff, 0x84, 0x7f, 0xc2, 0x8f, 0xe0, 0x1f, 0xf1, - 0x84, 0xec, 0x34, 0xb3, 0x93, 0x76, 0x55, 0x2b, 0x1e, 0x2a, 0xb9, 0xe7, 0xbb, 0xef, 0xee, 0x3b, - 0x7f, 0x77, 0x81, 0xce, 0x3b, 0xc6, 0xb8, 0x88, 0x45, 0xc2, 0x99, 0x9f, 0xe5, 0x5c, 0x70, 0x7c, - 0xb4, 0x1c, 0x76, 0xdd, 0x19, 0xe7, 0xb3, 0x94, 0x5e, 0x29, 0xcb, 0x64, 0x71, 0x73, 0xf5, 0x33, - 0x8f, 0xb3, 0x8c, 0xe6, 0xf3, 0xc2, 0xc7, 0xbb, 0x85, 0xb3, 0x68, 0xcc, 0xc4, 0x67, 0x91, 0x27, - 0x6c, 0xf6, 0x25, 0x4e, 0x17, 0x14, 0x77, 0xe1, 0x34, 0x61, 0x42, 0x9d, 0x1d, 0xd4, 0x47, 0x03, - 0x9b, 0xdc, 0xfd, 0xc7, 0x6f, 0xa0, 0x35, 0xd7, 0xae, 0xce, 0x51, 0x1f, 0x0d, 0x5a, 0x41, 0xcf, - 0x2f, 0x92, 0xf8, 0x65, 0x12, 0xdf, 0x80, 0x23, 0x66, 0x80, 0xf7, 0x1b, 0xc1, 0x13, 0x9d, 0x6f, - 0xdf, 0xac, 0x6f, 0xa1, 0x6d, 0x80, 0x0c, 0xf7, 0x4a, 0x5b, 0x89, 0xa8, 0x21, 0x04, 0x4e, 0xe3, - 0x40, 0x84, 0xc0, 0xfb, 0x8b, 0xc0, 0x8d, 0x3e, 0x72, 0x36, 0x1b, 0x33, 0x31, 0x66, 0x62, 0xb4, - 0x12, 0x54, 0xfe, 0x4c, 0x0a, 0x3d, 0x68, 0xa6, 0xbc, 0x6c, 0x8d, 0xe4, 0xd0, 0x20, 0xda, 0x20, - 0x6f, 0x4b, 0x42, 0x05, 0x03, 0x9b, 0x68, 0x83, 0x79, 0x5b, 0x54, 0x67, 0xdc, 0x06, 0xd8, 0x05, - 0x98, 0xac, 0x04, 0x5d, 0x07, 0x3f, 0xe8, 0xa3, 0xc1, 0x39, 0x31, 0x2c, 0x95, 0xfb, 0xc0, 0xb1, - 0x6b, 0xf7, 0x41, 0xfd, 0xd9, 0x8e, 0x0f, 0x7d, 0xb6, 0x5f, 0x08, 0xba, 0xf2, 0xd9, 0x46, 0x9c, - 0xa7, 0x34, 0x66, 0xfa, 0xb4, 0x85, 0x1a, 0xaa, 0x53, 0x93, 0xc5, 0x71, 0x9e, 0x1a, 0xcc, 0x4f, - 0x89, 0x61, 0xd9, 0x83, 0x7a, 0xe9, 0x1b, 0x28, 0xea, 0x66, 0x74, 0x20, 0x4b, 0xc3, 0xd1, 0xa6, - 0x9c, 0xea, 0x92, 0x41, 0xff, 0x2d, 0x99, 0xa3, 0x83, 0x25, 0xf3, 0xc7, 0x86, 0x4e, 0xa4, 0xa7, - 0xb2, 0x28, 0xcc, 0xab, 0x3e, 0x85, 0xac, 0xab, 0x19, 0x5a, 0x95, 0x76, 0x63, 0x17, 0x9a, 0x77, - 0x0c, 0x8b, 0x86, 0x85, 0x16, 0xd1, 0x26, 0xdc, 0x33, 0x66, 0x45, 0x35, 0x2c, 0xb4, 0x8c, 0x69, - 0x71, 0x4d, 0x19, 0xca, 0x86, 0x35, 0x64, 0xb4, 0x16, 0x62, 0x1f, 0x60, 0xfe, 0x8d, 0xe7, 0xeb, - 0x78, 0x25, 0x96, 0xd0, 0x22, 0x86, 0x4d, 0xd6, 0x78, 0xcd, 0x17, 0x93, 0x94, 0x6a, 0xb9, 0x20, - 0x59, 0xa3, 0x61, 0x94, 0x3e, 0x93, 0x84, 0xc5, 0xf9, 0xaa, 0xf0, 0x39, 0xe9, 0xa3, 0x41, 0x5b, - 0xfa, 0x18, 0x46, 0xc5, 0xa3, 0x14, 0xa1, 0x73, 0xba, 0x4e, 0xa4, 0x4d, 0xf8, 0x35, 0x3c, 0x4a, - 0x2a, 0xbb, 0xc7, 0x69, 0xaa, 0x26, 0x3f, 0xf6, 0x97, 0x43, 0xbf, 0xb6, 0x96, 0x42, 0x8b, 0xd4, - 0x9c, 0xf1, 0x7b, 0x38, 0x9f, 0xd7, 0x1f, 0xde, 0x01, 0x85, 0xf0, 0x54, 0x21, 0x6c, 0xc8, 0x22, - 0xb4, 0xc8, 0x66, 0x08, 0xfe, 0x04, 0x17, 0xc9, 0x96, 0x95, 0xe4, 0xb4, 0x14, 0xd4, 0x65, 0xb5, - 0x98, 0x2a, 0xda, 0xd6, 0x40, 0xfc, 0x1d, 0x9e, 0xa5, 0xbb, 0x36, 0x85, 0xd3, 0x56, 0xc8, 0x9e, - 0x42, 0xde, 0xb9, 0x53, 0x42, 0x8b, 0xec, 0x86, 0xc2, 0x5f, 0xe1, 0x32, 0xb9, 0x6f, 0x30, 0x9d, - 0x87, 0x2a, 0x8f, 0x5b, 0x32, 0xd8, 0xee, 0x15, 0x5a, 0xe4, 0x7e, 0x88, 0xd1, 0x09, 0xd8, 0x37, - 0x09, 0x4d, 0xaf, 0xbd, 0x0f, 0xd0, 0x32, 0xc4, 0x8c, 0x3b, 0xd0, 0xf8, 0x41, 0x57, 0xeb, 0x69, - 0x97, 0x47, 0xfc, 0x02, 0xec, 0xa5, 0xf1, 0x55, 0xb8, 0x50, 0x59, 0x6b, 0xf2, 0x27, 0x85, 0xcb, - 0xe8, 0x15, 0x3c, 0x9f, 0xf2, 0x5b, 0x9f, 0xc5, 0x4b, 0x9a, 0x4f, 0x79, 0x9e, 0xf9, 0x59, 0xc2, - 0x32, 0x9e, 0x30, 0xe1, 0xcf, 0xf2, 0x6c, 0xea, 0x8b, 0x3c, 0x9e, 0xd2, 0xd1, 0x99, 0x0e, 0x8e, - 0xe4, 0xb4, 0x45, 0x68, 0x72, 0xac, 0xc6, 0xee, 0xe5, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2a, - 0x1f, 0x5b, 0xfa, 0xed, 0x06, 0x00, 0x00, -} diff --git a/collector-agent/protocol/Cmd.pb.go b/collector-agent/protocol/Cmd.pb.go deleted file mode 100644 index a6bf0cb11..000000000 --- a/collector-agent/protocol/Cmd.pb.go +++ /dev/null @@ -1,919 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: Cmd.proto - -package v1 - -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type PCommandType int32 - -const ( - PCommandType_NONE PCommandType = 0 - PCommandType_PING PCommandType = 100 - PCommandType_PONG PCommandType = 101 - PCommandType_ECHO PCommandType = 710 - PCommandType_ACTIVE_THREAD_COUNT PCommandType = 730 - PCommandType_ACTIVE_THREAD_DUMP PCommandType = 740 - PCommandType_ACTIVE_THREAD_LIGHT_DUMP PCommandType = 750 -) - -var PCommandType_name = map[int32]string{ - 0: "NONE", - 100: "PING", - 101: "PONG", - 710: "ECHO", - 730: "ACTIVE_THREAD_COUNT", - 740: "ACTIVE_THREAD_DUMP", - 750: "ACTIVE_THREAD_LIGHT_DUMP", -} - -var PCommandType_value = map[string]int32{ - "NONE": 0, - "PING": 100, - "PONG": 101, - "ECHO": 710, - "ACTIVE_THREAD_COUNT": 730, - "ACTIVE_THREAD_DUMP": 740, - "ACTIVE_THREAD_LIGHT_DUMP": 750, -} - -func (x PCommandType) String() string { - return proto.EnumName(PCommandType_name, int32(x)) -} - -func (PCommandType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_58faf01eae08271f, []int{0} -} - -type PCmdMessage struct { - // Types that are valid to be assigned to Message: - // *PCmdMessage_HandshakeMessage - // *PCmdMessage_FailMessage - Message isPCmdMessage_Message `protobuf_oneof:"message"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PCmdMessage) Reset() { *m = PCmdMessage{} } -func (m *PCmdMessage) String() string { return proto.CompactTextString(m) } -func (*PCmdMessage) ProtoMessage() {} -func (*PCmdMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_58faf01eae08271f, []int{0} -} - -func (m *PCmdMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PCmdMessage.Unmarshal(m, b) -} -func (m *PCmdMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PCmdMessage.Marshal(b, m, deterministic) -} -func (m *PCmdMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_PCmdMessage.Merge(m, src) -} -func (m *PCmdMessage) XXX_Size() int { - return xxx_messageInfo_PCmdMessage.Size(m) -} -func (m *PCmdMessage) XXX_DiscardUnknown() { - xxx_messageInfo_PCmdMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_PCmdMessage proto.InternalMessageInfo - -type isPCmdMessage_Message interface { - isPCmdMessage_Message() -} - -type PCmdMessage_HandshakeMessage struct { - HandshakeMessage *PCmdServiceHandshake `protobuf:"bytes,1,opt,name=handshakeMessage,proto3,oneof"` -} - -type PCmdMessage_FailMessage struct { - FailMessage *PCmdResponse `protobuf:"bytes,2,opt,name=failMessage,proto3,oneof"` -} - -func (*PCmdMessage_HandshakeMessage) isPCmdMessage_Message() {} - -func (*PCmdMessage_FailMessage) isPCmdMessage_Message() {} - -func (m *PCmdMessage) GetMessage() isPCmdMessage_Message { - if m != nil { - return m.Message - } - return nil -} - -func (m *PCmdMessage) GetHandshakeMessage() *PCmdServiceHandshake { - if x, ok := m.GetMessage().(*PCmdMessage_HandshakeMessage); ok { - return x.HandshakeMessage - } - return nil -} - -func (m *PCmdMessage) GetFailMessage() *PCmdResponse { - if x, ok := m.GetMessage().(*PCmdMessage_FailMessage); ok { - return x.FailMessage - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*PCmdMessage) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*PCmdMessage_HandshakeMessage)(nil), - (*PCmdMessage_FailMessage)(nil), - } -} - -type PCmdServiceHandshake struct { - // initial message - SupportCommandServiceKey []int32 `protobuf:"varint,1,rep,packed,name=supportCommandServiceKey,proto3" json:"supportCommandServiceKey,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PCmdServiceHandshake) Reset() { *m = PCmdServiceHandshake{} } -func (m *PCmdServiceHandshake) String() string { return proto.CompactTextString(m) } -func (*PCmdServiceHandshake) ProtoMessage() {} -func (*PCmdServiceHandshake) Descriptor() ([]byte, []int) { - return fileDescriptor_58faf01eae08271f, []int{1} -} - -func (m *PCmdServiceHandshake) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PCmdServiceHandshake.Unmarshal(m, b) -} -func (m *PCmdServiceHandshake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PCmdServiceHandshake.Marshal(b, m, deterministic) -} -func (m *PCmdServiceHandshake) XXX_Merge(src proto.Message) { - xxx_messageInfo_PCmdServiceHandshake.Merge(m, src) -} -func (m *PCmdServiceHandshake) XXX_Size() int { - return xxx_messageInfo_PCmdServiceHandshake.Size(m) -} -func (m *PCmdServiceHandshake) XXX_DiscardUnknown() { - xxx_messageInfo_PCmdServiceHandshake.DiscardUnknown(m) -} - -var xxx_messageInfo_PCmdServiceHandshake proto.InternalMessageInfo - -func (m *PCmdServiceHandshake) GetSupportCommandServiceKey() []int32 { - if m != nil { - return m.SupportCommandServiceKey - } - return nil -} - -type PCmdResponse struct { - ResponseId int32 `protobuf:"varint,1,opt,name=responseId,proto3" json:"responseId,omitempty"` - Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` - Message *wrappers.StringValue `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PCmdResponse) Reset() { *m = PCmdResponse{} } -func (m *PCmdResponse) String() string { return proto.CompactTextString(m) } -func (*PCmdResponse) ProtoMessage() {} -func (*PCmdResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_58faf01eae08271f, []int{2} -} - -func (m *PCmdResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PCmdResponse.Unmarshal(m, b) -} -func (m *PCmdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PCmdResponse.Marshal(b, m, deterministic) -} -func (m *PCmdResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PCmdResponse.Merge(m, src) -} -func (m *PCmdResponse) XXX_Size() int { - return xxx_messageInfo_PCmdResponse.Size(m) -} -func (m *PCmdResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PCmdResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_PCmdResponse proto.InternalMessageInfo - -func (m *PCmdResponse) GetResponseId() int32 { - if m != nil { - return m.ResponseId - } - return 0 -} - -func (m *PCmdResponse) GetStatus() int32 { - if m != nil { - return m.Status - } - return 0 -} - -func (m *PCmdResponse) GetMessage() *wrappers.StringValue { - if m != nil { - return m.Message - } - return nil -} - -type PCmdStreamResponse struct { - ResponseId int32 `protobuf:"varint,1,opt,name=responseId,proto3" json:"responseId,omitempty"` - SequenceId int32 `protobuf:"varint,2,opt,name=sequenceId,proto3" json:"sequenceId,omitempty"` - Message *wrappers.StringValue `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PCmdStreamResponse) Reset() { *m = PCmdStreamResponse{} } -func (m *PCmdStreamResponse) String() string { return proto.CompactTextString(m) } -func (*PCmdStreamResponse) ProtoMessage() {} -func (*PCmdStreamResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_58faf01eae08271f, []int{3} -} - -func (m *PCmdStreamResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PCmdStreamResponse.Unmarshal(m, b) -} -func (m *PCmdStreamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PCmdStreamResponse.Marshal(b, m, deterministic) -} -func (m *PCmdStreamResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PCmdStreamResponse.Merge(m, src) -} -func (m *PCmdStreamResponse) XXX_Size() int { - return xxx_messageInfo_PCmdStreamResponse.Size(m) -} -func (m *PCmdStreamResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PCmdStreamResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_PCmdStreamResponse proto.InternalMessageInfo - -func (m *PCmdStreamResponse) GetResponseId() int32 { - if m != nil { - return m.ResponseId - } - return 0 -} - -func (m *PCmdStreamResponse) GetSequenceId() int32 { - if m != nil { - return m.SequenceId - } - return 0 -} - -func (m *PCmdStreamResponse) GetMessage() *wrappers.StringValue { - if m != nil { - return m.Message - } - return nil -} - -type PCmdRequest struct { - RequestId int32 `protobuf:"varint,1,opt,name=requestId,proto3" json:"requestId,omitempty"` - // Types that are valid to be assigned to Command: - // *PCmdRequest_CommandEcho - // *PCmdRequest_CommandActiveThreadCount - // *PCmdRequest_CommandActiveThreadDump - // *PCmdRequest_CommandActiveThreadLightDump - Command isPCmdRequest_Command `protobuf_oneof:"command"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PCmdRequest) Reset() { *m = PCmdRequest{} } -func (m *PCmdRequest) String() string { return proto.CompactTextString(m) } -func (*PCmdRequest) ProtoMessage() {} -func (*PCmdRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_58faf01eae08271f, []int{4} -} - -func (m *PCmdRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PCmdRequest.Unmarshal(m, b) -} -func (m *PCmdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PCmdRequest.Marshal(b, m, deterministic) -} -func (m *PCmdRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PCmdRequest.Merge(m, src) -} -func (m *PCmdRequest) XXX_Size() int { - return xxx_messageInfo_PCmdRequest.Size(m) -} -func (m *PCmdRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PCmdRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_PCmdRequest proto.InternalMessageInfo - -func (m *PCmdRequest) GetRequestId() int32 { - if m != nil { - return m.RequestId - } - return 0 -} - -type isPCmdRequest_Command interface { - isPCmdRequest_Command() -} - -type PCmdRequest_CommandEcho struct { - CommandEcho *PCmdEcho `protobuf:"bytes,710,opt,name=commandEcho,proto3,oneof"` -} - -type PCmdRequest_CommandActiveThreadCount struct { - CommandActiveThreadCount *PCmdActiveThreadCount `protobuf:"bytes,730,opt,name=commandActiveThreadCount,proto3,oneof"` -} - -type PCmdRequest_CommandActiveThreadDump struct { - CommandActiveThreadDump *PCmdActiveThreadDump `protobuf:"bytes,740,opt,name=commandActiveThreadDump,proto3,oneof"` -} - -type PCmdRequest_CommandActiveThreadLightDump struct { - CommandActiveThreadLightDump *PCmdActiveThreadLightDump `protobuf:"bytes,750,opt,name=commandActiveThreadLightDump,proto3,oneof"` -} - -func (*PCmdRequest_CommandEcho) isPCmdRequest_Command() {} - -func (*PCmdRequest_CommandActiveThreadCount) isPCmdRequest_Command() {} - -func (*PCmdRequest_CommandActiveThreadDump) isPCmdRequest_Command() {} - -func (*PCmdRequest_CommandActiveThreadLightDump) isPCmdRequest_Command() {} - -func (m *PCmdRequest) GetCommand() isPCmdRequest_Command { - if m != nil { - return m.Command - } - return nil -} - -func (m *PCmdRequest) GetCommandEcho() *PCmdEcho { - if x, ok := m.GetCommand().(*PCmdRequest_CommandEcho); ok { - return x.CommandEcho - } - return nil -} - -func (m *PCmdRequest) GetCommandActiveThreadCount() *PCmdActiveThreadCount { - if x, ok := m.GetCommand().(*PCmdRequest_CommandActiveThreadCount); ok { - return x.CommandActiveThreadCount - } - return nil -} - -func (m *PCmdRequest) GetCommandActiveThreadDump() *PCmdActiveThreadDump { - if x, ok := m.GetCommand().(*PCmdRequest_CommandActiveThreadDump); ok { - return x.CommandActiveThreadDump - } - return nil -} - -func (m *PCmdRequest) GetCommandActiveThreadLightDump() *PCmdActiveThreadLightDump { - if x, ok := m.GetCommand().(*PCmdRequest_CommandActiveThreadLightDump); ok { - return x.CommandActiveThreadLightDump - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*PCmdRequest) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*PCmdRequest_CommandEcho)(nil), - (*PCmdRequest_CommandActiveThreadCount)(nil), - (*PCmdRequest_CommandActiveThreadDump)(nil), - (*PCmdRequest_CommandActiveThreadLightDump)(nil), - } -} - -type PCmdEcho struct { - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PCmdEcho) Reset() { *m = PCmdEcho{} } -func (m *PCmdEcho) String() string { return proto.CompactTextString(m) } -func (*PCmdEcho) ProtoMessage() {} -func (*PCmdEcho) Descriptor() ([]byte, []int) { - return fileDescriptor_58faf01eae08271f, []int{5} -} - -func (m *PCmdEcho) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PCmdEcho.Unmarshal(m, b) -} -func (m *PCmdEcho) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PCmdEcho.Marshal(b, m, deterministic) -} -func (m *PCmdEcho) XXX_Merge(src proto.Message) { - xxx_messageInfo_PCmdEcho.Merge(m, src) -} -func (m *PCmdEcho) XXX_Size() int { - return xxx_messageInfo_PCmdEcho.Size(m) -} -func (m *PCmdEcho) XXX_DiscardUnknown() { - xxx_messageInfo_PCmdEcho.DiscardUnknown(m) -} - -var xxx_messageInfo_PCmdEcho proto.InternalMessageInfo - -func (m *PCmdEcho) GetMessage() string { - if m != nil { - return m.Message - } - return "" -} - -type PCmdEchoResponse struct { - CommonResponse *PCmdResponse `protobuf:"bytes,1,opt,name=commonResponse,proto3" json:"commonResponse,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PCmdEchoResponse) Reset() { *m = PCmdEchoResponse{} } -func (m *PCmdEchoResponse) String() string { return proto.CompactTextString(m) } -func (*PCmdEchoResponse) ProtoMessage() {} -func (*PCmdEchoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_58faf01eae08271f, []int{6} -} - -func (m *PCmdEchoResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PCmdEchoResponse.Unmarshal(m, b) -} -func (m *PCmdEchoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PCmdEchoResponse.Marshal(b, m, deterministic) -} -func (m *PCmdEchoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PCmdEchoResponse.Merge(m, src) -} -func (m *PCmdEchoResponse) XXX_Size() int { - return xxx_messageInfo_PCmdEchoResponse.Size(m) -} -func (m *PCmdEchoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PCmdEchoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_PCmdEchoResponse proto.InternalMessageInfo - -func (m *PCmdEchoResponse) GetCommonResponse() *PCmdResponse { - if m != nil { - return m.CommonResponse - } - return nil -} - -func (m *PCmdEchoResponse) GetMessage() string { - if m != nil { - return m.Message - } - return "" -} - -type PCmdActiveThreadDump struct { - Limit int32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` - ThreadName []string `protobuf:"bytes,2,rep,name=threadName,proto3" json:"threadName,omitempty"` - LocalTraceId []int64 `protobuf:"varint,3,rep,packed,name=localTraceId,proto3" json:"localTraceId,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PCmdActiveThreadDump) Reset() { *m = PCmdActiveThreadDump{} } -func (m *PCmdActiveThreadDump) String() string { return proto.CompactTextString(m) } -func (*PCmdActiveThreadDump) ProtoMessage() {} -func (*PCmdActiveThreadDump) Descriptor() ([]byte, []int) { - return fileDescriptor_58faf01eae08271f, []int{7} -} - -func (m *PCmdActiveThreadDump) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PCmdActiveThreadDump.Unmarshal(m, b) -} -func (m *PCmdActiveThreadDump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PCmdActiveThreadDump.Marshal(b, m, deterministic) -} -func (m *PCmdActiveThreadDump) XXX_Merge(src proto.Message) { - xxx_messageInfo_PCmdActiveThreadDump.Merge(m, src) -} -func (m *PCmdActiveThreadDump) XXX_Size() int { - return xxx_messageInfo_PCmdActiveThreadDump.Size(m) -} -func (m *PCmdActiveThreadDump) XXX_DiscardUnknown() { - xxx_messageInfo_PCmdActiveThreadDump.DiscardUnknown(m) -} - -var xxx_messageInfo_PCmdActiveThreadDump proto.InternalMessageInfo - -func (m *PCmdActiveThreadDump) GetLimit() int32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *PCmdActiveThreadDump) GetThreadName() []string { - if m != nil { - return m.ThreadName - } - return nil -} - -func (m *PCmdActiveThreadDump) GetLocalTraceId() []int64 { - if m != nil { - return m.LocalTraceId - } - return nil -} - -type PCmdActiveThreadDumpRes struct { - CommonResponse *PCmdResponse `protobuf:"bytes,1,opt,name=commonResponse,proto3" json:"commonResponse,omitempty"` - ThreadDump []*PActiveThreadDump `protobuf:"bytes,2,rep,name=threadDump,proto3" json:"threadDump,omitempty"` - Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` - SubType string `protobuf:"bytes,4,opt,name=subType,proto3" json:"subType,omitempty"` - Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PCmdActiveThreadDumpRes) Reset() { *m = PCmdActiveThreadDumpRes{} } -func (m *PCmdActiveThreadDumpRes) String() string { return proto.CompactTextString(m) } -func (*PCmdActiveThreadDumpRes) ProtoMessage() {} -func (*PCmdActiveThreadDumpRes) Descriptor() ([]byte, []int) { - return fileDescriptor_58faf01eae08271f, []int{8} -} - -func (m *PCmdActiveThreadDumpRes) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PCmdActiveThreadDumpRes.Unmarshal(m, b) -} -func (m *PCmdActiveThreadDumpRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PCmdActiveThreadDumpRes.Marshal(b, m, deterministic) -} -func (m *PCmdActiveThreadDumpRes) XXX_Merge(src proto.Message) { - xxx_messageInfo_PCmdActiveThreadDumpRes.Merge(m, src) -} -func (m *PCmdActiveThreadDumpRes) XXX_Size() int { - return xxx_messageInfo_PCmdActiveThreadDumpRes.Size(m) -} -func (m *PCmdActiveThreadDumpRes) XXX_DiscardUnknown() { - xxx_messageInfo_PCmdActiveThreadDumpRes.DiscardUnknown(m) -} - -var xxx_messageInfo_PCmdActiveThreadDumpRes proto.InternalMessageInfo - -func (m *PCmdActiveThreadDumpRes) GetCommonResponse() *PCmdResponse { - if m != nil { - return m.CommonResponse - } - return nil -} - -func (m *PCmdActiveThreadDumpRes) GetThreadDump() []*PActiveThreadDump { - if m != nil { - return m.ThreadDump - } - return nil -} - -func (m *PCmdActiveThreadDumpRes) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *PCmdActiveThreadDumpRes) GetSubType() string { - if m != nil { - return m.SubType - } - return "" -} - -func (m *PCmdActiveThreadDumpRes) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -type PCmdActiveThreadLightDump struct { - Limit int32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` - ThreadName []string `protobuf:"bytes,2,rep,name=threadName,proto3" json:"threadName,omitempty"` - LocalTraceId []int64 `protobuf:"varint,3,rep,packed,name=localTraceId,proto3" json:"localTraceId,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PCmdActiveThreadLightDump) Reset() { *m = PCmdActiveThreadLightDump{} } -func (m *PCmdActiveThreadLightDump) String() string { return proto.CompactTextString(m) } -func (*PCmdActiveThreadLightDump) ProtoMessage() {} -func (*PCmdActiveThreadLightDump) Descriptor() ([]byte, []int) { - return fileDescriptor_58faf01eae08271f, []int{9} -} - -func (m *PCmdActiveThreadLightDump) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PCmdActiveThreadLightDump.Unmarshal(m, b) -} -func (m *PCmdActiveThreadLightDump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PCmdActiveThreadLightDump.Marshal(b, m, deterministic) -} -func (m *PCmdActiveThreadLightDump) XXX_Merge(src proto.Message) { - xxx_messageInfo_PCmdActiveThreadLightDump.Merge(m, src) -} -func (m *PCmdActiveThreadLightDump) XXX_Size() int { - return xxx_messageInfo_PCmdActiveThreadLightDump.Size(m) -} -func (m *PCmdActiveThreadLightDump) XXX_DiscardUnknown() { - xxx_messageInfo_PCmdActiveThreadLightDump.DiscardUnknown(m) -} - -var xxx_messageInfo_PCmdActiveThreadLightDump proto.InternalMessageInfo - -func (m *PCmdActiveThreadLightDump) GetLimit() int32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *PCmdActiveThreadLightDump) GetThreadName() []string { - if m != nil { - return m.ThreadName - } - return nil -} - -func (m *PCmdActiveThreadLightDump) GetLocalTraceId() []int64 { - if m != nil { - return m.LocalTraceId - } - return nil -} - -type PCmdActiveThreadLightDumpRes struct { - CommonResponse *PCmdResponse `protobuf:"bytes,1,opt,name=commonResponse,proto3" json:"commonResponse,omitempty"` - ThreadDump []*PActiveThreadLightDump `protobuf:"bytes,2,rep,name=threadDump,proto3" json:"threadDump,omitempty"` - Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` - SubType string `protobuf:"bytes,4,opt,name=subType,proto3" json:"subType,omitempty"` - Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PCmdActiveThreadLightDumpRes) Reset() { *m = PCmdActiveThreadLightDumpRes{} } -func (m *PCmdActiveThreadLightDumpRes) String() string { return proto.CompactTextString(m) } -func (*PCmdActiveThreadLightDumpRes) ProtoMessage() {} -func (*PCmdActiveThreadLightDumpRes) Descriptor() ([]byte, []int) { - return fileDescriptor_58faf01eae08271f, []int{10} -} - -func (m *PCmdActiveThreadLightDumpRes) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PCmdActiveThreadLightDumpRes.Unmarshal(m, b) -} -func (m *PCmdActiveThreadLightDumpRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PCmdActiveThreadLightDumpRes.Marshal(b, m, deterministic) -} -func (m *PCmdActiveThreadLightDumpRes) XXX_Merge(src proto.Message) { - xxx_messageInfo_PCmdActiveThreadLightDumpRes.Merge(m, src) -} -func (m *PCmdActiveThreadLightDumpRes) XXX_Size() int { - return xxx_messageInfo_PCmdActiveThreadLightDumpRes.Size(m) -} -func (m *PCmdActiveThreadLightDumpRes) XXX_DiscardUnknown() { - xxx_messageInfo_PCmdActiveThreadLightDumpRes.DiscardUnknown(m) -} - -var xxx_messageInfo_PCmdActiveThreadLightDumpRes proto.InternalMessageInfo - -func (m *PCmdActiveThreadLightDumpRes) GetCommonResponse() *PCmdResponse { - if m != nil { - return m.CommonResponse - } - return nil -} - -func (m *PCmdActiveThreadLightDumpRes) GetThreadDump() []*PActiveThreadLightDump { - if m != nil { - return m.ThreadDump - } - return nil -} - -func (m *PCmdActiveThreadLightDumpRes) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *PCmdActiveThreadLightDumpRes) GetSubType() string { - if m != nil { - return m.SubType - } - return "" -} - -func (m *PCmdActiveThreadLightDumpRes) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -type PCmdActiveThreadCount struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PCmdActiveThreadCount) Reset() { *m = PCmdActiveThreadCount{} } -func (m *PCmdActiveThreadCount) String() string { return proto.CompactTextString(m) } -func (*PCmdActiveThreadCount) ProtoMessage() {} -func (*PCmdActiveThreadCount) Descriptor() ([]byte, []int) { - return fileDescriptor_58faf01eae08271f, []int{11} -} - -func (m *PCmdActiveThreadCount) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PCmdActiveThreadCount.Unmarshal(m, b) -} -func (m *PCmdActiveThreadCount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PCmdActiveThreadCount.Marshal(b, m, deterministic) -} -func (m *PCmdActiveThreadCount) XXX_Merge(src proto.Message) { - xxx_messageInfo_PCmdActiveThreadCount.Merge(m, src) -} -func (m *PCmdActiveThreadCount) XXX_Size() int { - return xxx_messageInfo_PCmdActiveThreadCount.Size(m) -} -func (m *PCmdActiveThreadCount) XXX_DiscardUnknown() { - xxx_messageInfo_PCmdActiveThreadCount.DiscardUnknown(m) -} - -var xxx_messageInfo_PCmdActiveThreadCount proto.InternalMessageInfo - -type PCmdActiveThreadCountRes struct { - CommonStreamResponse *PCmdStreamResponse `protobuf:"bytes,1,opt,name=commonStreamResponse,proto3" json:"commonStreamResponse,omitempty"` - HistogramSchemaType int32 `protobuf:"varint,2,opt,name=histogramSchemaType,proto3" json:"histogramSchemaType,omitempty"` - ActiveThreadCount []int32 `protobuf:"varint,3,rep,packed,name=activeThreadCount,proto3" json:"activeThreadCount,omitempty"` - TimeStamp int64 `protobuf:"varint,4,opt,name=timeStamp,proto3" json:"timeStamp,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PCmdActiveThreadCountRes) Reset() { *m = PCmdActiveThreadCountRes{} } -func (m *PCmdActiveThreadCountRes) String() string { return proto.CompactTextString(m) } -func (*PCmdActiveThreadCountRes) ProtoMessage() {} -func (*PCmdActiveThreadCountRes) Descriptor() ([]byte, []int) { - return fileDescriptor_58faf01eae08271f, []int{12} -} - -func (m *PCmdActiveThreadCountRes) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PCmdActiveThreadCountRes.Unmarshal(m, b) -} -func (m *PCmdActiveThreadCountRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PCmdActiveThreadCountRes.Marshal(b, m, deterministic) -} -func (m *PCmdActiveThreadCountRes) XXX_Merge(src proto.Message) { - xxx_messageInfo_PCmdActiveThreadCountRes.Merge(m, src) -} -func (m *PCmdActiveThreadCountRes) XXX_Size() int { - return xxx_messageInfo_PCmdActiveThreadCountRes.Size(m) -} -func (m *PCmdActiveThreadCountRes) XXX_DiscardUnknown() { - xxx_messageInfo_PCmdActiveThreadCountRes.DiscardUnknown(m) -} - -var xxx_messageInfo_PCmdActiveThreadCountRes proto.InternalMessageInfo - -func (m *PCmdActiveThreadCountRes) GetCommonStreamResponse() *PCmdStreamResponse { - if m != nil { - return m.CommonStreamResponse - } - return nil -} - -func (m *PCmdActiveThreadCountRes) GetHistogramSchemaType() int32 { - if m != nil { - return m.HistogramSchemaType - } - return 0 -} - -func (m *PCmdActiveThreadCountRes) GetActiveThreadCount() []int32 { - if m != nil { - return m.ActiveThreadCount - } - return nil -} - -func (m *PCmdActiveThreadCountRes) GetTimeStamp() int64 { - if m != nil { - return m.TimeStamp - } - return 0 -} - -func init() { - proto.RegisterEnum("v1.PCommandType", PCommandType_name, PCommandType_value) - proto.RegisterType((*PCmdMessage)(nil), "v1.PCmdMessage") - proto.RegisterType((*PCmdServiceHandshake)(nil), "v1.PCmdServiceHandshake") - proto.RegisterType((*PCmdResponse)(nil), "v1.PCmdResponse") - proto.RegisterType((*PCmdStreamResponse)(nil), "v1.PCmdStreamResponse") - proto.RegisterType((*PCmdRequest)(nil), "v1.PCmdRequest") - proto.RegisterType((*PCmdEcho)(nil), "v1.PCmdEcho") - proto.RegisterType((*PCmdEchoResponse)(nil), "v1.PCmdEchoResponse") - proto.RegisterType((*PCmdActiveThreadDump)(nil), "v1.PCmdActiveThreadDump") - proto.RegisterType((*PCmdActiveThreadDumpRes)(nil), "v1.PCmdActiveThreadDumpRes") - proto.RegisterType((*PCmdActiveThreadLightDump)(nil), "v1.PCmdActiveThreadLightDump") - proto.RegisterType((*PCmdActiveThreadLightDumpRes)(nil), "v1.PCmdActiveThreadLightDumpRes") - proto.RegisterType((*PCmdActiveThreadCount)(nil), "v1.PCmdActiveThreadCount") - proto.RegisterType((*PCmdActiveThreadCountRes)(nil), "v1.PCmdActiveThreadCountRes") -} - -func init() { - proto.RegisterFile("Cmd.proto", fileDescriptor_58faf01eae08271f) -} - -var fileDescriptor_58faf01eae08271f = []byte{ - // 827 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x4d, 0x6f, 0xdb, 0x36, - 0x18, 0xb6, 0xa2, 0xa8, 0x8b, 0x5f, 0x07, 0x83, 0xc6, 0xa6, 0x8d, 0x1a, 0xa4, 0x41, 0x26, 0xec, - 0x10, 0x0c, 0x83, 0xb2, 0x74, 0x1f, 0x18, 0x7a, 0x4b, 0x14, 0x2f, 0xca, 0xd6, 0x3a, 0x06, 0xe3, - 0x14, 0xbb, 0x15, 0x8c, 0xc4, 0xd8, 0xc2, 0x2c, 0x51, 0xa3, 0x28, 0x0f, 0xbd, 0x0c, 0xbb, 0x0e, - 0xd8, 0x79, 0x3f, 0xa9, 0x3f, 0x60, 0xc7, 0x62, 0xc7, 0x9c, 0xfb, 0x1b, 0x06, 0x92, 0x92, 0x2d, - 0x57, 0xf2, 0x30, 0xb4, 0xc8, 0x8d, 0x7c, 0x9f, 0xe7, 0xfd, 0x7a, 0xf8, 0x92, 0x84, 0xae, 0x9f, - 0x44, 0x5e, 0xc6, 0x99, 0x60, 0x68, 0x6d, 0x76, 0xb4, 0xb3, 0x37, 0x66, 0x6c, 0x3c, 0xa5, 0x87, - 0xca, 0x72, 0x5d, 0xdc, 0x1c, 0xfe, 0xca, 0x49, 0x96, 0x51, 0x9e, 0x6b, 0xce, 0x8e, 0x3d, 0x9a, - 0x70, 0x4a, 0xa2, 0xd3, 0x22, 0xc9, 0xb4, 0xc5, 0xfd, 0xcb, 0x80, 0xde, 0xd0, 0x4f, 0xa2, 0xe7, - 0x34, 0xcf, 0xc9, 0x98, 0xa2, 0xef, 0xc1, 0x9e, 0x90, 0x34, 0xca, 0x27, 0xe4, 0x67, 0x5a, 0xda, - 0x1c, 0x63, 0xdf, 0x38, 0xe8, 0x3d, 0x71, 0xbc, 0xd9, 0x91, 0x27, 0xa9, 0x97, 0x94, 0xcf, 0xe2, - 0x90, 0x06, 0x15, 0x2d, 0xe8, 0xe0, 0x86, 0x0f, 0xfa, 0x1a, 0x7a, 0x37, 0x24, 0x9e, 0x56, 0x21, - 0xd6, 0x54, 0x08, 0xbb, 0x0a, 0x81, 0x69, 0x9e, 0xb1, 0x34, 0x97, 0xae, 0x75, 0xda, 0x49, 0x17, - 0x3e, 0x4a, 0xf4, 0xd2, 0xc5, 0xb0, 0xd5, 0x96, 0x0c, 0x3d, 0x05, 0x27, 0x2f, 0xb2, 0x8c, 0x71, - 0xe1, 0xb3, 0x24, 0x21, 0x69, 0xc5, 0xf8, 0x91, 0xbe, 0x72, 0x8c, 0x7d, 0xf3, 0xc0, 0xc2, 0x2b, - 0x71, 0xf7, 0x37, 0xd8, 0xac, 0x67, 0x47, 0x7b, 0x00, 0xbc, 0x5c, 0x9f, 0x47, 0xaa, 0x4d, 0x0b, - 0xd7, 0x2c, 0xe8, 0x21, 0xdc, 0xcb, 0x05, 0x11, 0x45, 0xae, 0xea, 0xb7, 0x70, 0xb9, 0x43, 0xdf, - 0xce, 0xcb, 0x74, 0x4c, 0xd5, 0xd8, 0xae, 0xa7, 0x85, 0xf7, 0x2a, 0xe1, 0xbd, 0x4b, 0xc1, 0xe3, - 0x74, 0xfc, 0x82, 0x4c, 0x0b, 0x8a, 0xe7, 0x3d, 0xfd, 0x69, 0x00, 0x52, 0x4d, 0x09, 0x4e, 0x49, - 0xf2, 0xbf, 0xcb, 0xd8, 0x03, 0xc8, 0xe9, 0x2f, 0x05, 0x4d, 0x43, 0x89, 0xeb, 0x52, 0x6a, 0x96, - 0xf7, 0x2e, 0xe7, 0x77, 0x53, 0x9f, 0x3d, 0x96, 0xa1, 0x72, 0x81, 0x76, 0xa1, 0xcb, 0xf5, 0x72, - 0x5e, 0xc6, 0xc2, 0x80, 0x8e, 0xa0, 0x17, 0x6a, 0x45, 0xfb, 0xe1, 0x84, 0x39, 0xaf, 0x2d, 0x95, - 0x6a, 0xb3, 0x3a, 0x52, 0x69, 0x94, 0xc7, 0x59, 0xe3, 0xa0, 0x9f, 0xc0, 0x29, 0xb7, 0xc7, 0xa1, - 0x88, 0x67, 0x54, 0x4f, 0x9f, 0xcf, 0x8a, 0x54, 0x38, 0x6f, 0xb4, 0xff, 0xa3, 0xca, 0xbf, 0xc1, - 0x08, 0x3a, 0x78, 0xa5, 0x37, 0xba, 0x82, 0xed, 0x16, 0x4c, 0xce, 0xb5, 0x73, 0x6b, 0x2d, 0x8f, - 0xeb, 0xbb, 0x84, 0xa0, 0x83, 0x57, 0xf9, 0xa2, 0x08, 0x76, 0x5b, 0xa0, 0x67, 0xf1, 0x78, 0x22, - 0x54, 0xec, 0xb7, 0x3a, 0xf6, 0xe3, 0xb6, 0xd8, 0x73, 0x56, 0xd0, 0xc1, 0xff, 0x19, 0x45, 0x4e, - 0x79, 0x89, 0xbb, 0x9f, 0xc1, 0x46, 0x25, 0x1e, 0x72, 0x16, 0xc7, 0x28, 0xc5, 0xef, 0x2e, 0x0e, - 0xea, 0x06, 0xec, 0x8a, 0x35, 0x1f, 0x9a, 0xef, 0xe0, 0x63, 0x19, 0x84, 0xa5, 0x95, 0xa5, 0xbc, - 0xa6, 0x8d, 0x3b, 0x86, 0xdf, 0xe1, 0xd5, 0xf3, 0xac, 0x2d, 0xe7, 0xc9, 0xf4, 0x9d, 0x6b, 0xc8, - 0xb2, 0x05, 0xd6, 0x34, 0x4e, 0x62, 0x51, 0x0e, 0x85, 0xde, 0xc8, 0xb1, 0x14, 0x8a, 0x33, 0x20, - 0x89, 0x0c, 0x65, 0x1e, 0x74, 0x71, 0xcd, 0x82, 0x5c, 0xd8, 0x9c, 0xb2, 0x90, 0x4c, 0x47, 0x9c, - 0xa8, 0xc1, 0x35, 0xf7, 0xcd, 0x03, 0x13, 0x2f, 0xd9, 0xdc, 0xbf, 0x0d, 0xd8, 0x6e, 0x4b, 0x89, - 0x69, 0xfe, 0x01, 0x1d, 0x7e, 0x53, 0x55, 0xa6, 0x0e, 0x4d, 0x56, 0xd6, 0x7b, 0xf2, 0x40, 0x79, - 0x35, 0xf2, 0xd4, 0x88, 0x08, 0xc1, 0xba, 0x78, 0x95, 0xe9, 0x4b, 0xd4, 0xc5, 0x6a, 0x2d, 0xc5, - 0xca, 0x8b, 0xeb, 0x91, 0x34, 0xaf, 0x6b, 0xb1, 0xca, 0xad, 0x44, 0x66, 0x94, 0xe7, 0x31, 0x4b, - 0x1d, 0x4b, 0x23, 0xe5, 0xd6, 0x2d, 0xe0, 0xd1, 0xca, 0xe1, 0xb8, 0x43, 0x2d, 0xff, 0x31, 0x60, - 0x77, 0x65, 0xde, 0x0f, 0x13, 0xf4, 0x69, 0x8b, 0xa0, 0x3b, 0x0d, 0x41, 0x17, 0xc9, 0xee, 0x42, - 0xd5, 0x6d, 0x78, 0xd0, 0xfa, 0x4e, 0xb8, 0xb7, 0x06, 0x38, 0xad, 0x88, 0xec, 0xf9, 0x07, 0xd8, - 0xd2, 0xbd, 0x2c, 0xbf, 0xb9, 0x65, 0xe7, 0x0f, 0xe7, 0x7f, 0xda, 0x12, 0x8a, 0x5b, 0x7d, 0xd0, - 0x97, 0x70, 0x7f, 0x12, 0xe7, 0x82, 0x8d, 0x39, 0x49, 0x2e, 0xc3, 0x09, 0x4d, 0x88, 0xea, 0x40, - 0x3f, 0xc8, 0x6d, 0x10, 0xfa, 0x02, 0x3e, 0x21, 0x8d, 0x97, 0xcf, 0x54, 0xbf, 0x54, 0x13, 0x90, - 0xef, 0xaf, 0x88, 0x13, 0x7a, 0x29, 0x48, 0x92, 0x29, 0x5d, 0x4c, 0xbc, 0x30, 0x7c, 0xfe, 0x87, - 0x21, 0x7f, 0x2f, 0xfd, 0x6e, 0xa8, 0xe0, 0x1b, 0xb0, 0x3e, 0xb8, 0x18, 0xf4, 0xed, 0x8e, 0x5c, - 0x0d, 0xcf, 0x07, 0x67, 0x76, 0xa4, 0x56, 0x17, 0x83, 0x33, 0x9b, 0xa2, 0x2e, 0xac, 0xf7, 0xfd, - 0xe0, 0xc2, 0x7e, 0x6d, 0x21, 0x07, 0xee, 0x1f, 0xfb, 0xa3, 0xf3, 0x17, 0xfd, 0x97, 0xa3, 0x00, - 0xf7, 0x8f, 0x4f, 0x5f, 0xfa, 0x17, 0x57, 0x83, 0x91, 0xfd, 0xc6, 0x42, 0xdb, 0x80, 0x96, 0x91, - 0xd3, 0xab, 0xe7, 0x43, 0xfb, 0xd6, 0x42, 0x8f, 0xc1, 0x59, 0x06, 0x9e, 0x9d, 0x9f, 0x05, 0x23, - 0x0d, 0xbf, 0xb5, 0x4e, 0x0e, 0xe1, 0xd3, 0x90, 0x25, 0x5e, 0x4a, 0x66, 0x94, 0x87, 0x8c, 0x67, - 0x5e, 0x16, 0xa7, 0x19, 0x8b, 0x53, 0xe1, 0x8d, 0x79, 0x16, 0x7a, 0x42, 0x4e, 0xe4, 0xc9, 0x86, - 0x9f, 0x44, 0x43, 0xf9, 0x01, 0x0d, 0x8d, 0xeb, 0x7b, 0xea, 0x27, 0xfa, 0xea, 0xdf, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x09, 0xee, 0x9c, 0xcb, 0xb0, 0x08, 0x00, 0x00, -} diff --git a/collector-agent/protocol/Service.pb.go b/collector-agent/protocol/Service.pb.go deleted file mode 100644 index 2a818199a..000000000 --- a/collector-agent/protocol/Service.pb.go +++ /dev/null @@ -1,851 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: Service.proto - -package v1 - -import ( - context "context" - fmt "fmt" - proto "github.com/golang/protobuf/proto" - empty "github.com/golang/protobuf/ptypes/empty" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -func init() { - proto.RegisterFile("Service.proto", fileDescriptor_88420990119a24c7) -} - -var fileDescriptor_88420990119a24c7 = []byte{ - // 463 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xd1, 0x6e, 0xd3, 0x30, - 0x14, 0x5d, 0x61, 0xa0, 0xcd, 0x65, 0x50, 0x5d, 0x60, 0x48, 0xdd, 0x84, 0x60, 0x4f, 0xf0, 0xe2, - 0xd1, 0x4e, 0x08, 0x24, 0x34, 0x89, 0xae, 0xab, 0x04, 0x12, 0x93, 0xa2, 0x86, 0xa7, 0xbd, 0x79, - 0xc9, 0x6d, 0x6a, 0x29, 0xb1, 0x3d, 0xe7, 0x26, 0x12, 0xbf, 0xc2, 0x7f, 0xf0, 0x7f, 0xc8, 0x8e, - 0x93, 0x8e, 0x52, 0x55, 0x7b, 0x3b, 0xf7, 0x5c, 0x9f, 0x73, 0xae, 0xed, 0xcb, 0x0e, 0x62, 0xb4, - 0xb5, 0x4c, 0x90, 0x1b, 0xab, 0x49, 0xc3, 0x83, 0x7a, 0x34, 0x3c, 0xca, 0xb4, 0xce, 0x72, 0x3c, - 0xf5, 0xcc, 0x4d, 0xb5, 0x38, 0xc5, 0xc2, 0xd0, 0xaf, 0xe6, 0xc0, 0x90, 0xc5, 0x46, 0xa8, 0x0e, - 0x93, 0xa0, 0x80, 0x07, 0x3f, 0x97, 0x16, 0x45, 0x7a, 0x59, 0x15, 0x26, 0x30, 0xfb, 0xd3, 0x22, - 0x6d, 0xe0, 0xf8, 0x2b, 0xdb, 0x75, 0x32, 0xf8, 0xcc, 0xf6, 0x62, 0x54, 0xa9, 0xc7, 0x03, 0x5e, - 0x8f, 0x78, 0xe4, 0xe0, 0x15, 0x96, 0xa5, 0xc8, 0x70, 0x78, 0xc8, 0x9b, 0x60, 0xde, 0x06, 0xf3, - 0x99, 0x0b, 0x3e, 0xd9, 0x79, 0xd7, 0x1b, 0x23, 0x7b, 0x34, 0xc9, 0x50, 0x11, 0x8c, 0xd8, 0x60, - 0x8e, 0xb7, 0x15, 0x96, 0xe4, 0xeb, 0xef, 0x6a, 0xa1, 0xe1, 0xa9, 0xb7, 0xea, 0xea, 0x61, 0xdf, - 0xd7, 0x73, 0x2c, 0xab, 0x9c, 0x4e, 0x76, 0xe0, 0x3d, 0xeb, 0x47, 0x52, 0x65, 0x31, 0x96, 0xa5, - 0xd4, 0x0a, 0xf6, 0x7d, 0xd7, 0x31, 0xc3, 0x15, 0x74, 0x21, 0x1f, 0x7a, 0xe3, 0x3f, 0x3d, 0xb6, - 0x77, 0x85, 0x24, 0x52, 0x41, 0x02, 0x3e, 0x32, 0x08, 0x51, 0xf1, 0x6d, 0xee, 0xd8, 0x4b, 0xc7, - 0x86, 0xb9, 0x57, 0xcc, 0x7a, 0xdc, 0x4a, 0x36, 0x31, 0x72, 0x4d, 0x76, 0x87, 0x59, 0x97, 0x7d, - 0x61, 0x2f, 0xdb, 0x34, 0xb2, 0x52, 0x65, 0x9d, 0xf2, 0x79, 0x13, 0xf8, 0x0f, 0xb9, 0x26, 0x1e, - 0xcf, 0xd8, 0xae, 0xfb, 0x0b, 0x38, 0x77, 0xff, 0xa9, 0x52, 0xff, 0x14, 0x9e, 0x08, 0xd3, 0x92, - 0xa0, 0xfb, 0xbc, 0xf2, 0xef, 0x87, 0xec, 0x30, 0xb2, 0x7a, 0x21, 0x73, 0xb4, 0x53, 0x5d, 0x14, - 0x42, 0xa5, 0x61, 0x3d, 0xe0, 0x13, 0x3b, 0xf8, 0x26, 0x54, 0x9a, 0x63, 0xe0, 0xe1, 0x99, 0x77, - 0x9e, 0x16, 0x69, 0x6b, 0xdc, 0x11, 0xe1, 0x1a, 0xcd, 0x93, 0xc2, 0x39, 0xeb, 0x07, 0xc9, 0x2c, - 0x59, 0x6a, 0x78, 0xd1, 0x9e, 0x72, 0xd5, 0x1c, 0x4b, 0xa3, 0x55, 0xb9, 0x65, 0x28, 0xb8, 0x66, - 0xaf, 0xdb, 0x49, 0xc8, 0xa2, 0x28, 0x26, 0x09, 0xc9, 0x1a, 0x9b, 0x65, 0x9b, 0xea, 0x4a, 0x11, - 0x1c, 0xb7, 0x8e, 0xff, 0xb5, 0xe6, 0x58, 0x6e, 0xbb, 0x2e, 0x44, 0xec, 0x55, 0xf0, 0xbe, 0x2b, - 0x75, 0x2b, 0x0c, 0x47, 0x9b, 0x4c, 0x5d, 0x67, 0xab, 0x27, 0x5c, 0xb3, 0xe3, 0x0d, 0x8e, 0x3f, - 0x64, 0xb6, 0x24, 0x6f, 0xfb, 0x66, 0x93, 0x6d, 0xd7, 0xde, 0xea, 0x7d, 0x71, 0xc6, 0xde, 0x26, - 0xba, 0xe0, 0x4a, 0xd4, 0x68, 0x13, 0x6d, 0x0d, 0x37, 0x52, 0x19, 0x2d, 0x15, 0xf1, 0xcc, 0x9a, - 0x84, 0x93, 0x15, 0x09, 0x5e, 0x3c, 0x09, 0xff, 0x15, 0x39, 0x75, 0xd4, 0xbb, 0x79, 0xec, 0x6d, - 0xce, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0xa8, 0xaf, 0x53, 0x3a, 0xe7, 0x03, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// SpanClient is the client API for Span service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type SpanClient interface { - SendSpan(ctx context.Context, opts ...grpc.CallOption) (Span_SendSpanClient, error) -} - -type spanClient struct { - cc grpc.ClientConnInterface -} - -func NewSpanClient(cc grpc.ClientConnInterface) SpanClient { - return &spanClient{cc} -} - -func (c *spanClient) SendSpan(ctx context.Context, opts ...grpc.CallOption) (Span_SendSpanClient, error) { - stream, err := c.cc.NewStream(ctx, &_Span_serviceDesc.Streams[0], "/v1.Span/SendSpan", opts...) - if err != nil { - return nil, err - } - x := &spanSendSpanClient{stream} - return x, nil -} - -type Span_SendSpanClient interface { - Send(*PSpanMessage) error - CloseAndRecv() (*empty.Empty, error) - grpc.ClientStream -} - -type spanSendSpanClient struct { - grpc.ClientStream -} - -func (x *spanSendSpanClient) Send(m *PSpanMessage) error { - return x.ClientStream.SendMsg(m) -} - -func (x *spanSendSpanClient) CloseAndRecv() (*empty.Empty, error) { - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - m := new(empty.Empty) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// SpanServer is the server API for Span service. -type SpanServer interface { - SendSpan(Span_SendSpanServer) error -} - -// UnimplementedSpanServer can be embedded to have forward compatible implementations. -type UnimplementedSpanServer struct { -} - -func (*UnimplementedSpanServer) SendSpan(srv Span_SendSpanServer) error { - return status.Errorf(codes.Unimplemented, "method SendSpan not implemented") -} - -func RegisterSpanServer(s *grpc.Server, srv SpanServer) { - s.RegisterService(&_Span_serviceDesc, srv) -} - -func _Span_SendSpan_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(SpanServer).SendSpan(&spanSendSpanServer{stream}) -} - -type Span_SendSpanServer interface { - SendAndClose(*empty.Empty) error - Recv() (*PSpanMessage, error) - grpc.ServerStream -} - -type spanSendSpanServer struct { - grpc.ServerStream -} - -func (x *spanSendSpanServer) SendAndClose(m *empty.Empty) error { - return x.ServerStream.SendMsg(m) -} - -func (x *spanSendSpanServer) Recv() (*PSpanMessage, error) { - m := new(PSpanMessage) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _Span_serviceDesc = grpc.ServiceDesc{ - ServiceName: "v1.Span", - HandlerType: (*SpanServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "SendSpan", - Handler: _Span_SendSpan_Handler, - ClientStreams: true, - }, - }, - Metadata: "Service.proto", -} - -// AgentClient is the client API for Agent service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AgentClient interface { - RequestAgentInfo(ctx context.Context, in *PAgentInfo, opts ...grpc.CallOption) (*PResult, error) - PingSession(ctx context.Context, opts ...grpc.CallOption) (Agent_PingSessionClient, error) -} - -type agentClient struct { - cc grpc.ClientConnInterface -} - -func NewAgentClient(cc grpc.ClientConnInterface) AgentClient { - return &agentClient{cc} -} - -func (c *agentClient) RequestAgentInfo(ctx context.Context, in *PAgentInfo, opts ...grpc.CallOption) (*PResult, error) { - out := new(PResult) - err := c.cc.Invoke(ctx, "/v1.Agent/RequestAgentInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *agentClient) PingSession(ctx context.Context, opts ...grpc.CallOption) (Agent_PingSessionClient, error) { - stream, err := c.cc.NewStream(ctx, &_Agent_serviceDesc.Streams[0], "/v1.Agent/PingSession", opts...) - if err != nil { - return nil, err - } - x := &agentPingSessionClient{stream} - return x, nil -} - -type Agent_PingSessionClient interface { - Send(*PPing) error - Recv() (*PPing, error) - grpc.ClientStream -} - -type agentPingSessionClient struct { - grpc.ClientStream -} - -func (x *agentPingSessionClient) Send(m *PPing) error { - return x.ClientStream.SendMsg(m) -} - -func (x *agentPingSessionClient) Recv() (*PPing, error) { - m := new(PPing) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// AgentServer is the server API for Agent service. -type AgentServer interface { - RequestAgentInfo(context.Context, *PAgentInfo) (*PResult, error) - PingSession(Agent_PingSessionServer) error -} - -// UnimplementedAgentServer can be embedded to have forward compatible implementations. -type UnimplementedAgentServer struct { -} - -func (*UnimplementedAgentServer) RequestAgentInfo(ctx context.Context, req *PAgentInfo) (*PResult, error) { - return nil, status.Errorf(codes.Unimplemented, "method RequestAgentInfo not implemented") -} -func (*UnimplementedAgentServer) PingSession(srv Agent_PingSessionServer) error { - return status.Errorf(codes.Unimplemented, "method PingSession not implemented") -} - -func RegisterAgentServer(s *grpc.Server, srv AgentServer) { - s.RegisterService(&_Agent_serviceDesc, srv) -} - -func _Agent_RequestAgentInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PAgentInfo) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AgentServer).RequestAgentInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.Agent/RequestAgentInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AgentServer).RequestAgentInfo(ctx, req.(*PAgentInfo)) - } - return interceptor(ctx, in, info, handler) -} - -func _Agent_PingSession_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(AgentServer).PingSession(&agentPingSessionServer{stream}) -} - -type Agent_PingSessionServer interface { - Send(*PPing) error - Recv() (*PPing, error) - grpc.ServerStream -} - -type agentPingSessionServer struct { - grpc.ServerStream -} - -func (x *agentPingSessionServer) Send(m *PPing) error { - return x.ServerStream.SendMsg(m) -} - -func (x *agentPingSessionServer) Recv() (*PPing, error) { - m := new(PPing) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _Agent_serviceDesc = grpc.ServiceDesc{ - ServiceName: "v1.Agent", - HandlerType: (*AgentServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "RequestAgentInfo", - Handler: _Agent_RequestAgentInfo_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "PingSession", - Handler: _Agent_PingSession_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "Service.proto", -} - -// MetadataClient is the client API for Metadata service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MetadataClient interface { - RequestSqlMetaData(ctx context.Context, in *PSqlMetaData, opts ...grpc.CallOption) (*PResult, error) - RequestApiMetaData(ctx context.Context, in *PApiMetaData, opts ...grpc.CallOption) (*PResult, error) - RequestStringMetaData(ctx context.Context, in *PStringMetaData, opts ...grpc.CallOption) (*PResult, error) -} - -type metadataClient struct { - cc grpc.ClientConnInterface -} - -func NewMetadataClient(cc grpc.ClientConnInterface) MetadataClient { - return &metadataClient{cc} -} - -func (c *metadataClient) RequestSqlMetaData(ctx context.Context, in *PSqlMetaData, opts ...grpc.CallOption) (*PResult, error) { - out := new(PResult) - err := c.cc.Invoke(ctx, "/v1.Metadata/RequestSqlMetaData", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *metadataClient) RequestApiMetaData(ctx context.Context, in *PApiMetaData, opts ...grpc.CallOption) (*PResult, error) { - out := new(PResult) - err := c.cc.Invoke(ctx, "/v1.Metadata/RequestApiMetaData", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *metadataClient) RequestStringMetaData(ctx context.Context, in *PStringMetaData, opts ...grpc.CallOption) (*PResult, error) { - out := new(PResult) - err := c.cc.Invoke(ctx, "/v1.Metadata/RequestStringMetaData", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MetadataServer is the server API for Metadata service. -type MetadataServer interface { - RequestSqlMetaData(context.Context, *PSqlMetaData) (*PResult, error) - RequestApiMetaData(context.Context, *PApiMetaData) (*PResult, error) - RequestStringMetaData(context.Context, *PStringMetaData) (*PResult, error) -} - -// UnimplementedMetadataServer can be embedded to have forward compatible implementations. -type UnimplementedMetadataServer struct { -} - -func (*UnimplementedMetadataServer) RequestSqlMetaData(ctx context.Context, req *PSqlMetaData) (*PResult, error) { - return nil, status.Errorf(codes.Unimplemented, "method RequestSqlMetaData not implemented") -} -func (*UnimplementedMetadataServer) RequestApiMetaData(ctx context.Context, req *PApiMetaData) (*PResult, error) { - return nil, status.Errorf(codes.Unimplemented, "method RequestApiMetaData not implemented") -} -func (*UnimplementedMetadataServer) RequestStringMetaData(ctx context.Context, req *PStringMetaData) (*PResult, error) { - return nil, status.Errorf(codes.Unimplemented, "method RequestStringMetaData not implemented") -} - -func RegisterMetadataServer(s *grpc.Server, srv MetadataServer) { - s.RegisterService(&_Metadata_serviceDesc, srv) -} - -func _Metadata_RequestSqlMetaData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PSqlMetaData) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetadataServer).RequestSqlMetaData(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.Metadata/RequestSqlMetaData", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetadataServer).RequestSqlMetaData(ctx, req.(*PSqlMetaData)) - } - return interceptor(ctx, in, info, handler) -} - -func _Metadata_RequestApiMetaData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PApiMetaData) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetadataServer).RequestApiMetaData(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.Metadata/RequestApiMetaData", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetadataServer).RequestApiMetaData(ctx, req.(*PApiMetaData)) - } - return interceptor(ctx, in, info, handler) -} - -func _Metadata_RequestStringMetaData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PStringMetaData) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetadataServer).RequestStringMetaData(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.Metadata/RequestStringMetaData", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetadataServer).RequestStringMetaData(ctx, req.(*PStringMetaData)) - } - return interceptor(ctx, in, info, handler) -} - -var _Metadata_serviceDesc = grpc.ServiceDesc{ - ServiceName: "v1.Metadata", - HandlerType: (*MetadataServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "RequestSqlMetaData", - Handler: _Metadata_RequestSqlMetaData_Handler, - }, - { - MethodName: "RequestApiMetaData", - Handler: _Metadata_RequestApiMetaData_Handler, - }, - { - MethodName: "RequestStringMetaData", - Handler: _Metadata_RequestStringMetaData_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "Service.proto", -} - -// StatClient is the client API for Stat service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type StatClient interface { - SendAgentStat(ctx context.Context, opts ...grpc.CallOption) (Stat_SendAgentStatClient, error) -} - -type statClient struct { - cc grpc.ClientConnInterface -} - -func NewStatClient(cc grpc.ClientConnInterface) StatClient { - return &statClient{cc} -} - -func (c *statClient) SendAgentStat(ctx context.Context, opts ...grpc.CallOption) (Stat_SendAgentStatClient, error) { - stream, err := c.cc.NewStream(ctx, &_Stat_serviceDesc.Streams[0], "/v1.Stat/SendAgentStat", opts...) - if err != nil { - return nil, err - } - x := &statSendAgentStatClient{stream} - return x, nil -} - -type Stat_SendAgentStatClient interface { - Send(*PStatMessage) error - CloseAndRecv() (*empty.Empty, error) - grpc.ClientStream -} - -type statSendAgentStatClient struct { - grpc.ClientStream -} - -func (x *statSendAgentStatClient) Send(m *PStatMessage) error { - return x.ClientStream.SendMsg(m) -} - -func (x *statSendAgentStatClient) CloseAndRecv() (*empty.Empty, error) { - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - m := new(empty.Empty) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// StatServer is the server API for Stat service. -type StatServer interface { - SendAgentStat(Stat_SendAgentStatServer) error -} - -// UnimplementedStatServer can be embedded to have forward compatible implementations. -type UnimplementedStatServer struct { -} - -func (*UnimplementedStatServer) SendAgentStat(srv Stat_SendAgentStatServer) error { - return status.Errorf(codes.Unimplemented, "method SendAgentStat not implemented") -} - -func RegisterStatServer(s *grpc.Server, srv StatServer) { - s.RegisterService(&_Stat_serviceDesc, srv) -} - -func _Stat_SendAgentStat_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(StatServer).SendAgentStat(&statSendAgentStatServer{stream}) -} - -type Stat_SendAgentStatServer interface { - SendAndClose(*empty.Empty) error - Recv() (*PStatMessage, error) - grpc.ServerStream -} - -type statSendAgentStatServer struct { - grpc.ServerStream -} - -func (x *statSendAgentStatServer) SendAndClose(m *empty.Empty) error { - return x.ServerStream.SendMsg(m) -} - -func (x *statSendAgentStatServer) Recv() (*PStatMessage, error) { - m := new(PStatMessage) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _Stat_serviceDesc = grpc.ServiceDesc{ - ServiceName: "v1.Stat", - HandlerType: (*StatServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "SendAgentStat", - Handler: _Stat_SendAgentStat_Handler, - ClientStreams: true, - }, - }, - Metadata: "Service.proto", -} - -// ProfilerCommandServiceClient is the client API for ProfilerCommandService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ProfilerCommandServiceClient interface { - HandleCommand(ctx context.Context, opts ...grpc.CallOption) (ProfilerCommandService_HandleCommandClient, error) - CommandEcho(ctx context.Context, in *PCmdEchoResponse, opts ...grpc.CallOption) (*empty.Empty, error) - CommandStreamActiveThreadCount(ctx context.Context, opts ...grpc.CallOption) (ProfilerCommandService_CommandStreamActiveThreadCountClient, error) - CommandActiveThreadDump(ctx context.Context, in *PCmdActiveThreadDumpRes, opts ...grpc.CallOption) (*empty.Empty, error) - CommandActiveThreadLightDump(ctx context.Context, in *PCmdActiveThreadLightDumpRes, opts ...grpc.CallOption) (*empty.Empty, error) -} - -type profilerCommandServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewProfilerCommandServiceClient(cc grpc.ClientConnInterface) ProfilerCommandServiceClient { - return &profilerCommandServiceClient{cc} -} - -func (c *profilerCommandServiceClient) HandleCommand(ctx context.Context, opts ...grpc.CallOption) (ProfilerCommandService_HandleCommandClient, error) { - stream, err := c.cc.NewStream(ctx, &_ProfilerCommandService_serviceDesc.Streams[0], "/v1.ProfilerCommandService/HandleCommand", opts...) - if err != nil { - return nil, err - } - x := &profilerCommandServiceHandleCommandClient{stream} - return x, nil -} - -type ProfilerCommandService_HandleCommandClient interface { - Send(*PCmdMessage) error - Recv() (*PCmdRequest, error) - grpc.ClientStream -} - -type profilerCommandServiceHandleCommandClient struct { - grpc.ClientStream -} - -func (x *profilerCommandServiceHandleCommandClient) Send(m *PCmdMessage) error { - return x.ClientStream.SendMsg(m) -} - -func (x *profilerCommandServiceHandleCommandClient) Recv() (*PCmdRequest, error) { - m := new(PCmdRequest) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *profilerCommandServiceClient) CommandEcho(ctx context.Context, in *PCmdEchoResponse, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) - err := c.cc.Invoke(ctx, "/v1.ProfilerCommandService/CommandEcho", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *profilerCommandServiceClient) CommandStreamActiveThreadCount(ctx context.Context, opts ...grpc.CallOption) (ProfilerCommandService_CommandStreamActiveThreadCountClient, error) { - stream, err := c.cc.NewStream(ctx, &_ProfilerCommandService_serviceDesc.Streams[1], "/v1.ProfilerCommandService/CommandStreamActiveThreadCount", opts...) - if err != nil { - return nil, err - } - x := &profilerCommandServiceCommandStreamActiveThreadCountClient{stream} - return x, nil -} - -type ProfilerCommandService_CommandStreamActiveThreadCountClient interface { - Send(*PCmdActiveThreadCountRes) error - CloseAndRecv() (*empty.Empty, error) - grpc.ClientStream -} - -type profilerCommandServiceCommandStreamActiveThreadCountClient struct { - grpc.ClientStream -} - -func (x *profilerCommandServiceCommandStreamActiveThreadCountClient) Send(m *PCmdActiveThreadCountRes) error { - return x.ClientStream.SendMsg(m) -} - -func (x *profilerCommandServiceCommandStreamActiveThreadCountClient) CloseAndRecv() (*empty.Empty, error) { - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - m := new(empty.Empty) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *profilerCommandServiceClient) CommandActiveThreadDump(ctx context.Context, in *PCmdActiveThreadDumpRes, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) - err := c.cc.Invoke(ctx, "/v1.ProfilerCommandService/CommandActiveThreadDump", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *profilerCommandServiceClient) CommandActiveThreadLightDump(ctx context.Context, in *PCmdActiveThreadLightDumpRes, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) - err := c.cc.Invoke(ctx, "/v1.ProfilerCommandService/CommandActiveThreadLightDump", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ProfilerCommandServiceServer is the server API for ProfilerCommandService service. -type ProfilerCommandServiceServer interface { - HandleCommand(ProfilerCommandService_HandleCommandServer) error - CommandEcho(context.Context, *PCmdEchoResponse) (*empty.Empty, error) - CommandStreamActiveThreadCount(ProfilerCommandService_CommandStreamActiveThreadCountServer) error - CommandActiveThreadDump(context.Context, *PCmdActiveThreadDumpRes) (*empty.Empty, error) - CommandActiveThreadLightDump(context.Context, *PCmdActiveThreadLightDumpRes) (*empty.Empty, error) -} - -// UnimplementedProfilerCommandServiceServer can be embedded to have forward compatible implementations. -type UnimplementedProfilerCommandServiceServer struct { -} - -func (*UnimplementedProfilerCommandServiceServer) HandleCommand(srv ProfilerCommandService_HandleCommandServer) error { - return status.Errorf(codes.Unimplemented, "method HandleCommand not implemented") -} -func (*UnimplementedProfilerCommandServiceServer) CommandEcho(ctx context.Context, req *PCmdEchoResponse) (*empty.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method CommandEcho not implemented") -} -func (*UnimplementedProfilerCommandServiceServer) CommandStreamActiveThreadCount(srv ProfilerCommandService_CommandStreamActiveThreadCountServer) error { - return status.Errorf(codes.Unimplemented, "method CommandStreamActiveThreadCount not implemented") -} -func (*UnimplementedProfilerCommandServiceServer) CommandActiveThreadDump(ctx context.Context, req *PCmdActiveThreadDumpRes) (*empty.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method CommandActiveThreadDump not implemented") -} -func (*UnimplementedProfilerCommandServiceServer) CommandActiveThreadLightDump(ctx context.Context, req *PCmdActiveThreadLightDumpRes) (*empty.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method CommandActiveThreadLightDump not implemented") -} - -func RegisterProfilerCommandServiceServer(s *grpc.Server, srv ProfilerCommandServiceServer) { - s.RegisterService(&_ProfilerCommandService_serviceDesc, srv) -} - -func _ProfilerCommandService_HandleCommand_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ProfilerCommandServiceServer).HandleCommand(&profilerCommandServiceHandleCommandServer{stream}) -} - -type ProfilerCommandService_HandleCommandServer interface { - Send(*PCmdRequest) error - Recv() (*PCmdMessage, error) - grpc.ServerStream -} - -type profilerCommandServiceHandleCommandServer struct { - grpc.ServerStream -} - -func (x *profilerCommandServiceHandleCommandServer) Send(m *PCmdRequest) error { - return x.ServerStream.SendMsg(m) -} - -func (x *profilerCommandServiceHandleCommandServer) Recv() (*PCmdMessage, error) { - m := new(PCmdMessage) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _ProfilerCommandService_CommandEcho_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PCmdEchoResponse) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProfilerCommandServiceServer).CommandEcho(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.ProfilerCommandService/CommandEcho", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProfilerCommandServiceServer).CommandEcho(ctx, req.(*PCmdEchoResponse)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProfilerCommandService_CommandStreamActiveThreadCount_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ProfilerCommandServiceServer).CommandStreamActiveThreadCount(&profilerCommandServiceCommandStreamActiveThreadCountServer{stream}) -} - -type ProfilerCommandService_CommandStreamActiveThreadCountServer interface { - SendAndClose(*empty.Empty) error - Recv() (*PCmdActiveThreadCountRes, error) - grpc.ServerStream -} - -type profilerCommandServiceCommandStreamActiveThreadCountServer struct { - grpc.ServerStream -} - -func (x *profilerCommandServiceCommandStreamActiveThreadCountServer) SendAndClose(m *empty.Empty) error { - return x.ServerStream.SendMsg(m) -} - -func (x *profilerCommandServiceCommandStreamActiveThreadCountServer) Recv() (*PCmdActiveThreadCountRes, error) { - m := new(PCmdActiveThreadCountRes) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _ProfilerCommandService_CommandActiveThreadDump_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PCmdActiveThreadDumpRes) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProfilerCommandServiceServer).CommandActiveThreadDump(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.ProfilerCommandService/CommandActiveThreadDump", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProfilerCommandServiceServer).CommandActiveThreadDump(ctx, req.(*PCmdActiveThreadDumpRes)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProfilerCommandService_CommandActiveThreadLightDump_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PCmdActiveThreadLightDumpRes) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProfilerCommandServiceServer).CommandActiveThreadLightDump(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.ProfilerCommandService/CommandActiveThreadLightDump", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProfilerCommandServiceServer).CommandActiveThreadLightDump(ctx, req.(*PCmdActiveThreadLightDumpRes)) - } - return interceptor(ctx, in, info, handler) -} - -var _ProfilerCommandService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "v1.ProfilerCommandService", - HandlerType: (*ProfilerCommandServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CommandEcho", - Handler: _ProfilerCommandService_CommandEcho_Handler, - }, - { - MethodName: "CommandActiveThreadDump", - Handler: _ProfilerCommandService_CommandActiveThreadDump_Handler, - }, - { - MethodName: "CommandActiveThreadLightDump", - Handler: _ProfilerCommandService_CommandActiveThreadLightDump_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "HandleCommand", - Handler: _ProfilerCommandService_HandleCommand_Handler, - ServerStreams: true, - ClientStreams: true, - }, - { - StreamName: "CommandStreamActiveThreadCount", - Handler: _ProfilerCommandService_CommandStreamActiveThreadCount_Handler, - ClientStreams: true, - }, - }, - Metadata: "Service.proto", -} diff --git a/collector-agent/protocol/Span.pb.go b/collector-agent/protocol/Span.pb.go deleted file mode 100644 index 7a2d7dae4..000000000 --- a/collector-agent/protocol/Span.pb.go +++ /dev/null @@ -1,1100 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: Span.proto - -package v1 - -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/empty" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type PSpanMessage struct { - // Types that are valid to be assigned to Field: - // *PSpanMessage_Span - // *PSpanMessage_SpanChunk - Field isPSpanMessage_Field `protobuf_oneof:"field"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PSpanMessage) Reset() { *m = PSpanMessage{} } -func (m *PSpanMessage) String() string { return proto.CompactTextString(m) } -func (*PSpanMessage) ProtoMessage() {} -func (*PSpanMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_72a7884ce2d4c43e, []int{0} -} - -func (m *PSpanMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PSpanMessage.Unmarshal(m, b) -} -func (m *PSpanMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PSpanMessage.Marshal(b, m, deterministic) -} -func (m *PSpanMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_PSpanMessage.Merge(m, src) -} -func (m *PSpanMessage) XXX_Size() int { - return xxx_messageInfo_PSpanMessage.Size(m) -} -func (m *PSpanMessage) XXX_DiscardUnknown() { - xxx_messageInfo_PSpanMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_PSpanMessage proto.InternalMessageInfo - -type isPSpanMessage_Field interface { - isPSpanMessage_Field() -} - -type PSpanMessage_Span struct { - Span *PSpan `protobuf:"bytes,1,opt,name=span,proto3,oneof"` -} - -type PSpanMessage_SpanChunk struct { - SpanChunk *PSpanChunk `protobuf:"bytes,2,opt,name=spanChunk,proto3,oneof"` -} - -func (*PSpanMessage_Span) isPSpanMessage_Field() {} - -func (*PSpanMessage_SpanChunk) isPSpanMessage_Field() {} - -func (m *PSpanMessage) GetField() isPSpanMessage_Field { - if m != nil { - return m.Field - } - return nil -} - -func (m *PSpanMessage) GetSpan() *PSpan { - if x, ok := m.GetField().(*PSpanMessage_Span); ok { - return x.Span - } - return nil -} - -func (m *PSpanMessage) GetSpanChunk() *PSpanChunk { - if x, ok := m.GetField().(*PSpanMessage_SpanChunk); ok { - return x.SpanChunk - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*PSpanMessage) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*PSpanMessage_Span)(nil), - (*PSpanMessage_SpanChunk)(nil), - } -} - -type PSpan struct { - Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - TransactionId *PTransactionId `protobuf:"bytes,2,opt,name=transactionId,proto3" json:"transactionId,omitempty"` - SpanId int64 `protobuf:"fixed64,3,opt,name=spanId,proto3" json:"spanId,omitempty"` - ParentSpanId int64 `protobuf:"fixed64,4,opt,name=parentSpanId,proto3" json:"parentSpanId,omitempty"` - // span event's startTimestamp - StartTime int64 `protobuf:"varint,5,opt,name=startTime,proto3" json:"startTime,omitempty"` - Elapsed int32 `protobuf:"varint,6,opt,name=elapsed,proto3" json:"elapsed,omitempty"` - ApiId int32 `protobuf:"varint,7,opt,name=apiId,proto3" json:"apiId,omitempty"` - ServiceType int32 `protobuf:"varint,8,opt,name=serviceType,proto3" json:"serviceType,omitempty"` - AcceptEvent *PAcceptEvent `protobuf:"bytes,9,opt,name=acceptEvent,proto3" json:"acceptEvent,omitempty"` - Annotation []*PAnnotation `protobuf:"bytes,10,rep,name=annotation,proto3" json:"annotation,omitempty"` - Flag int32 `protobuf:"varint,11,opt,name=flag,proto3" json:"flag,omitempty"` - Err int32 `protobuf:"zigzag32,12,opt,name=err,proto3" json:"err,omitempty"` - SpanEvent []*PSpanEvent `protobuf:"bytes,13,rep,name=spanEvent,proto3" json:"spanEvent,omitempty"` - ExceptionInfo *PIntStringValue `protobuf:"bytes,14,opt,name=exceptionInfo,proto3" json:"exceptionInfo,omitempty"` - ApplicationServiceType int32 `protobuf:"varint,15,opt,name=applicationServiceType,proto3" json:"applicationServiceType,omitempty"` - LoggingTransactionInfo int32 `protobuf:"varint,16,opt,name=loggingTransactionInfo,proto3" json:"loggingTransactionInfo,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PSpan) Reset() { *m = PSpan{} } -func (m *PSpan) String() string { return proto.CompactTextString(m) } -func (*PSpan) ProtoMessage() {} -func (*PSpan) Descriptor() ([]byte, []int) { - return fileDescriptor_72a7884ce2d4c43e, []int{1} -} - -func (m *PSpan) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PSpan.Unmarshal(m, b) -} -func (m *PSpan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PSpan.Marshal(b, m, deterministic) -} -func (m *PSpan) XXX_Merge(src proto.Message) { - xxx_messageInfo_PSpan.Merge(m, src) -} -func (m *PSpan) XXX_Size() int { - return xxx_messageInfo_PSpan.Size(m) -} -func (m *PSpan) XXX_DiscardUnknown() { - xxx_messageInfo_PSpan.DiscardUnknown(m) -} - -var xxx_messageInfo_PSpan proto.InternalMessageInfo - -func (m *PSpan) GetVersion() int32 { - if m != nil { - return m.Version - } - return 0 -} - -func (m *PSpan) GetTransactionId() *PTransactionId { - if m != nil { - return m.TransactionId - } - return nil -} - -func (m *PSpan) GetSpanId() int64 { - if m != nil { - return m.SpanId - } - return 0 -} - -func (m *PSpan) GetParentSpanId() int64 { - if m != nil { - return m.ParentSpanId - } - return 0 -} - -func (m *PSpan) GetStartTime() int64 { - if m != nil { - return m.StartTime - } - return 0 -} - -func (m *PSpan) GetElapsed() int32 { - if m != nil { - return m.Elapsed - } - return 0 -} - -func (m *PSpan) GetApiId() int32 { - if m != nil { - return m.ApiId - } - return 0 -} - -func (m *PSpan) GetServiceType() int32 { - if m != nil { - return m.ServiceType - } - return 0 -} - -func (m *PSpan) GetAcceptEvent() *PAcceptEvent { - if m != nil { - return m.AcceptEvent - } - return nil -} - -func (m *PSpan) GetAnnotation() []*PAnnotation { - if m != nil { - return m.Annotation - } - return nil -} - -func (m *PSpan) GetFlag() int32 { - if m != nil { - return m.Flag - } - return 0 -} - -func (m *PSpan) GetErr() int32 { - if m != nil { - return m.Err - } - return 0 -} - -func (m *PSpan) GetSpanEvent() []*PSpanEvent { - if m != nil { - return m.SpanEvent - } - return nil -} - -func (m *PSpan) GetExceptionInfo() *PIntStringValue { - if m != nil { - return m.ExceptionInfo - } - return nil -} - -func (m *PSpan) GetApplicationServiceType() int32 { - if m != nil { - return m.ApplicationServiceType - } - return 0 -} - -func (m *PSpan) GetLoggingTransactionInfo() int32 { - if m != nil { - return m.LoggingTransactionInfo - } - return 0 -} - -type PTransactionId struct { - // identical to agentId if null - AgentId string `protobuf:"bytes,1,opt,name=agentId,proto3" json:"agentId,omitempty"` - AgentStartTime int64 `protobuf:"varint,2,opt,name=agentStartTime,proto3" json:"agentStartTime,omitempty"` - Sequence int64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PTransactionId) Reset() { *m = PTransactionId{} } -func (m *PTransactionId) String() string { return proto.CompactTextString(m) } -func (*PTransactionId) ProtoMessage() {} -func (*PTransactionId) Descriptor() ([]byte, []int) { - return fileDescriptor_72a7884ce2d4c43e, []int{2} -} - -func (m *PTransactionId) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PTransactionId.Unmarshal(m, b) -} -func (m *PTransactionId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PTransactionId.Marshal(b, m, deterministic) -} -func (m *PTransactionId) XXX_Merge(src proto.Message) { - xxx_messageInfo_PTransactionId.Merge(m, src) -} -func (m *PTransactionId) XXX_Size() int { - return xxx_messageInfo_PTransactionId.Size(m) -} -func (m *PTransactionId) XXX_DiscardUnknown() { - xxx_messageInfo_PTransactionId.DiscardUnknown(m) -} - -var xxx_messageInfo_PTransactionId proto.InternalMessageInfo - -func (m *PTransactionId) GetAgentId() string { - if m != nil { - return m.AgentId - } - return "" -} - -func (m *PTransactionId) GetAgentStartTime() int64 { - if m != nil { - return m.AgentStartTime - } - return 0 -} - -func (m *PTransactionId) GetSequence() int64 { - if m != nil { - return m.Sequence - } - return 0 -} - -type PAcceptEvent struct { - Rpc string `protobuf:"bytes,1,opt,name=rpc,proto3" json:"rpc,omitempty"` - EndPoint string `protobuf:"bytes,2,opt,name=endPoint,proto3" json:"endPoint,omitempty"` - RemoteAddr string `protobuf:"bytes,3,opt,name=remoteAddr,proto3" json:"remoteAddr,omitempty"` - ParentInfo *PParentInfo `protobuf:"bytes,4,opt,name=parentInfo,proto3" json:"parentInfo,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PAcceptEvent) Reset() { *m = PAcceptEvent{} } -func (m *PAcceptEvent) String() string { return proto.CompactTextString(m) } -func (*PAcceptEvent) ProtoMessage() {} -func (*PAcceptEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_72a7884ce2d4c43e, []int{3} -} - -func (m *PAcceptEvent) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PAcceptEvent.Unmarshal(m, b) -} -func (m *PAcceptEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PAcceptEvent.Marshal(b, m, deterministic) -} -func (m *PAcceptEvent) XXX_Merge(src proto.Message) { - xxx_messageInfo_PAcceptEvent.Merge(m, src) -} -func (m *PAcceptEvent) XXX_Size() int { - return xxx_messageInfo_PAcceptEvent.Size(m) -} -func (m *PAcceptEvent) XXX_DiscardUnknown() { - xxx_messageInfo_PAcceptEvent.DiscardUnknown(m) -} - -var xxx_messageInfo_PAcceptEvent proto.InternalMessageInfo - -func (m *PAcceptEvent) GetRpc() string { - if m != nil { - return m.Rpc - } - return "" -} - -func (m *PAcceptEvent) GetEndPoint() string { - if m != nil { - return m.EndPoint - } - return "" -} - -func (m *PAcceptEvent) GetRemoteAddr() string { - if m != nil { - return m.RemoteAddr - } - return "" -} - -func (m *PAcceptEvent) GetParentInfo() *PParentInfo { - if m != nil { - return m.ParentInfo - } - return nil -} - -type PParentInfo struct { - ParentApplicationName string `protobuf:"bytes,1,opt,name=parentApplicationName,proto3" json:"parentApplicationName,omitempty"` - ParentApplicationType int32 `protobuf:"varint,2,opt,name=parentApplicationType,proto3" json:"parentApplicationType,omitempty"` - AcceptorHost string `protobuf:"bytes,3,opt,name=acceptorHost,proto3" json:"acceptorHost,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PParentInfo) Reset() { *m = PParentInfo{} } -func (m *PParentInfo) String() string { return proto.CompactTextString(m) } -func (*PParentInfo) ProtoMessage() {} -func (*PParentInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_72a7884ce2d4c43e, []int{4} -} - -func (m *PParentInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PParentInfo.Unmarshal(m, b) -} -func (m *PParentInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PParentInfo.Marshal(b, m, deterministic) -} -func (m *PParentInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_PParentInfo.Merge(m, src) -} -func (m *PParentInfo) XXX_Size() int { - return xxx_messageInfo_PParentInfo.Size(m) -} -func (m *PParentInfo) XXX_DiscardUnknown() { - xxx_messageInfo_PParentInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_PParentInfo proto.InternalMessageInfo - -func (m *PParentInfo) GetParentApplicationName() string { - if m != nil { - return m.ParentApplicationName - } - return "" -} - -func (m *PParentInfo) GetParentApplicationType() int32 { - if m != nil { - return m.ParentApplicationType - } - return 0 -} - -func (m *PParentInfo) GetAcceptorHost() string { - if m != nil { - return m.AcceptorHost - } - return "" -} - -type PLocalAsyncId struct { - AsyncId int32 `protobuf:"varint,1,opt,name=asyncId,proto3" json:"asyncId,omitempty"` - Sequence int32 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PLocalAsyncId) Reset() { *m = PLocalAsyncId{} } -func (m *PLocalAsyncId) String() string { return proto.CompactTextString(m) } -func (*PLocalAsyncId) ProtoMessage() {} -func (*PLocalAsyncId) Descriptor() ([]byte, []int) { - return fileDescriptor_72a7884ce2d4c43e, []int{5} -} - -func (m *PLocalAsyncId) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PLocalAsyncId.Unmarshal(m, b) -} -func (m *PLocalAsyncId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PLocalAsyncId.Marshal(b, m, deterministic) -} -func (m *PLocalAsyncId) XXX_Merge(src proto.Message) { - xxx_messageInfo_PLocalAsyncId.Merge(m, src) -} -func (m *PLocalAsyncId) XXX_Size() int { - return xxx_messageInfo_PLocalAsyncId.Size(m) -} -func (m *PLocalAsyncId) XXX_DiscardUnknown() { - xxx_messageInfo_PLocalAsyncId.DiscardUnknown(m) -} - -var xxx_messageInfo_PLocalAsyncId proto.InternalMessageInfo - -func (m *PLocalAsyncId) GetAsyncId() int32 { - if m != nil { - return m.AsyncId - } - return 0 -} - -func (m *PLocalAsyncId) GetSequence() int32 { - if m != nil { - return m.Sequence - } - return 0 -} - -type PSpanEvent struct { - Sequence int32 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` - Depth int32 `protobuf:"varint,2,opt,name=depth,proto3" json:"depth,omitempty"` - StartElapsed int32 `protobuf:"varint,3,opt,name=startElapsed,proto3" json:"startElapsed,omitempty"` - EndElapsed int32 `protobuf:"varint,4,opt,name=endElapsed,proto3" json:"endElapsed,omitempty"` - ServiceType int32 `protobuf:"zigzag32,5,opt,name=serviceType,proto3" json:"serviceType,omitempty"` - Annotation []*PAnnotation `protobuf:"bytes,6,rep,name=annotation,proto3" json:"annotation,omitempty"` - ApiId int32 `protobuf:"zigzag32,10,opt,name=apiId,proto3" json:"apiId,omitempty"` - ExceptionInfo *PIntStringValue `protobuf:"bytes,11,opt,name=exceptionInfo,proto3" json:"exceptionInfo,omitempty"` - NextEvent *PNextEvent `protobuf:"bytes,12,opt,name=nextEvent,proto3" json:"nextEvent,omitempty"` - AsyncEvent int32 `protobuf:"varint,13,opt,name=asyncEvent,proto3" json:"asyncEvent,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PSpanEvent) Reset() { *m = PSpanEvent{} } -func (m *PSpanEvent) String() string { return proto.CompactTextString(m) } -func (*PSpanEvent) ProtoMessage() {} -func (*PSpanEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_72a7884ce2d4c43e, []int{6} -} - -func (m *PSpanEvent) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PSpanEvent.Unmarshal(m, b) -} -func (m *PSpanEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PSpanEvent.Marshal(b, m, deterministic) -} -func (m *PSpanEvent) XXX_Merge(src proto.Message) { - xxx_messageInfo_PSpanEvent.Merge(m, src) -} -func (m *PSpanEvent) XXX_Size() int { - return xxx_messageInfo_PSpanEvent.Size(m) -} -func (m *PSpanEvent) XXX_DiscardUnknown() { - xxx_messageInfo_PSpanEvent.DiscardUnknown(m) -} - -var xxx_messageInfo_PSpanEvent proto.InternalMessageInfo - -func (m *PSpanEvent) GetSequence() int32 { - if m != nil { - return m.Sequence - } - return 0 -} - -func (m *PSpanEvent) GetDepth() int32 { - if m != nil { - return m.Depth - } - return 0 -} - -func (m *PSpanEvent) GetStartElapsed() int32 { - if m != nil { - return m.StartElapsed - } - return 0 -} - -func (m *PSpanEvent) GetEndElapsed() int32 { - if m != nil { - return m.EndElapsed - } - return 0 -} - -func (m *PSpanEvent) GetServiceType() int32 { - if m != nil { - return m.ServiceType - } - return 0 -} - -func (m *PSpanEvent) GetAnnotation() []*PAnnotation { - if m != nil { - return m.Annotation - } - return nil -} - -func (m *PSpanEvent) GetApiId() int32 { - if m != nil { - return m.ApiId - } - return 0 -} - -func (m *PSpanEvent) GetExceptionInfo() *PIntStringValue { - if m != nil { - return m.ExceptionInfo - } - return nil -} - -func (m *PSpanEvent) GetNextEvent() *PNextEvent { - if m != nil { - return m.NextEvent - } - return nil -} - -func (m *PSpanEvent) GetAsyncEvent() int32 { - if m != nil { - return m.AsyncEvent - } - return 0 -} - -type PNextEvent struct { - // Types that are valid to be assigned to Field: - // *PNextEvent_MessageEvent - Field isPNextEvent_Field `protobuf_oneof:"field"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PNextEvent) Reset() { *m = PNextEvent{} } -func (m *PNextEvent) String() string { return proto.CompactTextString(m) } -func (*PNextEvent) ProtoMessage() {} -func (*PNextEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_72a7884ce2d4c43e, []int{7} -} - -func (m *PNextEvent) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PNextEvent.Unmarshal(m, b) -} -func (m *PNextEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PNextEvent.Marshal(b, m, deterministic) -} -func (m *PNextEvent) XXX_Merge(src proto.Message) { - xxx_messageInfo_PNextEvent.Merge(m, src) -} -func (m *PNextEvent) XXX_Size() int { - return xxx_messageInfo_PNextEvent.Size(m) -} -func (m *PNextEvent) XXX_DiscardUnknown() { - xxx_messageInfo_PNextEvent.DiscardUnknown(m) -} - -var xxx_messageInfo_PNextEvent proto.InternalMessageInfo - -type isPNextEvent_Field interface { - isPNextEvent_Field() -} - -type PNextEvent_MessageEvent struct { - MessageEvent *PMessageEvent `protobuf:"bytes,1,opt,name=messageEvent,proto3,oneof"` -} - -func (*PNextEvent_MessageEvent) isPNextEvent_Field() {} - -func (m *PNextEvent) GetField() isPNextEvent_Field { - if m != nil { - return m.Field - } - return nil -} - -func (m *PNextEvent) GetMessageEvent() *PMessageEvent { - if x, ok := m.GetField().(*PNextEvent_MessageEvent); ok { - return x.MessageEvent - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*PNextEvent) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*PNextEvent_MessageEvent)(nil), - } -} - -type PMessageEvent struct { - NextSpanId int64 `protobuf:"fixed64,1,opt,name=nextSpanId,proto3" json:"nextSpanId,omitempty"` - EndPoint string `protobuf:"bytes,2,opt,name=endPoint,proto3" json:"endPoint,omitempty"` - DestinationId string `protobuf:"bytes,3,opt,name=destinationId,proto3" json:"destinationId,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PMessageEvent) Reset() { *m = PMessageEvent{} } -func (m *PMessageEvent) String() string { return proto.CompactTextString(m) } -func (*PMessageEvent) ProtoMessage() {} -func (*PMessageEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_72a7884ce2d4c43e, []int{8} -} - -func (m *PMessageEvent) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PMessageEvent.Unmarshal(m, b) -} -func (m *PMessageEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PMessageEvent.Marshal(b, m, deterministic) -} -func (m *PMessageEvent) XXX_Merge(src proto.Message) { - xxx_messageInfo_PMessageEvent.Merge(m, src) -} -func (m *PMessageEvent) XXX_Size() int { - return xxx_messageInfo_PMessageEvent.Size(m) -} -func (m *PMessageEvent) XXX_DiscardUnknown() { - xxx_messageInfo_PMessageEvent.DiscardUnknown(m) -} - -var xxx_messageInfo_PMessageEvent proto.InternalMessageInfo - -func (m *PMessageEvent) GetNextSpanId() int64 { - if m != nil { - return m.NextSpanId - } - return 0 -} - -func (m *PMessageEvent) GetEndPoint() string { - if m != nil { - return m.EndPoint - } - return "" -} - -func (m *PMessageEvent) GetDestinationId() string { - if m != nil { - return m.DestinationId - } - return "" -} - -type PSpanChunk struct { - Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - TransactionId *PTransactionId `protobuf:"bytes,2,opt,name=transactionId,proto3" json:"transactionId,omitempty"` - SpanId int64 `protobuf:"fixed64,3,opt,name=spanId,proto3" json:"spanId,omitempty"` - EndPoint string `protobuf:"bytes,4,opt,name=endPoint,proto3" json:"endPoint,omitempty"` - SpanEvent []*PSpanEvent `protobuf:"bytes,5,rep,name=spanEvent,proto3" json:"spanEvent,omitempty"` - ApplicationServiceType int32 `protobuf:"varint,6,opt,name=applicationServiceType,proto3" json:"applicationServiceType,omitempty"` - KeyTime int64 `protobuf:"varint,7,opt,name=keyTime,proto3" json:"keyTime,omitempty"` - LocalAsyncId *PLocalAsyncId `protobuf:"bytes,8,opt,name=localAsyncId,proto3" json:"localAsyncId,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PSpanChunk) Reset() { *m = PSpanChunk{} } -func (m *PSpanChunk) String() string { return proto.CompactTextString(m) } -func (*PSpanChunk) ProtoMessage() {} -func (*PSpanChunk) Descriptor() ([]byte, []int) { - return fileDescriptor_72a7884ce2d4c43e, []int{9} -} - -func (m *PSpanChunk) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PSpanChunk.Unmarshal(m, b) -} -func (m *PSpanChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PSpanChunk.Marshal(b, m, deterministic) -} -func (m *PSpanChunk) XXX_Merge(src proto.Message) { - xxx_messageInfo_PSpanChunk.Merge(m, src) -} -func (m *PSpanChunk) XXX_Size() int { - return xxx_messageInfo_PSpanChunk.Size(m) -} -func (m *PSpanChunk) XXX_DiscardUnknown() { - xxx_messageInfo_PSpanChunk.DiscardUnknown(m) -} - -var xxx_messageInfo_PSpanChunk proto.InternalMessageInfo - -func (m *PSpanChunk) GetVersion() int32 { - if m != nil { - return m.Version - } - return 0 -} - -func (m *PSpanChunk) GetTransactionId() *PTransactionId { - if m != nil { - return m.TransactionId - } - return nil -} - -func (m *PSpanChunk) GetSpanId() int64 { - if m != nil { - return m.SpanId - } - return 0 -} - -func (m *PSpanChunk) GetEndPoint() string { - if m != nil { - return m.EndPoint - } - return "" -} - -func (m *PSpanChunk) GetSpanEvent() []*PSpanEvent { - if m != nil { - return m.SpanEvent - } - return nil -} - -func (m *PSpanChunk) GetApplicationServiceType() int32 { - if m != nil { - return m.ApplicationServiceType - } - return 0 -} - -func (m *PSpanChunk) GetKeyTime() int64 { - if m != nil { - return m.KeyTime - } - return 0 -} - -func (m *PSpanChunk) GetLocalAsyncId() *PLocalAsyncId { - if m != nil { - return m.LocalAsyncId - } - return nil -} - -type PResult struct { - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PResult) Reset() { *m = PResult{} } -func (m *PResult) String() string { return proto.CompactTextString(m) } -func (*PResult) ProtoMessage() {} -func (*PResult) Descriptor() ([]byte, []int) { - return fileDescriptor_72a7884ce2d4c43e, []int{10} -} - -func (m *PResult) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PResult.Unmarshal(m, b) -} -func (m *PResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PResult.Marshal(b, m, deterministic) -} -func (m *PResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_PResult.Merge(m, src) -} -func (m *PResult) XXX_Size() int { - return xxx_messageInfo_PResult.Size(m) -} -func (m *PResult) XXX_DiscardUnknown() { - xxx_messageInfo_PResult.DiscardUnknown(m) -} - -var xxx_messageInfo_PResult proto.InternalMessageInfo - -func (m *PResult) GetSuccess() bool { - if m != nil { - return m.Success - } - return false -} - -func (m *PResult) GetMessage() string { - if m != nil { - return m.Message - } - return "" -} - -type PSqlMetaData struct { - SqlId int32 `protobuf:"varint,1,opt,name=sqlId,proto3" json:"sqlId,omitempty"` - Sql string `protobuf:"bytes,2,opt,name=sql,proto3" json:"sql,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PSqlMetaData) Reset() { *m = PSqlMetaData{} } -func (m *PSqlMetaData) String() string { return proto.CompactTextString(m) } -func (*PSqlMetaData) ProtoMessage() {} -func (*PSqlMetaData) Descriptor() ([]byte, []int) { - return fileDescriptor_72a7884ce2d4c43e, []int{11} -} - -func (m *PSqlMetaData) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PSqlMetaData.Unmarshal(m, b) -} -func (m *PSqlMetaData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PSqlMetaData.Marshal(b, m, deterministic) -} -func (m *PSqlMetaData) XXX_Merge(src proto.Message) { - xxx_messageInfo_PSqlMetaData.Merge(m, src) -} -func (m *PSqlMetaData) XXX_Size() int { - return xxx_messageInfo_PSqlMetaData.Size(m) -} -func (m *PSqlMetaData) XXX_DiscardUnknown() { - xxx_messageInfo_PSqlMetaData.DiscardUnknown(m) -} - -var xxx_messageInfo_PSqlMetaData proto.InternalMessageInfo - -func (m *PSqlMetaData) GetSqlId() int32 { - if m != nil { - return m.SqlId - } - return 0 -} - -func (m *PSqlMetaData) GetSql() string { - if m != nil { - return m.Sql - } - return "" -} - -type PApiMetaData struct { - ApiId int32 `protobuf:"varint,1,opt,name=apiId,proto3" json:"apiId,omitempty"` - ApiInfo string `protobuf:"bytes,2,opt,name=apiInfo,proto3" json:"apiInfo,omitempty"` - Line int32 `protobuf:"varint,3,opt,name=line,proto3" json:"line,omitempty"` - Type int32 `protobuf:"varint,4,opt,name=type,proto3" json:"type,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PApiMetaData) Reset() { *m = PApiMetaData{} } -func (m *PApiMetaData) String() string { return proto.CompactTextString(m) } -func (*PApiMetaData) ProtoMessage() {} -func (*PApiMetaData) Descriptor() ([]byte, []int) { - return fileDescriptor_72a7884ce2d4c43e, []int{12} -} - -func (m *PApiMetaData) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PApiMetaData.Unmarshal(m, b) -} -func (m *PApiMetaData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PApiMetaData.Marshal(b, m, deterministic) -} -func (m *PApiMetaData) XXX_Merge(src proto.Message) { - xxx_messageInfo_PApiMetaData.Merge(m, src) -} -func (m *PApiMetaData) XXX_Size() int { - return xxx_messageInfo_PApiMetaData.Size(m) -} -func (m *PApiMetaData) XXX_DiscardUnknown() { - xxx_messageInfo_PApiMetaData.DiscardUnknown(m) -} - -var xxx_messageInfo_PApiMetaData proto.InternalMessageInfo - -func (m *PApiMetaData) GetApiId() int32 { - if m != nil { - return m.ApiId - } - return 0 -} - -func (m *PApiMetaData) GetApiInfo() string { - if m != nil { - return m.ApiInfo - } - return "" -} - -func (m *PApiMetaData) GetLine() int32 { - if m != nil { - return m.Line - } - return 0 -} - -func (m *PApiMetaData) GetType() int32 { - if m != nil { - return m.Type - } - return 0 -} - -type PStringMetaData struct { - StringId int32 `protobuf:"varint,1,opt,name=stringId,proto3" json:"stringId,omitempty"` - StringValue string `protobuf:"bytes,2,opt,name=stringValue,proto3" json:"stringValue,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PStringMetaData) Reset() { *m = PStringMetaData{} } -func (m *PStringMetaData) String() string { return proto.CompactTextString(m) } -func (*PStringMetaData) ProtoMessage() {} -func (*PStringMetaData) Descriptor() ([]byte, []int) { - return fileDescriptor_72a7884ce2d4c43e, []int{13} -} - -func (m *PStringMetaData) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PStringMetaData.Unmarshal(m, b) -} -func (m *PStringMetaData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PStringMetaData.Marshal(b, m, deterministic) -} -func (m *PStringMetaData) XXX_Merge(src proto.Message) { - xxx_messageInfo_PStringMetaData.Merge(m, src) -} -func (m *PStringMetaData) XXX_Size() int { - return xxx_messageInfo_PStringMetaData.Size(m) -} -func (m *PStringMetaData) XXX_DiscardUnknown() { - xxx_messageInfo_PStringMetaData.DiscardUnknown(m) -} - -var xxx_messageInfo_PStringMetaData proto.InternalMessageInfo - -func (m *PStringMetaData) GetStringId() int32 { - if m != nil { - return m.StringId - } - return 0 -} - -func (m *PStringMetaData) GetStringValue() string { - if m != nil { - return m.StringValue - } - return "" -} - -func init() { - proto.RegisterType((*PSpanMessage)(nil), "v1.PSpanMessage") - proto.RegisterType((*PSpan)(nil), "v1.PSpan") - proto.RegisterType((*PTransactionId)(nil), "v1.PTransactionId") - proto.RegisterType((*PAcceptEvent)(nil), "v1.PAcceptEvent") - proto.RegisterType((*PParentInfo)(nil), "v1.PParentInfo") - proto.RegisterType((*PLocalAsyncId)(nil), "v1.PLocalAsyncId") - proto.RegisterType((*PSpanEvent)(nil), "v1.PSpanEvent") - proto.RegisterType((*PNextEvent)(nil), "v1.PNextEvent") - proto.RegisterType((*PMessageEvent)(nil), "v1.PMessageEvent") - proto.RegisterType((*PSpanChunk)(nil), "v1.PSpanChunk") - proto.RegisterType((*PResult)(nil), "v1.PResult") - proto.RegisterType((*PSqlMetaData)(nil), "v1.PSqlMetaData") - proto.RegisterType((*PApiMetaData)(nil), "v1.PApiMetaData") - proto.RegisterType((*PStringMetaData)(nil), "v1.PStringMetaData") -} - -func init() { - proto.RegisterFile("Span.proto", fileDescriptor_72a7884ce2d4c43e) -} - -var fileDescriptor_72a7884ce2d4c43e = []byte{ - // 991 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x5f, 0x6f, 0xe3, 0x44, - 0x10, 0x3f, 0xe7, 0x6f, 0x33, 0x49, 0xda, 0xdc, 0x02, 0x27, 0xab, 0x20, 0x08, 0x16, 0x42, 0x79, - 0x38, 0xa5, 0x5c, 0x81, 0x03, 0x1e, 0x78, 0x48, 0xa1, 0x52, 0x23, 0xd1, 0x12, 0x6d, 0x2a, 0xde, - 0xf7, 0xec, 0x8d, 0x6b, 0x9d, 0xb3, 0xde, 0xd8, 0x9b, 0xe8, 0xfa, 0x21, 0xf8, 0x08, 0x7c, 0x22, - 0x3e, 0x0a, 0xaf, 0x7c, 0x00, 0xb4, 0xb3, 0x6b, 0x7b, 0x5d, 0x7a, 0x77, 0x3c, 0xf1, 0x94, 0x9d, - 0xdf, 0xcc, 0xec, 0x8c, 0xe7, 0xcf, 0x6f, 0x03, 0xb0, 0x96, 0x4c, 0xcc, 0x65, 0x9e, 0xa9, 0x8c, - 0xb4, 0x0e, 0x2f, 0x4e, 0x3f, 0x8e, 0xb3, 0x2c, 0x4e, 0xf9, 0x19, 0x22, 0xaf, 0xf6, 0x9b, 0x33, - 0xbe, 0x95, 0xea, 0xde, 0x18, 0x9c, 0x4e, 0x16, 0x42, 0x64, 0x8a, 0xa9, 0x24, 0xb3, 0x2e, 0xc1, - 0x1d, 0x8c, 0x56, 0xfa, 0x86, 0x6b, 0x5e, 0x14, 0x2c, 0xe6, 0xe4, 0x33, 0xe8, 0x14, 0x92, 0x09, - 0xdf, 0x9b, 0x7a, 0xb3, 0xe1, 0xf9, 0x60, 0x7e, 0x78, 0x31, 0x47, 0xfd, 0xd5, 0x13, 0x8a, 0x0a, - 0x32, 0x87, 0x81, 0xfe, 0xfd, 0xe9, 0x6e, 0x2f, 0x5e, 0xfb, 0x2d, 0xb4, 0x3a, 0xae, 0xac, 0x10, - 0xbd, 0x7a, 0x42, 0x6b, 0x93, 0x8b, 0x3e, 0x74, 0x37, 0x09, 0x4f, 0xa3, 0xe0, 0xaf, 0x0e, 0x74, - 0xd1, 0x88, 0xf8, 0xd0, 0x3f, 0xf0, 0xbc, 0x48, 0x32, 0x13, 0xa6, 0x4b, 0x4b, 0x91, 0x7c, 0x0f, - 0x63, 0x95, 0x33, 0x51, 0xb0, 0x50, 0xa7, 0xb8, 0x8c, 0x6c, 0x00, 0x82, 0x01, 0x6e, 0x5d, 0x0d, - 0x6d, 0x1a, 0x92, 0x67, 0xd0, 0xd3, 0x31, 0x97, 0x91, 0xdf, 0x9e, 0x7a, 0xb3, 0x09, 0xb5, 0x12, - 0x09, 0x60, 0x24, 0x59, 0xce, 0x85, 0x5a, 0x1b, 0x6d, 0x07, 0xb5, 0x0d, 0x8c, 0x7c, 0x02, 0x83, - 0x42, 0xb1, 0x5c, 0xdd, 0x26, 0x5b, 0xee, 0x77, 0xa7, 0xde, 0xac, 0x4d, 0x6b, 0x40, 0x67, 0xcb, - 0x53, 0x26, 0x0b, 0x1e, 0xf9, 0x3d, 0x93, 0xad, 0x15, 0xc9, 0x87, 0xd0, 0x65, 0x32, 0x59, 0x46, - 0x7e, 0x1f, 0x71, 0x23, 0x90, 0x29, 0x0c, 0x0b, 0x9e, 0x1f, 0x92, 0x90, 0xdf, 0xde, 0x4b, 0xee, - 0x1f, 0xa1, 0xce, 0x85, 0xc8, 0x39, 0x0c, 0x59, 0x18, 0x72, 0xa9, 0x2e, 0x0f, 0x5c, 0x28, 0x7f, - 0x80, 0xdf, 0x38, 0xc1, 0x6f, 0x5c, 0xd4, 0x38, 0x75, 0x8d, 0xc8, 0x19, 0x00, 0xab, 0x7a, 0xe7, - 0xc3, 0xb4, 0x3d, 0x1b, 0x9e, 0x9f, 0x18, 0x97, 0x0a, 0xa6, 0x8e, 0x09, 0x21, 0xd0, 0xd9, 0xa4, - 0x2c, 0xf6, 0x87, 0x18, 0x1f, 0xcf, 0x64, 0x02, 0x6d, 0x9e, 0xe7, 0xfe, 0x68, 0xea, 0xcd, 0x9e, - 0x52, 0x7d, 0x24, 0xcf, 0x4d, 0x37, 0x4d, 0x22, 0x63, 0xbc, 0xb5, 0xee, 0xa6, 0x49, 0xa3, 0x36, - 0x20, 0x3f, 0xc0, 0x98, 0xbf, 0xd1, 0x39, 0xe9, 0x9a, 0x8b, 0x4d, 0xe6, 0x1f, 0x63, 0xea, 0x1f, - 0xa0, 0xc7, 0x52, 0xa8, 0xb5, 0xca, 0x13, 0x11, 0xff, 0xc6, 0xd2, 0x3d, 0xa7, 0x4d, 0x4b, 0xf2, - 0x12, 0x9e, 0x31, 0x29, 0xd3, 0x24, 0xc4, 0xec, 0xd6, 0x4e, 0x81, 0x4e, 0x30, 0xc1, 0xb7, 0x68, - 0xb5, 0x5f, 0x9a, 0xc5, 0x71, 0x22, 0x62, 0xb7, 0xfd, 0x3a, 0xf6, 0xc4, 0xf8, 0x3d, 0xae, 0x0d, - 0x04, 0x1c, 0x37, 0x07, 0x46, 0xf7, 0x91, 0xc5, 0x5c, 0xa8, 0x65, 0x84, 0x53, 0x37, 0xa0, 0xa5, - 0x48, 0xbe, 0x84, 0x63, 0x3c, 0xae, 0xab, 0x21, 0x68, 0xe1, 0x10, 0x3c, 0x40, 0xc9, 0x29, 0x1c, - 0x15, 0x7c, 0xb7, 0xe7, 0x22, 0xe4, 0x38, 0x65, 0x6d, 0x5a, 0xc9, 0xc1, 0xef, 0x1e, 0x8c, 0xdc, - 0xee, 0xe9, 0x5a, 0xe7, 0x32, 0xb4, 0xa1, 0xf4, 0x51, 0xbb, 0x73, 0x11, 0xad, 0xb2, 0x44, 0x28, - 0x0c, 0x30, 0xa0, 0x95, 0x4c, 0x3e, 0x05, 0xc8, 0xf9, 0x36, 0x53, 0x7c, 0x11, 0x45, 0x39, 0x5e, - 0x3e, 0xa0, 0x0e, 0xa2, 0xdb, 0x6f, 0x46, 0x16, 0x3f, 0xbd, 0x83, 0x65, 0x37, 0xed, 0x5f, 0x55, - 0x30, 0x75, 0x4c, 0x82, 0x3f, 0x3c, 0x18, 0x3a, 0x3a, 0xf2, 0x0d, 0x7c, 0x64, 0xb4, 0x8b, 0xba, - 0xce, 0x37, 0x6c, 0xcb, 0x6d, 0x82, 0x8f, 0x2b, 0x1f, 0xf5, 0xc2, 0xa6, 0xb5, 0xb0, 0xf8, 0x8f, - 0x2b, 0xf5, 0xce, 0x99, 0xd1, 0xcd, 0xf2, 0xab, 0xac, 0x50, 0xf6, 0x73, 0x1a, 0x58, 0x70, 0x09, - 0xe3, 0xd5, 0x2f, 0x59, 0xc8, 0xd2, 0x45, 0x71, 0x2f, 0x42, 0xdb, 0x1e, 0x73, 0x2c, 0x49, 0xc1, - 0x8a, 0x8d, 0xb2, 0x9b, 0xb8, 0x75, 0xd9, 0xff, 0x6e, 0x01, 0xd4, 0xb3, 0xda, 0x30, 0xf5, 0x9a, - 0xa6, 0x7a, 0x5b, 0x23, 0x2e, 0xd5, 0x9d, 0xbd, 0xc3, 0x08, 0x3a, 0x57, 0x5c, 0xf5, 0x4b, 0xbb, - 0xe2, 0x6d, 0x54, 0x36, 0x30, 0xdd, 0x1c, 0x2e, 0xa2, 0xd2, 0xa2, 0x83, 0x16, 0x0e, 0xf2, 0x70, - 0xe3, 0xbb, 0xb8, 0x5e, 0x8d, 0x8d, 0x6f, 0x6e, 0x6f, 0xef, 0xfd, 0xdb, 0x5b, 0x51, 0x0b, 0xe0, - 0x65, 0x96, 0x5a, 0xfe, 0xb5, 0x7f, 0xc3, 0xff, 0xbc, 0x7f, 0xcf, 0x61, 0x20, 0xf8, 0x1b, 0xcb, - 0x38, 0x23, 0x87, 0xb6, 0x6f, 0x4a, 0x94, 0xd6, 0x06, 0xfa, 0x8b, 0xb1, 0xfa, 0x25, 0x2f, 0xe0, - 0x17, 0xd7, 0x48, 0x70, 0x03, 0x50, 0x3b, 0x92, 0xef, 0x60, 0xb4, 0x35, 0xcf, 0x87, 0xb1, 0x37, - 0x6f, 0xc7, 0x53, 0xbc, 0xfe, 0xda, 0x51, 0x5c, 0x3d, 0xa1, 0x0d, 0xc3, 0xfa, 0x6d, 0xd8, 0xc1, - 0xb8, 0x61, 0xa9, 0x13, 0xd0, 0xd9, 0x58, 0xd2, 0xf6, 0x90, 0xb4, 0x1d, 0xe4, 0x9d, 0xbb, 0xf4, - 0x05, 0x8c, 0x23, 0x5e, 0xa8, 0x44, 0x30, 0xfb, 0x88, 0x98, 0xf9, 0x6b, 0x82, 0xc1, 0x9f, 0xe5, - 0xe4, 0xe0, 0x33, 0xf5, 0xbf, 0xbe, 0x49, 0x6e, 0xf2, 0x9d, 0x07, 0xc9, 0x37, 0x08, 0xb9, 0xfb, - 0x3e, 0x42, 0x7e, 0x3b, 0xab, 0xf6, 0xde, 0xc9, 0xaa, 0x3e, 0xf4, 0x5f, 0xf3, 0x7b, 0xa4, 0xba, - 0x3e, 0x12, 0x59, 0x29, 0x92, 0x6f, 0x61, 0x94, 0x3a, 0x6b, 0x89, 0xcf, 0x57, 0xd9, 0x4b, 0x77, - 0x5f, 0x69, 0xc3, 0x2c, 0xf8, 0x11, 0xfa, 0x2b, 0xca, 0x8b, 0x7d, 0xaa, 0xf4, 0xdd, 0xc5, 0x3e, - 0x0c, 0x79, 0x51, 0x60, 0x25, 0x8f, 0x68, 0x29, 0x6a, 0x8d, 0x6d, 0xbf, 0xed, 0x59, 0x29, 0x06, - 0x2f, 0xf5, 0xbf, 0x90, 0x5d, 0x7a, 0xcd, 0x15, 0xfb, 0x99, 0x29, 0xa6, 0xc7, 0xbf, 0xd8, 0xa5, - 0x15, 0x15, 0x18, 0x41, 0x53, 0x6a, 0xb1, 0x4b, 0xad, 0xaf, 0x3e, 0x06, 0x1b, 0x4d, 0xba, 0x32, - 0x71, 0xfd, 0xcc, 0xda, 0x78, 0xee, 0x8b, 0xac, 0xa9, 0x45, 0x26, 0xb8, 0x30, 0x36, 0xae, 0x15, - 0xf5, 0x23, 0x99, 0x26, 0x82, 0xdb, 0xad, 0xc7, 0xb3, 0xc6, 0x94, 0xae, 0xa0, 0xd9, 0x73, 0x3c, - 0x07, 0xbf, 0xc2, 0xc9, 0xca, 0x2c, 0x57, 0x15, 0x4a, 0x53, 0x0d, 0x22, 0x55, 0xb4, 0x4a, 0x46, - 0x42, 0xa8, 0x57, 0xd1, 0x06, 0x75, 0xa1, 0x8b, 0xaf, 0xe0, 0xf3, 0x30, 0xdb, 0xce, 0x05, 0x3b, - 0xf0, 0x3c, 0xcc, 0x72, 0x39, 0x97, 0x89, 0x90, 0x7a, 0x00, 0xe6, 0x71, 0x2e, 0xc3, 0xb9, 0xca, - 0x59, 0xc8, 0x2f, 0x06, 0xba, 0xe7, 0x2b, 0xfd, 0x37, 0x6d, 0xe5, 0xbd, 0xea, 0xe1, 0xff, 0xb5, - 0xaf, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0xad, 0xc2, 0x70, 0xff, 0xf0, 0x09, 0x00, 0x00, -} diff --git a/collector-agent/protocol/Stat.pb.go b/collector-agent/protocol/Stat.pb.go deleted file mode 100644 index afcc3b18f..000000000 --- a/collector-agent/protocol/Stat.pb.go +++ /dev/null @@ -1,1467 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: Stat.proto - -package v1 - -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/empty" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type PJvmGcType int32 - -const ( - PJvmGcType_JVM_GC_TYPE_UNKNOWN PJvmGcType = 0 - PJvmGcType_JVM_GC_TYPE_SERIAL PJvmGcType = 1 - PJvmGcType_JVM_GC_TYPE_PARALLEL PJvmGcType = 2 - PJvmGcType_JVM_GC_TYPE_CMS PJvmGcType = 3 - PJvmGcType_JVM_GC_TYPE_G1 PJvmGcType = 4 -) - -var PJvmGcType_name = map[int32]string{ - 0: "JVM_GC_TYPE_UNKNOWN", - 1: "JVM_GC_TYPE_SERIAL", - 2: "JVM_GC_TYPE_PARALLEL", - 3: "JVM_GC_TYPE_CMS", - 4: "JVM_GC_TYPE_G1", -} - -var PJvmGcType_value = map[string]int32{ - "JVM_GC_TYPE_UNKNOWN": 0, - "JVM_GC_TYPE_SERIAL": 1, - "JVM_GC_TYPE_PARALLEL": 2, - "JVM_GC_TYPE_CMS": 3, - "JVM_GC_TYPE_G1": 4, -} - -func (x PJvmGcType) String() string { - return proto.EnumName(PJvmGcType_name, int32(x)) -} - -func (PJvmGcType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_29a37052f84a5404, []int{0} -} - -type PPing struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PPing) Reset() { *m = PPing{} } -func (m *PPing) String() string { return proto.CompactTextString(m) } -func (*PPing) ProtoMessage() {} -func (*PPing) Descriptor() ([]byte, []int) { - return fileDescriptor_29a37052f84a5404, []int{0} -} - -func (m *PPing) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PPing.Unmarshal(m, b) -} -func (m *PPing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PPing.Marshal(b, m, deterministic) -} -func (m *PPing) XXX_Merge(src proto.Message) { - xxx_messageInfo_PPing.Merge(m, src) -} -func (m *PPing) XXX_Size() int { - return xxx_messageInfo_PPing.Size(m) -} -func (m *PPing) XXX_DiscardUnknown() { - xxx_messageInfo_PPing.DiscardUnknown(m) -} - -var xxx_messageInfo_PPing proto.InternalMessageInfo - -type PStatMessage struct { - // Types that are valid to be assigned to Field: - // *PStatMessage_AgentStat - // *PStatMessage_AgentStatBatch - Field isPStatMessage_Field `protobuf_oneof:"field"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PStatMessage) Reset() { *m = PStatMessage{} } -func (m *PStatMessage) String() string { return proto.CompactTextString(m) } -func (*PStatMessage) ProtoMessage() {} -func (*PStatMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_29a37052f84a5404, []int{1} -} - -func (m *PStatMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PStatMessage.Unmarshal(m, b) -} -func (m *PStatMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PStatMessage.Marshal(b, m, deterministic) -} -func (m *PStatMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_PStatMessage.Merge(m, src) -} -func (m *PStatMessage) XXX_Size() int { - return xxx_messageInfo_PStatMessage.Size(m) -} -func (m *PStatMessage) XXX_DiscardUnknown() { - xxx_messageInfo_PStatMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_PStatMessage proto.InternalMessageInfo - -type isPStatMessage_Field interface { - isPStatMessage_Field() -} - -type PStatMessage_AgentStat struct { - AgentStat *PAgentStat `protobuf:"bytes,1,opt,name=agentStat,proto3,oneof"` -} - -type PStatMessage_AgentStatBatch struct { - AgentStatBatch *PAgentStatBatch `protobuf:"bytes,2,opt,name=agentStatBatch,proto3,oneof"` -} - -func (*PStatMessage_AgentStat) isPStatMessage_Field() {} - -func (*PStatMessage_AgentStatBatch) isPStatMessage_Field() {} - -func (m *PStatMessage) GetField() isPStatMessage_Field { - if m != nil { - return m.Field - } - return nil -} - -func (m *PStatMessage) GetAgentStat() *PAgentStat { - if x, ok := m.GetField().(*PStatMessage_AgentStat); ok { - return x.AgentStat - } - return nil -} - -func (m *PStatMessage) GetAgentStatBatch() *PAgentStatBatch { - if x, ok := m.GetField().(*PStatMessage_AgentStatBatch); ok { - return x.AgentStatBatch - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*PStatMessage) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*PStatMessage_AgentStat)(nil), - (*PStatMessage_AgentStatBatch)(nil), - } -} - -type PAgentInfo struct { - Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"` - Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"` - Ports string `protobuf:"bytes,3,opt,name=ports,proto3" json:"ports,omitempty"` - ServiceType int32 `protobuf:"varint,4,opt,name=serviceType,proto3" json:"serviceType,omitempty"` - Pid int32 `protobuf:"varint,5,opt,name=pid,proto3" json:"pid,omitempty"` - AgentVersion string `protobuf:"bytes,6,opt,name=agentVersion,proto3" json:"agentVersion,omitempty"` - VmVersion string `protobuf:"bytes,7,opt,name=vmVersion,proto3" json:"vmVersion,omitempty"` - EndTimestamp int64 `protobuf:"varint,8,opt,name=endTimestamp,proto3" json:"endTimestamp,omitempty"` - EndStatus int32 `protobuf:"varint,9,opt,name=endStatus,proto3" json:"endStatus,omitempty"` - ServerMetaData *PServerMetaData `protobuf:"bytes,10,opt,name=serverMetaData,proto3" json:"serverMetaData,omitempty"` - JvmInfo *PJvmInfo `protobuf:"bytes,11,opt,name=jvmInfo,proto3" json:"jvmInfo,omitempty"` - Container bool `protobuf:"varint,12,opt,name=container,proto3" json:"container,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PAgentInfo) Reset() { *m = PAgentInfo{} } -func (m *PAgentInfo) String() string { return proto.CompactTextString(m) } -func (*PAgentInfo) ProtoMessage() {} -func (*PAgentInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_29a37052f84a5404, []int{2} -} - -func (m *PAgentInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PAgentInfo.Unmarshal(m, b) -} -func (m *PAgentInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PAgentInfo.Marshal(b, m, deterministic) -} -func (m *PAgentInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_PAgentInfo.Merge(m, src) -} -func (m *PAgentInfo) XXX_Size() int { - return xxx_messageInfo_PAgentInfo.Size(m) -} -func (m *PAgentInfo) XXX_DiscardUnknown() { - xxx_messageInfo_PAgentInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_PAgentInfo proto.InternalMessageInfo - -func (m *PAgentInfo) GetHostname() string { - if m != nil { - return m.Hostname - } - return "" -} - -func (m *PAgentInfo) GetIp() string { - if m != nil { - return m.Ip - } - return "" -} - -func (m *PAgentInfo) GetPorts() string { - if m != nil { - return m.Ports - } - return "" -} - -func (m *PAgentInfo) GetServiceType() int32 { - if m != nil { - return m.ServiceType - } - return 0 -} - -func (m *PAgentInfo) GetPid() int32 { - if m != nil { - return m.Pid - } - return 0 -} - -func (m *PAgentInfo) GetAgentVersion() string { - if m != nil { - return m.AgentVersion - } - return "" -} - -func (m *PAgentInfo) GetVmVersion() string { - if m != nil { - return m.VmVersion - } - return "" -} - -func (m *PAgentInfo) GetEndTimestamp() int64 { - if m != nil { - return m.EndTimestamp - } - return 0 -} - -func (m *PAgentInfo) GetEndStatus() int32 { - if m != nil { - return m.EndStatus - } - return 0 -} - -func (m *PAgentInfo) GetServerMetaData() *PServerMetaData { - if m != nil { - return m.ServerMetaData - } - return nil -} - -func (m *PAgentInfo) GetJvmInfo() *PJvmInfo { - if m != nil { - return m.JvmInfo - } - return nil -} - -func (m *PAgentInfo) GetContainer() bool { - if m != nil { - return m.Container - } - return false -} - -type PServerMetaData struct { - ServerInfo string `protobuf:"bytes,1,opt,name=serverInfo,proto3" json:"serverInfo,omitempty"` - VmArg []string `protobuf:"bytes,2,rep,name=vmArg,proto3" json:"vmArg,omitempty"` - ServiceInfo []*PServiceInfo `protobuf:"bytes,3,rep,name=serviceInfo,proto3" json:"serviceInfo,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PServerMetaData) Reset() { *m = PServerMetaData{} } -func (m *PServerMetaData) String() string { return proto.CompactTextString(m) } -func (*PServerMetaData) ProtoMessage() {} -func (*PServerMetaData) Descriptor() ([]byte, []int) { - return fileDescriptor_29a37052f84a5404, []int{3} -} - -func (m *PServerMetaData) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PServerMetaData.Unmarshal(m, b) -} -func (m *PServerMetaData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PServerMetaData.Marshal(b, m, deterministic) -} -func (m *PServerMetaData) XXX_Merge(src proto.Message) { - xxx_messageInfo_PServerMetaData.Merge(m, src) -} -func (m *PServerMetaData) XXX_Size() int { - return xxx_messageInfo_PServerMetaData.Size(m) -} -func (m *PServerMetaData) XXX_DiscardUnknown() { - xxx_messageInfo_PServerMetaData.DiscardUnknown(m) -} - -var xxx_messageInfo_PServerMetaData proto.InternalMessageInfo - -func (m *PServerMetaData) GetServerInfo() string { - if m != nil { - return m.ServerInfo - } - return "" -} - -func (m *PServerMetaData) GetVmArg() []string { - if m != nil { - return m.VmArg - } - return nil -} - -func (m *PServerMetaData) GetServiceInfo() []*PServiceInfo { - if m != nil { - return m.ServiceInfo - } - return nil -} - -type PServiceInfo struct { - ServiceName string `protobuf:"bytes,1,opt,name=serviceName,proto3" json:"serviceName,omitempty"` - ServiceLib []string `protobuf:"bytes,2,rep,name=serviceLib,proto3" json:"serviceLib,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PServiceInfo) Reset() { *m = PServiceInfo{} } -func (m *PServiceInfo) String() string { return proto.CompactTextString(m) } -func (*PServiceInfo) ProtoMessage() {} -func (*PServiceInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_29a37052f84a5404, []int{4} -} - -func (m *PServiceInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PServiceInfo.Unmarshal(m, b) -} -func (m *PServiceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PServiceInfo.Marshal(b, m, deterministic) -} -func (m *PServiceInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_PServiceInfo.Merge(m, src) -} -func (m *PServiceInfo) XXX_Size() int { - return xxx_messageInfo_PServiceInfo.Size(m) -} -func (m *PServiceInfo) XXX_DiscardUnknown() { - xxx_messageInfo_PServiceInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_PServiceInfo proto.InternalMessageInfo - -func (m *PServiceInfo) GetServiceName() string { - if m != nil { - return m.ServiceName - } - return "" -} - -func (m *PServiceInfo) GetServiceLib() []string { - if m != nil { - return m.ServiceLib - } - return nil -} - -type PJvmInfo struct { - Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - VmVersion string `protobuf:"bytes,2,opt,name=vmVersion,proto3" json:"vmVersion,omitempty"` - GcType PJvmGcType `protobuf:"varint,3,opt,name=gcType,proto3,enum=v1.PJvmGcType" json:"gcType,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PJvmInfo) Reset() { *m = PJvmInfo{} } -func (m *PJvmInfo) String() string { return proto.CompactTextString(m) } -func (*PJvmInfo) ProtoMessage() {} -func (*PJvmInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_29a37052f84a5404, []int{5} -} - -func (m *PJvmInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PJvmInfo.Unmarshal(m, b) -} -func (m *PJvmInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PJvmInfo.Marshal(b, m, deterministic) -} -func (m *PJvmInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_PJvmInfo.Merge(m, src) -} -func (m *PJvmInfo) XXX_Size() int { - return xxx_messageInfo_PJvmInfo.Size(m) -} -func (m *PJvmInfo) XXX_DiscardUnknown() { - xxx_messageInfo_PJvmInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_PJvmInfo proto.InternalMessageInfo - -func (m *PJvmInfo) GetVersion() int32 { - if m != nil { - return m.Version - } - return 0 -} - -func (m *PJvmInfo) GetVmVersion() string { - if m != nil { - return m.VmVersion - } - return "" -} - -func (m *PJvmInfo) GetGcType() PJvmGcType { - if m != nil { - return m.GcType - } - return PJvmGcType_JVM_GC_TYPE_UNKNOWN -} - -type PAgentStat struct { - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - CollectInterval int64 `protobuf:"varint,2,opt,name=collectInterval,proto3" json:"collectInterval,omitempty"` - Gc *PJvmGc `protobuf:"bytes,3,opt,name=gc,proto3" json:"gc,omitempty"` - CpuLoad *PCpuLoad `protobuf:"bytes,4,opt,name=cpuLoad,proto3" json:"cpuLoad,omitempty"` - Transaction *PTransaction `protobuf:"bytes,5,opt,name=transaction,proto3" json:"transaction,omitempty"` - ActiveTrace *PActiveTrace `protobuf:"bytes,6,opt,name=activeTrace,proto3" json:"activeTrace,omitempty"` - DataSourceList *PDataSourceList `protobuf:"bytes,7,opt,name=dataSourceList,proto3" json:"dataSourceList,omitempty"` - ResponseTime *PResponseTime `protobuf:"bytes,8,opt,name=responseTime,proto3" json:"responseTime,omitempty"` - Deadlock *PDeadlock `protobuf:"bytes,9,opt,name=deadlock,proto3" json:"deadlock,omitempty"` - FileDescriptor *PFileDescriptor `protobuf:"bytes,10,opt,name=fileDescriptor,proto3" json:"fileDescriptor,omitempty"` - DirectBuffer *PDirectBuffer `protobuf:"bytes,11,opt,name=directBuffer,proto3" json:"directBuffer,omitempty"` - Metadata string `protobuf:"bytes,12,opt,name=metadata,proto3" json:"metadata,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PAgentStat) Reset() { *m = PAgentStat{} } -func (m *PAgentStat) String() string { return proto.CompactTextString(m) } -func (*PAgentStat) ProtoMessage() {} -func (*PAgentStat) Descriptor() ([]byte, []int) { - return fileDescriptor_29a37052f84a5404, []int{6} -} - -func (m *PAgentStat) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PAgentStat.Unmarshal(m, b) -} -func (m *PAgentStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PAgentStat.Marshal(b, m, deterministic) -} -func (m *PAgentStat) XXX_Merge(src proto.Message) { - xxx_messageInfo_PAgentStat.Merge(m, src) -} -func (m *PAgentStat) XXX_Size() int { - return xxx_messageInfo_PAgentStat.Size(m) -} -func (m *PAgentStat) XXX_DiscardUnknown() { - xxx_messageInfo_PAgentStat.DiscardUnknown(m) -} - -var xxx_messageInfo_PAgentStat proto.InternalMessageInfo - -func (m *PAgentStat) GetTimestamp() int64 { - if m != nil { - return m.Timestamp - } - return 0 -} - -func (m *PAgentStat) GetCollectInterval() int64 { - if m != nil { - return m.CollectInterval - } - return 0 -} - -func (m *PAgentStat) GetGc() *PJvmGc { - if m != nil { - return m.Gc - } - return nil -} - -func (m *PAgentStat) GetCpuLoad() *PCpuLoad { - if m != nil { - return m.CpuLoad - } - return nil -} - -func (m *PAgentStat) GetTransaction() *PTransaction { - if m != nil { - return m.Transaction - } - return nil -} - -func (m *PAgentStat) GetActiveTrace() *PActiveTrace { - if m != nil { - return m.ActiveTrace - } - return nil -} - -func (m *PAgentStat) GetDataSourceList() *PDataSourceList { - if m != nil { - return m.DataSourceList - } - return nil -} - -func (m *PAgentStat) GetResponseTime() *PResponseTime { - if m != nil { - return m.ResponseTime - } - return nil -} - -func (m *PAgentStat) GetDeadlock() *PDeadlock { - if m != nil { - return m.Deadlock - } - return nil -} - -func (m *PAgentStat) GetFileDescriptor() *PFileDescriptor { - if m != nil { - return m.FileDescriptor - } - return nil -} - -func (m *PAgentStat) GetDirectBuffer() *PDirectBuffer { - if m != nil { - return m.DirectBuffer - } - return nil -} - -func (m *PAgentStat) GetMetadata() string { - if m != nil { - return m.Metadata - } - return "" -} - -type PAgentStatBatch struct { - AgentStat []*PAgentStat `protobuf:"bytes,1,rep,name=agentStat,proto3" json:"agentStat,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PAgentStatBatch) Reset() { *m = PAgentStatBatch{} } -func (m *PAgentStatBatch) String() string { return proto.CompactTextString(m) } -func (*PAgentStatBatch) ProtoMessage() {} -func (*PAgentStatBatch) Descriptor() ([]byte, []int) { - return fileDescriptor_29a37052f84a5404, []int{7} -} - -func (m *PAgentStatBatch) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PAgentStatBatch.Unmarshal(m, b) -} -func (m *PAgentStatBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PAgentStatBatch.Marshal(b, m, deterministic) -} -func (m *PAgentStatBatch) XXX_Merge(src proto.Message) { - xxx_messageInfo_PAgentStatBatch.Merge(m, src) -} -func (m *PAgentStatBatch) XXX_Size() int { - return xxx_messageInfo_PAgentStatBatch.Size(m) -} -func (m *PAgentStatBatch) XXX_DiscardUnknown() { - xxx_messageInfo_PAgentStatBatch.DiscardUnknown(m) -} - -var xxx_messageInfo_PAgentStatBatch proto.InternalMessageInfo - -func (m *PAgentStatBatch) GetAgentStat() []*PAgentStat { - if m != nil { - return m.AgentStat - } - return nil -} - -type PDataSource struct { - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - ServiceTypeCode int32 `protobuf:"varint,2,opt,name=serviceTypeCode,proto3" json:"serviceTypeCode,omitempty"` - DatabaseName string `protobuf:"bytes,3,opt,name=databaseName,proto3" json:"databaseName,omitempty"` - Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"` - ActiveConnectionSize int32 `protobuf:"varint,5,opt,name=activeConnectionSize,proto3" json:"activeConnectionSize,omitempty"` - MaxConnectionSize int32 `protobuf:"varint,6,opt,name=maxConnectionSize,proto3" json:"maxConnectionSize,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PDataSource) Reset() { *m = PDataSource{} } -func (m *PDataSource) String() string { return proto.CompactTextString(m) } -func (*PDataSource) ProtoMessage() {} -func (*PDataSource) Descriptor() ([]byte, []int) { - return fileDescriptor_29a37052f84a5404, []int{8} -} - -func (m *PDataSource) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PDataSource.Unmarshal(m, b) -} -func (m *PDataSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PDataSource.Marshal(b, m, deterministic) -} -func (m *PDataSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_PDataSource.Merge(m, src) -} -func (m *PDataSource) XXX_Size() int { - return xxx_messageInfo_PDataSource.Size(m) -} -func (m *PDataSource) XXX_DiscardUnknown() { - xxx_messageInfo_PDataSource.DiscardUnknown(m) -} - -var xxx_messageInfo_PDataSource proto.InternalMessageInfo - -func (m *PDataSource) GetId() int32 { - if m != nil { - return m.Id - } - return 0 -} - -func (m *PDataSource) GetServiceTypeCode() int32 { - if m != nil { - return m.ServiceTypeCode - } - return 0 -} - -func (m *PDataSource) GetDatabaseName() string { - if m != nil { - return m.DatabaseName - } - return "" -} - -func (m *PDataSource) GetUrl() string { - if m != nil { - return m.Url - } - return "" -} - -func (m *PDataSource) GetActiveConnectionSize() int32 { - if m != nil { - return m.ActiveConnectionSize - } - return 0 -} - -func (m *PDataSource) GetMaxConnectionSize() int32 { - if m != nil { - return m.MaxConnectionSize - } - return 0 -} - -type PDataSourceList struct { - DataSource []*PDataSource `protobuf:"bytes,1,rep,name=dataSource,proto3" json:"dataSource,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PDataSourceList) Reset() { *m = PDataSourceList{} } -func (m *PDataSourceList) String() string { return proto.CompactTextString(m) } -func (*PDataSourceList) ProtoMessage() {} -func (*PDataSourceList) Descriptor() ([]byte, []int) { - return fileDescriptor_29a37052f84a5404, []int{9} -} - -func (m *PDataSourceList) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PDataSourceList.Unmarshal(m, b) -} -func (m *PDataSourceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PDataSourceList.Marshal(b, m, deterministic) -} -func (m *PDataSourceList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PDataSourceList.Merge(m, src) -} -func (m *PDataSourceList) XXX_Size() int { - return xxx_messageInfo_PDataSourceList.Size(m) -} -func (m *PDataSourceList) XXX_DiscardUnknown() { - xxx_messageInfo_PDataSourceList.DiscardUnknown(m) -} - -var xxx_messageInfo_PDataSourceList proto.InternalMessageInfo - -func (m *PDataSourceList) GetDataSource() []*PDataSource { - if m != nil { - return m.DataSource - } - return nil -} - -type PFileDescriptor struct { - OpenFileDescriptorCount int64 `protobuf:"varint,1,opt,name=openFileDescriptorCount,proto3" json:"openFileDescriptorCount,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PFileDescriptor) Reset() { *m = PFileDescriptor{} } -func (m *PFileDescriptor) String() string { return proto.CompactTextString(m) } -func (*PFileDescriptor) ProtoMessage() {} -func (*PFileDescriptor) Descriptor() ([]byte, []int) { - return fileDescriptor_29a37052f84a5404, []int{10} -} - -func (m *PFileDescriptor) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PFileDescriptor.Unmarshal(m, b) -} -func (m *PFileDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PFileDescriptor.Marshal(b, m, deterministic) -} -func (m *PFileDescriptor) XXX_Merge(src proto.Message) { - xxx_messageInfo_PFileDescriptor.Merge(m, src) -} -func (m *PFileDescriptor) XXX_Size() int { - return xxx_messageInfo_PFileDescriptor.Size(m) -} -func (m *PFileDescriptor) XXX_DiscardUnknown() { - xxx_messageInfo_PFileDescriptor.DiscardUnknown(m) -} - -var xxx_messageInfo_PFileDescriptor proto.InternalMessageInfo - -func (m *PFileDescriptor) GetOpenFileDescriptorCount() int64 { - if m != nil { - return m.OpenFileDescriptorCount - } - return 0 -} - -type PJvmGc struct { - Type PJvmGcType `protobuf:"varint,1,opt,name=type,proto3,enum=v1.PJvmGcType" json:"type,omitempty"` - JvmMemoryHeapUsed int64 `protobuf:"varint,2,opt,name=jvmMemoryHeapUsed,proto3" json:"jvmMemoryHeapUsed,omitempty"` - JvmMemoryHeapMax int64 `protobuf:"varint,3,opt,name=jvmMemoryHeapMax,proto3" json:"jvmMemoryHeapMax,omitempty"` - JvmMemoryNonHeapUsed int64 `protobuf:"varint,4,opt,name=jvmMemoryNonHeapUsed,proto3" json:"jvmMemoryNonHeapUsed,omitempty"` - JvmMemoryNonHeapMax int64 `protobuf:"varint,5,opt,name=jvmMemoryNonHeapMax,proto3" json:"jvmMemoryNonHeapMax,omitempty"` - JvmGcOldCount int64 `protobuf:"varint,6,opt,name=jvmGcOldCount,proto3" json:"jvmGcOldCount,omitempty"` - JvmGcOldTime int64 `protobuf:"varint,7,opt,name=jvmGcOldTime,proto3" json:"jvmGcOldTime,omitempty"` - JvmGcDetailed *PJvmGcDetailed `protobuf:"bytes,8,opt,name=jvmGcDetailed,proto3" json:"jvmGcDetailed,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PJvmGc) Reset() { *m = PJvmGc{} } -func (m *PJvmGc) String() string { return proto.CompactTextString(m) } -func (*PJvmGc) ProtoMessage() {} -func (*PJvmGc) Descriptor() ([]byte, []int) { - return fileDescriptor_29a37052f84a5404, []int{11} -} - -func (m *PJvmGc) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PJvmGc.Unmarshal(m, b) -} -func (m *PJvmGc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PJvmGc.Marshal(b, m, deterministic) -} -func (m *PJvmGc) XXX_Merge(src proto.Message) { - xxx_messageInfo_PJvmGc.Merge(m, src) -} -func (m *PJvmGc) XXX_Size() int { - return xxx_messageInfo_PJvmGc.Size(m) -} -func (m *PJvmGc) XXX_DiscardUnknown() { - xxx_messageInfo_PJvmGc.DiscardUnknown(m) -} - -var xxx_messageInfo_PJvmGc proto.InternalMessageInfo - -func (m *PJvmGc) GetType() PJvmGcType { - if m != nil { - return m.Type - } - return PJvmGcType_JVM_GC_TYPE_UNKNOWN -} - -func (m *PJvmGc) GetJvmMemoryHeapUsed() int64 { - if m != nil { - return m.JvmMemoryHeapUsed - } - return 0 -} - -func (m *PJvmGc) GetJvmMemoryHeapMax() int64 { - if m != nil { - return m.JvmMemoryHeapMax - } - return 0 -} - -func (m *PJvmGc) GetJvmMemoryNonHeapUsed() int64 { - if m != nil { - return m.JvmMemoryNonHeapUsed - } - return 0 -} - -func (m *PJvmGc) GetJvmMemoryNonHeapMax() int64 { - if m != nil { - return m.JvmMemoryNonHeapMax - } - return 0 -} - -func (m *PJvmGc) GetJvmGcOldCount() int64 { - if m != nil { - return m.JvmGcOldCount - } - return 0 -} - -func (m *PJvmGc) GetJvmGcOldTime() int64 { - if m != nil { - return m.JvmGcOldTime - } - return 0 -} - -func (m *PJvmGc) GetJvmGcDetailed() *PJvmGcDetailed { - if m != nil { - return m.JvmGcDetailed - } - return nil -} - -type PJvmGcDetailed struct { - JvmGcNewCount int64 `protobuf:"varint,1,opt,name=jvmGcNewCount,proto3" json:"jvmGcNewCount,omitempty"` - JvmGcNewTime int64 `protobuf:"varint,2,opt,name=jvmGcNewTime,proto3" json:"jvmGcNewTime,omitempty"` - JvmPoolCodeCacheUsed float64 `protobuf:"fixed64,3,opt,name=jvmPoolCodeCacheUsed,proto3" json:"jvmPoolCodeCacheUsed,omitempty"` - JvmPoolNewGenUsed float64 `protobuf:"fixed64,4,opt,name=jvmPoolNewGenUsed,proto3" json:"jvmPoolNewGenUsed,omitempty"` - JvmPoolOldGenUsed float64 `protobuf:"fixed64,5,opt,name=jvmPoolOldGenUsed,proto3" json:"jvmPoolOldGenUsed,omitempty"` - JvmPoolSurvivorSpaceUsed float64 `protobuf:"fixed64,6,opt,name=jvmPoolSurvivorSpaceUsed,proto3" json:"jvmPoolSurvivorSpaceUsed,omitempty"` - JvmPoolPermGenUsed float64 `protobuf:"fixed64,7,opt,name=jvmPoolPermGenUsed,proto3" json:"jvmPoolPermGenUsed,omitempty"` - JvmPoolMetaspaceUsed float64 `protobuf:"fixed64,8,opt,name=jvmPoolMetaspaceUsed,proto3" json:"jvmPoolMetaspaceUsed,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PJvmGcDetailed) Reset() { *m = PJvmGcDetailed{} } -func (m *PJvmGcDetailed) String() string { return proto.CompactTextString(m) } -func (*PJvmGcDetailed) ProtoMessage() {} -func (*PJvmGcDetailed) Descriptor() ([]byte, []int) { - return fileDescriptor_29a37052f84a5404, []int{12} -} - -func (m *PJvmGcDetailed) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PJvmGcDetailed.Unmarshal(m, b) -} -func (m *PJvmGcDetailed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PJvmGcDetailed.Marshal(b, m, deterministic) -} -func (m *PJvmGcDetailed) XXX_Merge(src proto.Message) { - xxx_messageInfo_PJvmGcDetailed.Merge(m, src) -} -func (m *PJvmGcDetailed) XXX_Size() int { - return xxx_messageInfo_PJvmGcDetailed.Size(m) -} -func (m *PJvmGcDetailed) XXX_DiscardUnknown() { - xxx_messageInfo_PJvmGcDetailed.DiscardUnknown(m) -} - -var xxx_messageInfo_PJvmGcDetailed proto.InternalMessageInfo - -func (m *PJvmGcDetailed) GetJvmGcNewCount() int64 { - if m != nil { - return m.JvmGcNewCount - } - return 0 -} - -func (m *PJvmGcDetailed) GetJvmGcNewTime() int64 { - if m != nil { - return m.JvmGcNewTime - } - return 0 -} - -func (m *PJvmGcDetailed) GetJvmPoolCodeCacheUsed() float64 { - if m != nil { - return m.JvmPoolCodeCacheUsed - } - return 0 -} - -func (m *PJvmGcDetailed) GetJvmPoolNewGenUsed() float64 { - if m != nil { - return m.JvmPoolNewGenUsed - } - return 0 -} - -func (m *PJvmGcDetailed) GetJvmPoolOldGenUsed() float64 { - if m != nil { - return m.JvmPoolOldGenUsed - } - return 0 -} - -func (m *PJvmGcDetailed) GetJvmPoolSurvivorSpaceUsed() float64 { - if m != nil { - return m.JvmPoolSurvivorSpaceUsed - } - return 0 -} - -func (m *PJvmGcDetailed) GetJvmPoolPermGenUsed() float64 { - if m != nil { - return m.JvmPoolPermGenUsed - } - return 0 -} - -func (m *PJvmGcDetailed) GetJvmPoolMetaspaceUsed() float64 { - if m != nil { - return m.JvmPoolMetaspaceUsed - } - return 0 -} - -type PCpuLoad struct { - JvmCpuLoad float64 `protobuf:"fixed64,1,opt,name=jvmCpuLoad,proto3" json:"jvmCpuLoad,omitempty"` - SystemCpuLoad float64 `protobuf:"fixed64,2,opt,name=systemCpuLoad,proto3" json:"systemCpuLoad,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PCpuLoad) Reset() { *m = PCpuLoad{} } -func (m *PCpuLoad) String() string { return proto.CompactTextString(m) } -func (*PCpuLoad) ProtoMessage() {} -func (*PCpuLoad) Descriptor() ([]byte, []int) { - return fileDescriptor_29a37052f84a5404, []int{13} -} - -func (m *PCpuLoad) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PCpuLoad.Unmarshal(m, b) -} -func (m *PCpuLoad) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PCpuLoad.Marshal(b, m, deterministic) -} -func (m *PCpuLoad) XXX_Merge(src proto.Message) { - xxx_messageInfo_PCpuLoad.Merge(m, src) -} -func (m *PCpuLoad) XXX_Size() int { - return xxx_messageInfo_PCpuLoad.Size(m) -} -func (m *PCpuLoad) XXX_DiscardUnknown() { - xxx_messageInfo_PCpuLoad.DiscardUnknown(m) -} - -var xxx_messageInfo_PCpuLoad proto.InternalMessageInfo - -func (m *PCpuLoad) GetJvmCpuLoad() float64 { - if m != nil { - return m.JvmCpuLoad - } - return 0 -} - -func (m *PCpuLoad) GetSystemCpuLoad() float64 { - if m != nil { - return m.SystemCpuLoad - } - return 0 -} - -type PTransaction struct { - SampledNewCount int64 `protobuf:"varint,2,opt,name=sampledNewCount,proto3" json:"sampledNewCount,omitempty"` - SampledContinuationCount int64 `protobuf:"varint,3,opt,name=sampledContinuationCount,proto3" json:"sampledContinuationCount,omitempty"` - UnsampledNewCount int64 `protobuf:"varint,4,opt,name=unsampledNewCount,proto3" json:"unsampledNewCount,omitempty"` - UnsampledContinuationCount int64 `protobuf:"varint,5,opt,name=unsampledContinuationCount,proto3" json:"unsampledContinuationCount,omitempty"` - SkippedNewCount int64 `protobuf:"varint,6,opt,name=skippedNewCount,proto3" json:"skippedNewCount,omitempty"` - SkippedContinuationCount int64 `protobuf:"varint,7,opt,name=skippedContinuationCount,proto3" json:"skippedContinuationCount,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PTransaction) Reset() { *m = PTransaction{} } -func (m *PTransaction) String() string { return proto.CompactTextString(m) } -func (*PTransaction) ProtoMessage() {} -func (*PTransaction) Descriptor() ([]byte, []int) { - return fileDescriptor_29a37052f84a5404, []int{14} -} - -func (m *PTransaction) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PTransaction.Unmarshal(m, b) -} -func (m *PTransaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PTransaction.Marshal(b, m, deterministic) -} -func (m *PTransaction) XXX_Merge(src proto.Message) { - xxx_messageInfo_PTransaction.Merge(m, src) -} -func (m *PTransaction) XXX_Size() int { - return xxx_messageInfo_PTransaction.Size(m) -} -func (m *PTransaction) XXX_DiscardUnknown() { - xxx_messageInfo_PTransaction.DiscardUnknown(m) -} - -var xxx_messageInfo_PTransaction proto.InternalMessageInfo - -func (m *PTransaction) GetSampledNewCount() int64 { - if m != nil { - return m.SampledNewCount - } - return 0 -} - -func (m *PTransaction) GetSampledContinuationCount() int64 { - if m != nil { - return m.SampledContinuationCount - } - return 0 -} - -func (m *PTransaction) GetUnsampledNewCount() int64 { - if m != nil { - return m.UnsampledNewCount - } - return 0 -} - -func (m *PTransaction) GetUnsampledContinuationCount() int64 { - if m != nil { - return m.UnsampledContinuationCount - } - return 0 -} - -func (m *PTransaction) GetSkippedNewCount() int64 { - if m != nil { - return m.SkippedNewCount - } - return 0 -} - -func (m *PTransaction) GetSkippedContinuationCount() int64 { - if m != nil { - return m.SkippedContinuationCount - } - return 0 -} - -type PActiveTraceHistogram struct { - Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - HistogramSchemaType int32 `protobuf:"varint,2,opt,name=histogramSchemaType,proto3" json:"histogramSchemaType,omitempty"` - ActiveTraceCount []int32 `protobuf:"varint,3,rep,packed,name=activeTraceCount,proto3" json:"activeTraceCount,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PActiveTraceHistogram) Reset() { *m = PActiveTraceHistogram{} } -func (m *PActiveTraceHistogram) String() string { return proto.CompactTextString(m) } -func (*PActiveTraceHistogram) ProtoMessage() {} -func (*PActiveTraceHistogram) Descriptor() ([]byte, []int) { - return fileDescriptor_29a37052f84a5404, []int{15} -} - -func (m *PActiveTraceHistogram) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PActiveTraceHistogram.Unmarshal(m, b) -} -func (m *PActiveTraceHistogram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PActiveTraceHistogram.Marshal(b, m, deterministic) -} -func (m *PActiveTraceHistogram) XXX_Merge(src proto.Message) { - xxx_messageInfo_PActiveTraceHistogram.Merge(m, src) -} -func (m *PActiveTraceHistogram) XXX_Size() int { - return xxx_messageInfo_PActiveTraceHistogram.Size(m) -} -func (m *PActiveTraceHistogram) XXX_DiscardUnknown() { - xxx_messageInfo_PActiveTraceHistogram.DiscardUnknown(m) -} - -var xxx_messageInfo_PActiveTraceHistogram proto.InternalMessageInfo - -func (m *PActiveTraceHistogram) GetVersion() int32 { - if m != nil { - return m.Version - } - return 0 -} - -func (m *PActiveTraceHistogram) GetHistogramSchemaType() int32 { - if m != nil { - return m.HistogramSchemaType - } - return 0 -} - -func (m *PActiveTraceHistogram) GetActiveTraceCount() []int32 { - if m != nil { - return m.ActiveTraceCount - } - return nil -} - -type PActiveTrace struct { - Histogram *PActiveTraceHistogram `protobuf:"bytes,1,opt,name=histogram,proto3" json:"histogram,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PActiveTrace) Reset() { *m = PActiveTrace{} } -func (m *PActiveTrace) String() string { return proto.CompactTextString(m) } -func (*PActiveTrace) ProtoMessage() {} -func (*PActiveTrace) Descriptor() ([]byte, []int) { - return fileDescriptor_29a37052f84a5404, []int{16} -} - -func (m *PActiveTrace) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PActiveTrace.Unmarshal(m, b) -} -func (m *PActiveTrace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PActiveTrace.Marshal(b, m, deterministic) -} -func (m *PActiveTrace) XXX_Merge(src proto.Message) { - xxx_messageInfo_PActiveTrace.Merge(m, src) -} -func (m *PActiveTrace) XXX_Size() int { - return xxx_messageInfo_PActiveTrace.Size(m) -} -func (m *PActiveTrace) XXX_DiscardUnknown() { - xxx_messageInfo_PActiveTrace.DiscardUnknown(m) -} - -var xxx_messageInfo_PActiveTrace proto.InternalMessageInfo - -func (m *PActiveTrace) GetHistogram() *PActiveTraceHistogram { - if m != nil { - return m.Histogram - } - return nil -} - -type PResponseTime struct { - Avg int64 `protobuf:"varint,1,opt,name=avg,proto3" json:"avg,omitempty"` - Max int64 `protobuf:"varint,2,opt,name=max,proto3" json:"max,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PResponseTime) Reset() { *m = PResponseTime{} } -func (m *PResponseTime) String() string { return proto.CompactTextString(m) } -func (*PResponseTime) ProtoMessage() {} -func (*PResponseTime) Descriptor() ([]byte, []int) { - return fileDescriptor_29a37052f84a5404, []int{17} -} - -func (m *PResponseTime) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PResponseTime.Unmarshal(m, b) -} -func (m *PResponseTime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PResponseTime.Marshal(b, m, deterministic) -} -func (m *PResponseTime) XXX_Merge(src proto.Message) { - xxx_messageInfo_PResponseTime.Merge(m, src) -} -func (m *PResponseTime) XXX_Size() int { - return xxx_messageInfo_PResponseTime.Size(m) -} -func (m *PResponseTime) XXX_DiscardUnknown() { - xxx_messageInfo_PResponseTime.DiscardUnknown(m) -} - -var xxx_messageInfo_PResponseTime proto.InternalMessageInfo - -func (m *PResponseTime) GetAvg() int64 { - if m != nil { - return m.Avg - } - return 0 -} - -func (m *PResponseTime) GetMax() int64 { - if m != nil { - return m.Max - } - return 0 -} - -type PDeadlock struct { - Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - ThreadDump []*PThreadDump `protobuf:"bytes,2,rep,name=threadDump,proto3" json:"threadDump,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PDeadlock) Reset() { *m = PDeadlock{} } -func (m *PDeadlock) String() string { return proto.CompactTextString(m) } -func (*PDeadlock) ProtoMessage() {} -func (*PDeadlock) Descriptor() ([]byte, []int) { - return fileDescriptor_29a37052f84a5404, []int{18} -} - -func (m *PDeadlock) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PDeadlock.Unmarshal(m, b) -} -func (m *PDeadlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PDeadlock.Marshal(b, m, deterministic) -} -func (m *PDeadlock) XXX_Merge(src proto.Message) { - xxx_messageInfo_PDeadlock.Merge(m, src) -} -func (m *PDeadlock) XXX_Size() int { - return xxx_messageInfo_PDeadlock.Size(m) -} -func (m *PDeadlock) XXX_DiscardUnknown() { - xxx_messageInfo_PDeadlock.DiscardUnknown(m) -} - -var xxx_messageInfo_PDeadlock proto.InternalMessageInfo - -func (m *PDeadlock) GetCount() int32 { - if m != nil { - return m.Count - } - return 0 -} - -func (m *PDeadlock) GetThreadDump() []*PThreadDump { - if m != nil { - return m.ThreadDump - } - return nil -} - -type PDirectBuffer struct { - DirectCount int64 `protobuf:"varint,1,opt,name=directCount,proto3" json:"directCount,omitempty"` - DirectMemoryUsed int64 `protobuf:"varint,2,opt,name=directMemoryUsed,proto3" json:"directMemoryUsed,omitempty"` - MappedCount int64 `protobuf:"varint,3,opt,name=mappedCount,proto3" json:"mappedCount,omitempty"` - MappedMemoryUsed int64 `protobuf:"varint,4,opt,name=mappedMemoryUsed,proto3" json:"mappedMemoryUsed,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PDirectBuffer) Reset() { *m = PDirectBuffer{} } -func (m *PDirectBuffer) String() string { return proto.CompactTextString(m) } -func (*PDirectBuffer) ProtoMessage() {} -func (*PDirectBuffer) Descriptor() ([]byte, []int) { - return fileDescriptor_29a37052f84a5404, []int{19} -} - -func (m *PDirectBuffer) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PDirectBuffer.Unmarshal(m, b) -} -func (m *PDirectBuffer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PDirectBuffer.Marshal(b, m, deterministic) -} -func (m *PDirectBuffer) XXX_Merge(src proto.Message) { - xxx_messageInfo_PDirectBuffer.Merge(m, src) -} -func (m *PDirectBuffer) XXX_Size() int { - return xxx_messageInfo_PDirectBuffer.Size(m) -} -func (m *PDirectBuffer) XXX_DiscardUnknown() { - xxx_messageInfo_PDirectBuffer.DiscardUnknown(m) -} - -var xxx_messageInfo_PDirectBuffer proto.InternalMessageInfo - -func (m *PDirectBuffer) GetDirectCount() int64 { - if m != nil { - return m.DirectCount - } - return 0 -} - -func (m *PDirectBuffer) GetDirectMemoryUsed() int64 { - if m != nil { - return m.DirectMemoryUsed - } - return 0 -} - -func (m *PDirectBuffer) GetMappedCount() int64 { - if m != nil { - return m.MappedCount - } - return 0 -} - -func (m *PDirectBuffer) GetMappedMemoryUsed() int64 { - if m != nil { - return m.MappedMemoryUsed - } - return 0 -} - -func init() { - proto.RegisterEnum("v1.PJvmGcType", PJvmGcType_name, PJvmGcType_value) - proto.RegisterType((*PPing)(nil), "v1.PPing") - proto.RegisterType((*PStatMessage)(nil), "v1.PStatMessage") - proto.RegisterType((*PAgentInfo)(nil), "v1.PAgentInfo") - proto.RegisterType((*PServerMetaData)(nil), "v1.PServerMetaData") - proto.RegisterType((*PServiceInfo)(nil), "v1.PServiceInfo") - proto.RegisterType((*PJvmInfo)(nil), "v1.PJvmInfo") - proto.RegisterType((*PAgentStat)(nil), "v1.PAgentStat") - proto.RegisterType((*PAgentStatBatch)(nil), "v1.PAgentStatBatch") - proto.RegisterType((*PDataSource)(nil), "v1.PDataSource") - proto.RegisterType((*PDataSourceList)(nil), "v1.PDataSourceList") - proto.RegisterType((*PFileDescriptor)(nil), "v1.PFileDescriptor") - proto.RegisterType((*PJvmGc)(nil), "v1.PJvmGc") - proto.RegisterType((*PJvmGcDetailed)(nil), "v1.PJvmGcDetailed") - proto.RegisterType((*PCpuLoad)(nil), "v1.PCpuLoad") - proto.RegisterType((*PTransaction)(nil), "v1.PTransaction") - proto.RegisterType((*PActiveTraceHistogram)(nil), "v1.PActiveTraceHistogram") - proto.RegisterType((*PActiveTrace)(nil), "v1.PActiveTrace") - proto.RegisterType((*PResponseTime)(nil), "v1.PResponseTime") - proto.RegisterType((*PDeadlock)(nil), "v1.PDeadlock") - proto.RegisterType((*PDirectBuffer)(nil), "v1.PDirectBuffer") -} - -func init() { - proto.RegisterFile("Stat.proto", fileDescriptor_29a37052f84a5404) -} - -var fileDescriptor_29a37052f84a5404 = []byte{ - // 1492 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x57, 0xdd, 0x6e, 0x1b, 0xc5, - 0x17, 0xef, 0xae, 0x63, 0x3b, 0x3e, 0xce, 0x87, 0x3b, 0xe9, 0xff, 0xdf, 0x25, 0x54, 0x28, 0xac, - 0x50, 0x15, 0xaa, 0xca, 0x6d, 0x53, 0x01, 0x15, 0x08, 0x50, 0xe2, 0x94, 0x24, 0x6d, 0xe2, 0x5a, - 0xe3, 0xb4, 0x88, 0xab, 0x6a, 0xb2, 0x3b, 0x71, 0x36, 0xf5, 0x7e, 0x68, 0x77, 0xbc, 0x6d, 0xe0, - 0x86, 0x2b, 0x24, 0xb8, 0xe1, 0x1d, 0xb8, 0xe5, 0x82, 0xd7, 0xe0, 0x2d, 0x78, 0x05, 0x1e, 0x01, - 0x9d, 0x99, 0xfd, 0x98, 0x5d, 0x3b, 0xbd, 0xdb, 0xf9, 0xfd, 0xce, 0xcc, 0x39, 0x73, 0x3e, 0x67, - 0x01, 0xc6, 0x82, 0x89, 0x7e, 0x14, 0x87, 0x22, 0x24, 0x66, 0xfa, 0x68, 0xf3, 0xc3, 0x49, 0x18, - 0x4e, 0xa6, 0xfc, 0x81, 0x44, 0xce, 0x66, 0xe7, 0x0f, 0xb8, 0x1f, 0x89, 0x2b, 0x25, 0xb0, 0xd9, - 0x3b, 0xbd, 0x88, 0x39, 0x73, 0xf7, 0x67, 0x7e, 0xa4, 0x10, 0xbb, 0x0d, 0xcd, 0xd1, 0xc8, 0x0b, - 0x26, 0xf6, 0x2f, 0x06, 0xac, 0x8c, 0xf0, 0xac, 0x13, 0x9e, 0x24, 0x6c, 0xc2, 0x49, 0x1f, 0x3a, - 0x6c, 0xc2, 0x03, 0x81, 0x98, 0x65, 0x6c, 0x19, 0xdb, 0xdd, 0x9d, 0xb5, 0x7e, 0xfa, 0xa8, 0x3f, - 0xda, 0xcd, 0xd1, 0xc3, 0x1b, 0xb4, 0x14, 0x21, 0x5f, 0xc3, 0x5a, 0xb1, 0xd8, 0x63, 0xc2, 0xb9, - 0xb0, 0x4c, 0xb9, 0x69, 0xa3, 0xba, 0x49, 0x52, 0x87, 0x37, 0x68, 0x4d, 0x78, 0xaf, 0x0d, 0xcd, - 0x73, 0x8f, 0x4f, 0x5d, 0xfb, 0xd7, 0x06, 0x80, 0x12, 0x3f, 0x0a, 0xce, 0x43, 0xb2, 0x09, 0xcb, - 0x17, 0x61, 0x22, 0x02, 0xe6, 0x73, 0x69, 0x45, 0x87, 0x16, 0x6b, 0xb2, 0x06, 0xa6, 0x17, 0x49, - 0x35, 0x1d, 0x6a, 0x7a, 0x11, 0xb9, 0x05, 0xcd, 0x28, 0x8c, 0x45, 0x62, 0x35, 0x24, 0xa4, 0x16, - 0x64, 0x0b, 0xba, 0x09, 0x8f, 0x53, 0xcf, 0xe1, 0xa7, 0x57, 0x11, 0xb7, 0x96, 0xb6, 0x8c, 0xed, - 0x26, 0xd5, 0x21, 0xd2, 0x83, 0x46, 0xe4, 0xb9, 0x56, 0x53, 0x32, 0xf8, 0x49, 0x6c, 0x58, 0x91, - 0xf6, 0xbd, 0xe2, 0x71, 0xe2, 0x85, 0x81, 0xd5, 0x92, 0x07, 0x56, 0x30, 0x72, 0x07, 0x3a, 0xa9, - 0x9f, 0x0b, 0xb4, 0xa5, 0x40, 0x09, 0xe0, 0x09, 0x3c, 0x70, 0x4f, 0x3d, 0x9f, 0x27, 0x82, 0xf9, - 0x91, 0xb5, 0xbc, 0x65, 0x6c, 0x37, 0x68, 0x05, 0xc3, 0x13, 0x78, 0xe0, 0xa2, 0x0f, 0x66, 0x89, - 0xd5, 0x91, 0xda, 0x4b, 0x80, 0x7c, 0x05, 0x6b, 0x68, 0x24, 0x8f, 0x4f, 0xb8, 0x60, 0xfb, 0x4c, - 0x30, 0x0b, 0x34, 0x87, 0x8e, 0x2b, 0x14, 0xad, 0x89, 0x92, 0xbb, 0xd0, 0xbe, 0x4c, 0x7d, 0xf4, - 0xa0, 0xd5, 0x95, 0xbb, 0x56, 0xe4, 0xae, 0x67, 0x0a, 0xa3, 0x39, 0x89, 0x26, 0x38, 0x61, 0x20, - 0x98, 0x17, 0xf0, 0xd8, 0x5a, 0xd9, 0x32, 0xb6, 0x97, 0x69, 0x09, 0xd8, 0x3f, 0xc1, 0x7a, 0x4d, - 0x11, 0xf9, 0x08, 0x40, 0xa9, 0x92, 0x67, 0xab, 0x88, 0x68, 0x08, 0xc6, 0x20, 0xf5, 0x77, 0xe3, - 0x89, 0x65, 0x6e, 0x35, 0x30, 0x06, 0x72, 0x41, 0x76, 0x8a, 0x18, 0xc8, 0x6d, 0x8d, 0xad, 0xc6, - 0x76, 0x77, 0xa7, 0x57, 0x5c, 0x24, 0xc3, 0xa9, 0x2e, 0x64, 0x8f, 0x30, 0x21, 0xcb, 0xb5, 0x16, - 0xc7, 0x61, 0x99, 0x0c, 0x3a, 0x94, 0xdb, 0xe6, 0x39, 0xfc, 0xd8, 0x3b, 0xcb, 0x0c, 0xd0, 0x10, - 0xfb, 0x12, 0x96, 0x73, 0x0f, 0x10, 0x0b, 0xda, 0x69, 0x16, 0x3b, 0x43, 0x7a, 0x3e, 0x5f, 0x56, - 0xe3, 0x6a, 0xd6, 0xe3, 0x7a, 0x17, 0x5a, 0x13, 0x47, 0x26, 0x12, 0x26, 0xd9, 0x5a, 0x56, 0x13, - 0xcf, 0x52, 0xff, 0x40, 0xa2, 0x34, 0x63, 0xed, 0xbf, 0x96, 0xf2, 0x34, 0x96, 0xd5, 0x71, 0x07, - 0x3a, 0xa2, 0xc8, 0x05, 0x43, 0xe6, 0x42, 0x09, 0x90, 0x6d, 0x58, 0x77, 0xc2, 0xe9, 0x94, 0x3b, - 0xe2, 0x28, 0x10, 0x3c, 0x4e, 0xd9, 0x54, 0x2a, 0x6e, 0xd0, 0x3a, 0x4c, 0x36, 0xc1, 0x9c, 0x38, - 0x52, 0x75, 0x77, 0x07, 0x4a, 0xd5, 0xd4, 0x9c, 0x38, 0x18, 0x73, 0x27, 0x9a, 0x1d, 0x87, 0xcc, - 0x95, 0x49, 0x9e, 0xc7, 0x7c, 0xa0, 0x30, 0x9a, 0x93, 0x18, 0x0c, 0x11, 0xb3, 0x20, 0x61, 0x8e, - 0xc0, 0x2b, 0x36, 0xa5, 0xac, 0x0a, 0xc6, 0x69, 0x89, 0x53, 0x5d, 0x08, 0xf7, 0xe0, 0x57, 0xca, - 0x4f, 0x63, 0xe6, 0x70, 0x59, 0x0f, 0xf9, 0x9e, 0xdd, 0x12, 0xa7, 0xba, 0x10, 0x26, 0xb0, 0xcb, - 0x04, 0x1b, 0x87, 0xb3, 0x18, 0xfd, 0x9f, 0x08, 0x59, 0x25, 0x79, 0x02, 0xef, 0x57, 0x28, 0x5a, - 0x13, 0x25, 0x9f, 0xc1, 0x4a, 0xcc, 0x93, 0x28, 0x0c, 0x12, 0x8e, 0x05, 0x23, 0xeb, 0xa7, 0xbb, - 0x73, 0x53, 0x6e, 0xa5, 0x1a, 0x41, 0x2b, 0x62, 0xe4, 0x53, 0x58, 0x76, 0x39, 0x73, 0xa7, 0xa1, - 0xf3, 0x46, 0x56, 0x54, 0x77, 0x67, 0x55, 0x69, 0xcb, 0x40, 0x5a, 0xd0, 0x68, 0xde, 0xb9, 0x37, - 0xe5, 0xfb, 0x3c, 0x71, 0x62, 0x2f, 0x12, 0x61, 0x5c, 0xa9, 0xaf, 0xef, 0x2a, 0x14, 0xad, 0x89, - 0xa2, 0x79, 0xae, 0x17, 0x73, 0x47, 0xec, 0xcd, 0xce, 0xcf, 0x79, 0x9c, 0x15, 0x99, 0x32, 0x6f, - 0x5f, 0x23, 0x68, 0x45, 0x0c, 0xbb, 0x99, 0xcf, 0x05, 0xc3, 0xbb, 0xca, 0x6a, 0xeb, 0xd0, 0x62, - 0x6d, 0x7f, 0x0b, 0xeb, 0xb5, 0x36, 0x49, 0xee, 0x57, 0x7b, 0x70, 0x63, 0xbe, 0x07, 0x6b, 0x1d, - 0xd8, 0xfe, 0xc7, 0x80, 0xae, 0xe6, 0x56, 0xd9, 0x1e, 0xdd, 0x2c, 0xbb, 0x4d, 0xcf, 0xc5, 0x2c, - 0xd3, 0xba, 0xde, 0x20, 0x74, 0xb9, 0xcc, 0xb2, 0x26, 0xad, 0xc3, 0xd8, 0xbc, 0xd0, 0xa4, 0x33, - 0x96, 0xa8, 0x5a, 0x53, 0xfd, 0xb4, 0x82, 0x61, 0xd3, 0x9c, 0xc5, 0x53, 0x99, 0x69, 0x1d, 0x8a, - 0x9f, 0x64, 0x07, 0x6e, 0xa9, 0xf0, 0x0f, 0xc2, 0x20, 0xe0, 0x32, 0x6f, 0xc6, 0xde, 0x8f, 0x3c, - 0xeb, 0xab, 0x0b, 0x39, 0x72, 0x1f, 0x6e, 0xfa, 0xec, 0x5d, 0x6d, 0x43, 0x4b, 0x6e, 0x98, 0x27, - 0xec, 0x3d, 0x58, 0xaf, 0xe5, 0x0d, 0x79, 0x00, 0x50, 0x66, 0x4e, 0xe6, 0xa3, 0xf5, 0x5a, 0x82, - 0x51, 0x4d, 0xc4, 0x7e, 0x0e, 0xeb, 0xb5, 0xe0, 0x92, 0x27, 0x70, 0x3b, 0x8c, 0x78, 0x50, 0x45, - 0x07, 0xe1, 0x2c, 0x10, 0x59, 0xa9, 0x5e, 0x47, 0xdb, 0xff, 0x9a, 0xd0, 0x52, 0x15, 0x48, 0x6c, - 0x58, 0x12, 0xd8, 0x16, 0x8c, 0x85, 0x6d, 0x41, 0x72, 0x78, 0xdb, 0xcb, 0xd4, 0x3f, 0xe1, 0x7e, - 0x18, 0x5f, 0x1d, 0x72, 0x16, 0xbd, 0x4c, 0xb8, 0x9b, 0x55, 0xfa, 0x3c, 0x41, 0xee, 0x41, 0xaf, - 0x02, 0x9e, 0xb0, 0x77, 0x32, 0x12, 0x0d, 0x3a, 0x87, 0xa3, 0xef, 0x0b, 0x6c, 0x18, 0x06, 0xc5, - 0xe1, 0x4b, 0x52, 0x7e, 0x21, 0x47, 0x1e, 0xc2, 0x46, 0x1d, 0x47, 0x15, 0x4d, 0xb9, 0x65, 0x11, - 0x45, 0x3e, 0x81, 0xd5, 0x4b, 0xbc, 0xd2, 0x8b, 0xa9, 0xab, 0xdc, 0xd3, 0x92, 0xb2, 0x55, 0x10, - 0xb3, 0x27, 0x07, 0x64, 0xe9, 0xb6, 0xd5, 0xe8, 0xd3, 0x31, 0xf2, 0x24, 0x3b, 0x69, 0x9f, 0x0b, - 0xe6, 0x4d, 0xb9, 0x9b, 0xd5, 0x37, 0x29, 0xdd, 0x96, 0x33, 0xb4, 0x2a, 0x68, 0xff, 0xd6, 0x80, - 0xb5, 0xaa, 0x44, 0x61, 0xd6, 0x90, 0xbf, 0xd5, 0xa3, 0x56, 0x05, 0x0b, 0xb3, 0x86, 0xfc, 0xad, - 0x34, 0xcb, 0xd4, 0xcc, 0xca, 0xb0, 0xcc, 0x8d, 0xa3, 0x30, 0x9c, 0x62, 0x1d, 0x0c, 0x98, 0x73, - 0xc1, 0xa5, 0x1b, 0xd1, 0xed, 0x06, 0x5d, 0xc8, 0x65, 0x41, 0x45, 0x7c, 0xc8, 0xdf, 0x1e, 0xf0, - 0xa0, 0xf0, 0xbb, 0x41, 0xe7, 0x09, 0x4d, 0xfa, 0xc5, 0xd4, 0xcd, 0xa5, 0x9b, 0x15, 0xe9, 0x92, - 0x20, 0x5f, 0x82, 0x95, 0x81, 0xe3, 0x59, 0x9c, 0x7a, 0x69, 0x18, 0x8f, 0x23, 0xe6, 0x28, 0x9b, - 0x5a, 0x72, 0xd3, 0xb5, 0x3c, 0xe9, 0x03, 0xc9, 0xb8, 0x11, 0x8f, 0xfd, 0x5c, 0x55, 0x5b, 0xee, - 0x5a, 0xc0, 0x68, 0x77, 0xc7, 0x61, 0x9f, 0x14, 0x7a, 0x96, 0x2b, 0x77, 0xaf, 0x70, 0xf6, 0x08, - 0x96, 0xf3, 0xf9, 0x82, 0xd3, 0xf7, 0x32, 0xf5, 0xb3, 0x95, 0x0c, 0x81, 0x41, 0x35, 0x04, 0xa3, - 0x94, 0x5c, 0x25, 0x82, 0x17, 0x22, 0xa6, 0x14, 0xa9, 0x82, 0xf6, 0xdf, 0x26, 0xac, 0xe8, 0x63, - 0x48, 0x76, 0x2d, 0xe6, 0x47, 0x53, 0xee, 0x16, 0xe1, 0xcd, 0x66, 0x63, 0x0d, 0x46, 0x67, 0x65, - 0xd0, 0x20, 0x0c, 0x84, 0x17, 0xcc, 0x18, 0x1e, 0xa0, 0xb6, 0xa8, 0xba, 0xb9, 0x96, 0xc7, 0xb0, - 0xcc, 0x82, 0xba, 0x1e, 0x55, 0x3c, 0xf3, 0x04, 0xf9, 0x06, 0x36, 0x0b, 0x70, 0x5e, 0x97, 0x2a, - 0xa0, 0xf7, 0x48, 0xc8, 0x3b, 0xbd, 0xf1, 0xa2, 0x48, 0xd3, 0xd5, 0xca, 0xee, 0x54, 0x85, 0xe5, - 0x9d, 0x14, 0x34, 0xaf, 0xa7, 0x9d, 0xdd, 0xe9, 0x1a, 0xde, 0xfe, 0xdd, 0x80, 0xff, 0xe9, 0xd3, - 0xf9, 0xd0, 0x4b, 0x44, 0x38, 0x89, 0x99, 0xff, 0x9e, 0xc7, 0xcf, 0x43, 0xd8, 0xb8, 0xc8, 0xc5, - 0xc6, 0xce, 0x05, 0xf7, 0x99, 0x7c, 0xeb, 0xa8, 0x39, 0xb1, 0x88, 0xc2, 0x2e, 0xa5, 0x0d, 0xfd, - 0xdc, 0xdb, 0x8d, 0xed, 0x26, 0x9d, 0xc3, 0xed, 0x03, 0x58, 0xd1, 0x0d, 0x22, 0x5f, 0x40, 0xa7, - 0x38, 0x32, 0xfb, 0xc7, 0xf8, 0xa0, 0xfe, 0xa6, 0x28, 0xac, 0xa6, 0xa5, 0xac, 0xfd, 0x18, 0x56, - 0x2b, 0xaf, 0x00, 0x9c, 0x46, 0x2c, 0x9d, 0x64, 0x85, 0x8f, 0x9f, 0x88, 0xf8, 0xec, 0x5d, 0x96, - 0x2b, 0xf8, 0x69, 0x53, 0xe8, 0x14, 0xef, 0x00, 0x7c, 0xa7, 0x3a, 0x45, 0xaf, 0x68, 0x52, 0xb5, - 0xc0, 0x69, 0x22, 0x8a, 0x5f, 0x24, 0xf9, 0x82, 0xcc, 0xa7, 0x49, 0xf9, 0xe7, 0x44, 0x35, 0x11, - 0xfb, 0x4f, 0x03, 0x56, 0x2b, 0x03, 0x1f, 0x9f, 0xa9, 0x6a, 0xe4, 0xeb, 0xad, 0x48, 0x87, 0xd0, - 0x63, 0x6a, 0xa9, 0xfa, 0xab, 0x36, 0x04, 0xe6, 0x70, 0x3c, 0xcd, 0x67, 0x2a, 0xbc, 0x65, 0x1a, - 0xeb, 0x10, 0x9e, 0xa6, 0x96, 0xda, 0x69, 0x2a, 0x71, 0xe7, 0xf0, 0x7b, 0x3f, 0x1b, 0x00, 0xe5, - 0x50, 0x22, 0xb7, 0x61, 0xe3, 0xd9, 0xab, 0x93, 0xd7, 0x07, 0x83, 0xd7, 0xa7, 0x3f, 0x8c, 0x9e, - 0xbe, 0x7e, 0x39, 0x7c, 0x3e, 0x7c, 0xf1, 0xfd, 0xb0, 0x77, 0x83, 0xfc, 0x1f, 0x88, 0x4e, 0x8c, - 0x9f, 0xd2, 0xa3, 0xdd, 0xe3, 0x9e, 0x41, 0x2c, 0xb8, 0xa5, 0xe3, 0xa3, 0x5d, 0xba, 0x7b, 0x7c, - 0xfc, 0xf4, 0xb8, 0x67, 0x92, 0x0d, 0x58, 0xd7, 0x99, 0xc1, 0xc9, 0xb8, 0xd7, 0x20, 0x04, 0xd6, - 0x74, 0xf0, 0xe0, 0x51, 0x6f, 0x69, 0xef, 0x73, 0xf8, 0xd8, 0x09, 0xfd, 0x7e, 0xc0, 0x52, 0x1e, - 0x3b, 0x61, 0x1c, 0xf5, 0x23, 0x2f, 0x88, 0x42, 0x2f, 0x10, 0xfd, 0x49, 0x1c, 0x39, 0x7d, 0x81, - 0x21, 0xdf, 0xeb, 0xe0, 0x7b, 0x66, 0x84, 0x3f, 0xa8, 0x23, 0xe3, 0x0f, 0xb3, 0x31, 0x3a, 0x1a, - 0x9e, 0xb5, 0xe4, 0xff, 0xea, 0xe3, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xc0, 0x3e, 0x40, 0xa1, - 0xf0, 0x0e, 0x00, 0x00, -} diff --git a/collector-agent/protocol/ThreadDump.pb.go b/collector-agent/protocol/ThreadDump.pb.go deleted file mode 100644 index e709cd088..000000000 --- a/collector-agent/protocol/ThreadDump.pb.go +++ /dev/null @@ -1,561 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: ThreadDump.proto - -package v1 - -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/empty" - _ "github.com/golang/protobuf/ptypes/wrappers" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type PThreadState int32 - -const ( - PThreadState_THREAD_STATE_NEW PThreadState = 0 - PThreadState_THREAD_STATE_RUNNABLE PThreadState = 1 - PThreadState_THREAD_STATE_BLOCKED PThreadState = 2 - PThreadState_THREAD_STATE_WAITING PThreadState = 3 - PThreadState_THREAD_STATE_TIMED_WAITING PThreadState = 4 - PThreadState_THREAD_STATE_TERMINATED PThreadState = 5 - PThreadState_THREAD_STATE_UNKNOWN PThreadState = 6 -) - -var PThreadState_name = map[int32]string{ - 0: "THREAD_STATE_NEW", - 1: "THREAD_STATE_RUNNABLE", - 2: "THREAD_STATE_BLOCKED", - 3: "THREAD_STATE_WAITING", - 4: "THREAD_STATE_TIMED_WAITING", - 5: "THREAD_STATE_TERMINATED", - 6: "THREAD_STATE_UNKNOWN", -} - -var PThreadState_value = map[string]int32{ - "THREAD_STATE_NEW": 0, - "THREAD_STATE_RUNNABLE": 1, - "THREAD_STATE_BLOCKED": 2, - "THREAD_STATE_WAITING": 3, - "THREAD_STATE_TIMED_WAITING": 4, - "THREAD_STATE_TERMINATED": 5, - "THREAD_STATE_UNKNOWN": 6, -} - -func (x PThreadState) String() string { - return proto.EnumName(PThreadState_name, int32(x)) -} - -func (PThreadState) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_f8203157ab6c6959, []int{0} -} - -type PThreadDumpType int32 - -const ( - PThreadDumpType_TARGET PThreadDumpType = 0 - PThreadDumpType_PENDING PThreadDumpType = 1 -) - -var PThreadDumpType_name = map[int32]string{ - 0: "TARGET", - 1: "PENDING", -} - -var PThreadDumpType_value = map[string]int32{ - "TARGET": 0, - "PENDING": 1, -} - -func (x PThreadDumpType) String() string { - return proto.EnumName(PThreadDumpType_name, int32(x)) -} - -func (PThreadDumpType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_f8203157ab6c6959, []int{1} -} - -type PMonitorInfo struct { - StackDepth int32 `protobuf:"varint,1,opt,name=stackDepth,proto3" json:"stackDepth,omitempty"` - StackFrame string `protobuf:"bytes,2,opt,name=stackFrame,proto3" json:"stackFrame,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PMonitorInfo) Reset() { *m = PMonitorInfo{} } -func (m *PMonitorInfo) String() string { return proto.CompactTextString(m) } -func (*PMonitorInfo) ProtoMessage() {} -func (*PMonitorInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_f8203157ab6c6959, []int{0} -} - -func (m *PMonitorInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PMonitorInfo.Unmarshal(m, b) -} -func (m *PMonitorInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PMonitorInfo.Marshal(b, m, deterministic) -} -func (m *PMonitorInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_PMonitorInfo.Merge(m, src) -} -func (m *PMonitorInfo) XXX_Size() int { - return xxx_messageInfo_PMonitorInfo.Size(m) -} -func (m *PMonitorInfo) XXX_DiscardUnknown() { - xxx_messageInfo_PMonitorInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_PMonitorInfo proto.InternalMessageInfo - -func (m *PMonitorInfo) GetStackDepth() int32 { - if m != nil { - return m.StackDepth - } - return 0 -} - -func (m *PMonitorInfo) GetStackFrame() string { - if m != nil { - return m.StackFrame - } - return "" -} - -type PThreadDump struct { - ThreadName string `protobuf:"bytes,1,opt,name=threadName,proto3" json:"threadName,omitempty"` - ThreadId int64 `protobuf:"varint,2,opt,name=threadId,proto3" json:"threadId,omitempty"` - BlockedTime int64 `protobuf:"varint,3,opt,name=blockedTime,proto3" json:"blockedTime,omitempty"` - BlockedCount int64 `protobuf:"varint,4,opt,name=blockedCount,proto3" json:"blockedCount,omitempty"` - WaitedTime int64 `protobuf:"varint,5,opt,name=waitedTime,proto3" json:"waitedTime,omitempty"` - WaitedCount int64 `protobuf:"varint,6,opt,name=waitedCount,proto3" json:"waitedCount,omitempty"` - LockName string `protobuf:"bytes,7,opt,name=lockName,proto3" json:"lockName,omitempty"` - LockOwnerId int64 `protobuf:"varint,8,opt,name=lockOwnerId,proto3" json:"lockOwnerId,omitempty"` - LockOwnerName string `protobuf:"bytes,9,opt,name=lockOwnerName,proto3" json:"lockOwnerName,omitempty"` - InNative bool `protobuf:"varint,10,opt,name=inNative,proto3" json:"inNative,omitempty"` - Suspended bool `protobuf:"varint,11,opt,name=suspended,proto3" json:"suspended,omitempty"` - ThreadState PThreadState `protobuf:"varint,12,opt,name=threadState,proto3,enum=v1.PThreadState" json:"threadState,omitempty"` - StackTrace []string `protobuf:"bytes,13,rep,name=stackTrace,proto3" json:"stackTrace,omitempty"` - LockedMonitor []*PMonitorInfo `protobuf:"bytes,14,rep,name=lockedMonitor,proto3" json:"lockedMonitor,omitempty"` - LockedSynchronizer []string `protobuf:"bytes,15,rep,name=lockedSynchronizer,proto3" json:"lockedSynchronizer,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PThreadDump) Reset() { *m = PThreadDump{} } -func (m *PThreadDump) String() string { return proto.CompactTextString(m) } -func (*PThreadDump) ProtoMessage() {} -func (*PThreadDump) Descriptor() ([]byte, []int) { - return fileDescriptor_f8203157ab6c6959, []int{1} -} - -func (m *PThreadDump) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PThreadDump.Unmarshal(m, b) -} -func (m *PThreadDump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PThreadDump.Marshal(b, m, deterministic) -} -func (m *PThreadDump) XXX_Merge(src proto.Message) { - xxx_messageInfo_PThreadDump.Merge(m, src) -} -func (m *PThreadDump) XXX_Size() int { - return xxx_messageInfo_PThreadDump.Size(m) -} -func (m *PThreadDump) XXX_DiscardUnknown() { - xxx_messageInfo_PThreadDump.DiscardUnknown(m) -} - -var xxx_messageInfo_PThreadDump proto.InternalMessageInfo - -func (m *PThreadDump) GetThreadName() string { - if m != nil { - return m.ThreadName - } - return "" -} - -func (m *PThreadDump) GetThreadId() int64 { - if m != nil { - return m.ThreadId - } - return 0 -} - -func (m *PThreadDump) GetBlockedTime() int64 { - if m != nil { - return m.BlockedTime - } - return 0 -} - -func (m *PThreadDump) GetBlockedCount() int64 { - if m != nil { - return m.BlockedCount - } - return 0 -} - -func (m *PThreadDump) GetWaitedTime() int64 { - if m != nil { - return m.WaitedTime - } - return 0 -} - -func (m *PThreadDump) GetWaitedCount() int64 { - if m != nil { - return m.WaitedCount - } - return 0 -} - -func (m *PThreadDump) GetLockName() string { - if m != nil { - return m.LockName - } - return "" -} - -func (m *PThreadDump) GetLockOwnerId() int64 { - if m != nil { - return m.LockOwnerId - } - return 0 -} - -func (m *PThreadDump) GetLockOwnerName() string { - if m != nil { - return m.LockOwnerName - } - return "" -} - -func (m *PThreadDump) GetInNative() bool { - if m != nil { - return m.InNative - } - return false -} - -func (m *PThreadDump) GetSuspended() bool { - if m != nil { - return m.Suspended - } - return false -} - -func (m *PThreadDump) GetThreadState() PThreadState { - if m != nil { - return m.ThreadState - } - return PThreadState_THREAD_STATE_NEW -} - -func (m *PThreadDump) GetStackTrace() []string { - if m != nil { - return m.StackTrace - } - return nil -} - -func (m *PThreadDump) GetLockedMonitor() []*PMonitorInfo { - if m != nil { - return m.LockedMonitor - } - return nil -} - -func (m *PThreadDump) GetLockedSynchronizer() []string { - if m != nil { - return m.LockedSynchronizer - } - return nil -} - -type PThreadLightDump struct { - ThreadName string `protobuf:"bytes,1,opt,name=threadName,proto3" json:"threadName,omitempty"` - ThreadId int64 `protobuf:"varint,2,opt,name=threadId,proto3" json:"threadId,omitempty"` - ThreadState PThreadState `protobuf:"varint,3,opt,name=threadState,proto3,enum=v1.PThreadState" json:"threadState,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PThreadLightDump) Reset() { *m = PThreadLightDump{} } -func (m *PThreadLightDump) String() string { return proto.CompactTextString(m) } -func (*PThreadLightDump) ProtoMessage() {} -func (*PThreadLightDump) Descriptor() ([]byte, []int) { - return fileDescriptor_f8203157ab6c6959, []int{2} -} - -func (m *PThreadLightDump) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PThreadLightDump.Unmarshal(m, b) -} -func (m *PThreadLightDump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PThreadLightDump.Marshal(b, m, deterministic) -} -func (m *PThreadLightDump) XXX_Merge(src proto.Message) { - xxx_messageInfo_PThreadLightDump.Merge(m, src) -} -func (m *PThreadLightDump) XXX_Size() int { - return xxx_messageInfo_PThreadLightDump.Size(m) -} -func (m *PThreadLightDump) XXX_DiscardUnknown() { - xxx_messageInfo_PThreadLightDump.DiscardUnknown(m) -} - -var xxx_messageInfo_PThreadLightDump proto.InternalMessageInfo - -func (m *PThreadLightDump) GetThreadName() string { - if m != nil { - return m.ThreadName - } - return "" -} - -func (m *PThreadLightDump) GetThreadId() int64 { - if m != nil { - return m.ThreadId - } - return 0 -} - -func (m *PThreadLightDump) GetThreadState() PThreadState { - if m != nil { - return m.ThreadState - } - return PThreadState_THREAD_STATE_NEW -} - -type PActiveThreadDump struct { - StartTime int64 `protobuf:"varint,1,opt,name=startTime,proto3" json:"startTime,omitempty"` - LocalTraceId int64 `protobuf:"varint,2,opt,name=localTraceId,proto3" json:"localTraceId,omitempty"` - ThreadDump *PThreadDump `protobuf:"bytes,3,opt,name=threadDump,proto3" json:"threadDump,omitempty"` - Sampled bool `protobuf:"varint,4,opt,name=sampled,proto3" json:"sampled,omitempty"` - TransactionId string `protobuf:"bytes,5,opt,name=transactionId,proto3" json:"transactionId,omitempty"` - EntryPoint string `protobuf:"bytes,6,opt,name=entryPoint,proto3" json:"entryPoint,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PActiveThreadDump) Reset() { *m = PActiveThreadDump{} } -func (m *PActiveThreadDump) String() string { return proto.CompactTextString(m) } -func (*PActiveThreadDump) ProtoMessage() {} -func (*PActiveThreadDump) Descriptor() ([]byte, []int) { - return fileDescriptor_f8203157ab6c6959, []int{3} -} - -func (m *PActiveThreadDump) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PActiveThreadDump.Unmarshal(m, b) -} -func (m *PActiveThreadDump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PActiveThreadDump.Marshal(b, m, deterministic) -} -func (m *PActiveThreadDump) XXX_Merge(src proto.Message) { - xxx_messageInfo_PActiveThreadDump.Merge(m, src) -} -func (m *PActiveThreadDump) XXX_Size() int { - return xxx_messageInfo_PActiveThreadDump.Size(m) -} -func (m *PActiveThreadDump) XXX_DiscardUnknown() { - xxx_messageInfo_PActiveThreadDump.DiscardUnknown(m) -} - -var xxx_messageInfo_PActiveThreadDump proto.InternalMessageInfo - -func (m *PActiveThreadDump) GetStartTime() int64 { - if m != nil { - return m.StartTime - } - return 0 -} - -func (m *PActiveThreadDump) GetLocalTraceId() int64 { - if m != nil { - return m.LocalTraceId - } - return 0 -} - -func (m *PActiveThreadDump) GetThreadDump() *PThreadDump { - if m != nil { - return m.ThreadDump - } - return nil -} - -func (m *PActiveThreadDump) GetSampled() bool { - if m != nil { - return m.Sampled - } - return false -} - -func (m *PActiveThreadDump) GetTransactionId() string { - if m != nil { - return m.TransactionId - } - return "" -} - -func (m *PActiveThreadDump) GetEntryPoint() string { - if m != nil { - return m.EntryPoint - } - return "" -} - -type PActiveThreadLightDump struct { - StartTime int64 `protobuf:"varint,1,opt,name=startTime,proto3" json:"startTime,omitempty"` - LocalTraceId int64 `protobuf:"varint,2,opt,name=localTraceId,proto3" json:"localTraceId,omitempty"` - ThreadDump *PThreadLightDump `protobuf:"bytes,3,opt,name=threadDump,proto3" json:"threadDump,omitempty"` - Sampled bool `protobuf:"varint,4,opt,name=sampled,proto3" json:"sampled,omitempty"` - TransactionId string `protobuf:"bytes,5,opt,name=transactionId,proto3" json:"transactionId,omitempty"` - EntryPoint string `protobuf:"bytes,6,opt,name=entryPoint,proto3" json:"entryPoint,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PActiveThreadLightDump) Reset() { *m = PActiveThreadLightDump{} } -func (m *PActiveThreadLightDump) String() string { return proto.CompactTextString(m) } -func (*PActiveThreadLightDump) ProtoMessage() {} -func (*PActiveThreadLightDump) Descriptor() ([]byte, []int) { - return fileDescriptor_f8203157ab6c6959, []int{4} -} - -func (m *PActiveThreadLightDump) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PActiveThreadLightDump.Unmarshal(m, b) -} -func (m *PActiveThreadLightDump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PActiveThreadLightDump.Marshal(b, m, deterministic) -} -func (m *PActiveThreadLightDump) XXX_Merge(src proto.Message) { - xxx_messageInfo_PActiveThreadLightDump.Merge(m, src) -} -func (m *PActiveThreadLightDump) XXX_Size() int { - return xxx_messageInfo_PActiveThreadLightDump.Size(m) -} -func (m *PActiveThreadLightDump) XXX_DiscardUnknown() { - xxx_messageInfo_PActiveThreadLightDump.DiscardUnknown(m) -} - -var xxx_messageInfo_PActiveThreadLightDump proto.InternalMessageInfo - -func (m *PActiveThreadLightDump) GetStartTime() int64 { - if m != nil { - return m.StartTime - } - return 0 -} - -func (m *PActiveThreadLightDump) GetLocalTraceId() int64 { - if m != nil { - return m.LocalTraceId - } - return 0 -} - -func (m *PActiveThreadLightDump) GetThreadDump() *PThreadLightDump { - if m != nil { - return m.ThreadDump - } - return nil -} - -func (m *PActiveThreadLightDump) GetSampled() bool { - if m != nil { - return m.Sampled - } - return false -} - -func (m *PActiveThreadLightDump) GetTransactionId() string { - if m != nil { - return m.TransactionId - } - return "" -} - -func (m *PActiveThreadLightDump) GetEntryPoint() string { - if m != nil { - return m.EntryPoint - } - return "" -} - -func init() { - proto.RegisterEnum("v1.PThreadState", PThreadState_name, PThreadState_value) - proto.RegisterEnum("v1.PThreadDumpType", PThreadDumpType_name, PThreadDumpType_value) - proto.RegisterType((*PMonitorInfo)(nil), "v1.PMonitorInfo") - proto.RegisterType((*PThreadDump)(nil), "v1.PThreadDump") - proto.RegisterType((*PThreadLightDump)(nil), "v1.PThreadLightDump") - proto.RegisterType((*PActiveThreadDump)(nil), "v1.PActiveThreadDump") - proto.RegisterType((*PActiveThreadLightDump)(nil), "v1.PActiveThreadLightDump") -} - -func init() { - proto.RegisterFile("ThreadDump.proto", fileDescriptor_f8203157ab6c6959) -} - -var fileDescriptor_f8203157ab6c6959 = []byte{ - // 694 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcd, 0x4e, 0xdb, 0x4c, - 0x14, 0xc5, 0x04, 0x42, 0x72, 0x13, 0x88, 0xbf, 0x11, 0x5f, 0xeb, 0x86, 0x0a, 0xa5, 0x51, 0x17, - 0x11, 0x0b, 0x23, 0x68, 0xc5, 0x3e, 0x21, 0x2e, 0xb5, 0x00, 0x13, 0x0d, 0x46, 0x2c, 0xd1, 0x60, - 0x0f, 0x89, 0x45, 0xe2, 0xb1, 0x26, 0x93, 0xa0, 0x74, 0xd9, 0xd7, 0xe9, 0x9b, 0xf4, 0x41, 0xba, - 0xee, 0x23, 0x54, 0x33, 0x36, 0xce, 0x18, 0x58, 0x54, 0x42, 0xea, 0xce, 0xf7, 0x9c, 0xeb, 0x73, - 0xff, 0x8e, 0x34, 0x60, 0xfa, 0x23, 0x4e, 0x49, 0xd8, 0x9f, 0x4d, 0x12, 0x3b, 0xe1, 0x4c, 0x30, - 0xb4, 0x3a, 0x3f, 0x68, 0xee, 0x0c, 0x19, 0x1b, 0x8e, 0xe9, 0xbe, 0x42, 0x6e, 0x67, 0x77, 0xfb, - 0x74, 0x92, 0x88, 0x45, 0x9a, 0xd0, 0xdc, 0x7d, 0x4a, 0x3e, 0x70, 0x92, 0x24, 0x94, 0x4f, 0x53, - 0xbe, 0xed, 0x41, 0x7d, 0x70, 0xce, 0xe2, 0x48, 0x30, 0xee, 0xc6, 0x77, 0x0c, 0xed, 0x02, 0x4c, - 0x05, 0x09, 0xee, 0xfb, 0x34, 0x11, 0x23, 0xcb, 0x68, 0x19, 0x9d, 0x75, 0xac, 0x21, 0x39, 0xff, - 0x85, 0x93, 0x09, 0xb5, 0x56, 0x5b, 0x46, 0xa7, 0x8a, 0x35, 0xa4, 0xfd, 0x63, 0x0d, 0x6a, 0x83, - 0x65, 0x9b, 0x32, 0x5f, 0xa8, 0xc8, 0x93, 0xf9, 0x46, 0x9a, 0xbf, 0x44, 0x50, 0x13, 0x2a, 0x69, - 0xe4, 0x86, 0x4a, 0xad, 0x84, 0xf3, 0x18, 0xb5, 0xa0, 0x76, 0x3b, 0x66, 0xc1, 0x3d, 0x0d, 0xfd, - 0x68, 0x42, 0xad, 0x92, 0xa2, 0x75, 0x08, 0xb5, 0xa1, 0x9e, 0x85, 0xc7, 0x6c, 0x16, 0x0b, 0x6b, - 0x4d, 0xa5, 0x14, 0x30, 0xd9, 0xc1, 0x03, 0x89, 0x44, 0x26, 0xb2, 0xae, 0x32, 0x34, 0x44, 0x56, - 0x49, 0xa3, 0x54, 0xa2, 0x9c, 0x56, 0xd1, 0x20, 0xd9, 0xa3, 0x14, 0x54, 0x13, 0x6c, 0xa8, 0x09, - 0xf2, 0x58, 0xfe, 0x2d, 0xbf, 0x2f, 0x1e, 0x62, 0xca, 0xdd, 0xd0, 0xaa, 0xa4, 0x7f, 0x6b, 0x10, - 0xfa, 0x08, 0x9b, 0x79, 0xa8, 0x24, 0xaa, 0x4a, 0xa2, 0x08, 0xca, 0x1a, 0x51, 0xec, 0x11, 0x11, - 0xcd, 0xa9, 0x05, 0x2d, 0xa3, 0x53, 0xc1, 0x79, 0x8c, 0xde, 0x43, 0x75, 0x3a, 0x9b, 0x26, 0x34, - 0x0e, 0x69, 0x68, 0xd5, 0x14, 0xb9, 0x04, 0xd0, 0x21, 0xd4, 0xd2, 0x8d, 0x5d, 0x0a, 0x22, 0xa8, - 0x55, 0x6f, 0x19, 0x9d, 0xad, 0x43, 0xd3, 0x9e, 0x1f, 0xd8, 0xd9, 0x1d, 0x14, 0x8e, 0xf5, 0xa4, - 0xfc, 0x8a, 0x3e, 0x27, 0x01, 0xb5, 0x36, 0x5b, 0xa5, 0xfc, 0x8a, 0x0a, 0x41, 0x47, 0x69, 0xcf, - 0x34, 0xcc, 0xac, 0x61, 0x6d, 0xb5, 0x4a, 0x9d, 0x5a, 0xa6, 0xaa, 0xd9, 0x05, 0x17, 0xd3, 0x90, - 0x0d, 0x28, 0x05, 0x2e, 0x17, 0x71, 0x30, 0xe2, 0x2c, 0x8e, 0xbe, 0x51, 0x6e, 0x35, 0x94, 0xfe, - 0x0b, 0x4c, 0xfb, 0xbb, 0x01, 0x66, 0xd6, 0xe5, 0x59, 0x34, 0x1c, 0x89, 0x57, 0x5b, 0xe6, 0xc9, - 0x32, 0x4a, 0x7f, 0xb1, 0x8c, 0xf6, 0x2f, 0x03, 0xfe, 0x1b, 0x74, 0x03, 0xb9, 0x6a, 0xcd, 0xb8, - 0x72, 0xe9, 0x82, 0x70, 0xa1, 0x5c, 0x63, 0xa8, 0x32, 0x4b, 0x40, 0x1a, 0x6f, 0xcc, 0x02, 0x32, - 0x56, 0xeb, 0xca, 0xfb, 0x28, 0x60, 0x68, 0xff, 0x71, 0x0e, 0xa9, 0xa7, 0x5a, 0xa9, 0x1d, 0x36, - 0xb4, 0x56, 0x24, 0x8c, 0xb5, 0x14, 0x64, 0xc1, 0xc6, 0x94, 0x4c, 0x92, 0x31, 0x0d, 0x95, 0x91, - 0x2b, 0xf8, 0x31, 0x94, 0x1e, 0x12, 0x9c, 0xc4, 0x53, 0x12, 0x88, 0x88, 0xc5, 0x6e, 0xa8, 0x6c, - 0x5c, 0xc5, 0x45, 0x50, 0x2e, 0x8e, 0xc6, 0x82, 0x2f, 0x06, 0x2c, 0xca, 0x8c, 0x5c, 0xc5, 0x1a, - 0xd2, 0xfe, 0x6d, 0xc0, 0x9b, 0xc2, 0xa0, 0xcb, 0x9d, 0xbf, 0x7e, 0xda, 0xcf, 0x2f, 0x4c, 0xbb, - 0xad, 0x4d, 0x9b, 0xd7, 0xfa, 0x97, 0x23, 0xef, 0xfd, 0x34, 0xa0, 0xae, 0x5f, 0x1e, 0x6d, 0x83, - 0xe9, 0x7f, 0xc5, 0x4e, 0xb7, 0x7f, 0x73, 0xe9, 0x77, 0x7d, 0xe7, 0xc6, 0x73, 0xae, 0xcd, 0x15, - 0xf4, 0x0e, 0xfe, 0x2f, 0xa0, 0xf8, 0xca, 0xf3, 0xba, 0xbd, 0x33, 0xc7, 0x34, 0x90, 0x05, 0xdb, - 0x05, 0xaa, 0x77, 0x76, 0x71, 0x7c, 0xea, 0xf4, 0xcd, 0xd5, 0x67, 0xcc, 0x75, 0xd7, 0xf5, 0x5d, - 0xef, 0xc4, 0x2c, 0xa1, 0x5d, 0x68, 0x16, 0x18, 0xdf, 0x3d, 0x77, 0xfa, 0x39, 0xbf, 0x86, 0x76, - 0xe0, 0x6d, 0x91, 0x77, 0xf0, 0xb9, 0xeb, 0x75, 0x7d, 0xa7, 0x6f, 0xae, 0x3f, 0x93, 0xbd, 0xf2, - 0x4e, 0xbd, 0x8b, 0x6b, 0xcf, 0x2c, 0xef, 0xed, 0x41, 0x43, 0xb3, 0x8e, 0xbf, 0x48, 0x28, 0x02, - 0x28, 0xfb, 0x5d, 0x7c, 0xe2, 0xf8, 0xe6, 0x0a, 0xaa, 0xc1, 0xc6, 0xc0, 0xf1, 0xfa, 0xb2, 0x84, - 0xd1, 0x3b, 0x82, 0x0f, 0x01, 0x9b, 0xd8, 0x31, 0x99, 0x53, 0x1e, 0x30, 0x9e, 0xd8, 0x49, 0x14, - 0x27, 0x72, 0x25, 0xf6, 0x90, 0x27, 0x81, 0x2d, 0xe4, 0xd5, 0x7a, 0x8d, 0xa5, 0xda, 0x40, 0xbe, - 0x06, 0x03, 0xe3, 0xb6, 0xac, 0x9e, 0x85, 0x4f, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xe8, 0xdd, - 0xd8, 0x24, 0x6b, 0x06, 0x00, 0x00, -} diff --git a/collector-agent/protocol/grpc/.gitignore b/collector-agent/protocol/grpc/.gitignore deleted file mode 100644 index 472fecd96..000000000 --- a/collector-agent/protocol/grpc/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.go \ No newline at end of file diff --git a/collector-agent/protocol/grpc/Annotation.proto b/collector-agent/protocol/grpc/Annotation.proto deleted file mode 100644 index 4a05de6d3..000000000 --- a/collector-agent/protocol/grpc/Annotation.proto +++ /dev/null @@ -1,68 +0,0 @@ -syntax = "proto3"; - -import "google/protobuf/wrappers.proto"; - - -option java_multiple_files = true; -option java_package = "com.navercorp.pinpoint.grpc.trace"; -option java_outer_classname = "AnnotationProto"; -//option objc_class_prefix = "PIN"; - -package v1; - -message PIntStringValue { - int32 intValue = 1; - google.protobuf.StringValue stringValue = 2; -} - -message PIntStringStringValue { - int32 intValue = 1; - google.protobuf.StringValue stringValue1 = 2; - google.protobuf.StringValue stringValue2 = 3; -} - -message PLongIntIntByteByteStringValue { - int64 longValue = 1; - int32 intValue1 = 2; - int32 intValue2 = 3; - sint32 byteValue1 = 4; - sint32 byteValue2 = 5; - google.protobuf.StringValue stringValue = 6; -} - -message PIntBooleanIntBooleanValue { - int32 intValue1 = 1; - bool boolValue1 = 2; - int32 intValue2 = 3; - bool boolValue2 = 4; -} - -message PStringStringValue { - google.protobuf.StringValue stringValue1 = 1; - google.protobuf.StringValue stringValue2 = 2; -} - -message PAnnotationValue { - oneof field { - string stringValue = 1; - bool boolValue = 2; - int32 intValue = 3; - int64 longValue = 4; - // for compatibility - sint32 shortValue = 5; - double doubleValue = 6; - bytes binaryValue = 7; - // for compatibility - sint32 byteValue = 8; - PIntStringValue intStringValue = 9; - PStringStringValue stringStringValue = 10; - PIntStringStringValue intStringStringValue = 11; - PLongIntIntByteByteStringValue longIntIntByteByteStringValue = 12; - PIntBooleanIntBooleanValue intBooleanIntBooleanValue = 13; - } -} - -message PAnnotation { - int32 key = 1; - PAnnotationValue value = 2; -} \ No newline at end of file diff --git a/collector-agent/protocol/grpc/Cmd.proto b/collector-agent/protocol/grpc/Cmd.proto deleted file mode 100644 index 38ad44ac5..000000000 --- a/collector-agent/protocol/grpc/Cmd.proto +++ /dev/null @@ -1,106 +0,0 @@ -syntax = "proto3"; - -import "google/protobuf/wrappers.proto"; -import "ThreadDump.proto"; - -option java_multiple_files = true; -option java_package = "com.navercorp.pinpoint.grpc.trace"; -option java_outer_classname = "CmdProto"; -//option objc_class_prefix = "PIN"; - -package v1; - -enum PCommandType { - NONE = 0; - - PING = 100; - PONG = 101; - - ECHO = 710; - - ACTIVE_THREAD_COUNT = 730; - ACTIVE_THREAD_DUMP = 740; - ACTIVE_THREAD_LIGHT_DUMP = 750; -} - -message PCmdMessage { - oneof message { - PCmdServiceHandshake handshakeMessage = 1; - PCmdResponse failMessage = 2; - } -} - -message PCmdServiceHandshake { - // initial message - repeated int32 supportCommandServiceKey = 1; -} - -message PCmdResponse { - int32 responseId = 1; - int32 status = 2; - google.protobuf.StringValue message = 3; -} - -message PCmdStreamResponse { - int32 responseId = 1; - int32 sequenceId = 2; - google.protobuf.StringValue message = 3; -} - -message PCmdRequest { - int32 requestId = 1; - - oneof command { - PCmdEcho commandEcho = 710; - PCmdActiveThreadCount commandActiveThreadCount = 730; - PCmdActiveThreadDump commandActiveThreadDump = 740; - PCmdActiveThreadLightDump commandActiveThreadLightDump = 750; - } -} - -message PCmdEcho { - string message = 1; -} - -message PCmdEchoResponse { - PCmdResponse commonResponse = 1; - string message = 2; -} - -message PCmdActiveThreadDump { - int32 limit = 1; - repeated string threadName = 2; - repeated int64 localTraceId = 3; -} - -message PCmdActiveThreadDumpRes { - PCmdResponse commonResponse = 1; - repeated PActiveThreadDump threadDump = 2; - string type = 3; - string subType = 4; - string version = 5; -} - -message PCmdActiveThreadLightDump { - int32 limit = 1; - repeated string threadName = 2; - repeated int64 localTraceId = 3; -} - -message PCmdActiveThreadLightDumpRes { - PCmdResponse commonResponse = 1; - repeated PActiveThreadLightDump threadDump = 2; - string type = 3; - string subType = 4; - string version = 5; -} - -message PCmdActiveThreadCount { -} - -message PCmdActiveThreadCountRes { - PCmdStreamResponse commonStreamResponse = 1; - int32 histogramSchemaType = 2; - repeated int32 activeThreadCount = 3; - int64 timeStamp = 4; -} \ No newline at end of file diff --git a/collector-agent/protocol/grpc/Service.proto b/collector-agent/protocol/grpc/Service.proto deleted file mode 100644 index e9a00b128..000000000 --- a/collector-agent/protocol/grpc/Service.proto +++ /dev/null @@ -1,57 +0,0 @@ -syntax = "proto3"; - -import "google/protobuf/empty.proto"; -import "Span.proto"; -import "Stat.proto"; -import "ThreadDump.proto"; -import "Cmd.proto"; - -option java_multiple_files = true; -option java_package = "com.navercorp.pinpoint.grpc.trace"; -option java_outer_classname = "ServiceProto"; -//option objc_class_prefix = "PIN"; - -package v1; - -service Span { - rpc SendSpan (stream PSpanMessage) returns (google.protobuf.Empty) { - } -} - -service Agent { - rpc RequestAgentInfo (PAgentInfo) returns (PResult) { - } - rpc PingSession (stream PPing) returns (stream PPing) { - } -} - -service Metadata { - rpc RequestSqlMetaData (PSqlMetaData) returns (PResult) { - } - rpc RequestApiMetaData (PApiMetaData) returns (PResult) { - } - rpc RequestStringMetaData (PStringMetaData) returns (PResult) { - } -} - -service Stat { - rpc SendAgentStat (stream PStatMessage) returns (google.protobuf.Empty) { - } -} - -service ProfilerCommandService { - rpc HandleCommand (stream PCmdMessage) returns (stream PCmdRequest) { - } - - rpc CommandEcho (PCmdEchoResponse) returns (google.protobuf.Empty) { - } - - rpc CommandStreamActiveThreadCount (stream PCmdActiveThreadCountRes) returns (google.protobuf.Empty) { - } - - rpc CommandActiveThreadDump (PCmdActiveThreadDumpRes) returns (google.protobuf.Empty) { - } - - rpc CommandActiveThreadLightDump (PCmdActiveThreadLightDumpRes) returns (google.protobuf.Empty) { - } -} \ No newline at end of file diff --git a/collector-agent/protocol/grpc/Span.proto b/collector-agent/protocol/grpc/Span.proto deleted file mode 100644 index f9a8c8f4d..000000000 --- a/collector-agent/protocol/grpc/Span.proto +++ /dev/null @@ -1,153 +0,0 @@ -syntax = "proto3"; - -import "google/protobuf/empty.proto"; -import "Annotation.proto"; - - -option java_multiple_files = true; -option java_package = "com.navercorp.pinpoint.grpc.trace"; -option java_outer_classname = "SpanProto"; -//option objc_class_prefix = "PIN"; - -package v1; - -message PSpanMessage { - oneof field { - PSpan span = 1; - PSpanChunk spanChunk =2; - } -} - -message PSpan { - int32 version = 1; - - PTransactionId transactionId = 2; - - sfixed64 spanId = 3; - sfixed64 parentSpanId = 4; - - // span event's startTimestamp - int64 startTime = 5; - int32 elapsed = 6; - int32 apiId = 7; - - int32 serviceType = 8; - - PAcceptEvent acceptEvent = 9; - - repeated PAnnotation annotation = 10; - - int32 flag = 11; - sint32 err = 12; - - repeated PSpanEvent spanEvent = 13; - - PIntStringValue exceptionInfo = 14; - - int32 applicationServiceType = 15; - int32 loggingTransactionInfo = 16; -} - -message PTransactionId { - // identical to agentId if null - string agentId = 1; //nullable - int64 agentStartTime = 2; - int64 sequence = 3; -} - -message PAcceptEvent { - string rpc = 1; - string endPoint = 2; - string remoteAddr = 3; - PParentInfo parentInfo = 4; -} - -message PParentInfo { - string parentApplicationName = 1; - int32 parentApplicationType = 2; - string acceptorHost = 3; -} - -message PLocalAsyncId { - int32 asyncId = 1; - int32 sequence = 2; -} - - -message PSpanEvent { - int32 sequence = 1; - int32 depth = 2; - - int32 startElapsed = 3; - int32 endElapsed = 4; - - sint32 serviceType = 5; - - repeated PAnnotation annotation = 6; - - sint32 apiId = 10; - PIntStringValue exceptionInfo = 11; - - PNextEvent nextEvent = 12; - int32 asyncEvent = 13; -} - -message PNextEvent { - oneof field { - PMessageEvent messageEvent = 1; - } -} - -message PMessageEvent { - sfixed64 nextSpanId = 1; - string endPoint = 2; - string destinationId = 3; -} - -message PSpanChunk { - int32 version = 1; - - PTransactionId transactionId = 2; - - sfixed64 spanId = 3; - - string endPoint = 4; - - repeated PSpanEvent spanEvent = 5; - - int32 applicationServiceType = 6; - - int64 keyTime = 7; - - PLocalAsyncId localAsyncId = 8; - -} - -// 1.6.x- : version = 0; -// 1.7.x+ : version = 1; -//const i8 TRACE_V1 = 0; -//const i8 TRACE_V2 = 1; -// - - -message PResult { - bool success = 1; - string message = 2; -} - -message PSqlMetaData { - int32 sqlId = 1; - string sql = 2; -} - -message PApiMetaData { - int32 apiId = 1; - string apiInfo = 2; - int32 line = 3; - int32 type = 4; -} - -message PStringMetaData { - int32 stringId = 1; - string stringValue = 2; -} \ No newline at end of file diff --git a/collector-agent/protocol/grpc/Stat.proto b/collector-agent/protocol/grpc/Stat.proto deleted file mode 100644 index 5fbdf53de..000000000 --- a/collector-agent/protocol/grpc/Stat.proto +++ /dev/null @@ -1,160 +0,0 @@ -syntax = "proto3"; - -import "google/protobuf/empty.proto"; -import "ThreadDump.proto"; - -option java_multiple_files = true; -option java_package = "com.navercorp.pinpoint.grpc.trace"; -option java_outer_classname = "StatProto"; -option objc_class_prefix = "PIN"; - -package v1; - -message PPing { -} - -message PStatMessage { - oneof field { - PAgentStat agentStat = 1; - PAgentStatBatch agentStatBatch = 2; - } -} - -message PAgentInfo { - string hostname = 1; - string ip = 2; - string ports = 3; - int32 serviceType = 4; - int32 pid = 5; - string agentVersion = 6; - string vmVersion = 7; - int64 endTimestamp = 8; - int32 endStatus = 9; - PServerMetaData serverMetaData = 10; - PJvmInfo jvmInfo = 11; - bool container = 12; -} - -message PServerMetaData { - string serverInfo = 1; - repeated string vmArg = 2; - repeated PServiceInfo serviceInfo = 3; -} - -message PServiceInfo { - string serviceName = 1; - repeated string serviceLib = 2; -} - -message PJvmInfo { - int32 version = 1; - string vmVersion = 2; - PJvmGcType gcType = 3; -} - -enum PJvmGcType { - JVM_GC_TYPE_UNKNOWN = 0; - JVM_GC_TYPE_SERIAL = 1; - JVM_GC_TYPE_PARALLEL = 2; - JVM_GC_TYPE_CMS = 3; - JVM_GC_TYPE_G1 = 4; -} - -message PAgentStat { - int64 timestamp = 1; - int64 collectInterval =2; - PJvmGc gc = 3; - PCpuLoad cpuLoad = 4; - PTransaction transaction = 5; - PActiveTrace activeTrace = 6; - PDataSourceList dataSourceList = 7; - PResponseTime responseTime = 8; - PDeadlock deadlock = 9; - PFileDescriptor fileDescriptor = 10; - PDirectBuffer directBuffer = 11; - string metadata = 12; -} - -message PAgentStatBatch { - repeated PAgentStat agentStat = 1; -} - -message PDataSource { - int32 id = 1; - int32 serviceTypeCode = 2; - string databaseName = 3; - string url = 4; - int32 activeConnectionSize = 5; - int32 maxConnectionSize = 6; -} - -message PDataSourceList { - repeated PDataSource dataSource = 1; -} - -message PFileDescriptor { - int64 openFileDescriptorCount = 1; -} - -message PJvmGc { - PJvmGcType type = 1; - int64 jvmMemoryHeapUsed = 2; - int64 jvmMemoryHeapMax = 3; - int64 jvmMemoryNonHeapUsed = 4; - int64 jvmMemoryNonHeapMax = 5; - int64 jvmGcOldCount = 6; - int64 jvmGcOldTime = 7; - PJvmGcDetailed jvmGcDetailed = 8; -} - -message PJvmGcDetailed { - int64 jvmGcNewCount = 1; - int64 jvmGcNewTime = 2; - double jvmPoolCodeCacheUsed = 3; - double jvmPoolNewGenUsed = 4; - double jvmPoolOldGenUsed = 5; - double jvmPoolSurvivorSpaceUsed = 6; - double jvmPoolPermGenUsed = 7; - double jvmPoolMetaspaceUsed = 8; -} - -message PCpuLoad { - double jvmCpuLoad = 1; - double systemCpuLoad = 2; -} - -message PTransaction { - int64 sampledNewCount = 2; - int64 sampledContinuationCount = 3; - int64 unsampledNewCount = 4; - int64 unsampledContinuationCount = 5; - int64 skippedNewCount = 6; - int64 skippedContinuationCount = 7; -} - -message PActiveTraceHistogram { - int32 version = 1; - int32 histogramSchemaType = 2; - repeated int32 activeTraceCount = 3; -} - -message PActiveTrace { - PActiveTraceHistogram histogram = 1; -} - -message PResponseTime { - int64 avg = 1; - int64 max = 2; -} - -message PDeadlock { - int32 count = 1; - repeated PThreadDump threadDump = 2; -} - -message PDirectBuffer { - int64 directCount = 1; - int64 directMemoryUsed = 2; - int64 mappedCount = 3; - int64 mappedMemoryUsed = 4; -} \ No newline at end of file diff --git a/collector-agent/protocol/grpc/ThreadDump.proto b/collector-agent/protocol/grpc/ThreadDump.proto deleted file mode 100644 index ed0db0fa8..000000000 --- a/collector-agent/protocol/grpc/ThreadDump.proto +++ /dev/null @@ -1,75 +0,0 @@ -syntax = "proto3"; - -import "google/protobuf/empty.proto"; -import "google/protobuf/wrappers.proto"; - -option java_multiple_files = true; -option java_package = "com.navercorp.pinpoint.grpc.trace"; -option java_outer_classname = "ThreadDumpProto"; -//option objc_class_prefix = "PIN"; - -package v1; - -enum PThreadState { - THREAD_STATE_NEW = 0; - THREAD_STATE_RUNNABLE = 1; - THREAD_STATE_BLOCKED = 2; - THREAD_STATE_WAITING = 3; - THREAD_STATE_TIMED_WAITING = 4; - THREAD_STATE_TERMINATED = 5; - THREAD_STATE_UNKNOWN = 6; -} - -message PMonitorInfo { - int32 stackDepth = 1; - string stackFrame = 2; -} - -message PThreadDump { - string threadName = 1; - int64 threadId = 2; - int64 blockedTime = 3; - int64 blockedCount = 4; - int64 waitedTime = 5; - int64 waitedCount = 6; - string lockName = 7; - int64 lockOwnerId = 8; - string lockOwnerName = 9; - bool inNative = 10; - bool suspended = 11; - PThreadState threadState = 12; - repeated string stackTrace = 13; - repeated PMonitorInfo lockedMonitor = 14; - repeated string lockedSynchronizer = 15; -} - -message PThreadLightDump { - string threadName = 1; - int64 threadId = 2; - PThreadState threadState = 3; -} - -enum PThreadDumpType { - TARGET = 0; - PENDING = 1; -} - -message PActiveThreadDump { - int64 startTime = 1; - int64 localTraceId = 2; - PThreadDump threadDump = 3; - bool sampled = 4; - string transactionId = 5; - string entryPoint = 6; -} - -message PActiveThreadLightDump { - int64 startTime = 1; - int64 localTraceId = 2; - PThreadLightDump threadDump = 3; - bool sampled = 4; - string transactionId = 5; - string entryPoint = 6; -} - - diff --git a/collector-agent/server/SpanServer.go b/collector-agent/server/SpanServer.go index ead58c90e..a79375e67 100644 --- a/collector-agent/server/SpanServer.go +++ b/collector-agent/server/SpanServer.go @@ -87,16 +87,22 @@ func (server *SpanServer) Run() (code int, err error) { } func (server *SpanServer) parseInComePacket(size, packetType uint32, body []byte) (err error) { - log.Debugf("size: %d packetType: %d body:%s ", size, packetType, string(body[:])) + log.Debugf("size:%d packetType:%d body:%s ", size, packetType, string(body[:])) + //todo parse packetType data := make([]byte, size) copy(data, body) rawPacket := agent.RawPacket{Type: packetType, RawData: data} - err = server.agentRouter.DispatchPacket(&rawPacket) - if err != nil { - log.Warnf("dispather packet with an exception: %s", err) - return err + switch packetType { + case 1: //REQ_UPDATE_SPAN + err = server.agentRouter.DispatchPacket(&rawPacket) + if err != nil { + log.Warnf("dispather packet with an exception: %s", err) + return err + } + default: + log.Warnf("unspport type:%d", packetType) } return nil @@ -191,7 +197,7 @@ func (server *SpanServer) handleClient(con net.Conn) { } // fetch data - clientInBuf := make([]byte, Setting.RecvBufSize) + clientInBuf := make([]byte, Setting.RecvBufSize) inOffset := 0 packetOffset := 0 @@ -226,9 +232,9 @@ func (server *SpanServer) handleClient(con net.Conn) { break } - if Setting.RecvBufSize -inOffset < int(needs){ + if Setting.RecvBufSize-inOffset < int(needs) { // not enough space to hold income - if int(needs) > Setting.RecvBufSize / 2 { + if int(needs) > Setting.RecvBufSize/2 { log.Errorf("packet overflow and overlap.Reason packet_offset:%d,in_offset:%d", packetOffset, inOffset) break } diff --git a/collector-agent/server/server_test.go b/collector-agent/server/server_test.go index 64afa442e..cb90e64b2 100644 --- a/collector-agent/server/server_test.go +++ b/collector-agent/server/server_test.go @@ -76,9 +76,10 @@ func handleWrite(t *testing.T, conn net.Conn, done chan string) { defer conn.Close() for i := 0; i < 5; i++ { - //_time := time.Now().Unix() - //msg := `{"E":17,"FT":1500,"S":` + strconv.FormatInt(_time, 10) + `,"AppId":"c_test_app_01","Appname":"c_test_name_01","calls":[{"E":7,"S":4,"clues":["-1:I'mthe parameters"],"name":"test_func","stp":"1301"},{"E":2,"S":11,"SQL":"select 1*3;","dst":"localhost:3307","name":"mysql::excute","stp":"2101"},{"E":4,"EXP":"test this exception","S":13,"clues":["40:/support/c-cpp-php-python","46:300"],"dst":"www.pinpoint-wonderful.com","name":"httpclient","nsid":"87969596","stp":"9800"}],"client":"127.0.0.1","clues":["46:200"],"name":"C_CPP Request","server":"HTTP_HOST","sid":"53562116","stp":"1500","tid":"c_test_app^1614586481657^5801","uri":"test_url"}` - msg := `{"E":1,"FT":1500,"NP":"t=1617083759.535 D=0.000","S":1617083759798,"appid":"app-2","appname":"APP-2","calls":[{"E":1,"S":0,"clues":["-1:input parameters","14:return value"],"name":"app\\AppDate::outputDate","stp":"1501"}],"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"} ` + // _time := time.Now().Unix() + // msg := `{"E":17,"FT":1500,"S":` + strconv.FormatInt(_time, 10) + `,"AppId":"c_test_app_01","Appname":"c_test_name_01","calls":[{"E":7,"S":4,"clues":["-1:I'mthe parameters"],"name":"test_func","stp":"1301"},{"E":2,"S":11,"SQL":"select 1*3;","dst":"localhost:3307","name":"mysql::excute","stp":"2101"},{"E":4,"EXP":"test this exception","S":13,"clues":["40:/support/c-cpp-php-python","46:300"],"dst":"www.pinpoint-wonderful.com","name":"httpclient","nsid":"87969596","stp":"9800"}],"client":"127.0.0.1","clues":["46:200"],"name":"C_CPP Request","server":"HTTP_HOST","sid":"53562116","stp":"1500","tid":"c_test_app^1614586481657^5801","uri":"test_url"}` + + msg := `{"E":1,"FT":1500,"NP":"t=1617083759.535 D=0.000","S":1617083759798,"appid":"app-2","appname":"APP-2","calls":[{"E":1,"S":0,"clues":["-1:input parameters","14:return value"],"name":"app\\AppDate::outputDate","stp":"1501"}],"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"}` buffer := generateValidPacket(msg) _, e := conn.Write(buffer) if e != nil { diff --git a/collector-agent/start-collector-agent.sh b/collector-agent/start-collector-agent.sh index dcd258e1e..1473b1326 100644 --- a/collector-agent/start-collector-agent.sh +++ b/collector-agent/start-collector-agent.sh @@ -1,2 +1,12 @@ #!/bin/bash -docker run -itd -p 9999:9999 --env-file ./env.list ghcr.io/pinpoint-apm/pinpoint-c-agent/collector-agent:latest \ No newline at end of file +export PP_COLLECTOR_AGENT_SPAN_IP=dev-pinpoint +export PP_COLLECTOR_AGENT_SPAN_PORT=9993 +export PP_COLLECTOR_AGENT_AGENT_IP=dev-pinpoint +export PP_COLLECTOR_AGENT_AGENT_PORT=9991 +export PP_COLLECTOR_AGENT_STAT_IP=dev-pinpoint +export PP_COLLECTOR_AGENT_STAT_PORT=9992 +export PP_COLLECTOR_AGENT_ISDOCKER=false +# export PP_LOG_DIR=/tmp/ +export PP_Log_Level=DEBUG +export PP_ADDRESS=0.0.0.0@9999 +make && ./collector-agent \ No newline at end of file diff --git a/collector-agent/todo.md b/collector-agent/todo.md new file mode 100644 index 000000000..c2cfd0102 --- /dev/null +++ b/collector-agent/todo.md @@ -0,0 +1,5 @@ +### Todo list +- [ ] support unique id +- [ ] support url template + - [ ] collector-agent + - [ ] support metric \ No newline at end of file diff --git a/common/.clang-format b/common/.clang-format new file mode 100644 index 000000000..b66517444 --- /dev/null +++ b/common/.clang-format @@ -0,0 +1,15 @@ +--- +Language: Cpp +AccessModifierOffset: -2 +ColumnLimit: 100 +DerivePointerAlignment: false +PointerAlignment: Left +SortIncludes: false +TypenameMacros: ['STACK_OF'] + +--- +Language: Proto +ColumnLimit: 100 +SpacesInContainerLiterals: false +AllowShortFunctionsOnASingleLine: false +ReflowComments: false \ No newline at end of file diff --git a/common/include/common.h.in b/common/include/common.h.in index 69b2af722..6e68e03a3 100644 --- a/common/include/common.h.in +++ b/common/include/common.h.in @@ -38,7 +38,7 @@ typedef enum { RESPONSE_AGENT_INFO = 0, REQ_UPDATE_SPAN = 1 } MSG_TYPE; typedef enum { E_LOGGING = 0x1, - E_DISABLE_GIL = 0x2, // disable gil checking in python + E_DISABLE_GIL = 0x2, // disable gil checking in python E_UTEST = 0x4 } AGENT_FLAG; @@ -53,23 +53,23 @@ typedef struct { typedef struct collector_agent_s { uint64_t start_time; - char *appid; - char *appname; + char* appid; + char* appname; } CollectorAgentInfo; /// typedef struct trace_store_layer { - void (*set_cur_trace_cb)(void *); - void *(*get_cur_trace_cb)(void); + void (*set_cur_trace_cb)(void*); + void* (*get_cur_trace_cb)(void); } TraceStoreLayer; #define LOG_SIZE 4096 #define MAX_ADDRESS_SIZE 256 typedef void (*VOID_FUNC)(void); typedef struct pp_agent_s { - char co_host[MAX_ADDRESS_SIZE]; // tcp:ip:port should support dns - long timeout_ms; // always be 0 - long trace_limit; // change to long as python need long + char co_host[MAX_ADDRESS_SIZE]; // tcp:ip:port should support dns + long timeout_ms; // always be 0 + long trace_limit; // change to long as python need long int agent_type; uint8_t inter_flag; VOID_FUNC get_read_lock; @@ -77,7 +77,12 @@ typedef struct pp_agent_s { VOID_FUNC release_lock; } PPAgentT; -typedef enum { E_OFFLINE = 0x1, E_TRACE_PASS = 0x2, E_TRACE_BLOCK = 0x4, E_READY = 0x8 } E_AGENT_STATUS; +typedef enum { + E_OFFLINE = 0x1, + E_TRACE_PASS = 0x2, + E_TRACE_BLOCK = 0x4, + E_READY = 0x8 +} E_AGENT_STATUS; /** * @brief at present only root checking @@ -104,160 +109,164 @@ extern "C" { extern PPAgentT global_agent_info; /** - * @brief [tls] - * pinpoint_get_per_thread_id and pinpoint_update_per_thread_id are paired API - * pinpoint_get_per_thread_id get the current trace-id of current thread - * pinpoint_update_per_thread_id update(stores) the current trace-id for pinpoint_get_per_thread_id - * @return NodeID - */ + * @brief [tls] + * pinpoint_get_per_thread_id and pinpoint_update_per_thread_id are paired API + * pinpoint_get_per_thread_id get the current trace-id of current thread + * pinpoint_update_per_thread_id update(stores) the current trace-id for pinpoint_get_per_thread_id + * @return NodeID + */ NodeID pinpoint_get_per_thread_id(void); void pinpoint_update_per_thread_id(NodeID id); /** - * @brief [tls] start a trace (span) from parentId. if current span is empty, create a span or else create a spanevent - * - * @param parentId - * @return -1: failed new traceId related to parentId (caller [parentId] -> callee [NodeID] ) - */ + * @brief [tls] start a trace (span) from parentId. if current span is empty, create a span or else + * create a spanevent + * + * @param parentId + * @return -1: failed new traceId related to parentId (caller [parentId] -> callee [NodeID] ) + */ NodeID pinpoint_start_trace(NodeID parentId); /** - * @brief [tls] V1 support trace with optional config - * Not support on root traceNode - * @param parentId - * @param opt param ... count; if opt == nullptr, the same as pinpoint_start_trace; Note: must end with nullptr - * @param ... only support const char*; - * eg: - * "TraceMinTimeMs:23" // the minimum time of a trace should be 23ms - * "TraceOnlyException" // only trace exception( only report when call pinpoint_add_exception) - * @return NodeID - */ -NodeID pinpoint_start_traceV1(NodeID parentId, const char *opt, ...); + * @brief [tls] V1 support trace with optional config + * Not support on root traceNode + * @param parentId + * @param opt param ... count; if opt == nullptr, the same as pinpoint_start_trace; Note: must end + * with nullptr + * @param ... only support const char*; + * eg: + * "TraceMinTimeMs:23" // the minimum time of a trace should be 23ms + * "TraceOnlyException" // only trace exception( only report when call pinpoint_add_exception) + * @return NodeID + */ +NodeID pinpoint_start_traceV1(NodeID parentId, const char* opt, ...); -void pinpoint_add_exception(NodeID, const char *exp); +void pinpoint_add_exception(NodeID, const char* exp); /**[tls] - * the same as pinpoint_start_trace. BUT, end a span or a spanevent - * Note: pinpoint_end_trace is thread safe, but you should avoid to call it in the multi-thread, it may send duplicate trace span - * @return NodeID is parent node id - */ + * the same as pinpoint_start_trace. BUT, end a span or a spanevent + * Note: pinpoint_end_trace is thread safe, but you should avoid to call it in the multi-thread, it + * may send duplicate trace span + * @return NodeID is parent node id + */ NodeID pinpoint_end_trace(NodeID); /** - * @brief wake a finished trace: this trace get a new startime, so it could be profile again. the end_trace will update the ["e"] by cumulative time (NOTE: root trace not supported) - * - * @param traceId - * @return int 0 if success, -1 if failed - */ + * @brief wake a finished trace: this trace get a new startime, so it could be profile again. the + * end_trace will update the ["e"] by cumulative time (NOTE: root trace not supported) + * + * @param traceId + * @return int 0 if success, -1 if failed + */ int pinpoint_wake_trace(NodeID traceId); /** - * check id->traceNode is root - * @param - * @return 1: is root; 0: not root node;-1: A wrong id - */ + * check id->traceNode is root + * @param + * @return 1: is root; 0: not root node;-1: A wrong id + */ int pinpoint_trace_is_root(NodeID); /** - * force end current trace, only called when callstack leaked - * @return int 0 : means oK - * -1: exception found, check the log - */ + * force end current trace, only called when callstack leaked + * @return int 0 : means oK + * -1: exception found, check the log + */ int pinpoint_force_end_trace(NodeID, int32_t timeout); /** - * [tls] pinpoint_add_clues, append a value into span[key] - * @param key must be a string - * @param value key must be a string - */ -void pinpoint_add_clues(NodeID _id, const char *key, const char *value, E_NODE_LOC flag); + * [tls] pinpoint_add_clues, append a value into span[key] + * @param key must be a string + * @param value key must be a string + */ +void pinpoint_add_clues(NodeID _id, const char* key, const char* value, E_NODE_LOC flag); /** - * [tls] pinpoint_add_clues, add a key-value into span. span[key]=value - * @param key must be a string - * @param value key must be a string - */ -void pinpoint_add_clue(NodeID _id, const char *key, const char *value, E_NODE_LOC flag); + * [tls] pinpoint_add_clues, add a key-value into span. span[key]=value + * @param key must be a string + * @param value key must be a string + */ +void pinpoint_add_clue(NodeID _id, const char* key, const char* value, E_NODE_LOC flag); /** - * [tls] add a key value into current trace. IF the trace is end, all data(key-value) will be free - * @param key - * @param value - */ -void pinpoint_set_context_key(NodeID _id, const char *key, const char *value); + * [tls] add a key value into current trace. IF the trace is end, all data(key-value) will be free + * @param key + * @param value + */ +void pinpoint_set_context_key(NodeID _id, const char* key, const char* value); /** - * [tls] get the corresponding value with key(in current trace) - * @param size copy into pbuf, not include '\0' - * @return - */ -int pinpoint_get_context_key(NodeID _id, const char *key, char *pbuf, int buf_size); + * [tls] get the corresponding value with key(in current trace) + * @param size copy into pbuf, not include '\0' + * @return value size + */ +int pinpoint_get_context_key(NodeID _id, const char* key, char* pbuf, int buf_size); -void pinpoint_set_context_long(NodeID _id, const char *key, long); +void pinpoint_set_context_long(NodeID _id, const char* key, long); /** - * @brief the value is a long type - * - * @param _id node id - * @param key string - * @return int 1: failed - * 0: success - */ -int pinpoint_get_context_long(NodeID _id, const char *key, long *); + * @brief the value is a long type + * + * @param _id node id + * @param key string + * @return int 1: failed + * 0: success + */ +int pinpoint_get_context_long(NodeID _id, const char* key, long*); /** - * [tls] if tracelimit enable, check current trace state, - * @param timestamp - * @return 0, sampled or else, not sampled - */ + * [tls] if tracelimit enable, check current trace state, + * @param timestamp + * @return 0, sampled or else, not sampled + */ int check_tracelimit(int64_t); /** - * @brief [tls] setting current trace status - typedef enum { - E_OFFLINE = 0x1, - E_TRACE_PASS =0x2, - E_TRACE_BLOCK =0x4, - E_READY = 0x8 - }E_AGENT_STATUS; - * @param _id - * @param status - * @return int last status - */ +* @brief [tls] setting current trace status + typedef enum { + E_OFFLINE = 0x1, + E_TRACE_PASS =0x2, + E_TRACE_BLOCK =0x4, + E_READY = 0x8 + }E_AGENT_STATUS; +* @param _id +* @param status +* @return int last status +*/ uint64_t mark_current_trace_status(NodeID _id, int status); /** - * [tls] get an unique auto-increment id - * NOTE: implement by shared memory, only valid in current host. - * @return - */ + * [tls] get an unique auto-increment id + * NOTE: implement by shared memory, only valid in current host. + * @return + */ int64_t generate_unique_id(void); /** - * [tls] get the start time of collector-agent.Use to generate transactionID - * @return - */ + * [tls] get the start time of collector-agent.Use to generate transactionID + * @return + */ uint64_t pinpoint_start_time(void); /** - * mark current span with error - * @param msg - * @param error_filename - * @param error_lineno - */ -void catch_error(NodeID _id, const char *msg, const char *error_filename, uint32_t error_lineno); -typedef void (*log_msg_cb)(char *); + * mark current span with error + * @param msg + * @param error_filename + * @param error_lineno + */ +void catch_error(NodeID _id, const char* msg, const char* error_filename, uint32_t error_lineno); +typedef void (*log_msg_cb)(char*); void register_error_cb(log_msg_cb error_cb); /** - * @brief for test-case: not send span to collector-agent, pass to handler - * not tls - * @param handler - */ -void register_span_handler(void (*handler)(const char *)); + * @brief for test-case: not send span to collector-agent, pass to handler + * not tls + * @param handler + */ +void register_span_handler(void (*handler)(const char*)); -void pp_trace(const char *format, ...); +void pp_trace(const char* format, ...); /** - * NOTE: only for testcase - */ + * NOTE: only for testcase + */ void reset_unique_id(void); -const char *pinpoint_agent_version(); +const char* pinpoint_agent_version(); void show_status(void); #ifdef __cplusplus } diff --git a/common/src/ConnectionPool/TransLayer.h b/common/src/ConnectionPool/TransLayer.h index 4be1bd700..2f8ba6de2 100644 --- a/common/src/ConnectionPool/TransLayer.h +++ b/common/src/ConnectionPool/TransLayer.h @@ -76,7 +76,7 @@ class TransLayer { // { // if ( this->chunks.copyDataIntoChunks(pbuf,len) != 0) // { - // pp_trace("Send buffer is full. size:[%d]",len); + // pp_trace("Send buffer is full. size: [%d]",len); // return ; // } // this->_state |= S_WRITING; diff --git a/common/src/Logging.c b/common/src/Logging.c index c8c469a5a..2edc9894f 100644 --- a/common/src/Logging.c +++ b/common/src/Logging.c @@ -32,7 +32,7 @@ #include #include #include -#define gettid() (long) getpid() +#define gettid() (long)getpid() #define getOSPid getpid #endif @@ -43,8 +43,7 @@ static log_msg_cb _error_cb; -static void log_format_out(const char *format, va_list *args) -{ +static void log_format_out(const char* format, va_list* args) { char buf[LOG_SIZE] = {0}; int n = snprintf(buf, LOG_SIZE, "[pinpoint] [%d] [%ld]", getOSPid(), gettid()); vsnprintf(buf + n, LOG_SIZE - n - 1, format, *args); @@ -59,9 +58,10 @@ static void log_format_out(const char *format, va_list *args) /** * Note: the logging should be disable when in Real env */ -void pp_trace(const char *format, ...) -{ - if ((global_agent_info.inter_flag & E_LOGGING) == 0) { return; } +void pp_trace(const char* format, ...) { + if ((global_agent_info.inter_flag & E_LOGGING) == 0) { + return; + } va_list args; va_start(args, format); // there is no need to create a LOG_SIZE in every call diff --git a/common/src/NodePool/PoolManager.cpp b/common/src/NodePool/PoolManager.cpp index 9b6947cca..4b109cd8c 100644 --- a/common/src/NodePool/PoolManager.cpp +++ b/common/src/NodePool/PoolManager.cpp @@ -56,7 +56,7 @@ bool PoolManager::Restore(NodeID id, NodeID& child_id, NodeID& next_id) { } std::this_thread::sleep_for(std::chrono::milliseconds(1)); } - pp_trace("[🐛]Restore node failed: #%d; node restore forcefully", id); + pp_trace("[🐛]Restore node failed: [%d]; node restore forcefully", id); return this->_restore(id, child_id, next_id, true); } diff --git a/common/src/NodePool/TraceNode.cpp b/common/src/NodePool/TraceNode.cpp index da557627e..282fa1dac 100644 --- a/common/src/NodePool/TraceNode.cpp +++ b/common/src/NodePool/TraceNode.cpp @@ -25,38 +25,39 @@ #include "PoolManager.h" #include "header.h" -namespace NodePool -{ +namespace NodePool { // static std::atomic _uid_; -WrapperTraceNode::WrapperTraceNode(TraceNode *node) : _traceNode(node) -{ +WrapperTraceNode::WrapperTraceNode(TraceNode* node) : _traceNode(node) { assert(_traceNode != nullptr); _traceNode->addRef(); } -WrapperTraceNode::~WrapperTraceNode() -{ - if (_traceNode != nullptr) { _traceNode->rmRef(); } +WrapperTraceNode::~WrapperTraceNode() { + if (_traceNode != nullptr) { + _traceNode->rmRef(); + } } TraceNode::~TraceNode() {} -void TraceNode::clearAttach() -{ +void TraceNode::clearAttach() { // empty the json value - if (!this->_value.empty()) this->_value.clear(); // Json::Value(); + if (!this->_value.empty()) + this->_value.clear(); // Json::Value(); - if (!this->_context.empty()) this->_context.clear(); + if (!this->_context.empty()) + this->_context.clear(); - if (!this->_endTraceCallback.empty()) this->_endTraceCallback.clear(); + if (!this->_endTraceCallback.empty()) + this->_endTraceCallback.clear(); } -void TraceNode::initId(NodeID &id) { this->mPoolIndex = id; } +void TraceNode::initId(NodeID& id) { this->mPoolIndex = id; } -void TraceNode::addChild(WrapperTraceNode &child) -{ +void TraceNode::addChild(WrapperTraceNode& child) { std::lock_guard _safe(this->mlock); - if (this->mChildHeadId != E_INVALID_NODE) child->mNextId = this->mChildHeadId; + if (this->mChildHeadId != E_INVALID_NODE) + child->mNextId = this->mChildHeadId; this->mChildHeadId = child->mPoolIndex; @@ -65,8 +66,7 @@ void TraceNode::addChild(WrapperTraceNode &child) child->root_start_time = this->root_start_time; } -void TraceNode::endTimer() -{ +void TraceNode::endTimer() { uint64_t end_time = Helper::get_current_msec_stamp(); this->cumulative_time += (end_time - this->start_time); @@ -74,18 +74,16 @@ void TraceNode::endTimer() void TraceNode::wakeUp() { this->start_time = Helper::get_current_msec_stamp(); } -void TraceNode::convertToSpan() -{ - this->AddTraceDetail("E", this->cumulative_time); - this->AddTraceDetail("S", this->start_time); +void TraceNode::convertToSpan() { + this->AddTraceDetail(":E", this->cumulative_time); + this->AddTraceDetail(":S", this->start_time); - this->AddTraceDetail("FT", global_agent_info.agent_type); + this->AddTraceDetail(":FT", global_agent_info.agent_type); } -void TraceNode::convertToSpanEvent() -{ - this->AddTraceDetail("E", this->cumulative_time); - this->AddTraceDetail("S", this->start_time - this->root_start_time); +void TraceNode::convertToSpanEvent() { + this->AddTraceDetail(":E", this->cumulative_time); + this->AddTraceDetail(":S", this->start_time - this->root_start_time); } // void TraceNode::setTraceParent(WrapperTraceNode &parent, WrapperTraceNode &root) @@ -96,21 +94,21 @@ void TraceNode::convertToSpanEvent() // this->root_start_time = root->root_start_time; // } -void TraceNode::startTimer() -{ +void TraceNode::startTimer() { uint64_t time_in_ms = Helper::get_current_msec_stamp(); this->start_time = time_in_ms; this->root_start_time = time_in_ms; } -void TraceNode::parseOpt(std::string key, std::string value) -{ - pp_trace("#%d add opt: key:%s value:%s", mPoolIndex, key.c_str(), value.c_str()); +void TraceNode::parseOpt(std::string key, std::string value) { + pp_trace(" [%d] add opt: key:%s value:%s", mPoolIndex, key.c_str(), value.c_str()); if (key == "TraceMinTimeMs") { int64_t min = std::stoll(value); auto cb = [=]() -> bool { - pp_trace("checkOpt: #%d TraceMinTimeMs:%ld cumulative_time:%lu", this->mPoolIndex, min, this->cumulative_time); - if ((int64_t) this->cumulative_time >= min) return true; + pp_trace("checkOpt: [%d] TraceMinTimeMs:%ld cumulative_time:%lu", this->mPoolIndex, min, + this->cumulative_time); + if ((int64_t)this->cumulative_time >= min) + return true; return false; }; this->_endTraceCallback.push_back(cb); @@ -121,21 +119,20 @@ void TraceNode::parseOpt(std::string key, std::string value) } } -bool TraceNode::checkOpt() -{ +bool TraceNode::checkOpt() { bool ret = true; - for (auto &cb : this->_endTraceCallback) { - if ((ret = cb()) == true) return ret; + for (auto& cb : this->_endTraceCallback) { + if ((ret = cb()) == true) + return ret; } return ret; } -void TraceNode::setOpt(const char *opt, va_list *args) -{ - const char *var = opt; +void TraceNode::setOpt(const char* opt, va_list* args) { + const char* var = opt; while (var != nullptr) { - const char *delimit = strchr(var, ':'); + const char* delimit = strchr(var, ':'); if (delimit == nullptr) { this->parseOpt(std::string(var), ""); } else { @@ -143,7 +140,7 @@ void TraceNode::setOpt(const char *opt, va_list *args) std::string value(delimit + 1); this->parseOpt(key, value); } - var = va_arg(*args, const char *); + var = va_arg(*args, const char*); } } -} // namespace NodePool +} // namespace NodePool diff --git a/common/src/Util/Helper.h b/common/src/Util/Helper.h index 0adf326ca..7d9240a32 100644 --- a/common/src/Util/Helper.h +++ b/common/src/Util/Helper.h @@ -58,7 +58,7 @@ typedef struct scope_time_trace { } ~scope_time_trace() { milliseconds elapsed = duration_cast(steady_clock::now() - _start_time); - pp_trace(" [%s] it's take [%ld] miliseconds", _funcName.c_str(), elapsed.count()); + // pp_trace(" [%s] it's take [%ld] miliseconds", _funcName.c_str(), elapsed.count()); } } STT; diff --git a/common/src/common.cpp b/common/src/common.cpp index cbdcd10fa..f17961887 100644 --- a/common/src/common.cpp +++ b/common/src/common.cpp @@ -55,6 +55,15 @@ NodeID pinpoint_get_per_thread_id() { return __tls_id; } void pinpoint_update_per_thread_id(NodeID id) { __tls_id = id; } +static inline void _verify_key(const char* key) { + if (key == nullptr || key[0] == ':') { + std::string reason = "key:"; + reason += key; + reason += "is invalid"; + throw std::invalid_argument(reason); + } +} + static NodeID do_start_trace(NodeID id, const char* opt = nullptr, va_list* args = nullptr) { if (id <= E_INVALID_NODE) { throw std::out_of_range("invalid node id"); @@ -112,9 +121,9 @@ NodeID do_end_trace(NodeID Id) { r_node->convertToSpan(); sendSpan(Id); } else if (r_node->limit == E_TRACE_BLOCK) { - pp_trace("current#%d span dropped,due to TRACE_BLOCK", r_node->getId()); + pp_trace("current [%d] span dropped,due to TRACE_BLOCK", r_node->getId()); } else { - pp_trace("current#%d span dropped,due to limit=%ld", r_node->getId(), r_node->limit); + pp_trace("current [%d] span dropped,due to limit=%ld", r_node->getId(), r_node->limit); } } else { r_node->endTimer(); @@ -128,14 +137,14 @@ NodeID do_end_trace(NodeID Id) { NodeID pinpoint_start_trace(NodeID parentId) { try { NodeID childId = do_start_trace(parentId); - pp_trace("#%d pinpoint_start child #%d", parentId, childId); + pp_trace(" [%d] pinpoint_start child [%d]", parentId, childId); return childId; } catch (const std::out_of_range& ex) { - pp_trace(" start_trace#%d failed with %s", parentId, ex.what()); + pp_trace(" start_trace [%d] failed with %s", parentId, ex.what()); } catch (const std::runtime_error& ex) { - pp_trace(" start_trace#%d failed with %s", parentId, ex.what()); + pp_trace(" start_trace [%d] failed with %s", parentId, ex.what()); } catch (const std::exception& ex) { - pp_trace(" start_trace#%d failed with %s", parentId, ex.what()); + pp_trace(" start_trace [%d] failed with %s", parentId, ex.what()); } return E_INVALID_NODE; } @@ -149,7 +158,7 @@ static NodeID do_wake_trace(NodeID& id) { WrapperTraceNode w_node = PoolManager::getInstance().GetWrapperNode(id); if (w_node->isRoot()) { - pp_trace("#%d wake_trace failed, it's a root node", id); + pp_trace(" [%d] wake_trace failed, it's a root node", id); return E_INVALID_NODE; } @@ -160,14 +169,14 @@ static NodeID do_wake_trace(NodeID& id) { int pinpoint_wake_trace(NodeID traceId) { try { - pp_trace("wake_trace #%d ", traceId); + pp_trace("wake_trace [%d] ", traceId); return do_wake_trace(traceId); } catch (const std::out_of_range& ex) { - pp_trace(" wake_trace#%d failed with %s", traceId, ex.what()); + pp_trace(" wake_trace [%d] failed with %s", traceId, ex.what()); } catch (const std::runtime_error& ex) { - pp_trace(" wake_trace#%d failed with %s", traceId, ex.what()); + pp_trace(" wake_trace [%d] failed with %s", traceId, ex.what()); } catch (...) { - pp_trace(" wake_trace#%d failed with unkonw reason", traceId); + pp_trace(" wake_trace [%d] failed with unkonw reason", traceId); } return 0; } @@ -184,9 +193,9 @@ int pinpoint_force_end_trace(NodeID id, int32_t timeout) { _span_timeout = global_agent_info.timeout_ms; return 0; } catch (const std::out_of_range&) { - pp_trace("#%d not found", id); + pp_trace(" [%d] not found", id); } catch (const std::exception& ex) { - pp_trace("#%d end trace failed. %s", id, ex.what()); + pp_trace(" [%d] end trace failed. %s", id, ex.what()); } return -1; } @@ -196,9 +205,9 @@ int pinpoint_trace_is_root(NodeID _id) { WrapperTraceNode node = PoolManager::getInstance().GetWrapperNode(_id); return node->isRoot() ? (1) : (0); } catch (const std::out_of_range&) { - pp_trace("#%d not found", _id); + pp_trace(" [%d] not found", _id); } catch (const std::exception& ex) { - pp_trace("#%d end trace failed. %s", _id, ex.what()); + pp_trace(" [%d] end trace failed. %s", _id, ex.what()); } return -1; } @@ -209,14 +218,14 @@ NodeID pinpoint_end_trace(NodeID traceId) { if (ret == E_ROOT_NODE) { freeNodeTree(traceId); } - pp_trace("#%d pinpoint_end_trace Done!", traceId); + pp_trace(" [%d] pinpoint_end_trace Done!", traceId); return ret; } catch (const std::out_of_range& ex) { pp_trace("end_trace %d out_of_range exception: %s", traceId, ex.what()); } catch (const std::runtime_error& ex) { pp_trace("end_trace %d runtime_error: %s", traceId, ex.what()); } catch (const std::exception& ex) { - pp_trace("end_trace #%d end trace failed. %s", traceId, ex.what()); + pp_trace("end_trace [%d] end trace failed. %s", traceId, ex.what()); } return E_INVALID_NODE; @@ -234,13 +243,13 @@ NodeID pinpoint_end_trace(NodeID traceId) { // try // { // NodeID ret = do_remove_trace(traceId); -// pp_trace("#%d pinpoint_remove_trace Done!",traceId); +// pp_trace(" [%d] pinpoint_remove_trace Done!",traceId); // return ret; // }catch(const std::out_of_range&){ -// pp_trace("#%d not found",traceId); +// pp_trace(" [%d] not found",traceId); // return -1; // }catch(const std::exception &ex){ -// pp_trace("#%d end trace failed. %s",traceId,ex.what()); +// pp_trace(" [%d] end trace failed. %s",traceId,ex.what()); // return -1; // } // } @@ -254,7 +263,8 @@ void reset_unique_id(void) { return SafeSharedState::instance().resetUniqueId(); uint64_t inline do_mark_current_trace_status(NodeID& _id, E_AGENT_STATUS status) { WrapperTraceNode w_node = PoolManager::getInstance().GetWrapperNode(_id); WrapperTraceNode w_root = PoolManager::getInstance().GetWrapperNode(w_node->mRootIndex); - pp_trace("change current#%d status, before:%lld,now:%d", w_root->getId(), w_root->limit, status); + pp_trace("change current [%d] status, before:%lld,now:%d", w_root->getId(), w_root->limit, + status); return __sync_lock_test_and_set(&w_root->limit, status); } @@ -262,11 +272,11 @@ uint64_t mark_current_trace_status(NodeID _id, int status) { try { return do_mark_current_trace_status(_id, (E_AGENT_STATUS)status); } catch (const std::out_of_range& ex) { - pp_trace(" %s#%d failed with %s", __func__, _id, ex.what()); + pp_trace(" %s [%d] failed with %s", __func__, _id, ex.what()); } catch (const std::runtime_error& ex) { - pp_trace(" %s#%d failed with %s", __func__, _id, ex.what()); + pp_trace(" %s [%d] failed with %s", __func__, _id, ex.what()); } catch (...) { - pp_trace(" %s#%d failed with unkonw reason", __func__, _id); + pp_trace(" %s [%d] failed with unkonw reason", __func__, _id); } return 0; } @@ -287,7 +297,7 @@ static inline WrapperTraceNode locate_node_by_loc(NodeID _id, E_NODE_LOC flag) { static void do_add_clue(NodeID _id, const char* key, const char* value, E_NODE_LOC flag) { WrapperTraceNode w_node = locate_node_by_loc(_id, flag); w_node->AddTraceDetail(key, value); - pp_trace("#%d add clue key:%s value:%s", _id, key, value); + pp_trace(" [%d] add clue key:%s value:%s", _id, key, value); } static void do_add_clues(NodeID _id, const char* key, const char* value, E_NODE_LOC flag) { @@ -298,30 +308,32 @@ static void do_add_clues(NodeID _id, const char* key, const char* value, E_NODE_ cvalue += ':'; cvalue += value; w_node->appendNodeValue(CLUSE, cvalue.c_str()); - pp_trace("#%d add clues:%s:%s", _id, key, value); + pp_trace(" [%d] add clues:%s:%s", _id, key, value); } void pinpoint_add_clues(NodeID _id, const char* key, const char* value, E_NODE_LOC flag) { try { + _verify_key(key); do_add_clues(_id, key, value, flag); } catch (const std::out_of_range& ex) { - pp_trace(" %s#%d failed.Reason %s,parameters:%s:%s", __func__, _id, ex.what(), key, value); + pp_trace(" %s [%d] failed. Reason %s,parameters:%s:%s", __func__, _id, ex.what(), key, value); } catch (const std::runtime_error& ex) { - pp_trace(" %s#%d failed.Reason %s,parameters:%s:%s", __func__, _id, ex.what(), key, value); - } catch (...) { - pp_trace(" %s#%d failed.Reason: unknown reason,parameters:%s:%s", __func__, _id, key, value); + pp_trace(" %s [%d] failed. Reason %s,parameters:%s:%s", __func__, _id, ex.what(), key, value); + } catch (const std::exception& ex) { + pp_trace(" %s [%d] failed. Reason: %s,parameters:%s:%s", __func__, _id, ex.what(), key, value); } } void pinpoint_add_clue(NodeID _id, const char* key, const char* value, E_NODE_LOC flag) { try { + _verify_key(key); do_add_clue(_id, key, value, flag); } catch (const std::out_of_range& ex) { - pp_trace(" %s#%d failed. Reason: %s,parameters:%s:%s", __func__, _id, ex.what(), key, value); + pp_trace(" %s [%d] failed. Reason: %s,parameters:%s:%s", __func__, _id, ex.what(), key, value); } catch (const std::runtime_error& ex) { - pp_trace(" %s#%d failed. Reason: %s,parameters:%s:%s", __func__, _id, ex.what(), key, value); - } catch (...) { - pp_trace(" %s#%d failed. Reason: unknow reason,parameters:%s:%s", __func__, _id, key, value); + pp_trace(" %s [%d] failed. Reason: %s,parameters:%s:%s", __func__, _id, ex.what(), key, value); + } catch (const std::exception& ex) { + pp_trace(" %s [%d] failed. Reason: %s,parameters:%s:%s", __func__, _id, ex.what(), key, value); } } @@ -338,22 +350,23 @@ static int do_get_context_key(NodeID _id, const char* key, char* pbuf, int buf_s strncpy(pbuf, value.c_str(), buf_size); return (int)value.size(); } else { - pp_trace("#%d get context key:%s failed. buffer is not enough", _id, key); + pp_trace(" [%d] get context key:%s failed. buffer is not enough", _id, key); return -1; } } void pinpoint_set_context_key(NodeID _id, const char* key, const char* value) { try { + _verify_key(key); do_set_context_key(_id, key, value); } catch (const std::out_of_range& ex) { - pp_trace(" %s#%d failed with out_of_range. %s,parameters:%s:%s", __func__, _id, ex.what(), key, - value); + pp_trace(" %s [%d] failed with out_of_range. %s,parameters:%s:%s", __func__, _id, ex.what(), + key, value); } catch (const std::runtime_error& ex) { - pp_trace(" %s#%d failed with runtime_error. %s,parameters:%s:%s", __func__, _id, ex.what(), key, - value); + pp_trace(" %s [%d] failed with runtime_error. %s,parameters:%s:%s", __func__, _id, ex.what(), + key, value); } catch (const std::exception& ex) { - pp_trace(" %s#%d failed with %s,parameters:%s:%s", __func__, _id, ex.what(), key, value); + pp_trace(" %s [%d] failed with %s,parameters:%s:%s", __func__, _id, ex.what(), key, value); } } @@ -364,13 +377,14 @@ static void do_set_long_key(NodeID id, const char* key, long l) { void pinpoint_set_context_long(NodeID _id, const char* key, long l) { try { + _verify_key(key); do_set_long_key(_id, key, l); } catch (const std::out_of_range& ex) { - pp_trace(" %s#%d failed with %s", __func__, _id, ex.what()); + pp_trace(" %s [%d] failed with %s", __func__, _id, ex.what()); } catch (const std::runtime_error& ex) { - pp_trace(" %s#%d failed with %s", __func__, _id, ex.what()); + pp_trace(" %s [%d] failed with %s", __func__, _id, ex.what()); } catch (const std::exception& ex) { - pp_trace(" %s#%d failed with %s", __func__, _id, ex.what()); + pp_trace(" %s [%d] failed with %s", __func__, _id, ex.what()); } } @@ -386,27 +400,29 @@ static int do_get_long_key(NodeID _id, const char* key, long* l) { int pinpoint_get_context_long(NodeID _id, const char* key, long* l) { try { + _verify_key(key); do_get_long_key(_id, key, l); return 0; } catch (const std::out_of_range& ex) { - pp_trace(" %s#%d failed with %s", __func__, _id, ex.what()); + pp_trace(" %s [%d] failed with %s", __func__, _id, ex.what()); } catch (const std::runtime_error& ex) { - pp_trace(" %s#%d failed with %s", __func__, _id, ex.what()); + pp_trace(" %s [%d] failed with %s", __func__, _id, ex.what()); } catch (const std::exception& ex) { - pp_trace(" %s#%d failed with %s", __func__, _id, ex.what()); + pp_trace(" %s [%d] failed with %s", __func__, _id, ex.what()); } return 1; } int pinpoint_get_context_key(NodeID _id, const char* key, char* pbuf, int buf_size) { try { + _verify_key(key); return do_get_context_key(_id, key, pbuf, buf_size); } catch (const std::out_of_range& ex) { - pp_trace(" %s#%d failed with %s, parameters:%s", __func__, _id, ex.what(), key); + pp_trace(" %s [%d] failed with %s, parameters:%s", __func__, _id, ex.what(), key); } catch (const std::runtime_error& ex) { - pp_trace(" %s#%d failed with %s, parameters:%s", __func__, _id, ex.what(), key); + pp_trace(" %s [%d] failed with %s, parameters:%s", __func__, _id, ex.what(), key); } catch (const std::exception& ex) { - pp_trace(" %s#%d failed with %s, parameters:%s", __func__, _id, ex.what(), key); + pp_trace(" %s [%d] failed with %s, parameters:%s", __func__, _id, ex.what(), key); } return -1; } @@ -426,11 +442,11 @@ void catch_error(NodeID _id, const char* msg, const char* error_filename, uint32 try { do_catch_error(_id, msg, error_filename, error_lineno); } catch (const std::out_of_range& ex) { - pp_trace(" %s#%d failed with %s", __func__, _id, ex.what()); + pp_trace(" %s [%d] failed with %s", __func__, _id, ex.what()); } catch (const std::runtime_error& ex) { - pp_trace(" %s#%d failed with %s", __func__, _id, ex.what()); + pp_trace(" %s [%d] failed with %s", __func__, _id, ex.what()); } catch (const std::exception& ex) { - pp_trace(" %s#%d failed with %s", __func__, _id, ex.what()); + pp_trace(" %s [%d] failed with %s", __func__, _id, ex.what()); } } @@ -449,14 +465,14 @@ NodeID pinpoint_start_traceV1(NodeID parentId, const char* opt, ...) { va_start(args, opt); NodeID childId = do_start_trace(parentId, opt, &args); va_end(args); - pp_trace("#%d pinpoint_start_traceV1 child #%d", parentId, childId); + pp_trace(" [%d] pinpoint_start_traceV1 child [%d]", parentId, childId); return childId; } catch (const std::out_of_range& ex) { - pp_trace(" start_trace#%d failed with %s", parentId, ex.what()); + pp_trace(" start_trace [%d] failed with %s", parentId, ex.what()); } catch (const std::runtime_error& ex) { - pp_trace(" start_trace#%d failed with %s", parentId, ex.what()); + pp_trace(" start_trace [%d] failed with %s", parentId, ex.what()); } catch (...) { - pp_trace(" start_trace#%d failed with unkonw reason", parentId); + pp_trace(" start_trace [%d] failed with unkonw reason", parentId); } return E_INVALID_NODE; } @@ -465,18 +481,18 @@ static void do_add_exp(NodeID _id, const char* value) { WrapperTraceNode w_root = locate_node_by_loc(_id, E_LOC_CURRENT); w_root->AddTraceDetail("EXP", value); w_root->mHasExp = true; - pp_trace("#%d add exp value:%s", _id, value); + pp_trace(" [%d] add exp value:%s", _id, value); } void pinpoint_add_exception(NodeID traceId, const char* exp) { try { do_add_exp(traceId, exp); } catch (const std::out_of_range& ex) { - pp_trace(" %s#%d failed. Reason: %s,parameters:%s", __func__, traceId, ex.what(), exp); + pp_trace(" %s [%d] failed. Reason: %s,parameters:%s", __func__, traceId, ex.what(), exp); } catch (const std::runtime_error& ex) { - pp_trace(" %s#%d failed. Reason: %s,parameters:%s", __func__, traceId, ex.what(), exp); + pp_trace(" %s [%d] failed. Reason: %s,parameters:%s", __func__, traceId, ex.what(), exp); } catch (const std::exception& ex) { - pp_trace(" %s#%d failed. Reason: %s,parameters:%s", __func__, traceId, ex.what(), exp); + pp_trace(" %s [%d] failed. Reason: %s,parameters:%s", __func__, traceId, ex.what(), exp); } } @@ -502,8 +518,8 @@ void show_status(void) { void debug_nodeid(NodeID id) { try { WrapperTraceNode r_node = PoolManager::getInstance().GetWrapperNode(id); - fprintf(stderr, "nodeid#%d: { value:%s }", id, r_node->ToString().c_str()); + fprintf(stderr, "nodeid [%d]: { value:%s }", id, r_node->ToString().c_str()); } catch (const std::exception& ex) { - pp_trace(" debug_nodeid:#%d Reason: %s", id, ex.what()); + pp_trace(" debug_nodeid: [%d] Reason: %s", id, ex.what()); } } \ No newline at end of file diff --git a/common/test/test_common.cc b/common/test/test_common.cc index 916082ef8..2a1b97e4e 100644 --- a/common/test/test_common.cc +++ b/common/test/test_common.cc @@ -8,10 +8,9 @@ using namespace testing; std::string ouputMsg; -void cc_log_error_cb(char *msg) { ouputMsg += msg; } +void cc_log_error_cb(char* msg) { ouputMsg += msg; } -TEST(common, uid_all_in_one) -{ +TEST(common, uid_all_in_one) { // register_error_cb(cc_log_error_cb); // test_trace(); int64_t startId = generate_unique_id(); @@ -24,18 +23,19 @@ TEST(common, uid_all_in_one) pid_t pid = fork(); if (pid == 0) { - for (int i = 0; i < _100K; i++) generate_unique_id(); + for (int i = 0; i < _100K; i++) + generate_unique_id(); exit(0); } - for (int i = 0; i < _100K; i++) generate_unique_id(); + for (int i = 0; i < _100K; i++) + generate_unique_id(); waitpid(pid, NULL, 0); //[0~9999] EXPECT_EQ(generate_unique_id(), (startId + 2 * _100K + 5)); } -TEST(common, start_end_trace) -{ +TEST(common, start_end_trace) { NodeID id = pinpoint_start_trace(E_ROOT_NODE); mark_current_trace_status(id, E_OFFLINE); EXPECT_EQ(pinpoint_trace_is_root(id), 1); @@ -56,8 +56,7 @@ TEST(common, start_end_trace) EXPECT_EQ(id, 0); } -TEST(common, context_check) -{ +TEST(common, context_check) { NodeID id = pinpoint_start_trace(E_ROOT_NODE); std::string str = "fdafadf"; pinpoint_add_clues(id, "fasdfas", str.c_str(), E_LOC_CURRENT); @@ -89,11 +88,28 @@ TEST(common, context_check) long value; EXPECT_EQ(pinpoint_get_context_long(id, "1024", &value), 0); EXPECT_EQ(value, 1024); + + pinpoint_set_context_key(id, ":interl", "abc"); + pinpoint_add_clue(id, ":internal", "abc", E_LOC_CURRENT); + pinpoint_add_clue(id, ":internal-1", "abc", E_LOC_ROOT); + + pinpoint_add_clues(id, ":internal-abc", "abc", E_LOC_CURRENT); + pinpoint_add_clues(id, ":internal-abc-1", "abc", E_LOC_ROOT); + + pinpoint_set_context_long(id, ":internal-abc-2", 12563); + + long out; + + EXPECT_NE(pinpoint_get_context_long(id, ":internal-abc-2", &out), 0); + + char outBuf[128] = {0}; + + EXPECT_EQ(pinpoint_get_context_key(id, ":interl", outBuf, sizeof(outBuf)), -1); + pinpoint_end_trace(id); } -TEST(common, error_checking) -{ +TEST(common, error_checking) { NodeID id = pinpoint_start_trace(E_ROOT_NODE); EXPECT_EQ(pinpoint_trace_is_root(id), 1); id = pinpoint_end_trace(id); @@ -103,13 +119,12 @@ TEST(common, error_checking) EXPECT_EQ(id, E_INVALID_NODE); } -static void test_per_thread_id_odd() -{ +static void test_per_thread_id_odd() { NodeID id = pinpoint_get_per_thread_id(); EXPECT_EQ(id, 0); id = NodeID(1); for (int i = 1; i < 10000; i++) { - int index = (int) id; + int index = (int)id; index += 2; id = NodeID(index); pinpoint_update_per_thread_id(id); @@ -118,15 +133,14 @@ static void test_per_thread_id_odd() } } -static void test_per_thread_id_even() -{ +static void test_per_thread_id_even() { NodeID id = pinpoint_get_per_thread_id(); EXPECT_EQ(id, 0); for (int i = 1; i < 10000; i++) { - int index = (int) id; + int index = (int)id; index += 2; - id = (NodeID) index; + id = (NodeID)index; pinpoint_update_per_thread_id(id); std::this_thread::sleep_for(std::chrono::microseconds(1)); @@ -134,16 +148,14 @@ static void test_per_thread_id_even() } } -TEST(common, per_threadid) -{ +TEST(common, per_threadid) { std::thread f1(test_per_thread_id_odd); std::thread f2(test_per_thread_id_even); f1.join(); f2.join(); } -TEST(common, force_end_trace) -{ +TEST(common, force_end_trace) { NodeID id = pinpoint_start_trace(E_ROOT_NODE); id = pinpoint_end_trace(id); id = pinpoint_start_trace(id); @@ -166,9 +178,10 @@ TEST(common, force_end_trace) TEST(common, version) { EXPECT_STREQ(pinpoint_agent_version(), AGENT_VERSION); } //./bin/unittest --gtest_filter=common.id_1 -TEST(common, id_1) -{ +TEST(common, id_1) { NodeID id = pinpoint_start_trace(E_ROOT_NODE); - for (int i = 0; i < 1280; i++) { id = pinpoint_start_trace(id); } + for (int i = 0; i < 1280; i++) { + id = pinpoint_start_trace(id); + } pinpoint_set_context_long(id, "1024", 1024); } diff --git a/plugins/PY/pinpointPy/__init__.py b/plugins/PY/pinpointPy/__init__.py index 067812dc7..426ba4584 100644 --- a/plugins/PY/pinpointPy/__init__.py +++ b/plugins/PY/pinpointPy/__init__.py @@ -17,7 +17,7 @@ # !/usr/bin/env python # -*- coding: UTF-8 -*- # Created by eeliu at 2/4/21 -__version__ = "1.0.15" +__version__ = "1.0.16" from .libs import monkey_patch_for_pinpoint from .pinpoint import set_agent, app_id, app_name, gen_tid diff --git a/setup_pypi.py b/setup_pypi.py index 00000fd93..0437364e8 100644 --- a/setup_pypi.py +++ b/setup_pypi.py @@ -67,7 +67,7 @@ def run(self): setup(name='pinpointPy', - version="1.0.15",# don't forget update __version__ in pinpointPy/__init__.py + version="1.0.16",# don't forget update __version__ in pinpointPy/__init__.py author="cd_pinpoint members", author_email='dl_cd_pinpoint@navercorp.com', license='Apache License 2.0', diff --git a/src/CPP/test_pinpoint.c b/src/CPP/test_pinpoint.c index bd5b330ed..d568a119f 100644 --- a/src/CPP/test_pinpoint.c +++ b/src/CPP/test_pinpoint.c @@ -23,115 +23,105 @@ #include int32_t id = 0; -const char *app_id = "c_test_app"; -const char *app_name = "c_test_name"; +const char* app_id = "c_test_app"; +const char* app_name = "c_test_name"; -char *get_sid() -{ - char *psid = (char *)malloc(16); - sprintf(psid, "%ld", rand() % 100000000l); - return psid; +char* get_sid() { + char* psid = (char*)malloc(16); + sprintf(psid, "%ld", rand() % 100000000l); + return psid; } -char *get_tid() -{ - char *p_tid = (char *)malloc(64); - sprintf(p_tid, "%s^%ld^%ld", app_id, pinpoint_start_time(), generate_unique_id()); - return p_tid; +char* get_tid() { + char* p_tid = (char*)malloc(64); + sprintf(p_tid, "%s^%ld^%ld", app_id, pinpoint_start_time(), generate_unique_id()); + return p_tid; } -void random_sleep() -{ - // int32_t delay = rand()%10; - // usleep(delay* 1000); - // sleep(3); +void random_sleep() { + // int32_t delay = rand()%10; + // usleep(delay* 1000); + // sleep(3); } -void test_httpclient() -{ - id = pinpoint_start_trace(id); - pinpoint_add_clue(id, PP_INTERCEPTOR_NAME, "httpclient", E_LOC_CURRENT); - pinpoint_add_clue(id, PP_DESTINATION, "www.pinpoint-wonderful.com", E_LOC_CURRENT); - pinpoint_add_clue(id, PP_SERVER_TYPE, PP_C_CPP_REMOTE_METHOD, E_LOC_CURRENT); - char *sid = get_sid(); - pinpoint_add_clue(id, PP_NEXT_SPAN_ID, sid, E_LOC_CURRENT); - free(sid); - pinpoint_add_clues(id, PP_HTTP_URL, "/support/c-cpp-php-python", E_LOC_CURRENT); - pinpoint_add_clue(id, PP_ADD_EXCEPTION, "test this exception", E_LOC_CURRENT); - pinpoint_add_clues(id, PP_HTTP_STATUS_CODE, "300", E_LOC_CURRENT); +void test_httpclient() { + id = pinpoint_start_trace(id); + pinpoint_add_clue(id, PP_INTERCEPTOR_NAME, "httpclient", E_LOC_CURRENT); + pinpoint_add_clue(id, PP_DESTINATION, "www.pinpoint-wonderful.com", E_LOC_CURRENT); + pinpoint_add_clue(id, PP_SERVER_TYPE, PP_C_CPP_REMOTE_METHOD, E_LOC_CURRENT); + char* sid = get_sid(); + pinpoint_add_clue(id, PP_NEXT_SPAN_ID, sid, E_LOC_CURRENT); + free(sid); + pinpoint_add_clues(id, PP_HTTP_URL, "/support/c-cpp-php-python", E_LOC_CURRENT); + pinpoint_add_clue(id, PP_ADD_EXCEPTION, "test this exception", E_LOC_CURRENT); + pinpoint_add_clues(id, PP_HTTP_STATUS_CODE, "300", E_LOC_CURRENT); - random_sleep(); + random_sleep(); - id = pinpoint_end_trace(id); + id = pinpoint_end_trace(id); } -void test_mysql() -{ - id = pinpoint_start_trace(id); - pinpoint_add_clue(id, PP_INTERCEPTOR_NAME, "mysql::excute", E_LOC_CURRENT); - pinpoint_add_clue(id, PP_SERVER_TYPE, PP_MYSQL, E_LOC_CURRENT); - pinpoint_add_clue(id, PP_SQL_FORMAT, "select 1*3;", E_LOC_CURRENT); - pinpoint_add_clue(id, PP_DESTINATION, "localhost:3307", E_LOC_CURRENT); - random_sleep(); - id = pinpoint_end_trace(id); +void test_mysql() { + id = pinpoint_start_trace(id); + pinpoint_add_clue(id, PP_INTERCEPTOR_NAME, "mysql::excute", E_LOC_CURRENT); + pinpoint_add_clue(id, PP_SERVER_TYPE, PP_MYSQL, E_LOC_CURRENT); + pinpoint_add_clue(id, PP_SQL_FORMAT, "select 1*3;", E_LOC_CURRENT); + pinpoint_add_clue(id, PP_DESTINATION, "localhost:3307", E_LOC_CURRENT); + random_sleep(); + id = pinpoint_end_trace(id); } -void test_func() -{ - id = pinpoint_start_trace(id); - pinpoint_add_clue(id, PP_INTERCEPTOR_NAME, "test_func", E_LOC_CURRENT); - pinpoint_add_clue(id, PP_SERVER_TYPE, PP_C_CPP_METHOD, E_LOC_CURRENT); - pinpoint_add_clues(id, PP_PHP_ARGS, "I'm the parameters", E_LOC_CURRENT); - random_sleep(); - id = pinpoint_end_trace(id); +void test_func() { + id = pinpoint_start_trace(id); + pinpoint_add_clue(id, PP_INTERCEPTOR_NAME, "test_func", E_LOC_CURRENT); + pinpoint_add_clue(id, PP_SERVER_TYPE, PP_C_CPP_METHOD, E_LOC_CURRENT); + pinpoint_add_clues(id, PP_PHP_ARGS, "I'm the parameters", E_LOC_CURRENT); + random_sleep(); + id = pinpoint_end_trace(id); } -void test_req() -{ - id = pinpoint_start_trace(id); - pinpoint_add_clue(id, PP_REQ_URI, "test_url", E_LOC_CURRENT); - pinpoint_add_clue(id, PP_REQ_CLIENT, "127.0.0.1", E_LOC_CURRENT); - pinpoint_add_clue(id, PP_REQ_SERVER, "HTTP_HOST", E_LOC_CURRENT); - pinpoint_add_clue(id, PP_SERVER_TYPE, PP_C_CPP, E_LOC_CURRENT); - pinpoint_add_clue(id, PP_INTERCEPTOR_NAME, "C_CPP Request", E_LOC_CURRENT); - pinpoint_add_clue(id, PP_APP_NAME, app_name, E_LOC_CURRENT); - pinpoint_add_clue(id, PP_APP_ID, app_id, E_LOC_CURRENT); +void test_req() { + id = pinpoint_start_trace(id); + pinpoint_add_clue(id, PP_REQ_URI, "test_url", E_LOC_CURRENT); + pinpoint_add_clue(id, PP_REQ_CLIENT, "127.0.0.1", E_LOC_CURRENT); + pinpoint_add_clue(id, PP_REQ_SERVER, "HTTP_HOST", E_LOC_CURRENT); + pinpoint_add_clue(id, PP_SERVER_TYPE, PP_C_CPP, E_LOC_CURRENT); + pinpoint_add_clue(id, PP_INTERCEPTOR_NAME, "C_CPP Request", E_LOC_CURRENT); + pinpoint_add_clue(id, PP_APP_NAME, app_name, E_LOC_CURRENT); + pinpoint_add_clue(id, PP_APP_ID, app_id, E_LOC_CURRENT); - random_sleep(); + random_sleep(); - test_func(); - test_mysql(); - test_httpclient(); - char *tid = get_tid(); - char *sid = get_sid(); - pinpoint_add_clue(id, PP_TRANSCATION_ID, tid, E_LOC_CURRENT); - pinpoint_add_clue(id, PP_SPAN_ID, sid, E_LOC_CURRENT); - pinpoint_add_clues(id, PP_HTTP_STATUS_CODE, "200", E_LOC_CURRENT); - id = pinpoint_end_trace(id); - check_tracelimit(-1); - free(tid); - free(sid); + test_func(); + test_mysql(); + test_httpclient(); + char* tid = get_tid(); + char* sid = get_sid(); + pinpoint_add_clue(id, PP_TRANSCATION_ID, tid, E_LOC_CURRENT); + pinpoint_add_clue(id, PP_SPAN_ID, sid, E_LOC_CURRENT); + pinpoint_add_clues(id, PP_HTTP_STATUS_CODE, "200", E_LOC_CURRENT); + id = pinpoint_end_trace(id); + check_tracelimit(-1); + free(tid); + free(sid); } -int main(int argc, char const *argv[]) -{ - PPAgentT agent_info = { - "tcp:127.0.0.1:9999", 1000, -1, 1700, 0, NULL, NULL, NULL}; - global_agent_info = agent_info; - char appid[] = "appid-c"; - char appname[] = "appid-c"; - app_id = getenv("APPID"); - app_name = getenv("APPNAME"); - if (app_id == NULL || app_name == NULL) - { - app_id = appid; - app_name = appname; - } - srand(time(NULL)); - int i = 0; - for (; i < 100000; i++) - { - test_req(); - } - return 0; +int main(int argc, char const* argv[]) { + PPAgentT agent_info = {"tcp:127.0.0.1:9999", 1000, -1, 1700, 1, NULL, NULL, NULL}; + global_agent_info = agent_info; + char appid[] = "cd.dev.test"; + char appname[] = "cd.dev.test"; + app_id = getenv("APPID"); + app_name = getenv("APPNAME"); + if (app_id == NULL || app_name == NULL) { + app_id = appid; + app_name = appname; + } + srand(time(NULL)); + int i = 0; + for (; i < 10; i++) { + test_req(); + sleep(1); + } + return 0; } diff --git a/src/CPP/test_pinpoint.cpp b/src/CPP/test_pinpoint.cpp index e03a059a6..5d0bff812 100644 --- a/src/CPP/test_pinpoint.cpp +++ b/src/CPP/test_pinpoint.cpp @@ -23,108 +23,96 @@ #include thread_local NodeID id = E_ROOT_NODE; -const char *app_id = "cpp_test_app"; -const char *app_name = "cpp_test_name"; +const char* app_id = "cd.dev.test.cpp"; +const char* app_name = "cd.dev.test.cpp"; -std::string get_sid() -{ - return std::to_string(rand() % 100000000l); -} +std::string get_sid() { return std::to_string(rand() % 100000000l); } -std::string get_tid() -{ - std::string sid = ""; - return sid + app_id + "^" + std::to_string(pinpoint_start_time()) + "^" + std::to_string(generate_unique_id()); +std::string get_tid() { + std::string sid = ""; + return sid + app_id + "^" + std::to_string(pinpoint_start_time()) + "^" + + std::to_string(generate_unique_id()); } -void random_sleep() -{ - int32_t delay = rand() % 10; - usleep(delay * 1000); +void random_sleep() { + int32_t delay = rand() % 10; + usleep(delay * 1000); } -void test_httpclient() -{ - id = pinpoint_start_trace(id); - pinpoint_add_clue(id, PP_INTERCEPTOR_NAME, "httpclient", E_LOC_CURRENT); - pinpoint_add_clue(id, PP_DESTINATION, "www.pinpoint-wonderful.com", E_LOC_CURRENT); - pinpoint_add_clue(id, PP_SERVER_TYPE, PP_C_CPP_REMOTE_METHOD, E_LOC_CURRENT); - pinpoint_add_clue(id, PP_NEXT_SPAN_ID, get_sid().c_str(), E_LOC_CURRENT); - pinpoint_add_clues(id, PP_HTTP_URL, "/support/c-cpp-php-python", E_LOC_CURRENT); - pinpoint_add_clue(id, PP_ADD_EXCEPTION, "test this exception", E_LOC_CURRENT); - pinpoint_add_clues(id, PP_HTTP_STATUS_CODE, "300", E_LOC_CURRENT); +void test_httpclient() { + id = pinpoint_start_trace(id); + pinpoint_add_clue(id, PP_INTERCEPTOR_NAME, "httpclient", E_LOC_CURRENT); + pinpoint_add_clue(id, PP_DESTINATION, "www.pinpoint-wonderful.com", E_LOC_CURRENT); + pinpoint_add_clue(id, PP_SERVER_TYPE, PP_C_CPP_REMOTE_METHOD, E_LOC_CURRENT); + pinpoint_add_clue(id, PP_NEXT_SPAN_ID, get_sid().c_str(), E_LOC_CURRENT); + pinpoint_add_clues(id, PP_HTTP_URL, "/support/c-cpp-php-python", E_LOC_CURRENT); + pinpoint_add_clue(id, PP_ADD_EXCEPTION, "test this exception", E_LOC_CURRENT); + pinpoint_add_clues(id, PP_HTTP_STATUS_CODE, "300", E_LOC_CURRENT); - random_sleep(); + random_sleep(); - id = pinpoint_end_trace(id); + id = pinpoint_end_trace(id); } -void test_mysql() -{ - id = pinpoint_start_trace(id); - pinpoint_add_clue(id, PP_INTERCEPTOR_NAME, "mysql::excute", E_LOC_CURRENT); - pinpoint_add_clue(id, PP_SERVER_TYPE, PP_MYSQL, E_LOC_CURRENT); - pinpoint_add_clue(id, PP_SQL_FORMAT, "select 1*3;", E_LOC_CURRENT); - pinpoint_add_clue(id, PP_DESTINATION, "localhost:3307", E_LOC_CURRENT); - random_sleep(); - id = pinpoint_end_trace(id); +void test_mysql() { + id = pinpoint_start_trace(id); + pinpoint_add_clue(id, PP_INTERCEPTOR_NAME, "mysql::excute", E_LOC_CURRENT); + pinpoint_add_clue(id, PP_SERVER_TYPE, PP_MYSQL, E_LOC_CURRENT); + pinpoint_add_clue(id, PP_SQL_FORMAT, "select 1*3;", E_LOC_CURRENT); + pinpoint_add_clue(id, PP_DESTINATION, "localhost:3307", E_LOC_CURRENT); + random_sleep(); + id = pinpoint_end_trace(id); } -void test_func() -{ - id = pinpoint_start_trace(id); - pinpoint_add_clue(id, PP_INTERCEPTOR_NAME, "test_func", E_LOC_CURRENT); - pinpoint_add_clue(id, PP_SERVER_TYPE, PP_C_CPP_METHOD, E_LOC_CURRENT); - pinpoint_add_clues(id, PP_PHP_ARGS, "I'm the parameters", E_LOC_CURRENT); - random_sleep(); - id = pinpoint_end_trace(id); +void test_func() { + id = pinpoint_start_trace(id); + pinpoint_add_clue(id, PP_INTERCEPTOR_NAME, "test_func", E_LOC_CURRENT); + pinpoint_add_clue(id, PP_SERVER_TYPE, PP_C_CPP_METHOD, E_LOC_CURRENT); + pinpoint_add_clues(id, PP_PHP_ARGS, "I'm the parameters", E_LOC_CURRENT); + random_sleep(); + id = pinpoint_end_trace(id); } -void test_kafka() -{ - id = pinpoint_start_trace(id); - pinpoint_add_clue(id, "name", "kafka", E_LOC_CURRENT); - pinpoint_add_clue(id, "stp", PP_KAFKA, E_LOC_CURRENT); - pinpoint_add_clues(id, "140", "xxxxx", E_LOC_CURRENT); - pinpoint_add_clue(id, "dst", "xxxx", E_LOC_CURRENT); - id = pinpoint_end_trace(id); +void test_kafka() { + id = pinpoint_start_trace(id); + pinpoint_add_clue(id, "name", "kafka", E_LOC_CURRENT); + pinpoint_add_clue(id, "stp", PP_KAFKA, E_LOC_CURRENT); + pinpoint_add_clues(id, "140", "xxxxx", E_LOC_CURRENT); + pinpoint_add_clue(id, "dst", "xxxx", E_LOC_CURRENT); + id = pinpoint_end_trace(id); } -void test_req() -{ - id = pinpoint_start_trace(id); - pinpoint_add_clue(id, PP_REQ_URI, "test_url", E_LOC_CURRENT); - pinpoint_add_clue(id, PP_REQ_CLIENT, "127.0.0.1", E_LOC_CURRENT); - pinpoint_add_clue(id, PP_REQ_SERVER, "HTTP_HOST", E_LOC_CURRENT); - pinpoint_add_clue(id, PP_SERVER_TYPE, PP_C_CPP, E_LOC_CURRENT); - pinpoint_add_clue(id, PP_INTERCEPTOR_NAME, "C_CPP Request", E_LOC_CURRENT); - pinpoint_add_clue(id, PP_APP_NAME, "cpp_app", E_LOC_CURRENT); - pinpoint_add_clue(id, PP_APP_ID, "CPP_APP", E_LOC_CURRENT); +void test_req() { + id = pinpoint_start_trace(id); + pinpoint_add_clue(id, PP_REQ_URI, "test_url", E_LOC_CURRENT); + pinpoint_add_clue(id, PP_REQ_CLIENT, "127.0.0.1", E_LOC_CURRENT); + pinpoint_add_clue(id, PP_REQ_SERVER, "HTTP_HOST", E_LOC_CURRENT); + pinpoint_add_clue(id, PP_SERVER_TYPE, PP_C_CPP, E_LOC_CURRENT); + pinpoint_add_clue(id, PP_INTERCEPTOR_NAME, "C_CPP Request", E_LOC_CURRENT); + pinpoint_add_clue(id, PP_APP_NAME, "cpp_app", E_LOC_CURRENT); + pinpoint_add_clue(id, PP_APP_ID, "CPP_APP", E_LOC_CURRENT); - random_sleep(); + random_sleep(); - test_func(); - test_mysql(); - test_httpclient(); - test_kafka(); - pinpoint_add_clue(id, PP_TRANSCATION_ID, get_tid().c_str(), E_LOC_CURRENT); - pinpoint_add_clue(id, PP_SPAN_ID, get_sid().c_str(), E_LOC_CURRENT); - pinpoint_add_clues(id, PP_HTTP_STATUS_CODE, "200", E_LOC_CURRENT); - catch_error(id, "msg", __FILE__, 100); - id = pinpoint_end_trace(id); + test_func(); + test_mysql(); + test_httpclient(); + test_kafka(); + pinpoint_add_clue(id, PP_TRANSCATION_ID, get_tid().c_str(), E_LOC_CURRENT); + pinpoint_add_clue(id, PP_SPAN_ID, get_sid().c_str(), E_LOC_CURRENT); + pinpoint_add_clues(id, PP_HTTP_STATUS_CODE, "200", E_LOC_CURRENT); + catch_error(id, "msg", __FILE__, 100); + id = pinpoint_end_trace(id); } -int main(int argc, char const *argv[]) -{ - PPAgentT agent_info = { - "tcp:127.0.0.1:9999", 1000, -1, 1700, 0, NULL, NULL, NULL}; - global_agent_info = agent_info; - srand(time(nullptr)); - int i = 0; - for (; i < 3; i++) - { - test_req(); - sleep(1); - } - return 0; +int main(int argc, char const* argv[]) { + PPAgentT agent_info = {"tcp:127.0.0.1:9999", 1000, -1, 1700, 0, NULL, NULL, NULL}; + global_agent_info = agent_info; + srand(time(nullptr)); + int i = 0; + for (; i < 3; i++) { + test_req(); + sleep(1); + } + return 0; } diff --git a/src/PHP/tests/add_root_trace.phpt b/src/PHP/tests/add_root_trace.phpt index 9a4eeb054..cf6975ea4 100644 --- a/src/PHP/tests/add_root_trace.phpt +++ b/src/PHP/tests/add_root_trace.phpt @@ -21,17 +21,17 @@ $id = pinpoint_end_trace($id); $id = pinpoint_end_trace($id); $id = pinpoint_end_trace($id); --EXPECTF-- -[pinpoint] [%d] [%d]#0 pinpoint_start child #128 -[pinpoint] [%d] [%d]#128 add clue key:name value:Foo -[pinpoint] [%d] [%d]#128 pinpoint_start child #127 -[pinpoint] [%d] [%d]#127 add clues:global:global_value -[pinpoint] [%d] [%d]#127 add clue key:global value:global_value -[pinpoint] [%d] [%d]#127 add clues:name:Foo1 -[pinpoint] [%d] [%d]#127 pinpoint_start child #126 -[pinpoint] [%d] [%d]#126 add clue key:name value:Foo2 -[pinpoint] [%d] [%d]#126 pinpoint_end_trace Done! -[pinpoint] [%d] [%d]#127 pinpoint_end_trace Done! -[pinpoint] [%d] [%d]this span:({"E":%d,"FT":1500,"S":%d,"calls":[{"E":%d,"S":%d,"calls":[{"E":%d,"S":%d,"name":"Foo2"}],"clues":["name:Foo1"]}],"clues":["global:global_value"],"global":"global_value","name":"Foo"}) +[pinpoint] [%d] [%d] [0] pinpoint_start child [128] +[pinpoint] [%d] [%d] [128] add clue key:name value:Foo +[pinpoint] [%d] [%d] [128] pinpoint_start child [127] +[pinpoint] [%d] [%d] [127] add clues:global:global_value +[pinpoint] [%d] [%d] [127] add clue key:global value:global_value +[pinpoint] [%d] [%d] [127] add clues:name:Foo1 +[pinpoint] [%d] [%d] [127] pinpoint_start child [126] +[pinpoint] [%d] [%d] [126] add clue key:name value:Foo2 +[pinpoint] [%d] [%d] [126] pinpoint_end_trace Done! +[pinpoint] [%d] [%d] [127] pinpoint_end_trace Done! +[pinpoint] [%d] [%d]this span:({":E":%d,":FT":1500,":S":%d,"calls":[{":E":%d,":S":%d,"calls":[{":E":0,":S":%d,"name":"Foo2"}],"clues":["name:Foo1"]}],"clues":["global:global_value"],"global":"global_value","name":"Foo"}) [pinpoint] [%d] [%d]agent try to connect:(unix:/unexist_file.sock) [pinpoint] [%d] [%d]connect:(/unexist_file.sock) failed as (No such file or directory) -[pinpoint] [%d] [%d]#128 pinpoint_end_trace Done! \ No newline at end of file +[pinpoint] [%d] [%d] [128] pinpoint_end_trace Done! \ No newline at end of file diff --git a/src/PHP/tests/drop_trace_test.phpt b/src/PHP/tests/drop_trace_test.phpt index d89158a9c..fce51ee2c 100644 --- a/src/PHP/tests/drop_trace_test.phpt +++ b/src/PHP/tests/drop_trace_test.phpt @@ -15,9 +15,9 @@ pinpoint_add_clue("args",'a,$b'); pinpoint_add_clue("ret",'a,$b'); pinpoint_end_trace(); --EXPECTF-- -[pinpoint] [%d] [%d]#0 pinpoint_start child #128 -[pinpoint] [%d] [%d]change current#128 status, before:2,now:4 -[pinpoint] [%d] [%d]#128 add clue key:args value:a,$b -[pinpoint] [%d] [%d]#128 add clue key:ret value:a,$b -[pinpoint] [%d] [%d]current#128 span dropped,due to TRACE_BLOCK -[pinpoint] [%d] [%d]#128 pinpoint_end_trace Done! \ No newline at end of file +[pinpoint] [%d] [%d] [0] pinpoint_start child [128] +[pinpoint] [%d] [%d]change current [128] status, before:2,now:4 +[pinpoint] [%d] [%d] [128] add clue key:args value:a,$b +[pinpoint] [%d] [%d] [128] add clue key:ret value:a,$b +[pinpoint] [%d] [%d]current [128] span dropped,due to TRACE_BLOCK +[pinpoint] [%d] [%d] [128] pinpoint_end_trace Done! \ No newline at end of file diff --git a/src/PHP/tests/mark_as_error.phpt b/src/PHP/tests/mark_as_error.phpt index c58e28d2a..de202333f 100644 --- a/src/PHP/tests/mark_as_error.phpt +++ b/src/PHP/tests/mark_as_error.phpt @@ -17,11 +17,11 @@ pinpoint_add_clue("ret",'a,$b'); pinpoint_mark_as_error("message you cared","filename you cared",1023); echo pinpoint_end_trace()."\n"; --EXPECTF-- -[pinpoint] [%d] [%d]#0 pinpoint_start child #128 -[pinpoint] [%d] [%d]#128 add clue key:args value:a,$b -[pinpoint] [%d] [%d]#128 add clue key:ret value:a,$b -[pinpoint] [%d] [%d]this span:({"E":%d,"ERR":{"file":"filename you cared","line":1023,"msg":"message you cared"},"FT":%d,"S":%d,"args":"a,$b","ret":"a,$b"}) +[pinpoint] [%d] [%d] [0] pinpoint_start child [128] +[pinpoint] [%d] [%d] [128] add clue key:args value:a,$b +[pinpoint] [%d] [%d] [128] add clue key:ret value:a,$b +[pinpoint] [%d] [%d]this span:({":E":%d,":FT":1500,":S":%d,"ERR":{"file":"filename you cared","line":1023,"msg":"message you cared"},"args":"a,$b","ret":"a,$b"}) [pinpoint] [%d] [%d]agent try to connect:(unix:/unexist_file.sock) [pinpoint] [%d] [%d]connect:(/unexist_file.sock) failed as (No such file or directory) -[pinpoint] [%d] [%d]#128 pinpoint_end_trace Done! +[pinpoint] [%d] [%d] [128] pinpoint_end_trace Done! 0 \ No newline at end of file diff --git a/src/PHP/tests/node_test.phpt b/src/PHP/tests/node_test.phpt index e281c87d7..e76e43fdf 100644 --- a/src/PHP/tests/node_test.phpt +++ b/src/PHP/tests/node_test.phpt @@ -25,11 +25,11 @@ pinpoint_get_context('b',$unexist_node); pinpoint_end_trace($unexist_node); --EXPECTF-- -[pinpoint] [%d] [%d] start_trace#1024 failed with #1024 is not alive -[pinpoint] [%d] [%d] pinpoint_add_clue#1024 failed. Reason: #1024 is not alive,parameters:adf:fdfd -[pinpoint] [%d] [%d] pinpoint_add_clue#1024 failed. Reason: #1024 is not alive,parameters:adf:fdfd -[pinpoint] [%d] [%d] pinpoint_set_context_key#1024 failed with out_of_range. #1024 is not alive,parameters:b:b -[pinpoint] [%d] [%d] pinpoint_add_clues#1024 failed.Reason #1024 is not alive,parameters:32:fdfd -[pinpoint] [%d] [%d] pinpoint_add_clues#1024 failed.Reason #1024 is not alive,parameters:32:fdfd -[pinpoint] [%d] [%d] pinpoint_get_context_key#1024 failed with #1024 is not alive, parameters:b +[pinpoint] [%d] [%d] start_trace [1024] failed with #1024 is not alive +[pinpoint] [%d] [%d] pinpoint_add_clue [1024] failed. Reason: #1024 is not alive,parameters:adf:fdfd +[pinpoint] [%d] [%d] pinpoint_add_clue [1024] failed. Reason: #1024 is not alive,parameters:adf:fdfd +[pinpoint] [%d] [%d] pinpoint_set_context_key [1024] failed with out_of_range. #1024 is not alive,parameters:b:b +[pinpoint] [%d] [%d] pinpoint_add_clues [1024] failed. Reason #1024 is not alive,parameters:32:fdfd +[pinpoint] [%d] [%d] pinpoint_add_clues [1024] failed. Reason #1024 is not alive,parameters:32:fdfd +[pinpoint] [%d] [%d] pinpoint_get_context_key [1024] failed with #1024 is not alive, parameters:b [pinpoint] [%d] [%d]end_trace 1024 out_of_range exception: #1024 is not alive \ No newline at end of file diff --git a/src/PHP/tests/stack_fetal_error.phpt b/src/PHP/tests/stack_fetal_error.phpt index 09f20a63a..bca212b6c 100644 --- a/src/PHP/tests/stack_fetal_error.phpt +++ b/src/PHP/tests/stack_fetal_error.phpt @@ -50,18 +50,18 @@ try{ pinpoint_start_trace(); --EXPECTF-- -[pinpoint] [%d] [%d]#0 pinpoint_start child #128 -[pinpoint] [%d] [%d]#128 pinpoint_start child #127 -[pinpoint] [%d] [%d]#127 add clue key:name value:Foo +[pinpoint] [%d] [%d] [0] pinpoint_start child [128] +[pinpoint] [%d] [%d] [128] pinpoint_start child [127] +[pinpoint] [%d] [%d] [127] add clue key:name value:Foo [pinpoint] [%d] [%d]apm_error_cb called -Fatal error: Uncaught Exception: I am testting in %s:27 +Fatal error: Uncaught Exception: I am testting in /workspaces/pinpoint-c-agent/src/PHP/tests/stack_fetal_error.php:27 Stack trace: -#0 %s(34): Test() +#0 /workspaces/pinpoint-c-agent/src/PHP/tests/stack_fetal_error.php(34): Test() #1 {main} - thrown in %s on line 27 -[pinpoint] [%d] [%d]#127 pinpoint_end_trace Done! -[pinpoint] [%d] [%d]this span:({"E":%d,"ERR":{"file":"%s","line":27,"msg":"Uncaught Exception: I am testting in %s:27\nStack trace:\n#0 %s(34): Test()\n#1 {main}\n thrown"},"FT":1500,"S":%d,"calls":[{"E":%d,"S":%d,"name":"Foo"}]}) + thrown in /workspaces/pinpoint-c-agent/src/PHP/tests/stack_fetal_error.php on line 27 +[pinpoint] [%d] [%d] [127] pinpoint_end_trace Done! +[pinpoint] [%d] [%d]this span:({":E":%d,":FT":1500,":S":%d,"ERR":{"file":"/workspaces/pinpoint-c-agent/src/PHP/tests/stack_fetal_error.php","line":27,"msg":"Uncaught Exception: I am testting in /workspaces/pinpoint-c-agent/src/PHP/tests/stack_fetal_error.php:27\nStack trace:\n#0 /workspaces/pinpoint-c-agent/src/PHP/tests/stack_fetal_error.php(34): Test()\n#1 {main}\n thrown"},"calls":[{":E":%d,":S":%d,"name":"Foo"}]}) [pinpoint] [%d] [%d]agent try to connect:(unix:/unexist_file.sock) [pinpoint] [%d] [%d]connect:(/unexist_file.sock) failed as (No such file or directory) -[pinpoint] [%d] [%d]#128 pinpoint_end_trace Done! \ No newline at end of file +[pinpoint] [%d] [%d] [128] pinpoint_end_trace Done! \ No newline at end of file diff --git a/src/PHP/tests/trace_api_context.phpt b/src/PHP/tests/trace_api_context.phpt index efd1aed35..969852fbc 100644 --- a/src/PHP/tests/trace_api_context.phpt +++ b/src/PHP/tests/trace_api_context.phpt @@ -43,24 +43,24 @@ pinpoint_end_trace($id); ?> --EXPECTF-- -[pinpoint] [%d] [%d]#0 pinpoint_start child #128 +[pinpoint] [%d] [%d] [0] pinpoint_start child [128] string(1) "a" string(1) "b" string(1) "c" -[pinpoint] [%d] [%d] pinpoint_get_context_key#128 failed with map::at, parameters:not exist +[pinpoint] [%d] [%d] pinpoint_get_context_key [128] failed with map::at, parameters:not exist bool(false) -[pinpoint] [%d] [%d]this span:({"E":%d,"FT":1500,"S":%d}) +[pinpoint] [%d] [%d]this span:({":E":%d,":FT":1500,":S":%d}) [pinpoint] [%d] [%d]agent try to connect:(unix:/unexist_file.sock) [pinpoint] [%d] [%d]connect:(/unexist_file.sock) failed as (No such file or directory) -[pinpoint] [%d] [%d]#128 pinpoint_end_trace Done! -[pinpoint] [%d] [%d]#0 pinpoint_start child #128 -[pinpoint] [%d] [%d]#128 pinpoint_start child #127 +[pinpoint] [%d] [%d] [128] pinpoint_end_trace Done! +[pinpoint] [%d] [%d] [0] pinpoint_start child [128] +[pinpoint] [%d] [%d] [128] pinpoint_start child [127] string(1) "c" string(1) "b" string(1) "a" -[pinpoint] [%d] [%d] pinpoint_get_context_key#127 failed with map::at, parameters:not exist +[pinpoint] [%d] [%d] pinpoint_get_context_key [127] failed with map::at, parameters:not exist bool(false) -[pinpoint] [%d] [%d]#127 pinpoint_end_trace Done! -[pinpoint] [%d] [%d]this span:({"E":%d,"FT":1500,"S":%d,"calls":[{"E":%d,"S":%d}]}) +[pinpoint] [%d] [%d] [127] pinpoint_end_trace Done! +[pinpoint] [%d] [%d]this span:({":E":%d,":FT":1500,":S":%d,"calls":[{":E":%d,":S":%d}]}) [pinpoint] [%d] [%d]agent try to connect:(unix:/unexist_file.sock) -[pinpoint] [%d] [%d]#128 pinpoint_end_trace Done! \ No newline at end of file +[pinpoint] [%d] [%d] [128] pinpoint_end_trace Done! \ No newline at end of file diff --git a/src/PHP/tests/trace_api_context_tcp.phpt b/src/PHP/tests/trace_api_context_tcp.phpt index b478c83a0..bfb35ab61 100644 --- a/src/PHP/tests/trace_api_context_tcp.phpt +++ b/src/PHP/tests/trace_api_context_tcp.phpt @@ -43,25 +43,25 @@ pinpoint_end_trace($id); ?> --EXPECTF-- -[pinpoint] [%d] [%d]#0 pinpoint_start child #128 +[pinpoint] [%d] [%d] [0] pinpoint_start child [128] string(1) "a" string(1) "b" string(1) "c" -[pinpoint] [%d] [%d] pinpoint_get_context_key#128 failed with map::at, parameters:not exist +[pinpoint] [%d] [%d] pinpoint_get_context_key [128] failed with map::at, parameters:not exist bool(false) -[pinpoint] [%d] [%d]this span:({"E":%d,"FT":1500,"S":%d}) +[pinpoint] [%d] [%d]this span:({":E":%d,":FT":1500,":S":%d}) [pinpoint] [%d] [%d]agent try to connect:(tcp:127.0.0.1:9999) -[pinpoint] [%d] [%d]_do_write_data@%d send data error:(Connection refused) fd:(%d) -[pinpoint] [%d] [%d]reset peer:%d -[pinpoint] [%d] [%d]#128 pinpoint_end_trace Done! -[pinpoint] [%d] [%d]#0 pinpoint_start child #128 -[pinpoint] [%d] [%d]#128 pinpoint_start child #127 +[pinpoint] [%d] [%d]_do_write_data@198 send data error:(Connection refused) fd:(3) +[pinpoint] [%d] [%d]reset peer:3 +[pinpoint] [%d] [%d] [128] pinpoint_end_trace Done! +[pinpoint] [%d] [%d] [0] pinpoint_start child [128] +[pinpoint] [%d] [%d] [128] pinpoint_start child [127] string(1) "c" string(1) "b" string(1) "a" -[pinpoint] [%d] [%d] pinpoint_get_context_key#127 failed with map::at, parameters:not exist +[pinpoint] [%d] [%d] pinpoint_get_context_key [127] failed with map::at, parameters:not exist bool(false) -[pinpoint] [%d] [%d]#127 pinpoint_end_trace Done! -[pinpoint] [%d] [%d]this span:({"E":%d,"FT":1500,"S":%d,"calls":[{"E":%d,"S":%d}]}) +[pinpoint] [%d] [%d] [127] pinpoint_end_trace Done! +[pinpoint] [%d] [%d]this span:({":E":%d,":FT":1500,":S":%d,"calls":[{":E":%d,":S":%d}]}) [pinpoint] [%d] [%d]agent try to connect:(tcp:127.0.0.1:9999) -[pinpoint] [%d] [%d]#128 pinpoint_end_trace Done! \ No newline at end of file +[pinpoint] [%d] [%d] [128] pinpoint_end_trace Done! \ No newline at end of file diff --git a/src/PHP/tests/trace_api_test.phpt b/src/PHP/tests/trace_api_test.phpt index 273837000..d17404e33 100644 --- a/src/PHP/tests/trace_api_test.phpt +++ b/src/PHP/tests/trace_api_test.phpt @@ -53,83 +53,83 @@ echo pinpoint_end_trace()."\n"; ?> --EXPECTF-- -[pinpoint] [%d] [%d]#0 pinpoint_start child #128 +[pinpoint] [%d] [%d] [0] pinpoint_start child [128] 128 -[pinpoint] [%d] [%d]#128 add clue key:name value:ouput_234 -[pinpoint] [%d] [%d]#128 pinpoint_start child #127 +[pinpoint] [%d] [%d] [128] add clue key:name value:ouput_234 +[pinpoint] [%d] [%d] [128] pinpoint_start child [127] 127 -[pinpoint] [%d] [%d]#127 add clue key:name value:Foo -[pinpoint] [%d] [%d]#127 add clues:1:234,3432 -[pinpoint] [%d] [%d]#127 add clues:2:234 -[pinpoint] [%d] [%d]#127 pinpoint_end_trace Done! +[pinpoint] [%d] [%d] [127] add clue key:name value:Foo +[pinpoint] [%d] [%d] [127] add clues:1:234,3432 +[pinpoint] [%d] [%d] [127] add clues:2:234 +[pinpoint] [%d] [%d] [127] pinpoint_end_trace Done! 128 -[pinpoint] [%d] [%d]#128 pinpoint_start child #126 +[pinpoint] [%d] [%d] [128] pinpoint_start child [126] 126 -[pinpoint] [%d] [%d]#126 add clue key:name value:Foo -[pinpoint] [%d] [%d]#126 add clues:1:234,3432 -[pinpoint] [%d] [%d]#126 add clues:2:234 -[pinpoint] [%d] [%d]#126 pinpoint_end_trace Done! +[pinpoint] [%d] [%d] [126] add clue key:name value:Foo +[pinpoint] [%d] [%d] [126] add clues:1:234,3432 +[pinpoint] [%d] [%d] [126] add clues:2:234 +[pinpoint] [%d] [%d] [126] pinpoint_end_trace Done! 128 -[pinpoint] [%d] [%d]#128 pinpoint_start child #125 +[pinpoint] [%d] [%d] [128] pinpoint_start child [125] 125 -[pinpoint] [%d] [%d]#125 add clue key:name value:Foo -[pinpoint] [%d] [%d]#125 add clues:1:234,3432 -[pinpoint] [%d] [%d]#125 add clues:2:234 -[pinpoint] [%d] [%d]#125 pinpoint_end_trace Done! +[pinpoint] [%d] [%d] [125] add clue key:name value:Foo +[pinpoint] [%d] [%d] [125] add clues:1:234,3432 +[pinpoint] [%d] [%d] [125] add clues:2:234 +[pinpoint] [%d] [%d] [125] pinpoint_end_trace Done! 128 -[pinpoint] [%d] [%d]#128 pinpoint_start child #124 +[pinpoint] [%d] [%d] [128] pinpoint_start child [124] 124 -[pinpoint] [%d] [%d]#124 add clue key:name value:Foo -[pinpoint] [%d] [%d]#124 add clues:1:234,3432 -[pinpoint] [%d] [%d]#124 add clues:2:234 -[pinpoint] [%d] [%d]#124 pinpoint_end_trace Done! +[pinpoint] [%d] [%d] [124] add clue key:name value:Foo +[pinpoint] [%d] [%d] [124] add clues:1:234,3432 +[pinpoint] [%d] [%d] [124] add clues:2:234 +[pinpoint] [%d] [%d] [124] pinpoint_end_trace Done! 128 -[pinpoint] [%d] [%d]#128 pinpoint_start child #123 +[pinpoint] [%d] [%d] [128] pinpoint_start child [123] 123 -[pinpoint] [%d] [%d]#123 add clue key:name value:Foo -[pinpoint] [%d] [%d]#123 add clues:1:234,3432 -[pinpoint] [%d] [%d]#123 add clues:2:234 -[pinpoint] [%d] [%d]#123 pinpoint_end_trace Done! +[pinpoint] [%d] [%d] [123] add clue key:name value:Foo +[pinpoint] [%d] [%d] [123] add clues:1:234,3432 +[pinpoint] [%d] [%d] [123] add clues:2:234 +[pinpoint] [%d] [%d] [123] pinpoint_end_trace Done! 128 -[pinpoint] [%d] [%d]#128 pinpoint_start child #122 +[pinpoint] [%d] [%d] [128] pinpoint_start child [122] 122 -[pinpoint] [%d] [%d]#122 add clue key:name value:Foo -[pinpoint] [%d] [%d]#122 add clues:1:234,3432 -[pinpoint] [%d] [%d]#122 add clues:2:234 -[pinpoint] [%d] [%d]#122 pinpoint_end_trace Done! +[pinpoint] [%d] [%d] [122] add clue key:name value:Foo +[pinpoint] [%d] [%d] [122] add clues:1:234,3432 +[pinpoint] [%d] [%d] [122] add clues:2:234 +[pinpoint] [%d] [%d] [122] pinpoint_end_trace Done! 128 -[pinpoint] [%d] [%d]#128 pinpoint_start child #121 +[pinpoint] [%d] [%d] [128] pinpoint_start child [121] 121 -[pinpoint] [%d] [%d]#121 add clue key:name value:Foo -[pinpoint] [%d] [%d]#121 add clues:1:234,3432 -[pinpoint] [%d] [%d]#121 add clues:2:234 -[pinpoint] [%d] [%d]#121 pinpoint_end_trace Done! +[pinpoint] [%d] [%d] [121] add clue key:name value:Foo +[pinpoint] [%d] [%d] [121] add clues:1:234,3432 +[pinpoint] [%d] [%d] [121] add clues:2:234 +[pinpoint] [%d] [%d] [121] pinpoint_end_trace Done! 128 -[pinpoint] [%d] [%d]#128 pinpoint_start child #120 +[pinpoint] [%d] [%d] [128] pinpoint_start child [120] 120 -[pinpoint] [%d] [%d]#120 add clue key:name value:Foo -[pinpoint] [%d] [%d]#120 add clues:1:234,3432 -[pinpoint] [%d] [%d]#120 add clues:2:234 -[pinpoint] [%d] [%d]#120 pinpoint_end_trace Done! +[pinpoint] [%d] [%d] [120] add clue key:name value:Foo +[pinpoint] [%d] [%d] [120] add clues:1:234,3432 +[pinpoint] [%d] [%d] [120] add clues:2:234 +[pinpoint] [%d] [%d] [120] pinpoint_end_trace Done! 128 -[pinpoint] [%d] [%d]#128 pinpoint_start child #119 +[pinpoint] [%d] [%d] [128] pinpoint_start child [119] 119 -[pinpoint] [%d] [%d]#119 add clue key:name value:Foo -[pinpoint] [%d] [%d]#119 add clues:1:234,3432 -[pinpoint] [%d] [%d]#119 add clues:2:234 -[pinpoint] [%d] [%d]#119 pinpoint_end_trace Done! +[pinpoint] [%d] [%d] [119] add clue key:name value:Foo +[pinpoint] [%d] [%d] [119] add clues:1:234,3432 +[pinpoint] [%d] [%d] [119] add clues:2:234 +[pinpoint] [%d] [%d] [119] pinpoint_end_trace Done! 128 -[pinpoint] [%d] [%d]#128 pinpoint_start child #118 +[pinpoint] [%d] [%d] [128] pinpoint_start child [118] 118 -[pinpoint] [%d] [%d]#118 add clue key:name value:Foo -[pinpoint] [%d] [%d]#118 add clues:1:234,3432 -[pinpoint] [%d] [%d]#118 add clues:2:234 -[pinpoint] [%d] [%d]#118 pinpoint_end_trace Done! +[pinpoint] [%d] [%d] [118] add clue key:name value:Foo +[pinpoint] [%d] [%d] [118] add clues:1:234,3432 +[pinpoint] [%d] [%d] [118] add clues:2:234 +[pinpoint] [%d] [%d] [118] pinpoint_end_trace Done! 128 -[pinpoint] [%d] [%d]#128 add clue key:args value:a,$b -[pinpoint] [%d] [%d]#128 add clue key:ret value:a,$b -[pinpoint] [%d] [%d]this span:({"E":%d,"FT":1500,"S":%d,"args":"a,$b","calls":[{"E":%d,"S":%d,"clues":["1:234,3432","2:234"],"name":"Foo"},{"E":%d,"S":%d,"clues":["1:234,3432","2:234"],"name":"Foo"},{"E":%d,"S":%d,"clues":["1:234,3432","2:234"],"name":"Foo"},{"E":%d,"S":%d,"clues":["1:234,3432","2:234"],"name":"Foo"},{"E":%d,"S":%d,"clues":["1:234,3432","2:234"],"name":"Foo"},{"E":%d,"S":%d,"clues":["1:234,3432","2:234"],"name":"Foo"},{"E":%d,"S":%d,"clues":["1:234,3432","2:234"],"name":"Foo"},{"E":%d,"S":%d,"clues":["1:234,3432","2:234"],"name":"Foo"},{"E":%d,"S":%d,"clues":["1:234,3432","2:234"],"name":"Foo"},{"E":%d,"S":%d,"clues":["1:234,3432","2:234"],"name":"Foo"}],"name":"ouput_234","ret":"a,$b"}) +[pinpoint] [%d] [%d] [128] add clue key:args value:a,$b +[pinpoint] [%d] [%d] [128] add clue key:ret value:a,$b +[pinpoint] [%d] [%d]this span:({":E":%d,":FT":1500,":S":%d,"args":"a,$b","calls":[{":E":%d,":S":%d,"clues":["1:234,3432","2:234"],"name":"Foo"},{":E":%d,":S":%d,"clues":["1:234,3432","2:234"],"name":"Foo"},{":E":%d,":S":%d,"clues":["1:234,3432","2:234"],"name":"Foo"},{":E":%d,":S":%d,"clues":["1:234,3432","2:234"],"name":"Foo"},{":E":%d,":S":%d,"clues":["1:234,3432","2:234"],"name":"Foo"},{":E":%d,":S":%d,"clues":["1:234,3432","2:234"],"name":"Foo"},{":E":%d,":S":%d,"clues":["1:234,3432","2:234"],"name":"Foo"},{":E":%d,":S":%d,"clues":["1:234,3432","2:234"],"name":"Foo"},{":E":%d,":S":%d,"clues":["1:234,3432","2:234"],"name":"Foo"},{":E":%d,":S":%d,"clues":["1:234,3432","2:234"],"name":"Foo"}],"name":"ouput_234","ret":"a,$b"}) [pinpoint] [%d] [%d]agent try to connect:(unix:/unexist_file.sock) [pinpoint] [%d] [%d]connect:(/unexist_file.sock) failed as (No such file or directory) -[pinpoint] [%d] [%d]#128 pinpoint_end_trace Done! +[pinpoint] [%d] [%d] [128] pinpoint_end_trace Done! 0 \ No newline at end of file diff --git a/src/PHP/tests/trace_api_with_id.phpt b/src/PHP/tests/trace_api_with_id.phpt index 627cb74f2..499a6b2e0 100644 --- a/src/PHP/tests/trace_api_with_id.phpt +++ b/src/PHP/tests/trace_api_with_id.phpt @@ -45,22 +45,22 @@ pinpoint_add_clue("name","Foo",$id); $id = pinpoint_end_trace($id); --EXPECTF-- -[pinpoint] [%d] [%d]#0 pinpoint_start child #128 -[pinpoint] [%d] [%d]#128 add clue key:name value:Foo -[pinpoint] [%d] [%d]#128 pinpoint_start child #127 -[pinpoint] [%d] [%d]#127 add clues:name:Foo1 -[pinpoint] [%d] [%d]#127 pinpoint_start child #126 -[pinpoint] [%d] [%d]#126 add clue key:name value:Foo2 -[pinpoint] [%d] [%d]#126 pinpoint_end_trace Done! -[pinpoint] [%d] [%d]#127 pinpoint_start child #125 -[pinpoint] [%d] [%d]#125 add clues:name:Foo3 -[pinpoint] [%d] [%d]#125 add clue key:name value:Foo4 -[pinpoint] [%d] [%d]#125 pinpoint_end_trace Done! -[pinpoint] [%d] [%d]#127 add clues:name:Foo5 -[pinpoint] [%d] [%d]#127 add clue key:EXP value:too heavy, throw it -[pinpoint] [%d] [%d]#127 pinpoint_end_trace Done! -[pinpoint] [%d] [%d]this span:({"E":%d,"FT":1500,"S":%d,"calls":[{"E":%d,"EXP":"too heavy, throw it","S":%d,"calls":[{"E":%d,"S":%d,"name":"Foo2"},{"E":%d,"S":%d,"clues":["name:Foo3"],"name":"Foo4"}],"clues":["name:Foo1","name:Foo5"]}],"name":"Foo"}) +[pinpoint] [%d] [%d] [0] pinpoint_start child [128] +[pinpoint] [%d] [%d] [128] add clue key:name value:Foo +[pinpoint] [%d] [%d] [128] pinpoint_start child [127] +[pinpoint] [%d] [%d] [127] add clues:name:Foo1 +[pinpoint] [%d] [%d] [127] pinpoint_start child [126] +[pinpoint] [%d] [%d] [126] add clue key:name value:Foo2 +[pinpoint] [%d] [%d] [126] pinpoint_end_trace Done! +[pinpoint] [%d] [%d] [127] pinpoint_start child [125] +[pinpoint] [%d] [%d] [125] add clues:name:Foo3 +[pinpoint] [%d] [%d] [125] add clue key:name value:Foo4 +[pinpoint] [%d] [%d] [125] pinpoint_end_trace Done! +[pinpoint] [%d] [%d] [127] add clues:name:Foo5 +[pinpoint] [%d] [%d] [127] add clue key:EXP value:too heavy, throw it +[pinpoint] [%d] [%d] [127] pinpoint_end_trace Done! +[pinpoint] [%d] [%d]this span:({":E":%d,":FT":1500,":S":%d,"calls":[{":E":%d,":S":%d,"EXP":"too heavy, throw it","calls":[{":E":%d,":S":%d,"name":"Foo2"},{":E":%d,":S":%d,"clues":["name:Foo3"],"name":"Foo4"}],"clues":["name:Foo1","name:Foo5"]}],"name":"Foo"}) [pinpoint] [%d] [%d]agent try to connect:(unix:/unexist_file.sock) [pinpoint] [%d] [%d]connect:(/unexist_file.sock) failed as (No such file or directory) -[pinpoint] [%d] [%d]#128 pinpoint_end_trace Done! +[pinpoint] [%d] [%d] [128] pinpoint_end_trace Done! Uncaught exception: too heavy, throw it \ No newline at end of file diff --git a/src/PHP/tests/trace_limit_test-i448.phpt b/src/PHP/tests/trace_limit_test-i448.phpt index bbfa50d02..d73a63750 100644 --- a/src/PHP/tests/trace_limit_test-i448.phpt +++ b/src/PHP/tests/trace_limit_test-i448.phpt @@ -34,15 +34,15 @@ if(pinpoint_tracelimit()) pinpoint_end_trace($id); --EXPECTF-- -[pinpoint] [%d] [%d]#0 pinpoint_start child #128 -[pinpoint] [%d] [%d]#128 pinpoint_start child #127 +[pinpoint] [%d] [%d] [0] pinpoint_start child [128] +[pinpoint] [%d] [%d] [128] pinpoint_start child [127] string(1) "c" string(1) "b" string(1) "a" -[pinpoint] [%d] [%d] pinpoint_get_context_key#127 failed with map::at, parameters:not exist +[pinpoint] [%d] [%d] pinpoint_get_context_key [127] failed with map::at, parameters:not exist bool(false) -[pinpoint] [%d] [%d]#127 pinpoint_end_trace Done! -[pinpoint] [%d] [%d]This span dropped. max_trace_limit:0 current_tick:0 onLine:1 -[pinpoint] [%d] [%d]change current#128 status, before:2,now:4 -[pinpoint] [%d] [%d]current#128 span dropped,due to TRACE_BLOCK -[pinpoint] [%d] [%d]#128 pinpoint_end_trace Done! \ No newline at end of file +[pinpoint] [%d] [%d] [127] pinpoint_end_trace Done! +[pinpoint] [%d] [%d]This span dropped. max_trace_limit:0 current_tick:2 onLine:1 +[pinpoint] [%d] [%d]change current [128] status, before:2,now:4 +[pinpoint] [%d] [%d]current [128] span dropped,due to TRACE_BLOCK +[pinpoint] [%d] [%d] [128] pinpoint_end_trace Done! \ No newline at end of file