-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix(proxy): Keep spans, profiles, and replays in proxy mode #3888
Conversation
@@ -798,6 +798,9 @@ struct ProcessEnvelopeState<'a, Group> { | |||
/// The state of the project that this envelope belongs to. | |||
project_state: Arc<ProjectInfo>, | |||
|
|||
/// The config of this Relay instance. | |||
config: Arc<Config>, |
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 did not have the config on the state but passed it into all the processing functions which needed it.
For example:
relay/relay-server/src/services/processor.rs
Lines 1686 to 1690 in 77ffd71
if_processing!(self.inner.config, { | |
unreal::expand(state, &self.inner.config)?; | |
}); | |
event::extract(state, &self.inner.config)?; |
Do we want to replace all of these now as well?
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.
Yeah good idea.
/// but we want to forward them in proxy mode. | ||
fn feature_disabled_by_upstream(&self, feature: Feature) -> bool { | ||
match self.config.relay_mode() { | ||
RelayMode::Proxy | RelayMode::Static | RelayMode::Capture => false, |
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.
Is this correct for all feature flags?
If not: Possibly we make project.has_feature()
require a &Config
as argument?
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 think this logic only makes sense for feature flags that are used to filter data. I.e. it would not make sense to assume that a feature is enabled for something like Feature::DoExpensiveAndDangerousExperimentalStuff
in proxies. Do you think I should just rename this function to should_filter
?
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 like should_filter
!
Fixes #3800