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

Make logger names consistent in the xDS server package #2313

Closed
jpeach opened this issue Jul 6, 2021 · 14 comments · Fixed by #10965
Closed

Make logger names consistent in the xDS server package #2313

jpeach opened this issue Jul 6, 2021 · 14 comments · Fixed by #10965
Labels
area/observability good first issue Good for newcomers kind/cleanup Cleanup/refactor an existing component/code triage/accepted The issue was reviewed and is complete enough to start working on it triage/stale Inactive for some time. It will be triaged again
Milestone

Comments

@jpeach
Copy link
Contributor

jpeach commented Jul 6, 2021

Summary

 git grep Log.*WithName pkg/xds/
pkg/xds/bootstrap/handler.go:var log = core.Log.WithName("bootstrap")
pkg/xds/cache/cla/cache.go:     claCacheLog = core.Log.WithName("cla-cache")
pkg/xds/cache/mesh/snapshot.go:var meshCacheLog = core.Log.WithName("mesh-cache")
pkg/xds/envoy/clusters/v3/health_check_configurer.go:           core.Log.WithName("health-check-configurer").Error(
pkg/xds/generator/outbound_proxy_generator.go:var outboundLog = core.Log.WithName("outbound-proxy-generator")
pkg/xds/server/callbacks/dataplane_lifecycle.go:var lifecycleLog = core.Log.WithName("xds").WithName("dp-lifecycle")
pkg/xds/server/callbacks/dataplane_status_sink.go:var sinkLog = core.Log.WithName("xds").WithName("sink")
pkg/xds/server/callbacks/dataplane_status_tracker.go:var statusTrackerLog = core.Log.WithName("xds").WithName("statusTracker")
pkg/xds/server/callbacks/dataplane_sync_tracker.go:     dataplaneSyncTrackerLog = core.Log.WithName("xds-server").WithName("dataplane-sync-tracker")
pkg/xds/server/callbacks/nack_backoff.go:var nackLog = core.Log.WithName("xds").WithName("nack-backoff")
pkg/xds/server/v3/components.go:var xdsServerLog = core.Log.WithName("xds-server")
pkg/xds/server/v3/reconcile.go: reconcileLog = core.Log.WithName("xds-server").WithName("reconcile")
pkg/xds/server/v3/resource_warming_forcer.go:var warmingForcerLog = xdsServerLog.WithName("warming-forcer")
pkg/xds/sync/components.go:     xdsServerLog = core.Log.WithName("xds-server")
pkg/xds/sync/dataplane_proxy_builder.go:var syncLog = core.Log.WithName("sync")
pkg/xds/sync/dataplane_watchdog_factory.go:     log := xdsServerLog.WithName("dataplane-sync-watchdog").WithValues("dataplaneKey", proxyId.ToResourceKey())
pkg/xds/template/proxy_template_resolver.go:    templateResolverLog = core.Log.WithName("proxy-template-resolver")

Sometimes we use xds as the parent logger name, sometimes we use xds-server. Some names are hyphenated (proxy-template-resolver) and some are lowerCamelCased (statusTracker).

Would be nice to make these all consistent.

@jpeach jpeach added the good first issue Good for newcomers label Jul 8, 2021
@burntcarrot
Copy link
Contributor

@jpeach I would like to take this one if it's open. Would you prefer camel case or something else?

Just for a sanity check, can you tell me if there are any services dependent on the logger name?

@jpeach
Copy link
Contributor Author

jpeach commented Jul 15, 2021

@jpeach I would like to take this one if it's open.

Great!

Would you prefer camel case or something else?

Lets stick with hyphen-separated-words.

Just for a sanity check, can you tell me if there are any services dependent on the logger name?

Not AFAIK. Would be good to ping on the Kuma slack though.

@jpeach
Copy link
Contributor Author

jpeach commented Jul 15, 2021

I pinged this to the community slack. Let's give people a week to give feedback.

https://kuma-mesh.slack.com/archives/CN2GN4HE1/p1626390711062600

@jpeach
Copy link
Contributor Author

jpeach commented Jul 25, 2021

Remaining work here is to look into the use of WithName("xds"), and WithName("xds-server") and loggers that don't do either.

@github-actions github-actions bot added the triage/stale Inactive for some time. It will be triaged again label Nov 23, 2021
@github-actions
Copy link
Contributor

This issue was inactive for 30 days it will be reviewed in the next triage meeting and might be closed.
If you think this issue is still relevant please comment on it promptly or attend the next triage meeting.

@lahabana lahabana added area/observability triage/accepted The issue was reviewed and is complete enough to start working on it kind/cleanup Cleanup/refactor an existing component/code and removed triage/stale Inactive for some time. It will be triaged again labels Apr 26, 2022
@github-actions
Copy link
Contributor

This issue was inactive for 30 days it will be reviewed in the next triage meeting and might be closed.
If you think this issue is still relevant please comment on it promptly or attend the next triage meeting.

@github-actions github-actions bot added the triage/stale Inactive for some time. It will be triaged again label May 27, 2022
@lahabana lahabana removed the triage/stale Inactive for some time. It will be triaged again label Jun 29, 2022
@github-actions github-actions bot added the triage/stale Inactive for some time. It will be triaged again label Aug 29, 2022
@github-actions
Copy link
Contributor

This issue was inactive for 30 days it will be reviewed in the next triage meeting and might be closed.
If you think this issue is still relevant please comment on it promptly or attend the next triage meeting.

@lobkovilya lobkovilya removed the triage/stale Inactive for some time. It will be triaged again label Aug 29, 2022
@github-actions github-actions bot added the triage/stale Inactive for some time. It will be triaged again label Nov 28, 2022
@github-actions
Copy link
Contributor

This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed.
If you think this issue is still relevant, please comment on it or attend the next triage meeting.

@michaelbeaumont michaelbeaumont removed the triage/stale Inactive for some time. It will be triaged again label Dec 5, 2022
@github-actions github-actions bot added the triage/stale Inactive for some time. It will be triaged again label Mar 6, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2023

This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed.
If you think this issue is still relevant, please comment on it or attend the next triage meeting.

@slonka slonka removed the triage/stale Inactive for some time. It will be triaged again label Mar 6, 2023
@github-actions github-actions bot added the triage/stale Inactive for some time. It will be triaged again label Jun 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2023

This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed.
If you think this issue is still relevant, please comment on it or attend the next triage meeting.

@lukidzi lukidzi removed the triage/stale Inactive for some time. It will be triaged again label Jun 12, 2023
@github-actions github-actions bot added the triage/stale Inactive for some time. It will be triaged again label Sep 11, 2023
@github-actions
Copy link
Contributor

This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed.
If you think this issue is still relevant, please comment on it or attend the next triage meeting.

@lukidzi lukidzi removed the triage/stale Inactive for some time. It will be triaged again label Sep 11, 2023
@github-actions github-actions bot added the triage/stale Inactive for some time. It will be triaged again label Dec 12, 2023
Copy link
Contributor

This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed.
If you think this issue is still relevant, please comment on it or attend the next triage meeting.

@jakubdyszkiewicz jakubdyszkiewicz removed the triage/stale Inactive for some time. It will be triaged again label Dec 14, 2023
@lahabana
Copy link
Contributor

It's better than it used too but could still do with a few imporvements:

pkg/xds/bootstrap/handler.go:var log = core.Log.WithName("bootstrap")
pkg/xds/context/context.go:             core.Log.WithName("xds").Info("Tracing backend is not found. Ignoring.",
pkg/xds/context/context.go:             core.Log.WithName("xds").Info("Logging backend is not found. Ignoring.",
pkg/xds/context/mesh_context_builder.go:var logger = core.Log.WithName("xds").WithName("context")
pkg/xds/envoy/clusters/v3/health_check_configurer.go:           core.Log.WithName("health-check-configurer").Error(
pkg/xds/generator/egress/generator.go:var log = core.Log.WithName("xds").WithName("generator").WithName("egress")
pkg/xds/generator/outbound_proxy_generator.go:var outboundLog = core.Log.WithName("outbound-proxy-generator")
pkg/xds/generator/prometheus_endpoint_generator.go:var prometheusLog = core.Log.WithName("prometheus-endpoint-generator")
pkg/xds/generator/secrets/generator.go: log := core.Log.WithName("secrets-generator").WithValues("proxyID", proxyId.String())
pkg/xds/generator/secrets/generator.go: log := core.Log.WithName("secrets-generator").WithValues("proxyID", proxy.Id.String())
pkg/xds/secrets/secrets.go:var log = core.Log.WithName("xds").WithName("secrets")
pkg/xds/server/callbacks/dataplane_lifecycle.go:var lifecycleLog = core.Log.WithName("xds").WithName("dp-lifecycle")
pkg/xds/server/callbacks/dataplane_status_sink.go:var sinkLog = core.Log.WithName("xds").WithName("sink")
pkg/xds/server/callbacks/dataplane_status_tracker.go:var statusTrackerLog = core.Log.WithName("xds").WithName("status-tracker")
pkg/xds/server/callbacks/dataplane_sync_tracker.go:var dataplaneSyncTrackerLog = core.Log.WithName("xds-server").WithName("dataplane-sync-tracker")
pkg/xds/server/callbacks/nack_backoff.go:var nackLog = core.Log.WithName("xds").WithName("nack-backoff")
pkg/xds/server/v3/components.go:var xdsServerLog = core.Log.WithName("xds-server")
pkg/xds/server/v3/context.go:   log := core.Log.WithName(name)
pkg/xds/server/v3/reconcile.go:var reconcileLog = core.Log.WithName("xds-server").WithName("reconcile")
pkg/xds/server/v3/resource_warming_forcer.go:var warmingForcerLog = xdsServerLog.WithName("warming-forcer")
pkg/xds/sync/components.go:var xdsServerLog = core.Log.WithName("xds-server")
pkg/xds/sync/dataplane_watchdog_factory.go:     log := xdsServerLog.WithName("dataplane-sync-watchdog").WithValues("dataplaneKey", dpKey)
pkg/xds/template/proxy_template_resolver.go:var templateResolverLog = core.Log.WithName("proxy-template-resolver")

@lahabana lahabana added this to the 2.7.x milestone Jan 10, 2024
@lahabana lahabana modified the milestones: 2.7.x, 2.8.x Mar 25, 2024
@lahabana lahabana modified the milestones: 2.8.x, 2.9.x Apr 24, 2024
@github-actions github-actions bot added the triage/stale Inactive for some time. It will be triaged again label Jul 24, 2024
Copy link
Contributor

This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed.
If you think this issue is still relevant, please comment on it or attend the next triage meeting.

Automaat added a commit to Automaat/kuma that referenced this issue Jul 24, 2024
Fixes: kumahq#2313
Signed-off-by: Marcin Skalski <skalskimarcin33@gmail.com>
Automaat added a commit to Automaat/kuma that referenced this issue Jul 24, 2024
Fixes: kumahq#2313
Signed-off-by: Marcin Skalski <skalskimarcin33@gmail.com>
Automaat added a commit to Automaat/kuma that referenced this issue Jul 24, 2024
Fixes: kumahq#2313
Signed-off-by: Marcin Skalski <skalskimarcin33@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/observability good first issue Good for newcomers kind/cleanup Cleanup/refactor an existing component/code triage/accepted The issue was reviewed and is complete enough to start working on it triage/stale Inactive for some time. It will be triaged again
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants