-
Notifications
You must be signed in to change notification settings - Fork 272
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
Feat: Display Apollo Router version on startup. #543
Conversation
f1df3e8
to
384273f
Compare
apollo-router/src/main.rs
Outdated
tracing::info!("Apollo Router version {}", env!("CARGO_PKG_VERSION")); | ||
|
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.
We are using this kind of format in the spaceport (which was inspired by the TS naming convention):
format!("{}@{}",
std::env!("CARGO_PKG_NAME"),
std::env!("CARGO_PKG_VERSION")
);
It would just become:
tracing::info!("{}@{}", std::env!("CARGO_PKG_NAME"), std::env!("CARGO_PKG_VERSION"));
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.
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.
I'm good with apollo-router@x.y.z
, though it's worth noting that the usage in spaceport
is meant to be serialized into a protobuf file and be machine readable:
router/apollo-spaceport/src/lib.rs
Line 146 in bef4fc6
header.agent_version = format!( |
This user story is very different. It's, instead: As a user, I want to be able to quickly see the version I'm running at startup.
I don't think that calls for consistency in that case and I think Apollo Router vX.Y.Z
would look nice for a human to read.
But again, I'm fine with apollo-router@x.y.z
.
- **Display Apollo Router version on startup** ([PR #543](https://github.com/apollographql/router/pull/543)) | ||
The Apollo Router displays its version on startup from now on, which will come in handy when debugging/observing how your application behaves. |
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.
❤️
apollo-router/src/main.rs
Outdated
tracing::info!("Apollo Router version {}", env!("CARGO_PKG_VERSION")); | ||
|
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.
I'm good with apollo-router@x.y.z
, though it's worth noting that the usage in spaceport
is meant to be serialized into a protobuf file and be machine readable:
router/apollo-spaceport/src/lib.rs
Line 146 in bef4fc6
header.agent_version = format!( |
This user story is very different. It's, instead: As a user, I want to be able to quickly see the version I'm running at startup.
I don't think that calls for consistency in that case and I think Apollo Router vX.Y.Z
would look nice for a human to read.
But again, I'm fine with apollo-router@x.y.z
.
👍 |
This commit displays the Apollo Router version as an INFO when the router starts.
af64292
to
071520d
Compare
This commit displays the Apollo Router version as an INFO when the router starts.