Skip to content

Conversation

@brokenpip3
Copy link

@brokenpip3 brokenpip3 commented Oct 14, 2025

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

  • I have discussed my proposed changes in an issue and have received approval to proceed.
  • I have followed the coding standards of the project.
  • Tests or benchmarks have been added or updated.
  • Documentation has been updated on https://github.com/wundergraph/cosmo-docs.
  • I have read the Contributors Guide.

close: #2277

@coderabbitai
Copy link

coderabbitai bot commented Oct 14, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@brokenpip3 brokenpip3 force-pushed the add-log-service-name-config branch from 3f32887 to cabbc51 Compare October 14, 2025 22:11
@github-actions
Copy link

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Oct 30, 2025
@github-actions github-actions bot removed the Stale label Oct 31, 2025

logLevelAtomic := zap.NewAtomicLevelAt(result.Config.LogLevel)

serviceName := *logServiceName
Copy link
Contributor

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

type Config struct {

There you can also enforce the default, make it available as ENV + make it required.

Copy link
Author

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 :)

@github-actions
Copy link

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Nov 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

router: make service value in logs configurable via env var

2 participants