Skip to content

Commit

Permalink
feat[jaeger-receiver]: log the endpoint of the server listening
Browse files Browse the repository at this point in the history
Signed-off-by: Saumyacodes-40 <[email protected]>
  • Loading branch information
Saumya40-codes committed Dec 26, 2024
1 parent cb8b5d3 commit 19cff4a
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions receiver/jaegerreceiver/trace_receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import (
"go.opentelemetry.io/collector/receiver"
"go.opentelemetry.io/collector/receiver/receiverhelper"
"go.uber.org/multierr"
"go.uber.org/zap"
"google.golang.org/grpc"

jaegertranslator "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger"
Expand Down Expand Up @@ -247,6 +248,12 @@ func (jr *jReceiver) startAgent(host component.Host) error {
return err
}
jr.agentProcessors = append(jr.agentProcessors, processor)

jr.settings.Logger.Info("Starting Binary Thrift server",
zap.String("kind", "receiver"),
zap.String("name", "jaegerreceiver"),
zap.String("endpoint", jr.config.AgentBinaryThrift.Endpoint),
)
}

if jr.config.AgentCompactThrift.Endpoint != "" {
Expand All @@ -267,6 +274,12 @@ func (jr *jReceiver) startAgent(host component.Host) error {
return err
}
jr.agentProcessors = append(jr.agentProcessors, processor)

jr.settings.Logger.Info("Starting Compact Thrift server",
zap.String("kind", "receiver"),
zap.String("name", "jaegerreceiver"),
zap.String("endpoint", jr.config.AgentCompactThrift.Endpoint),
)
}

jr.goroutines.Add(len(jr.agentProcessors))
Expand All @@ -280,6 +293,12 @@ func (jr *jReceiver) startAgent(host component.Host) error {
if jr.config.AgentHTTPEndpoint != "" {
jr.agentServer = httpserver.NewHTTPServer(jr.config.AgentHTTPEndpoint, &notImplementedConfigManager{}, metrics.NullFactory, jr.settings.Logger)

jr.settings.Logger.Info("Starting HTTP server",
zap.String("kind", "receiver"),
zap.String("name", "jaegerreceiver"),
zap.String("endpoint", jr.config.AgentHTTPEndpoint),
)

jr.goroutines.Add(1)
go func() {
defer jr.goroutines.Done()
Expand Down Expand Up @@ -388,6 +407,12 @@ func (jr *jReceiver) startCollector(ctx context.Context, host component.Host) er
return err
}

jr.settings.Logger.Info("Starting HTTP collector server",
zap.String("kind", "receiver"),
zap.String("name", "jaegerreceiver"),
zap.String("endpoint", jr.config.HTTPServerConfig.Endpoint),
)

jr.goroutines.Add(1)
go func() {
defer jr.goroutines.Done()
Expand All @@ -411,6 +436,12 @@ func (jr *jReceiver) startCollector(ctx context.Context, host component.Host) er

api_v2.RegisterCollectorServiceServer(jr.grpc, jr)

jr.settings.Logger.Info("Starting gRPC collector server",
zap.String("kind", "receiver"),
zap.String("name", "jaegerreceiver"),
zap.String("endpoint", jr.config.GRPCServerConfig.NetAddr.Endpoint),
)

jr.goroutines.Add(1)
go func() {
defer jr.goroutines.Done()
Expand Down

0 comments on commit 19cff4a

Please sign in to comment.