github.com/badrootd/celestia-core@v0.0.0-20240305091328-aa4207a4b25d/pkg/trace/schema/tables.go (about) 1 package schema 2 3 import ( 4 "strings" 5 6 "github.com/badrootd/celestia-core/config" 7 ) 8 9 func init() { 10 config.DefaultInfluxTables = strings.Join(AllTables(), ",") 11 } 12 13 func AllTables() []string { 14 tables := []string{} 15 tables = append(tables, MempoolTables()...) 16 tables = append(tables, ConsensusTables()...) 17 return tables 18 } 19 20 // General purpose schema constants used across multiple tables 21 const ( 22 // PeerFieldKey is the tracing field key for the peer that sent or 23 // received a tx. This should take the form of the peer's address as the 24 // value. 25 PeerFieldKey = "peer" 26 27 // TransferTypeFieldKey is the tracing field key for the class of a tx 28 // and votes. 29 TransferTypeFieldKey = "transfer_type" 30 31 // TransferTypeDownload is a tracing field value for receiving some 32 // data from a peer. This value is used by the "TransferType" field key. 33 TransferTypeDownload = "download" 34 35 // TransferTypeUpload is a tracing field value for sending some data 36 // to a peer. This value is used by the "TransferType" field key. 37 TransferTypeUpload = "upload" 38 39 // RoundFieldKey is the name of the field that stores the consensus round. 40 // The value is an int32. 41 RoundFieldKey = "round" 42 43 // HeightFieldKey is the name of the field that stores the consensus height. 44 // The value is an int64. 45 HeightFieldKey = "height" 46 )