-
Notifications
You must be signed in to change notification settings - Fork 93
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
fix(crons): Limit environment names on check-ins to 64 chars #2309
Conversation
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.
The metastructure
attribute only works in combination with Annotated
. I think we need to do some manual work here, similar to trim_slug
.
is there any way to directly import this value instead? can add in the copycat relay/relay-general/src/processor/attrs.rs Line 134 in 3ec78a1
|
You can either add |
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.
Almost there, see two remaining comments.
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.
Left few suggestions.
I'm not sure we want to rely on relay-general
crate though, it's quite big with a lot of deps as well, and it would be better to keep the relay-monitors
somewhere with smaller footprint.
CHANGELOG.md
Outdated
@@ -6,6 +6,7 @@ | |||
|
|||
- Add support for `sampled` field in the DSC and error tagging. ([#2290](https://github.com/getsentry/relay/pull/2290)) | |||
- Move span tag extraction from metrics to normalization. ([#2304](https://github.com/getsentry/relay/pull/2304)) | |||
- Limit environment names on check-ins to 64 chars. ([#2309](https://github.com/getsentry/relay/pull/2309)) |
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.
Could you, please, move this to Unreleased
section of the changelog
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.
Yep, got moved during a bad merge
relay-monitors/src/lib.rs
Outdated
@@ -32,6 +35,10 @@ pub enum ProcessCheckInError { | |||
/// Monitor slug was empty after slugification. | |||
#[error("the monitor slug is empty or invalid")] | |||
EmptySlug, | |||
|
|||
/// Environment name was invalid.environment. |
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.
/// Environment name was invalid.environment. | |
/// Environment name was invalid. |
I really want to only import the |
How about we define a constant in |
I think I'm just going to hardcode |
alright I can't figure out how to make this work. will wait for comments |
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.
LGTM as-is.
Restricts max_chars on environment names.
Helps close SENTRY-1351
#skip-changelog