Skip to content

Conversation

shellmayr
Copy link
Member

  • Allow project slugs & continue allowing project ids for project parameter in logs list

@shellmayr shellmayr marked this pull request as ready for review August 8, 2025 12:15
@shellmayr shellmayr requested review from a team and szokeasaurusrex as code owners August 8, 2025 12:15
Copy link
Member

@szokeasaurusrex szokeasaurusrex left a comment

Choose a reason for hiding this comment

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

Thanks for implementing this @shellmayr!

I left some comments, please address these before merging.

src/api/mod.rs Outdated
Comment on lines 1483 to 1487
if let Some(project) = self.project {
if !project.is_empty() {
params.push(format!("project={}", QueryArg(project)));
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Is there any semantic difference between a self.project value of None and Some("")? If not, I would suggest that we make project non-optional, as originally, and just use the empty string to indicate a missing project.

Copy link
Member Author

Choose a reason for hiding this comment

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

Is there a reason we don't want to allow project to be None, and show logs from any project?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, from a user perspective, I'd definitely like to see a feature where we can show logs from all projects, if no specific project is provided, just like in the Sentry web UI assuming this is possible.

What I am wondering with this comment is whether there is any difference between a project value of None versus Some("") (i.e. empty string). Right now, this if statement seems to treat both the same way. All I am saying is that, if empty string is the same as None, we can just make the project's type a simple String rather than Option<String> and only send the project to Sentry if it is non-empty.

Alternatively, we keep it as Option<String>, and assume that any Some value is non-empty.

In any case, this is not a major concern, I was just wondering if there is some semantic difference between the two cases

Copy link
Member Author

Choose a reason for hiding this comment

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

At the moment - no real semantic difference, just wondering about the desired behaviour here

cursor[bot]

This comment was marked as outdated.

@shellmayr shellmayr force-pushed the shellmayr/feat/allow-slugs-in-logs-list branch from a229e27 to 760a600 Compare August 11, 2025 11:31
cursor[bot]

This comment was marked as outdated.

@shellmayr shellmayr merged commit c7e2731 into master Aug 11, 2025
31 checks passed
@shellmayr shellmayr deleted the shellmayr/feat/allow-slugs-in-logs-list branch August 11, 2025 12:58
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.

2 participants