Skip to content

Commit 5d9e71f

Browse files
committed
update tracing enable flag
1 parent ce64931 commit 5d9e71f

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

cmd/opera/launcher/launcher.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,12 @@ func initFlags() {
158158
utils.MetricsInfluxDBUsernameFlag,
159159
utils.MetricsInfluxDBPasswordFlag,
160160
utils.MetricsInfluxDBTagsFlag,
161-
tracing.EnableFlag,
162161
}
163162

164163
tracingFlags = []cli.Flag{
165164
tracing.EnableFlag,
166165
tracing.AgentEndpointFlag,
167-
tracing.DevelopmentFlag,
166+
tracing.EnableDevFlag,
168167
}
169168

170169
nodeFlags = []cli.Flag{}

cmd/opera/launcher/tracing/tracing.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@ var (
1919
Usage: "Enable traces collection and reporting",
2020
}
2121

22+
EnableDevFlag = cli.BoolFlag{
23+
Name: "tracing.dev",
24+
Usage: "Enable traces collection and reporting in development mode",
25+
}
26+
2227
AgentEndpointFlag = cli.StringFlag{
2328
Name: "tracing.agent",
2429
Usage: "Jaeger agent endpoint. Default is localhost:6831",
2530
Value: "localhost:6831",
2631
}
2732

28-
DevelopmentFlag = cli.BoolFlag{
29-
Name: "tracing.dev",
30-
Usage: "Use development Jaeger configuration",
31-
}
32-
3333
ErrInvalidEndpoint = errors.New("invalid agent endpoint")
3434
)
3535

3636
func Start(ctx *cli.Context) (func(), error) {
37-
if !ctx.Bool(EnableFlag.Name) {
37+
if !ctx.Bool(EnableFlag.Name) && !ctx.Bool(EnableDevFlag.Name) {
3838
return func() {}, nil
3939
}
4040

@@ -51,7 +51,7 @@ func Start(ctx *cli.Context) (func(), error) {
5151
},
5252
}
5353

54-
if ctx.Bool(DevelopmentFlag.Name) {
54+
if ctx.Bool(EnableDevFlag.Name) {
5555
// Makes sampler collect and report all traces
5656
cfg.Sampler = &jaegercfg.SamplerConfig{
5757
Type: jaeger.SamplerTypeConst,

demo/start.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ do
2424
--fakenet=${ACC}/$N \
2525
--port=${PORT} \
2626
--nat extip:127.0.0.1 \
27+
--tracing.dev \
2728
--http --http.addr="127.0.0.1" --http.port=${RPCP} --http.corsdomain="*" --http.api="eth,debug,net,admin,web3,personal,txpool,ftm,dag" \
2829
--ws --ws.addr="127.0.0.1" --ws.port=${WSP} --ws.origins="*" --ws.api="eth,debug,net,admin,web3,personal,txpool,ftm,dag" \
2930
--nousb --verbosity=3 --tracing &>> opera$i.log)&

0 commit comments

Comments
 (0)