Repository navigation
ref: Implement ingest_path attribute - #6402
pierceroberts wants to merge 2 commits into
Conversation
loewenheim
left a comment
There was a problem hiding this comment.
Hi, thank you for the contribution! This looks sensible. However, you will need to rebase on top of master (or merge it) because some things related to Config have changed in the meantime.
There was a problem hiding this comment.
You can temporarily add your new attribute as a constant in this PR, then open a PR to conventions adding the attribute, then update this PR.
| "sentry.description": { | ||
| "type": "string", | ||
| "value": "secret123" | ||
| "value": "[Filtered]" |
There was a problem hiding this comment.
Probably a result of the sentry-conventions confusion.
| fn format_relay_ingest_path_prefix(version: &str, git_revision: Option<&str>) -> String { | ||
| match git_revision { | ||
| Some(revision) if !revision.is_empty() => format!("{version}@[{revision}]"), | ||
| _ => version.to_owned(), | ||
| } | ||
| } |
There was a problem hiding this comment.
I'd fold this into format_relay_ingest_path_entry. Having it available separately in current_relay_ingest_path_entry doesn't save you that much, you have to call format! on every access anyway.
| .map(|value| match value.value()? { | ||
| Value::String(value) => Some(value.clone()), | ||
| _ => None, | ||
| }) |
There was a problem hiding this comment.
| .map(|value| match value.value()? { | |
| Value::String(value) => Some(value.clone()), | |
| _ => None, | |
| }) | |
| .map(|value| Some(value.as_str()?.to_owned())) |
| ingest_path.push(current_entry.to_owned()); | ||
| } | ||
|
|
||
| let attributes = attributes.get_or_insert_with(Default::default); |
There was a problem hiding this comment.
This line can move to the start of the function.
This is related to #6071
and is my first attempt at getting this implemented.
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.