https://signoz.io logo
#support
Title
# support
z

Zoop

10/19/2022, 8:33 PM
Hi, I wanted to filter out some log entries since Longhorn is running in debug mode it fills up the logs very quick. But I found no good way of doing it. How should I configure the signoz opentel collector pipe for it? If I try to reges the body via filter I get an error message. Here is what I want to filter out and the error message:
Copy code
{
  "timestamp": 1666209977113678300,
  "id": "2GMrb6aQr7vufL4DoehXo21U7Dl",
  "trace_id": "",
  "span_id": "",
  "trace_flags": 0,
  "severity_text": "",
  "severity_number": 0,
  "body": "[longhorn-instance-manager] time=\"2022-10-19T20:06:17Z\" level=debug msg=\"Getting snapshot clone status\" serviceURL=\"10.42.0.236:10007\"",
  "resources_string": {},
  "attributes_string": {
    "k8s_container_name": "engine-manager",
    "k8s_container_restart_count": "0",
    "k8s_namespace_name": "longhorn-system",
    "k8s_pod_name": "instance-manager-e-0df031cc",
    "k8s_pod_uid": "9f5aeea7-52ac-4fa6-83de-ad957792842c",
    "log_file_path": "/var/log/pods/longhorn-system_instance-manager-e-0df031cc_9f5aeea7-52ac-4fa6-83de-ad957792842c/engine-manager/0.log",
    "log_iostream": "stderr",
    "logtag": "F",
    "time": "2022-10-19T20:06:17.113678307Z"
  },
  "attributes_int": {},
  "attributes_float": {}
}
error:
Copy code
* 'logs.exclude' has invalid keys: bodies
2022/10/19 20:12:25 application run finished with error: failed to get config: cannot unmarshal the configuration: error reading processors configuration for "filter/1": 1 error(s) decoding:
* 'logs.exclude' has invalid keys: bodies
My configuration:
Copy code
processors:
      filter/1:
        logs/bodies:
          exclude:
            match_type: regexp
            bodies:
            - "longhorn.*level=debug"
Thank you for your help. I also tried filtering the namespace (longhorn-system) but it didn't work either....
p

Pranay

10/19/2022, 10:09 PM
@nitya-signoz May have more insights on this
s

Srikanth Chekuri

10/19/2022, 11:02 PM
This is pretty recent feature in filter processor. The SigNoz collector distro doesn’t have it yet.
a

Ankit Nayan

10/21/2022, 8:08 AM
@nitya-signoz should's it be possible to regex at otel-collector config without needing filterprocessor?
n

nitya-signoz

10/21/2022, 8:11 AM
@Ankit Nayan he will have to use some kind of processor to filter out.
a

Ankit Nayan

10/21/2022, 8:13 AM
ohk..for dropping data
s

Srikanth Chekuri

10/21/2022, 8:21 AM
Support for body is added in most recent release 0.62 (just a week back I think). We will have it supported soon. Some other changes need to be synced up to the latest release. Tracking issue here https://github.com/SigNoz/signoz-otel-collector/issues/19.
11 Views