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/otlp] Rewrite logs related to server startup #6174

Merged
merged 4 commits into from
Oct 4, 2022
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

- Add config marshaler (#5566)
- Add semantic conventions for specification v1.10-v1.13 (#6213)
- `receiver/otlp`: Make logs related to gRCPC and HTTP server startup clearer (#6174)

## v0.61.0 Beta

Expand Down
5 changes: 3 additions & 2 deletions receiver/otlpreceiver/otlp.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"net/http"
"sync"

"go.uber.org/zap"
"google.golang.org/grpc"

"go.opentelemetry.io/collector/component"
Expand Down Expand Up @@ -67,7 +68,7 @@ func newOtlpReceiver(cfg *Config, settings component.ReceiverCreateSettings) *ot
}

func (r *otlpReceiver) startGRPCServer(cfg *configgrpc.GRPCServerSettings, host component.Host) error {
r.settings.Logger.Info("Starting GRPC server on endpoint " + cfg.NetAddr.Endpoint)
r.settings.Logger.Info("Starting GRPC server", zap.String("endpoint", cfg.NetAddr.Endpoint))

gln, err := cfg.ToListener()
if err != nil {
Expand All @@ -85,7 +86,7 @@ func (r *otlpReceiver) startGRPCServer(cfg *configgrpc.GRPCServerSettings, host
}

func (r *otlpReceiver) startHTTPServer(cfg *confighttp.HTTPServerSettings, host component.Host) error {
r.settings.Logger.Info("Starting HTTP server on endpoint " + cfg.Endpoint)
r.settings.Logger.Info("Starting HTTP server", zap.String("endpoint", cfg.Endpoint))
var hln net.Listener
hln, err := cfg.ToListener()
if err != nil {
Expand Down