Skip to content

Commit

Permalink
update srv code
Browse files Browse the repository at this point in the history
  • Loading branch information
congim committed Jan 25, 2019
1 parent 7331319 commit a112701
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
2 changes: 1 addition & 1 deletion analyze/service/span_events.go
Expand Up @@ -74,7 +74,7 @@ func (spanEvents *SpanEvents) eventsCounter(rpc string, events []*trace.TSpanEve
return nil
}

var gInserRPCDetailsRecord string = ` INSERT INTO api_details_stats (app_name, api, input_date, method_id, ser_type, elapsed, max_elapsed, min_elapsed, average_elapsed, count, err_count) VALUES (?,?,?,?,?,?,?,?,?,?,?);`
var gInserRPCDetailsRecord string = ` INSERT INTO api_details_stats (app_name, api, input_date, method_id, service_type, elapsed, max_elapsed, min_elapsed, average_elapsed, count, err_count) VALUES (?,?,?,?,?,?,?,?,?,?,?);`

// eventRecord ...
func (spanEvents *SpanEvents) eventRecord(app *App, recordTime int64) error {
Expand Down
10 changes: 5 additions & 5 deletions sql/cassandra.cql
Expand Up @@ -104,7 +104,7 @@ CREATE CUSTOM INDEX IF NOT EXISTS ON app_alert (group)
CREATE TABLE IF NOT EXISTS agents (
app_name text,
agent_id text,
ser_type int,
service_type int,
socket_id int,
host_name text,
ip text,
Expand Down Expand Up @@ -269,7 +269,7 @@ CREATE TABLE IF NOT EXISTS api_details_stats (
api text,
method_id int,
input_date bigint,
ser_type int,
service_type int,
elapsed int,
max_elapsed int,
min_elapsed int,
Expand Down Expand Up @@ -329,8 +329,8 @@ CREATE CUSTOM INDEX IF NOT EXISTS ON jvm_memory_stats (input_date)


CREATE TABLE IF NOT EXISTS service_type (
ser_type int,
info text,
PRIMARY KEY (ser_type)
service_type int,
info text,
PRIMARY KEY (service_type)
) WITH gc_grace_seconds = 10800;

18 changes: 18 additions & 0 deletions util/ser_code.go → util/srv_code.go
Expand Up @@ -126,4 +126,22 @@ func init() {
SerCode[1501] = "PHP_METHOD"
SerCode[9700] = "PHP_REMOTE_METHOD"

// postgresql
SerCode[1500] = "PHP"
SerCode[1501] = "PHP_METHOD"
SerCode[9700] = "PHP_REMOTE_METHOD"

// php
SerCode[1500] = "PHP"
SerCode[1501] = "PHP_METHOD"
SerCode[9700] = "PHP_REMOTE_METHOD"

// postgresql
SerCode[2500] = "POSTGRESQL"
SerCode[2501] = "POSTGRESQL_EXECUTE_QUERY"

// rabbitmq.client
SerCode[8300] = "RABBITMQ_CLIENT"
SerCode[8301] = "RABBITMQ_CLIENT_INTERNAL"

}
2 changes: 1 addition & 1 deletion vgo/misc/sql.go
@@ -1,6 +1,6 @@
package misc

var AgentInsert string = `INSERT INTO agents (app_name, agent_id, ser_type, socket_id, host_name, ip,
var AgentInsert string = `INSERT INTO agents (app_name, agent_id, service_type, socket_id, host_name, ip,
pid, version, start_time, end_time, is_live, is_container, operating_env, vgo_addr)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);`

Expand Down

0 comments on commit a112701

Please sign in to comment.