feat(logs): allow project slugs in logs list#2688
Conversation
shellmayr
commented
Aug 8, 2025
- Allow project slugs & continue allowing project ids for project parameter in logs list
szokeasaurusrex
left a comment
There was a problem hiding this comment.
Thanks for implementing this @shellmayr!
I left some comments, please address these before merging.
src/api/mod.rs
Outdated
| if let Some(project) = self.project { | ||
| if !project.is_empty() { | ||
| params.push(format!("project={}", QueryArg(project))); | ||
| } | ||
| } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Is there a reason we don't want to allow project to be None, and show logs from any project?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
At the moment - no real semantic difference, just wondering about the desired behaviour here
a229e27 to
760a600
Compare