Skip to content

Commit

Permalink
[receiver/otlp] Rewrite logs related to server startup (#6174)
Browse files Browse the repository at this point in the history
* [receiver/otlp] Rewrite confusing logs

* Add changelog

* Update CHANGELOG.md
  • Loading branch information
mx-psi authored Oct 4, 2022
1 parent 7cb544d commit b1e1614
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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

0 comments on commit b1e1614

Please sign in to comment.