Skip to content
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

feat: Remove sessions #3271

Merged
merged 18 commits into from Mar 25, 2024
Merged

feat: Remove sessions #3271

merged 18 commits into from Mar 25, 2024

Conversation

lynnagara
Copy link
Member

@lynnagara lynnagara commented Mar 14, 2024

Sessions does not exist anymore

Copy link
Member

@jjbayer jjbayer left a comment

Choose a reason for hiding this comment

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

@lynnagara thank you for picking this up!

We cannot get rid of sessions entirely, because SDKs still send them. But we can remove the Kafka topic and hard-code the decision to drop sessions after converting them to metrics, essentially everything around:

/// Returns `true` if the session should be dropped after extracting metrics.
pub fn should_drop(&self) -> bool {
self.drop
}

@@ -155,7 +149,6 @@ impl Default for TopicAssignments {
transactions: "ingest-transactions".to_owned().into(),
outcomes: "outcomes".to_owned().into(),
outcomes_billing: None,
sessions: "ingest-sessions".to_owned().into(),
Copy link
Member

Choose a reason for hiding this comment

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

Does the ops repo still have configuration for this? We don't want Relay to crash because of an unknown topic parameter.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. https://github.com/getsentry/ops/blob/master/k8s/clusters/us/default.yaml#L3256-L3257. Though is this comment actually backwards and it needs to be removed from ops first?

Comment on lines 99 to 102
/// Session update data.
Session,
/// Aggregated session data.
Sessions,
Copy link
Member

Choose a reason for hiding this comment

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

Relay now converts session items from SDKs to metrics, but we still need to accept these incoming item types.

@lynnagara
Copy link
Member Author

thanks for the feedback @jjbayer! i tried to pared this down to the minimum now -- removed the envelope changes and just taking out the part that produces to kafka. I'm not sure why the metrics extraction tests are failing now though - is it possible metrics are not being properly extracted anymore?

Copy link
Member

@jjbayer jjbayer left a comment

Choose a reason for hiding this comment

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

Though is this comment actually backwards and it needs to be removed from ops first?

I think the comment is mostly about single tenant, are the kafka topics empty there as well? I just checked my local relay and it seems like it's fine with an unknown topic key in the config, so this should be safe to merge.

https://github.com/getsentry/ops/blob/b5a4fb9c0f0a2e2d2eaf50799d1907a593ad5f80/k8s/clusters/us/default.yaml#L3262-L3264

pub fn should_drop(&self) -> bool {
self.drop
true
Copy link
Member

Choose a reason for hiding this comment

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

Personally I would just remove this method.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

client,
item,
)?;
// Do nothing
Copy link
Member

Choose a reason for hiding this comment

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

There's a catch-all at the bottom of this match, so we can just remove this branch.

"sdk": "raven-node/2.6.3",
}

sessions_consumer.assert_empty()
Copy link
Member

Choose a reason for hiding this comment

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

Shall we just remove the entire test case (same below)?

CHANGELOG.md Outdated
Comment on lines 19 to 20
- Stop producing to sessions topic, the feature is now fully migrated to metrics ([#3271](https://github.com/getsentry/relay/pull/3271))

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- Stop producing to sessions topic, the feature is now fully migrated to metrics ([#3271](https://github.com/getsentry/relay/pull/3271))
- Stop producing to sessions topic, the feature is now fully migrated to metrics. ([#3271](https://github.com/getsentry/relay/pull/3271))

@lynnagara lynnagara enabled auto-merge (squash) March 25, 2024 17:51
@lynnagara lynnagara merged commit 5b03bfb into master Mar 25, 2024
20 checks passed
@lynnagara lynnagara deleted the cleanup-sessions branch March 25, 2024 18:05
Dav1dde added a commit to getsentry/sentry that referenced this pull request Apr 3, 2024
Makes cardinality limits for Relay more configurable, to be able to test
and roll them out more easily.

`drop` from the sessions config was removed in
getsentry/relay#3271 - required for the librelay
update to work
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.

None yet

3 participants