Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mybee
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
mybee
Commits
42307cab
Unverified
Commit
42307cab
authored
Jul 12, 2021
by
Ivan Vandot
Committed by
GitHub
Jul 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: allow setting tracing-endpoint using host and port (#2323)
parent
a3deb311
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
cmd.go
cmd/bee/cmd/cmd.go
+4
-0
start.go
cmd/bee/cmd/start.go
+7
-1
No files found.
cmd/bee/cmd/cmd.go
View file @
42307cab
...
@@ -43,6 +43,8 @@ const (
...
@@ -43,6 +43,8 @@ const (
optionNameStandalone
=
"standalone"
optionNameStandalone
=
"standalone"
optionNameTracingEnabled
=
"tracing-enable"
optionNameTracingEnabled
=
"tracing-enable"
optionNameTracingEndpoint
=
"tracing-endpoint"
optionNameTracingEndpoint
=
"tracing-endpoint"
optionNameTracingHost
=
"tracing-host"
optionNameTracingPort
=
"tracing-port"
optionNameTracingServiceName
=
"tracing-service-name"
optionNameTracingServiceName
=
"tracing-service-name"
optionNameVerbosity
=
"verbosity"
optionNameVerbosity
=
"verbosity"
optionNameGlobalPinningEnabled
=
"global-pinning-enable"
optionNameGlobalPinningEnabled
=
"global-pinning-enable"
...
@@ -218,6 +220,8 @@ func (c *command) setAllFlags(cmd *cobra.Command) {
...
@@ -218,6 +220,8 @@ func (c *command) setAllFlags(cmd *cobra.Command) {
cmd
.
Flags
()
.
Bool
(
optionNameStandalone
,
false
,
"whether we want the node to start with no listen addresses for p2p"
)
cmd
.
Flags
()
.
Bool
(
optionNameStandalone
,
false
,
"whether we want the node to start with no listen addresses for p2p"
)
cmd
.
Flags
()
.
Bool
(
optionNameTracingEnabled
,
false
,
"enable tracing"
)
cmd
.
Flags
()
.
Bool
(
optionNameTracingEnabled
,
false
,
"enable tracing"
)
cmd
.
Flags
()
.
String
(
optionNameTracingEndpoint
,
"127.0.0.1:6831"
,
"endpoint to send tracing data"
)
cmd
.
Flags
()
.
String
(
optionNameTracingEndpoint
,
"127.0.0.1:6831"
,
"endpoint to send tracing data"
)
cmd
.
Flags
()
.
String
(
optionNameTracingHost
,
""
,
"host to send tracing data"
)
cmd
.
Flags
()
.
String
(
optionNameTracingPort
,
""
,
"port to send tracing data"
)
cmd
.
Flags
()
.
String
(
optionNameTracingServiceName
,
"bee"
,
"service name identifier for tracing"
)
cmd
.
Flags
()
.
String
(
optionNameTracingServiceName
,
"bee"
,
"service name identifier for tracing"
)
cmd
.
Flags
()
.
String
(
optionNameVerbosity
,
"info"
,
"log verbosity level 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=trace"
)
cmd
.
Flags
()
.
String
(
optionNameVerbosity
,
"info"
,
"log verbosity level 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=trace"
)
cmd
.
Flags
()
.
String
(
optionWelcomeMessage
,
""
,
"send a welcome message string during handshakes"
)
cmd
.
Flags
()
.
String
(
optionWelcomeMessage
,
""
,
"send a welcome message string during handshakes"
)
...
...
cmd/bee/cmd/start.go
View file @
42307cab
...
@@ -151,6 +151,12 @@ inability to use, or your interaction with other nodes or the software.`)
...
@@ -151,6 +151,12 @@ inability to use, or your interaction with other nodes or the software.`)
networkConfig
.
blockTime
=
blockTime
networkConfig
.
blockTime
=
blockTime
}
}
tracingEndpoint
:=
c
.
config
.
GetString
(
optionNameTracingEndpoint
)
if
c
.
config
.
IsSet
(
optionNameTracingHost
)
&&
c
.
config
.
IsSet
(
optionNameTracingPort
)
{
tracingEndpoint
=
strings
.
Join
([]
string
{
c
.
config
.
GetString
(
optionNameTracingHost
),
c
.
config
.
GetString
(
optionNameTracingPort
)},
":"
)
}
b
,
err
:=
node
.
NewBee
(
c
.
config
.
GetString
(
optionNameP2PAddr
),
signerConfig
.
publicKey
,
signerConfig
.
signer
,
networkID
,
logger
,
signerConfig
.
libp2pPrivateKey
,
signerConfig
.
pssPrivateKey
,
&
node
.
Options
{
b
,
err
:=
node
.
NewBee
(
c
.
config
.
GetString
(
optionNameP2PAddr
),
signerConfig
.
publicKey
,
signerConfig
.
signer
,
networkID
,
logger
,
signerConfig
.
libp2pPrivateKey
,
signerConfig
.
pssPrivateKey
,
&
node
.
Options
{
DataDir
:
c
.
config
.
GetString
(
optionNameDataDir
),
DataDir
:
c
.
config
.
GetString
(
optionNameDataDir
),
CacheCapacity
:
c
.
config
.
GetUint64
(
optionNameCacheCapacity
),
CacheCapacity
:
c
.
config
.
GetUint64
(
optionNameCacheCapacity
),
...
@@ -169,7 +175,7 @@ inability to use, or your interaction with other nodes or the software.`)
...
@@ -169,7 +175,7 @@ inability to use, or your interaction with other nodes or the software.`)
CORSAllowedOrigins
:
c
.
config
.
GetStringSlice
(
optionCORSAllowedOrigins
),
CORSAllowedOrigins
:
c
.
config
.
GetStringSlice
(
optionCORSAllowedOrigins
),
Standalone
:
c
.
config
.
GetBool
(
optionNameStandalone
),
Standalone
:
c
.
config
.
GetBool
(
optionNameStandalone
),
TracingEnabled
:
c
.
config
.
GetBool
(
optionNameTracingEnabled
),
TracingEnabled
:
c
.
config
.
GetBool
(
optionNameTracingEnabled
),
TracingEndpoint
:
c
.
config
.
GetString
(
optionNameTracingEndpoint
)
,
TracingEndpoint
:
tracingEndpoint
,
TracingServiceName
:
c
.
config
.
GetString
(
optionNameTracingServiceName
),
TracingServiceName
:
c
.
config
.
GetString
(
optionNameTracingServiceName
),
Logger
:
logger
,
Logger
:
logger
,
GlobalPinningEnabled
:
c
.
config
.
GetBool
(
optionNameGlobalPinningEnabled
),
GlobalPinningEnabled
:
c
.
config
.
GetBool
(
optionNameGlobalPinningEnabled
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment