Skip to content

Filtering the logs #1132

Closed Answered by M4RC02U1F4A4
M4RC02U1F4A4 asked this question in Q&A
Jan 29, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

It is possible to filter the logs by going to edit the configuration of OpenTelemtry Collector from here

Below is an example of a conf that collects only logs beginning with INFO

agent:
  config:
    processors:
      filter/severity_text:
        logs:
          include:
            match_type: regexp
            bodies:
            - ^INFO
            resource_attributes:
            - key: k8s.container.name
              value: test-log-container
    service:
      pipelines:
        logs:
          processors:
          - memory_limiter
          - k8sattributes

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@vojtechvelkjop
Comment options

Answer selected by M4RC02U1F4A4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants