File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import (
1010
1111type session struct {
1212 Catalog string
13+ Principal string
1314 User string
1415 UserAgent string
1516}
@@ -32,6 +33,7 @@ type QueryInfo struct {
3233 Catalog string
3334 CreateTime time.Time
3435 DurationMs int64
36+ Principal string
3537 QueryId string
3638 QuerySizeBytes int
3739 QueryType string
@@ -82,6 +84,7 @@ func FetchQueryInfo() ([]QueryInfo, error) {
8284 Catalog : q .Session .Catalog ,
8385 CreateTime : q .QueryStats .CreateTime ,
8486 DurationMs : q .QueryStats .EndTime .Sub (q .QueryStats .CreateTime ).Milliseconds (),
87+ Principal : q .Session .Principal ,
8588 QueryId : q .QueryId ,
8689 QuerySizeBytes : len (q .Query ),
8790 QueryType : q .QueryType ,
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ func metricsHandler(w http.ResponseWriter, r *http.Request) {
2828 Str ("catalog" , q .Catalog ).
2929 Int64 ("duration_ms" , q .DurationMs ).
3030 Str ("id" , q .QueryId ).
31+ Str ("principal" , q .Principal ).
3132 Time ("query_time" , q .CreateTime ).
3233 Int ("size_bytes" , q .QuerySizeBytes ).
3334 Str ("state" , q .State ).
You can’t perform that action at this time.
0 commit comments