-
Notifications
You must be signed in to change notification settings - Fork 0
chore: improve const maintainability #1835
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?
Conversation
gsanchezgavier
commented
Nov 4, 2025
- reuse const defaults
- improves e2e test assertion time
11790d2 to
572a18d
Compare
| // Fleet Control auto generated agent id | ||
| pub const AGENT_ID_INFRA_AGENT: &str = "nr-infra"; | ||
| pub const AGENT_ID_NRDOT: &str = "nrdot"; |
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 should have a way to make this robust to unilateral changes from FC (not saying it will happen, but it's the kind of thing with potential to break something in the long term xD)
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.
at least we have it in a const now
| ( | ||
| "license_key".to_string(), | ||
| serde_yaml::Value::String("{{NEW_RELIC_LICENSE_KEY}}".to_string()), | ||
| serde_yaml::Value::String(format!("{{{{{NEW_RELIC_LICENSE_CONFIG_KEY}}}}}")), |
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.
Lisp but with braces!
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 was thinking how horrible was this while doing it but i was too lazy to check if there was a better way
agent-control/src/cli/on_host/host_monitoring_gen/otel_config_gen.rs
Outdated
Show resolved
Hide resolved
572a18d to
bae8cf3
Compare
DavSanchez
left a comment
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.
Thanks! 🚀