8000 feat: service name filter by daibhin · Pull Request #33436 · PostHog/posthog · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: service name filter #33436

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

Merged
merged 7 commits into from
Jun 12, 2025
Merged

feat: service name filter #33436

merged 7 commits into from
Jun 12, 2025

Conversation

daibhin
Copy link
Contributor
@daibhin daibhin commented Jun 10, 2025

Problem

We want to be able to filter logs but service

Changes

Add a top level property filter

Copy link
Contributor
@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Implements service-based filtering for logs by restructuring taxonomic filters and adding service name properties across the application.

  • Renamed taxonomic filter group from Logs to LogAttributes in multiple files including types.ts and schema.py for more precise attribute filtering
  • Added new serviceNames: list[str] field to LogsQuery model for service filtering support
  • Introduced new 'service_name' property in taxonomy.py core filter definitions for logs group
  • Added initialLoad prop to PropertyValue component to support proactive loading of service names
  • Updated property filter type mappings and universal filters logic to accommodate the new log attribute filtering structure

11 files reviewed, 2 comments
Edit PR Review Bot Settings | Greptile

Comment on lines 89 to 93
useEffect(() => {
if (initialLoad) {
load('')
}
}, [])
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: This useEffect's dependency array is empty but uses initialLoad from props. Add initialLoad to the dependency array to prevent stale closures.

Suggested change
useEffect(() => {
if (initialLoad) {
load('')
}
}, [])
useEffect(() => {
if (initialLoad) {
load('')
}
}, [initialLoad])

Comment on lines 2077 to 2082
"logs": {
"service_name": {
"label": "Service name",
"description": "The service that emitted the log",
},
},
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Consider defining the type field as 'String' to maintain consistency with other filter definitions

Copy link
Contributor
github-actions bot commented Jun 10, 2025

Size Change: 0 B

Total Size: 1.83 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 1.83 MB

compressed-size-action

@daibhin daibhin changed the title simple service filter feat: service name filter Jun 12, 2025
@daibhin daibhin requested a review from frankh June 12, 2025 12:41
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@frankh frankh force-pushed the dn-feat/search-service-names branch from 5d564d9 to f39770f Compare June 12, 2025 13:35
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@daibhin daibhin enabled auto-merge (squash) June 12, 2025 13:56
@daibhin daibhin merged commit fb2d18e into master Jun 12, 2025
99 checks passed
@daibhin daibhin deleted the dn-feat/search-service-names branch June 12, 2025 14:28
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.

3 participants
0