Skip to content

LOG: Logs context filter selection logic #9147

@nityanandagohain

Description

@nityanandagohain

Improvement over #8504 (comment).

One we released this, we have seen then some users have k8s, cloud, host in resource attributes even this all selected results in a query which exceeds the limit.

We should come with a strategy.

  1. Always include - service.name and deployment.environment/env/environment if present in resource filters.
  2. Select only one from the list, if k8s is found then don't move to the next. And from k8s just pick the first found
{
  "kubernetes": {
    "priority_order": [
      "k8s.pod.uid",
      "k8s.pod.name",
      "k8s.deployment.name"
    ],
    "selection_rule": "pick_first_available"
  },
  "cloud": {
    "priority_order": [
      "cloud.resource_id",
      "cloud.provider",
      "cloud.region"
    ],
    "selection_rule": "pick_first_available"
  },
  "host": {
    "priority_order": [
      "host.id",
      "host.name"
    ],
    "selection_rule": "pick_first_available"
  },
  "container": {
    "priority_order": [
      "container.id",
      "container.name"
    ],
    "selection_rule": "pick_first_available"
  }
}

If the resource filter is still empty after the above. We keep this logic #8504 (comment) and remove the k8s, cloud, host, container from the logic as it is already added above.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions