Skip to content

Commit

Permalink
Merge branch 'master' into txiao/feat/extract-client-sdk-for-profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Zylphrex committed Aug 12, 2024
2 parents 0cd037e + 609dc91 commit 6ece7bd
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ jobs:

steps:
- name: Install cosign
uses: sigstore/cosign-installer@v3.5.0
uses: sigstore/cosign-installer@v3.6.0

- name: Install regctl
uses: regclient/actions/regctl-installer@2dac4eff5925ed07edbfe12d2d11af6304df29a6
Expand Down Expand Up @@ -410,7 +410,7 @@ jobs:

steps:
- name: Install cosign
uses: sigstore/cosign-installer@v3.5.0
uses: sigstore/cosign-installer@v3.6.0

- name: Google Auth
id: auth
Expand Down
3 changes: 2 additions & 1 deletion relay-metrics/src/meta/redis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ impl RedisMetricMetaStore {
let expire_at = meta.timestamp.as_secs() + self.expiry.as_secs();
pipe.cmd("EXPIREAT").arg(key).arg(expire_at).ignore();
}
pipe.query(&mut connection).map_err(RedisError::Redis)?;
pipe.query::<()>(&mut connection)
.map_err(RedisError::Redis)?;

relay_statsd::metric!(counter(MetricCounters::MetaRedisUpdate) += redis_updates);

Expand Down
2 changes: 1 addition & 1 deletion relay-pii/src/attachments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ impl<'a> PiiAttachmentsProcessor<'a> {

/// Scrub a filepath, preserving the basename.
pub fn scrub_utf8_filepath(&self, path: &mut str, state: &ProcessingState<'_>) -> bool {
if let Some(index) = path.rfind(|c| c == '/' || c == '\\') {
if let Some(index) = path.rfind(['/', '\\']) {
let data = unsafe { &mut path.as_bytes_mut()[..index] };
self.scrub_bytes(data, state, ScrubEncodings::Utf8)
} else {
Expand Down
5 changes: 2 additions & 3 deletions relay-pii/src/legacy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,11 @@ impl DataScrubbingConfig {
/// Like [`pii_config`](Self::pii_config) but without internal caching.
#[inline]
pub fn pii_config_uncached(&self) -> Result<Option<PiiConfig>, PiiConfigError> {
convert::to_pii_config(self).map_err(|e| {
convert::to_pii_config(self).inspect_err(|e| {
relay_log::error!(
error = &e as &dyn std::error::Error,
error = e as &dyn std::error::Error,
"failed to convert datascrubbing config"
);
e
})
}
}
2 changes: 1 addition & 1 deletion relay-pii/src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ impl<'a> Processor for PiiProcessor<'a> {
// string. If we decide that we need to preserve anything other than suffixes all PII
// tooltips/annotations are potentially wrong.

if let Some(index) = value.rfind(|c| c == '/' || c == '\\') {
if let Some(index) = value.rfind(['/', '\\']) {
let basename = value.split_off(index);
match self.process_string(value, meta, state) {
Ok(()) => value.push_str(&basename),
Expand Down
2 changes: 1 addition & 1 deletion relay-sampling/src/redis_sampling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ pub fn set_redis_expiry(
relay_redis::redis::cmd("EXPIRE")
.arg(key.as_str())
.arg(expiry_time - now)
.query(redis_connection)?;
.query::<()>(redis_connection)?;
Ok(())
}
5 changes: 2 additions & 3 deletions relay-server/src/services/processor/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,8 @@ pub fn extract<G: EventProcessing>(
})?
} else if let Some(item) = nel_item {
relay_log::trace!("processing nel report");
event_from_nel_item(item, envelope.meta()).map_err(|error| {
relay_log::error!(error = &error as &dyn Error, "failed to extract NEL report");
error
event_from_nel_item(item, envelope.meta()).inspect_err(|error| {
relay_log::error!(error = error as &dyn Error, "failed to extract NEL report");
})?
} else if attachment_item.is_some() || breadcrumbs1.is_some() || breadcrumbs2.is_some() {
relay_log::trace!("extracting attached event data");
Expand Down

0 comments on commit 6ece7bd

Please sign in to comment.