Logs query
Logs-Query by Posthog is a powerful tool designed to search and filter logs within your project efficiently. It enables detailed querying based on severity, services, date ranges, and free-text, providing comprehensive insight into log data.
Features
- Supports filtering logs by severity levels including trace, debug, info, warn, error, and fatal.
- Allows filtering logs by specific service names to isolate issues per service.
- Enables date range filtering to focus on logs within precise timeframes.
- Provides free text search to quickly find relevant log entries based on keywords.
- Supports pagination with cursor-based navigation and ordering of results by latest or earliest timestamps.
Benefits
- Streamlines troubleshooting by quickly locating relevant log entries across services.
- Improves visibility into application performance and errors through detailed log filtering.
- Saves time by narrowing down large log datasets with multiple filter options.
- Enhances reliability of debugging by providing trace information linked to logs.
- Facilitates monitoring and proactive issue detection via comprehensive search capabilities.
Description
Search and query logs in the project. Supports filtering by severity levels (trace, debug, info, warn, error, fatal), service names, date range, and free text search. Returns log entries with their attributes, timestamps, and trace information. Supports pagination via cursor.
Parameters
8 parameters
| Name | Type | Description |
|---|---|---|
| dateFromrequired | string | Start of date range (ISO 8601 format, e.g., "2024-01-01T00:00:00Z") |
| dateTorequired | string | End of date range (ISO 8601 format, e.g., "2024-01-02T00:00:00Z") |
| severityLevels | string[] | Filter by severity levels (trace, debug, info, warn, error, fatal) |
| serviceNames | string[] | Filter by service names |
| searchTerm | string | Free text search term to filter logs |
| orderBy | enum | Order results by timestamp (default: latest) |
| limit | integer | Maximum number of results (1-1000, default: 100) |
| after | string | Cursor for pagination (from previous response nextCursor) |