-
Notifications
You must be signed in to change notification settings - Fork 192
feat(router): permit log service name to be configured via env var #2276
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
base: main
Are you sure you want to change the base?
feat(router): permit log service name to be configured via env var #2276
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
3f32887 to
cabbc51
Compare
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
|
|
||
| logLevelAtomic := zap.NewAtomicLevelAt(result.Config.LogLevel) | ||
|
|
||
| serviceName := *logServiceName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead off having this as a flag, it would be more useful to support it in the config file. For this, you need to update
cosmo/router/pkg/config/config.go
Line 1006 in d6a443e
| type Config struct { |
There you can also enforce the default, make it available as ENV + make it required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah it make sense, ty, let me do it :)
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
This PR will make the "service" value in router logs configurable through an env var, while keeping the current hardcoded @wundergraph/router as the default.
I was not able to find any existing test for router/cmd/main.go, in case you prefer I can add a couple of test cases to cover this change.
@coderabbitai summary
Checklist
close: #2277