diff --git a/.chloggen/log-jaegerreceiver-endpoints.yaml b/.chloggen/log-jaegerreceiver-endpoints.yaml new file mode 100644 index 000000000000..c2d735a0fc19 --- /dev/null +++ b/.chloggen/log-jaegerreceiver-endpoints.yaml @@ -0,0 +1,28 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: jaegerreceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Log the endpoints of different servers started by jaegerreceiver + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [36961] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: | + This change logs the endpoints of different servers started by jaegerreceiver. It simplifies debugging by ensuring log messages match configuration settings. + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [user] diff --git a/receiver/jaegerreceiver/go.mod b/receiver/jaegerreceiver/go.mod index ea1daa0480e7..2f2266cdf5d5 100644 --- a/receiver/jaegerreceiver/go.mod +++ b/receiver/jaegerreceiver/go.mod @@ -27,6 +27,7 @@ require ( go.opentelemetry.io/collector/semconv v0.116.1-0.20241220212031-7c2639723f67 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 + go.uber.org/zap v1.27.0 google.golang.org/grpc v1.69.0 ) @@ -74,7 +75,6 @@ require ( go.opentelemetry.io/otel/sdk v1.32.0 // indirect go.opentelemetry.io/otel/sdk/metric v1.32.0 // indirect go.opentelemetry.io/otel/trace v1.32.0 // indirect - go.uber.org/zap v1.27.0 // indirect golang.org/x/net v0.33.0 // indirect golang.org/x/sys v0.28.0 // indirect golang.org/x/text v0.21.0 // indirect diff --git a/receiver/jaegerreceiver/trace_receiver.go b/receiver/jaegerreceiver/trace_receiver.go index 3e3b44c83e72..369864b45661 100644 --- a/receiver/jaegerreceiver/trace_receiver.go +++ b/receiver/jaegerreceiver/trace_receiver.go @@ -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" @@ -247,6 +248,8 @@ func (jr *jReceiver) startAgent(host component.Host) error { return err } jr.agentProcessors = append(jr.agentProcessors, processor) + + jr.settings.Logger.Info("Starting UDP server for Binary Thrift", zap.String("endpoint", jr.config.AgentBinaryThrift.Endpoint)) } if jr.config.AgentCompactThrift.Endpoint != "" { @@ -267,6 +270,8 @@ func (jr *jReceiver) startAgent(host component.Host) error { return err } jr.agentProcessors = append(jr.agentProcessors, processor) + + jr.settings.Logger.Info("Starting UDP server for Compact Thrift", zap.String("endpoint", jr.config.AgentCompactThrift.Endpoint)) } jr.goroutines.Add(len(jr.agentProcessors)) @@ -388,6 +393,8 @@ func (jr *jReceiver) startCollector(ctx context.Context, host component.Host) er return err } + jr.settings.Logger.Info("Starting HTTP server for Jaeger Thrift", zap.String("endpoint", jr.config.HTTPServerConfig.Endpoint)) + jr.goroutines.Add(1) go func() { defer jr.goroutines.Done() @@ -411,6 +418,8 @@ func (jr *jReceiver) startCollector(ctx context.Context, host component.Host) er api_v2.RegisterCollectorServiceServer(jr.grpc, jr) + jr.settings.Logger.Info("Starting gRPC server for Jaeger Protobuf", zap.String("endpoint", jr.config.GRPCServerConfig.NetAddr.Endpoint)) + jr.goroutines.Add(1) go func() { defer jr.goroutines.Done()