Skip to content

Commit

Permalink
feat: added logs quick filters product docs (#1003)
Browse files Browse the repository at this point in the history
* feat: added logs quick filters product docs

* feat: minor correction

* chore: added reference for log pipelines

* chore: added reference for log pipelines

* fix: address review comments

* fix: address review comments
  • Loading branch information
vikrantgupta25 authored Dec 2, 2024
1 parent 8b41526 commit 8b5830a
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 16 deletions.
36 changes: 20 additions & 16 deletions constants/docsSideNav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ const docsSideNav = [
// // type: 'doc',
// // },
// items: [

// ],
// },
],
Expand Down Expand Up @@ -597,8 +597,7 @@ const docsSideNav = [
},
{
type: 'doc',
route:
'/docs/logs-management/send-logs/vector-logs-to-signoz',
route: '/docs/logs-management/send-logs/vector-logs-to-signoz',
label: 'Vector',
},
{
Expand Down Expand Up @@ -670,6 +669,11 @@ const docsSideNav = [
route: '/docs/userguide/logs_query_builder',
label: 'Logs Query Builder',
},
{
type: 'doc',
route: '/docs/logs-management/features/logs-quick-filters',
label: 'Logs Quick Filters',
},
],
},
{
Expand Down Expand Up @@ -718,14 +722,14 @@ const docsSideNav = [
{
type: 'doc',
route: '/docs/logs-management/guides/pii-scrubbing',
label: 'PII Scrubbing'
label: 'PII Scrubbing',
},
{
type: 'doc',
route: '/docs/userguide/parse-multiline-logs',
label: 'Parse Multiline Logs',
},
]
],
},
{
type: 'doc',
Expand Down Expand Up @@ -1023,7 +1027,7 @@ const docsSideNav = [
label: 'Flutter',
route: '/docs/instrumentation/mobile-instrumentation/flutter',
},
],
],
},
{
label: 'Integrations',
Expand Down Expand Up @@ -1101,7 +1105,7 @@ const docsSideNav = [
route: '/docs/messaging-queues/confluent-kafka',
label: 'Confluent Kafka',
},
],
],
},
{
type: 'doc',
Expand Down Expand Up @@ -1587,7 +1591,7 @@ const docsSideNav = [
type: 'doc',
route: '/docs/gcp-monitoring/compute-engine/tracing',
label: 'APM & Tracing',
}
},
],
},
{
Expand Down Expand Up @@ -1628,7 +1632,7 @@ const docsSideNav = [
type: 'doc',
route: '/docs/gcp-monitoring/cloud-sql/metrics',
label: 'Metrics',
}
},
],
},
{
Expand Down Expand Up @@ -1670,8 +1674,8 @@ const docsSideNav = [
route: '/docs/gcp-monitoring/vpc/metrics',
label: 'Metrics',
},
],
},
],
},
{
label: 'GKE',
type: 'category',
Expand All @@ -1684,7 +1688,7 @@ const docsSideNav = [
label: 'APM & Tracing',
},
{
type: 'doc',
type: 'doc',
route: '/docs/gcp-monitoring/gke/gke-logging-and-metrics',
label: 'Logs and Metrics',
},
Expand All @@ -1702,17 +1706,17 @@ const docsSideNav = [
label: 'Cloud Run Service Setup',
},
{
type: 'doc',
type: 'doc',
route: '/docs/gcp-monitoring/cloud-run/logging',
label: 'Logging',
},
{
type: 'doc',
type: 'doc',
route: '/docs/gcp-monitoring/cloud-run/metrics',
label: 'Metrics',
},
{
type: 'doc',
type: 'doc',
route: '/docs/gcp-monitoring/cloud-run/tracing',
label: 'APM & Tracing',
},
Expand All @@ -1725,7 +1729,7 @@ const docsSideNav = [
route: '/docs/gcp-monitoring/cloud-monitoring',
items: [
{
type: 'doc',
type: 'doc',
route: '/docs/gcp-monitoring/cloud-monitoring/metrics',
label: 'Metrics',
},
Expand Down
92 changes: 92 additions & 0 deletions data/docs/logs-management/features/logs-quick-filters.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
date: 2024-12-02
title: Logs Quick Filters
id: logs-quick-filters
---

The Logs Explorer comes with quick filters which allows filtering of logs based on key attributes making it easier to analyze and debug applications.
Below is a detailed explanation of the available filters and instructions on how to use them.

<figure data-zoomable align="center">
<img
src="/img/docs/logs-management/ui/logs-quick-filters.webp"
alt="Quick Filters in Logs Explorer"
/>
<figcaption>
<i> Quick Filters in Logs Explorer </i>
</figcaption>
</figure>

## Available Filters

There are multiple filtering options available, with each filter mapped to a specific [OpenTelemetry](https://opentelemetry.io/docs/specs/otel/common/#attribute) attribute. Here’s a list of the available filters:

### Severity Text

- **Description**: Filter logs based on their severity text.
- **Usage**: Useful for quickly filtering in FATAL logs when some incident occurs or filter in DEBUG logs when debugging some issue.
- **OTel Attribute**: Maps to [`severity_text`](https://opentelemetry.io/docs/specs/otel/logs/data-model/#field-severitytext) opentelemetry attribute.

### Environment

- **Description**: Filter logs based on the source environment.
- **Usage**: Useful for filtering in/out logs coming from different environments. Example - Production / Staging / Development etc.
- **OTel Attribute**: Maps to [`deployment.environment`](https://opentelemetry.io/docs/specs/semconv/attributes-registry/deployment/#deployment-attributes) opentelemetry resource attribute.

### Service Name

- **Description**: Filter logs by the name of the service that generated them.
- **Usage**: Select from a list of service names to isolate logs from a specific service. This can be helpful in microservices architectures where multiple services generate logs.
- **OTel Attribute**: Maps to [`service.name`](https://opentelemetry.io/docs/specs/semconv/attributes-registry/service/#service-attributes) opentelemetry resource attribute.

### Hostname

- **Description**: Filter logs based on the hostname of the machine that generated the logs.
- **Usage**: This filter allows you to isolate logs from specific hosts, which is particularly useful in environments with multiple servers or instances. For example, you can filter logs to view only those generated by a particular server during a specific time frame.
- **OTel Attribute**: Maps to [`host.name`](https://opentelemetry.io/docs/specs/semconv/attributes-registry/host/#host-attributes) opentelemetry resource attribute.

### K8s Pod Name

- **Description**: Filter logs based on the name of the Kubernetes pod that generated them.
- **Usage**: This filter allows you to isolate logs from specific pods, which is particularly useful in environments with multiple pods running the same service.
- **OTel Attribute**: Maps to [`k8s.pod.name`](https://opentelemetry.io/docs/specs/semconv/attributes-registry/k8s/#kubernetes-attributes) opentelemetry resource attribute.

### K8s Node Name

- **Description**: Filter logs based on the name of the Kubernetes node that generated them.
- **Usage**: This filter helps in isolating logs from specific nodes, which can be useful for debugging issues related to particular nodes in a cluster.
- **OTel Attribute**: Maps to [`k8s.node.name`](https://opentelemetry.io/docs/specs/semconv/attributes-registry/k8s/#kubernetes-attributes) opentelemetry resource attribute.

### K8s Cluster Name

- **Description**: Filter logs based on the name of the Kubernetes cluster that generated them.
- **Usage**: This filter allows you to isolate logs from specific clusters, which is particularly useful in environments with multiple clusters running different services.
- **OTel Attribute**: Maps to [`k8s.cluster.name`](https://opentelemetry.io/docs/specs/semconv/attributes-registry/k8s/#kubernetes-attributes) opentelemetry resource attribute.

<Admonition>
For mapping attributes from log body to the above attributes use{' '}
<a href="https://signoz.io/docs/logs-pipelines/introduction/">log pipelines</a>
</Admonition>

## How to use quick filters

1. **Accessing Filters**: Open the logs explorer and locate the quick filters panel on the left side.

2. **Selecting Filters**: Click on the desired filter category to expand it. For example, click on "K8s Cluster Name" to select a particular cluster.

3. **Setting Filter Values**: Select the appropriate values for the filter. For instance, you can select specific severity text.

4. **Applying Filters**: Once you set the filter values, the Logs Explorer will automatically update the displayed logs based on the selected filters.

5. **Multiple Queries Filters**: If there are multiple queries, the `Filters For` section will display the query name which is currently in sync with the filter and all the filter actions will be applied to this query.

<figure data-zoomable align="center">
<img src="/img/docs/logs-management/ui/filter-sync.webp" alt="Quick Filters in Logs Explorer" />
<figcaption>
<i> Filter sync in quick filters </i>
</figcaption>
</figure>

6. **How to change sync in Multiple Queries**: The last interacted query will be in sync with quick filter. Interact with any query to sync it with the filters bar.

7. **Clearing Filters**: If you need to reset a filter, click on the "Clear All" option next to the filter category. You can also clear all applied filters at once by clicking on a Reset button available at the top. It will reset the filters for the query it is in sync with.
Binary file not shown.
Binary file not shown.

0 comments on commit 8b5830a

Please sign in to comment.