Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[receiver/jaegerreceiver] Add logs when the respective server starts in jaegerreceiver #36961

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
28 changes: 28 additions & 0 deletions .chloggen/log-jaegerreceiver-endpoints.yaml
Original file line number Diff line number Diff line change
@@ -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]
2 changes: 1 addition & 1 deletion receiver/jaegerreceiver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down Expand Up @@ -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
Expand Down
9 changes: 9 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,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 != "" {
Expand All @@ -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))
Expand Down Expand Up @@ -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()
Expand All @@ -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()
Expand Down
Loading