Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions cmd/jaeger/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@ service:
port: 8888
logs:
level: debug
# TODO Initialize telemetry tracer once OTEL released new feature.
# https://github.com/open-telemetry/opentelemetry-collector/issues/10663
traces:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't this by default in this config, but in cmd/jaeger/internal/all-in-one.yaml

Copy link
Contributor Author

@AnmolxSingh AnmolxSingh Oct 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my bad, I remember you mentioned this even during the call.
I had a doubt in mind, if we are going to enable tracing then why only in all-in-one not all the config files? Does this approach give the user the option to enable the setting?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All in one historically came with tracing enabled 100%. For real production scenarios people can configure their own sampling.

processors:
- batch:
exporter:
otlp:
protocol: http/protobuf
endpoint: http://0.0.0.0:4318

extensions:
healthcheckv2:
Expand Down
31 changes: 2 additions & 29 deletions cmd/jaeger/internal/extension/jaegerquery/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@ import (
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/extension"
"go.opentelemetry.io/collector/extension/extensioncapabilities"
"go.opentelemetry.io/otel/trace"
"go.uber.org/zap"

"github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerstorage"
queryapp "github.com/jaegertracing/jaeger/cmd/query/app"
"github.com/jaegertracing/jaeger/cmd/query/app/querysvc"
v2querysvc "github.com/jaegertracing/jaeger/cmd/query/app/querysvc/v2/querysvc"
"github.com/jaegertracing/jaeger/internal/jtracer"
"github.com/jaegertracing/jaeger/internal/metrics"
"github.com/jaegertracing/jaeger/internal/storage/metricstore/disabled"
"github.com/jaegertracing/jaeger/internal/storage/v1/api/metricstore"
Expand All @@ -41,10 +39,10 @@ type server struct {
closeTracer func(ctx context.Context) error
}

func newServer(config *Config, otel component.TelemetrySettings) *server {
func newServer(config *Config, telset component.TelemetrySettings) *server {
return &server{
config: config,
telset: otel,
telset: telset,
}
}

Expand All @@ -55,30 +53,7 @@ func (*server) Dependencies() []component.ID {
}

func (s *server) Start(ctx context.Context, host component.Host) error {
var tp trace.TracerProvider
success := false
tp = jtracer.NoOp().OTEL
if s.config.EnableTracing {
// TODO OTel-collector does not initialize the tracer currently
// https://github.com/open-telemetry/opentelemetry-collector/issues/7532
//nolint
tracerProvider, err := jtracer.New("jaeger")
if err != nil {
return fmt.Errorf("could not initialize a tracer: %w", err)
}
tp = tracerProvider.OTEL
// make sure to close the tracer if subsequent code exists with error
defer func(ctx context.Context) {
if success {
s.closeTracer = tracerProvider.Close
} else {
tracerProvider.Close(ctx)
}
}(ctx)
}

telset := telemetry.FromOtelComponent(s.telset, host)
telset.TracerProvider = tp
telset.Metrics = telset.Metrics.
Namespace(metrics.NSOptions{Name: "jaeger"}).
Namespace(metrics.NSOptions{Name: "query"})
Expand Down Expand Up @@ -136,8 +111,6 @@ func (s *server) Start(ctx context.Context, host component.Host) error {
if err := s.server.Start(ctx); err != nil {
return fmt.Errorf("could not start jaeger-query: %w", err)
}

success = true
return nil
}

Expand Down
Loading