-
-
Notifications
You must be signed in to change notification settings - Fork 235
feat(logs): allow project slugs in logs list #2688
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
Conversation
shellmayr
commented
Aug 8, 2025
- Allow project slugs & continue allowing project ids for project parameter in logs list
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.
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.
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.
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 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.
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
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.
At the moment - no real semantic difference, just wondering about the desired behaviour here
a229e27
to
760a600
Compare