Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2eac899

Browse files
committed
use new env var formet
1 parent 3609cdb commit 2eac899

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cli/start.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import (
1717

1818
"cdr.dev/slog"
1919
"cdr.dev/slog/sloggers/sloghuman"
20-
"github.com/coder/coder/cli/cliflag"
2120
"github.com/briandowns/spinner"
21+
"github.com/coder/coder/cli/cliflag"
2222
"github.com/coder/coder/cli/cliui"
2323
"github.com/coder/coder/cli/config"
2424
"github.com/coder/coder/coderd"
@@ -53,11 +53,12 @@ func start() *cobra.Command {
5353
tlsKeyFile string
5454
tlsMinVersion string
5555
useTunnel bool
56+
traceDD bool
5657
)
5758
root := &cobra.Command{
5859
Use: "start",
5960
RunE: func(cmd *cobra.Command, args []string) error {
60-
if os.Getenv("CODER_TRACE_DATADOG") == "true" {
61+
if traceDD {
6162
tracer.Start()
6263
defer tracer.Stop()
6364
}
@@ -328,6 +329,7 @@ func start() *cobra.Command {
328329
`Specifies the minimum supported version of TLS. Accepted values are "tls10", "tls11", "tls12" or "tls13"`)
329330
cliflag.BoolVarP(root.Flags(), &useTunnel, "tunnel", "", "CODER_DEV_TUNNEL", false, "Serve dev mode through a Cloudflare Tunnel for easy setup")
330331
_ = root.Flags().MarkHidden("tunnel")
332+
cliflag.BoolVarP(root.Flags(), &traceDD, "trace-datadog", "", "CODER_TRACE_DATADOG", false, "Send tracing data to a datadog agent")
331333

332334
return root
333335
}

0 commit comments

Comments
 (0)