proper name for topics so that we can filter dynamically using chronicles (#210)

* proper name for topics so that we can filter dynamically using chronicles

* lowercase
This commit is contained in:
Viktor Kirilov 2020-06-10 11:48:01 +03:00 committed by GitHub
parent 8d9e231a74
commit 1afec627c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 19 additions and 19 deletions

View File

@ -20,7 +20,7 @@ when chronicles.enabledLogLevel == LogLevel.TRACE:
export lpstream export lpstream
logScope: logScope:
topic = "Connection" topics = "connection"
const const
ConnectionTrackerName* = "libp2p.connection" ConnectionTrackerName* = "libp2p.connection"

View File

@ -15,7 +15,7 @@ import connection,
protocols/protocol protocols/protocol
logScope: logScope:
topic = "Multistream" topics = "multistream"
const const
MsgSize* = 64*1024 MsgSize* = 64*1024

View File

@ -17,7 +17,7 @@ import types,
../../stream/lpstream ../../stream/lpstream
logScope: logScope:
topic = "MplexCoder" topics = "mplexcoder"
type type
Msg* = tuple Msg* = tuple

View File

@ -21,7 +21,7 @@ import types,
export lpstream export lpstream
logScope: logScope:
topic = "MplexChannel" topics = "mplexchannel"
## Channel half-closed states ## Channel half-closed states
## ##

View File

@ -20,7 +20,7 @@ import ../muxer,
lpchannel lpchannel
logScope: logScope:
topic = "Mplex" topics = "mplex"
type type
Mplex* = ref object of Muxer Mplex* = ref object of Muxer

View File

@ -13,7 +13,7 @@ import ../protocols/protocol,
../errors ../errors
logScope: logScope:
topic = "Muxer" topics = "muxer"
type type
StreamHandler* = proc(conn: Connection): Future[void] {.gcsafe.} StreamHandler* = proc(conn: Connection): Future[void] {.gcsafe.}

View File

@ -19,7 +19,7 @@ import ../protobuf/minprotobuf,
../utility ../utility
logScope: logScope:
topic = "Identify" topics = "identify"
const const
IdentifyCodec* = "/ipfs/id/1.0.0" IdentifyCodec* = "/ipfs/id/1.0.0"

View File

@ -21,7 +21,7 @@ import pubsub,
../../errors ../../errors
logScope: logScope:
topic = "FloodSub" topics = "floodsub"
const FloodSubCodec* = "/floodsub/1.0.0" const FloodSubCodec* = "/floodsub/1.0.0"

View File

@ -24,7 +24,7 @@ import pubsub,
../../utility ../../utility
logScope: logScope:
topic = "GossipSub" topics = "gossipsub"
const GossipSubCodec* = "/meshsub/1.0.0" const GossipSubCodec* = "/meshsub/1.0.0"

View File

@ -20,7 +20,7 @@ export PubSubPeer
export PubSubObserver export PubSubObserver
logScope: logScope:
topic = "PubSub" topics = "pubsub"
declareGauge(libp2p_pubsub_peers, "pubsub peer instances") declareGauge(libp2p_pubsub_peers, "pubsub peer instances")
declareGauge(libp2p_pubsub_topics, "pubsub subscribed topics") declareGauge(libp2p_pubsub_topics, "pubsub subscribed topics")

View File

@ -21,7 +21,7 @@ import rpc/[messages, message, protobuf],
import metrics import metrics
logScope: logScope:
topic = "PubSubPeer" topics = "pubsubpeer"
type type
PubSubObserver* = ref object PubSubObserver* = ref object

View File

@ -18,7 +18,7 @@ import messages, protobuf,
../../../protobuf/minprotobuf ../../../protobuf/minprotobuf
logScope: logScope:
topic = "PubSubMessage" topics = "pubsubmessage"
const PubSubPrefix = "libp2p-pubsub:" const PubSubPrefix = "libp2p-pubsub:"

View File

@ -11,7 +11,7 @@ import tables
import chronos, chronicles import chronos, chronicles
logScope: logScope:
topic = "TimedCache" topics = "timedcache"
const Timeout* = 10.seconds # default timeout in ms const Timeout* = 10.seconds # default timeout in ms

View File

@ -22,7 +22,7 @@ import secure,
../../stream/bufferstream ../../stream/bufferstream
logScope: logScope:
topic = "noise" topics = "noise"
const const
# https://godoc.org/github.com/libp2p/go-libp2p-noise#pkg-constants # https://godoc.org/github.com/libp2p/go-libp2p-noise#pkg-constants

View File

@ -19,7 +19,7 @@ import secure,
export hmac, sha2, sha, hash, rijndael, bcmode export hmac, sha2, sha, hash, rijndael, bcmode
logScope: logScope:
topic = "secio" topics = "secio"
const const
SecioCodec* = "/secio/1.0.0" SecioCodec* = "/secio/1.0.0"

View File

@ -40,7 +40,7 @@ when chronicles.enabledLogLevel == LogLevel.TRACE:
export lpstream export lpstream
logScope: logScope:
topic = "BufferStream" topics = "bufferstream"
declareGauge libp2p_open_bufferstream, "open BufferStream instances" declareGauge libp2p_open_bufferstream, "open BufferStream instances"

View File

@ -11,7 +11,7 @@ import chronos, chronicles
import lpstream, ../utility import lpstream, ../utility
logScope: logScope:
topic = "ChronosStream" topics = "chronosstream"
type ChronosStream* = ref object of LPStream type ChronosStream* = ref object of LPStream
client: StreamTransport client: StreamTransport

View File

@ -23,7 +23,7 @@ import connection,
peer peer
logScope: logScope:
topic = "Switch" topics = "switch"
#TODO: General note - use a finite state machine to manage the different #TODO: General note - use a finite state machine to manage the different
# steps of connections establishing and upgrading. This makes everything # steps of connections establishing and upgrading. This makes everything

View File

@ -18,7 +18,7 @@ import transport,
../stream/chronosstream ../stream/chronosstream
logScope: logScope:
topic = "TcpTransport" topics = "tcptransport"
const const
TcpTransportTrackerName* = "libp2p.tcptransport" TcpTransportTrackerName* = "libp2p.tcptransport"