The Filter endpoint is not your everyday search—this is a precision-engineered, high-performance log hunter. Imagine it as a sleek, ninja cat gracefully sifting through vast log data with the agility of a seasoned developer dodging code bugs.
The primary objective of the Filter endpoint is to empower users to perform a surgical search across the log universe. You're not just looking for any logs; you're on a quest for specific ones, armed with a variety of search parameters.
-
Level: Specify the log level you're interested in, whether it's a calm "info," a warning "warning," or the ever-dreaded "error." It's like choosing your log adventure difficulty level.
-
Message: Enter keywords to uncover logs with messages like hidden treasure chests. "Failed to connect," "Database connection lost," or "Unexpected EOF while parsing JSON" are your secret passcodes.
-
Resource ID: Unearth logs specific to a resource. Your servers have unique IDs, and this parameter is your map to the exact spot in the log jungle.
-
Timestamp Range: Define a time window for your search expedition. Need logs from a quiet Sunday morning or the chaotic Friday rush? We've got you covered.
-
Trace and Span IDs: Trace your logs' lineage with trace and span IDs. It's like a genealogy chart for your logs. Find logs related to a specific operation and understand their ancestry.
-
Commit: Ever wondered what was happening in your logs during a specific commit? The commit parameter reveals the log secrets tied to a particular commit hash.
-
Metadata Parent Resource ID: Dive deeper into the metadata rabbit hole. Sometimes, logs have parents too, and this parameter lets you trace logs born from a specific parent.
-
Pagination: Nobody likes an overwhelming scroll. Paginate through your results with paginationPage and paginationCount to keep things manageable.
-
Date Range Filtering: Feeling nostalgic for logs from a bygone era? Use this feature to filter logs between specific date ranges. It's like time travel for your logs.
-
Regular Expressions: For the regex virtuosos, unleash your pattern-matching sorcery. Craft intricate regex queries and watch logs surrender to your mighty expressions.
-
Combining Multiple Filters: Why settle for one filter when you can have them all? Combine multiple filters to create powerful, nuanced queries. It's like crafting a potion with just the right ingredients.
-
Real-time Log Magic: Experience logs unfolding in real-time. Witness the magic of logs popping into existence and disappearing into the void as your system updates in real-time.
-
Role-Based Access: Keep the log kingdom secure with role-based access. Ensure that only the chosen ones have the privilege to summon and command the logs.
The Filter endpoint doesn't just find logs; it returns a treasure trove—a JSON array of CommonResponse objects. Each object is a log gem waiting to be explored, revealing details about its level, message, resource ID, timestamp, trace ID, span ID, commit, and metadata.
When your search is successful, the HTTP status code 200 acknowledges your log-hunting prowess. Your results are ready to be analyzed, and your developer instincts validated.
Now, let's turn our attention to the Rank endpoint—an endpoint that doesn't just search logs; it ranks them, giving you a leaderboard of logs. It's like turning your logs into a competitive sport.
The Rank endpoint isn't for the faint of heart. It's for those who want more than just logs; they want insights, patterns, and a touch of drama. With a multiline query string, it's like writing the script for your log opera.
-
Multiline Query: This is where the magic happens. Craft a multiline query string that tells a story. Whether it's an epic saga or a short story, this parameter transforms your logs into a narrative.
-
Timestamp Range: Set the stage for your log drama with a specific time range. Logs from a weekend escapade or a Monday morning crisis—choose your log setting.
-
Pagination: Sometimes, you want to savor your log insights in bite-sized pieces. paginationPage and paginationCount are your companions on this journey.
Real-time Drama: Live log drama unfolds before your eyes. As logs stream in, the ranking adapts, giving you a front-row seat to the evolving log storyline.
Not everyone gets a backstage pass to the log opera. With role-based access, ensure that only the privileged few can witness the log drama unfold.
The Rank endpoint doesn't just return logs; it presents a spectacle—a JSON array of CommonResponse objects, each log vying for attention on the leaderboard. It's not just about finding logs; it's about discovering the star logs that steal the show.
When your ranked search is successful, the HTTP status code 200 is the standing ovation. Your log leaderboard is ready, and you're the director of this log performance, shaping the narrative with each query.