Skip to content

feat(filter): Add a health check filter #2118

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

Merged
merged 24 commits into from
Jun 23, 2023
Merged

Conversation

RaduW
Copy link
Contributor

@RaduW RaduW commented May 12, 2023

This PR implements a filter for health-check events

Relates to getsentry/sentry#49082

@RaduW RaduW marked this pull request as ready for review May 16, 2023 16:22
@RaduW RaduW requested a review from a team May 16, 2023 16:22
@RaduW RaduW requested a review from iambriccardo May 16, 2023 16:23
@jan-auer jan-auer changed the title feat(inbound-filter): implements an inbound filter for events coming from a health check endpoint. feat(filter): Add a health check filter May 17, 2023
Copy link
Contributor

@iker-barriocanal iker-barriocanal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR looks good, but I want to clarify the configurability of the health check pattern from Sentry, see the comment below.

Comment on lines 11 to 24
static HEALTH_CHECK_ENDPOINTS: Lazy<Regex> = Lazy::new(|| {
Regex::new(
r#"(?ix)
healthcheck|
healthy|
live|
ready|
heartbeat|
/health$|
/healthz$
"#,
)
.expect("Invalid healthcheck filter Regex")
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How often will this list get updated? Are we planning on new inbound filters on transaction names?

The health check filter checks transaction names, there's nothing specific to health checks besides this pattern. However, if we need to change the pattern, it requires redeploying Relay. Could we benefit from this filter if we make it more generic, and accept a pattern from Sentry? This is the approach with the client IPs inbound filter. This will give us more flexibility. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really know, we had a discussion and it was decided that we'd rather update Relay than add this to the configuration of each project ( I guess the implication is that it will not be updated very often).

RaduW and others added 4 commits May 17, 2023 11:03
@RaduW RaduW requested a review from iker-barriocanal May 17, 2023 09:06
Copy link
Contributor

@iker-barriocanal iker-barriocanal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The config will live in Relay for now.

Copy link
Contributor

@iker-barriocanal iker-barriocanal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking for naming inconsistencies.

@RaduW RaduW requested a review from iker-barriocanal June 22, 2023 10:41
@RaduW RaduW removed the request for review from iker-barriocanal June 22, 2023 12:26
default,
skip_serializing_if = "HealthCheckEndpointsFilterConfig::is_empty"
)]
pub health_check: HealthCheckEndpointsFilterConfig,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This filter works for any pattern, not just health checks. Could we rename it to reflect it (e.g. transaction_names)? It's ok if we just use it for health checks, but once we introduce health_check we should keep it for backward compatibility.

@RaduW RaduW requested a review from iker-barriocanal June 22, 2023 16:28
@RaduW RaduW enabled auto-merge (squash) June 23, 2023 08:54
@RaduW RaduW merged commit 68b655a into master Jun 23, 2023
@RaduW RaduW deleted the feat/inbound-filters/health-check branch June 23, 2023 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants