node: Put in log info about listening endpoints #714

Merged
fyrchik merged 1 commit from acid-ant/frostfs-node:bugfix/709-log-interface into master 2023-10-02 13:31:11 +00:00
Member

Close #709

Logs example:

2023-10-02T09:12:54.899Z	info	frostfs-node/grpc.go:113	start listening endpoint	{"service": "gRPC", "endpoint": "192.168.130.72:8080"}
2023-10-02T09:12:55.905Z	info	frostfs-node/control.go:72	start listening endpoint	{"service": "control", "endpoint": "s02.frostfs.devenv:8081"}
2023-10-02T09:12:55.905Z	info	frostfs-node/httpcomponent.go:47	start listening endpoint	{"service": "pprof", "endpoint": ":6060"}
2023-10-02T09:12:55.905Z	info	frostfs-node/httpcomponent.go:47	start listening endpoint	{"service": "metrics", "endpoint": ":9090"}

Signed-off-by: Anton Nikiforov an.nikiforov@yadro.com

Close #709 Logs example: ``` 2023-10-02T09:12:54.899Z info frostfs-node/grpc.go:113 start listening endpoint {"service": "gRPC", "endpoint": "192.168.130.72:8080"} 2023-10-02T09:12:55.905Z info frostfs-node/control.go:72 start listening endpoint {"service": "control", "endpoint": "s02.frostfs.devenv:8081"} 2023-10-02T09:12:55.905Z info frostfs-node/httpcomponent.go:47 start listening endpoint {"service": "pprof", "endpoint": ":6060"} 2023-10-02T09:12:55.905Z info frostfs-node/httpcomponent.go:47 start listening endpoint {"service": "metrics", "endpoint": ":9090"} ``` Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
requested reviews from storage-core-committers, storage-core-developers 2023-10-02 07:42:19 +00:00
fyrchik approved these changes 2023-10-02 08:56:56 +00:00
@ -42,6 +43,8 @@ func (cmp *httpComponent) init(c *cfg) {
cmp.name,
func(ctx context.Context) {
runAndLog(ctx, c, cmp.name, false, func(context.Context, *cfg) {
c.log.Info(fmt.Sprintf("start listening %s endpoint", cmp.name),
Owner

How about zap.String("service", cmp.name)?

How about `zap.String("service", cmp.name)`?
Author
Member

Much better, updated.

Much better, updated.
acid-ant force-pushed bugfix/709-log-interface from 918f08d106 to 1a1a739bd8 2023-10-02 09:17:43 +00:00 Compare
fyrchik reviewed 2023-10-02 10:14:52 +00:00
@ -42,6 +44,9 @@ func (cmp *httpComponent) init(c *cfg) {
cmp.name,
func(ctx context.Context) {
runAndLog(ctx, c, cmp.name, false, func(context.Context, *cfg) {
c.log.Info(fmt.Sprintf(logs.FrostFSNodeStartListeningEndpoint),
Owner

fmt.Sprintf can be removed now?

`fmt.Sprintf` can be removed now?
fyrchik marked this conversation as resolved
acid-ant force-pushed bugfix/709-log-interface from 1a1a739bd8 to 079fe2b4af 2023-10-02 10:28:20 +00:00 Compare
dstepanov-yadro approved these changes 2023-10-02 11:26:43 +00:00
Owner

I don't see how it is related, but does 1.21 tests run locally for you? They fail on CI with some "mIssing package" error.

I don't see how it is related, but does 1.21 tests run locally for you? They fail on CI with some "mIssing package" error.
Author
Member

I don't see how it is related, but does 1.21 tests run locally for you? They fail on CI with some "mIssing package" error.

I am also surprised by this issue, it prompted me to put 1.21 at last, but everything is build and run fine locally.

> I don't see how it is related, but does 1.21 tests run locally for you? They fail on CI with some "mIssing package" error. I am also surprised by this issue, it prompted me to put 1.21 at last, but everything is build and run fine locally.
fyrchik merged commit 627b302745 into master 2023-10-02 13:31:11 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#714
No description provided.