Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit38560dd

Browse files
authored
chore: remove coder trace telemetry (#9677)
1 parente7b0181 commit38560dd

File tree

12 files changed

+3
-84
lines changed

12 files changed

+3
-84
lines changed

‎cli/exp_scaletest.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ func (s *scaletestTracingFlags) provider(ctx context.Context) (trace.TracerProvi
105105

106106
tracerProvider,closeTracing,err:=tracing.TracerProvider(ctx,scaletestTracerName, tracing.TracerOpts{
107107
Default:s.traceEnable,
108-
Coder:s.traceCoder,
109108
Honeycomb:s.traceHoneycombAPIKey,
110109
})
111110
iferr!=nil {

‎cli/root.go‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"encoding/base64"
88
"encoding/json"
99
"errors"
10-
"flag"
1110
"fmt"
1211
"io"
1312
"math/rand"
@@ -436,10 +435,6 @@ func LoggerFromContext(ctx context.Context) (slog.Logger, bool) {
436435
returnl,ok
437436
}
438437

439-
funcisTest()bool {
440-
returnflag.Lookup("test.v")!=nil
441-
}
442-
443438
// RootCmd contains parameters and helpers useful to all commands.
444439
typeRootCmdstruct {
445440
clientURL*url.URL

‎cli/server.go‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
408408
// which is caught by goleaks.
409409
deferhttp.DefaultClient.CloseIdleConnections()
410410

411-
tracerProvider,sqlDriver,closeTracing:=ConfigureTraceProvider(ctx,logger,inv,vals)
411+
tracerProvider,sqlDriver,closeTracing:=ConfigureTraceProvider(ctx,logger,vals)
412412
deferfunc() {
413413
logger.Debug(ctx,"closing tracing")
414414
traceCloseErr:=shutdownWithTimeout(closeTracing,5*time.Second)
@@ -2087,27 +2087,17 @@ func (s *HTTPServers) Close() {
20872087
funcConfigureTraceProvider(
20882088
ctx context.Context,
20892089
logger slog.Logger,
2090-
inv*clibase.Invocation,
20912090
cfg*codersdk.DeploymentValues,
20922091
) (trace.TracerProvider,string,func(context.Context)error) {
20932092
var (
20942093
tracerProvider=trace.NewNoopTracerProvider()
20952094
closeTracing=func(context.Context)error {returnnil }
20962095
sqlDriver="postgres"
20972096
)
2098-
// Coder tracing should be disabled if telemetry is disabled unless
2099-
// --telemetry-trace was explicitly provided.
2100-
shouldCoderTrace:=cfg.Telemetry.Enable.Value()&&!isTest()
2101-
// Only override if telemetryTraceEnable was specifically set.
2102-
// By default we want it to be controlled by telemetryEnable.
2103-
ifinv.ParsedFlags().Changed("telemetry-trace") {
2104-
shouldCoderTrace=cfg.Telemetry.Trace.Value()
2105-
}
21062097

2107-
ifcfg.Trace.Enable.Value()||shouldCoderTrace||cfg.Trace.HoneycombAPIKey!="" {
2098+
ifcfg.Trace.Enable.Value()||cfg.Trace.DataDog.Value()||cfg.Trace.HoneycombAPIKey!="" {
21082099
sdkTracerProvider,_closeTracing,err:=tracing.TracerProvider(ctx,"coderd", tracing.TracerOpts{
21092100
Default:cfg.Trace.Enable.Value(),
2110-
Coder:shouldCoderTrace,
21112101
DataDog:cfg.Trace.DataDog.Value(),
21122102
Honeycomb:cfg.Trace.HoneycombAPIKey.String(),
21132103
})

‎cli/testdata/coder_server_--help.golden‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -415,11 +415,6 @@ telemetrywhen required by your organization's security policy.
415415
Whether telemetry is enabled or not. Coder collects anonymized usage
416416
data to help improve our product.
417417

418-
--telemetry-trace bool, $CODER_TELEMETRY_TRACE (default: false)
419-
Whether Opentelemetry traces are sent to Coder. Coder collects
420-
anonymized application tracing to help improve our product. Disabling
421-
telemetry also disables this option.
422-
423418
USER QUIET HOURS SCHEDULE OPTIONS:
424419
Allow users to set quiet hours schedules each day for workspaces to avoid
425420
workspaces stopping during the day due to template max TTL.

‎cli/testdata/server-config.yaml.golden‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -334,11 +334,6 @@ telemetry:
334334
# help improve our product.
335335
# (default: false, type: bool)
336336
enable: false
337-
# Whether Opentelemetry traces are sent to Coder. Coder collects anonymized
338-
# application tracing to help improve our product. Disabling telemetry also
339-
# disables this option.
340-
# (default: false, type: bool)
341-
trace: false
342337
# URL to send telemetry.
343338
# (default: https://telemetry.coder.com, type: url)
344339
url: https://telemetry.coder.com

‎coderd/tracing/exporter.go‎

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"go.opentelemetry.io/otel"
99
"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
1010
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
11-
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
1211
"go.opentelemetry.io/otel/propagation"
1312
"go.opentelemetry.io/otel/sdk/resource"
1413
sdktrace"go.opentelemetry.io/otel/sdk/trace"
@@ -26,9 +25,6 @@ type TracerOpts struct {
2625
// Default exports to a backend configured by environment variables. See:
2726
// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md
2827
Defaultbool
29-
// Coder exports traces to Coder's public tracing ingest service and is used
30-
// to improve the product. It is disabled when opting out of telemetry.
31-
Coderbool
3228
// DataDog exports traces and profiles to the local DataDog daemon.
3329
DataDogbool
3430
// Exports traces to Honeycomb.io with the provided API key.
@@ -88,14 +84,6 @@ func TracerProvider(ctx context.Context, service string, opts TracerOpts) (*sdkt
8884
closers=append(closers,exporter.Shutdown)
8985
tracerOpts=append(tracerOpts,sdktrace.WithBatcher(exporter))
9086
}
91-
ifopts.Coder {
92-
exporter,err:=CoderExporter(ctx)
93-
iferr!=nil {
94-
returnnil,nil,xerrors.Errorf("coder exporter: %w",err)
95-
}
96-
closers=append(closers,exporter.Shutdown)
97-
tracerOpts=append(tracerOpts,sdktrace.WithBatcher(exporter))
98-
}
9987
ifopts.Honeycomb!="" {
10088
exporter,err:=HoneycombExporter(ctx,opts.Honeycomb)
10189
iferr!=nil {
@@ -147,20 +135,6 @@ func DefaultExporter(ctx context.Context) (*otlptrace.Exporter, error) {
147135
returnexporter,nil
148136
}
149137

150-
funcCoderExporter(ctx context.Context) (*otlptrace.Exporter,error) {
151-
opts:= []otlptracehttp.Option{
152-
otlptracehttp.WithEndpoint("oss-otel-ingest-http.coder.app:443"),
153-
otlptracehttp.WithCompression(otlptracehttp.GzipCompression),
154-
}
155-
156-
exporter,err:=otlptrace.New(ctx,otlptracehttp.NewClient(opts...))
157-
iferr!=nil {
158-
returnnil,xerrors.Errorf("create otlp exporter: %w",err)
159-
}
160-
161-
returnexporter,nil
162-
}
163-
164138
funcHoneycombExporter(ctx context.Context,apiKeystring) (*otlptrace.Exporter,error) {
165139
opts:= []otlptracegrpc.Option{
166140
otlptracegrpc.WithEndpoint("api.honeycomb.io:443"),

‎codersdk/deployment.go‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,16 +1190,6 @@ when required by your organization's security policy.`,
11901190
Group:&deploymentGroupTelemetry,
11911191
YAML:"enable",
11921192
},
1193-
{
1194-
Name:"Telemetry Trace",
1195-
Description:"Whether Opentelemetry traces are sent to Coder. Coder collects anonymized application tracing to help improve our product. Disabling telemetry also disables this option.",
1196-
Flag:"telemetry-trace",
1197-
Env:"CODER_TELEMETRY_TRACE",
1198-
Default:strconv.FormatBool(flag.Lookup("test.v")==nil),
1199-
Value:&c.Telemetry.Trace,
1200-
Group:&deploymentGroupTelemetry,
1201-
YAML:"trace",
1202-
},
12031193
{
12041194
Name:"Telemetry URL",
12051195
Description:"URL to send telemetry.",

‎docs/cli/server.md‎

Lines changed: 0 additions & 11 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎enterprise/cli/proxyserver.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func (*RootCmd) proxyServer() *clibase.Cmd {
151151
deferhttp.DefaultClient.CloseIdleConnections()
152152
closers.Add(http.DefaultClient.CloseIdleConnections)
153153

154-
tracer,_,closeTracing:=cli.ConfigureTraceProvider(ctx,logger,inv,cfg)
154+
tracer,_,closeTracing:=cli.ConfigureTraceProvider(ctx,logger,cfg)
155155
deferfunc() {
156156
logger.Debug(ctx,"closing tracing")
157157
traceCloseErr:=shutdownWithTimeout(closeTracing,5*time.Second)

‎enterprise/cli/testdata/coder_server_--help.golden‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -416,11 +416,6 @@ telemetrywhen required by your organization's security policy.
416416
Whether telemetry is enabled or not. Coder collects anonymized usage
417417
data to help improve our product.
418418

419-
--telemetry-trace bool, $CODER_TELEMETRY_TRACE (default: false)
420-
Whether Opentelemetry traces are sent to Coder. Coder collects
421-
anonymized application tracing to help improve our product. Disabling
422-
telemetry also disables this option.
423-
424419
USER QUIET HOURS SCHEDULE OPTIONS:
425420
Allow users to set quiet hours schedules each day for workspaces to avoid
426421
workspaces stopping during the day due to template max TTL.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp