Skip to content

Slow Query in Plugin #113

@relwell

Description

@relwell

Environment

  • Python version: 3.11
  • Nautobot version: 2.4.6
  • nautobot-capacity-metrics version: 3.1.1
  • netobs version: 0.102.0

Expected Behavior

Prometheus queries are performant and minimize load on the database

Observed Behavior

Slow queries occur for instances with a large number of job results.

Steps to Reproduce

So long as Prometheus scrapes the capacity metrics endpoint, slow queries will be reported by Sentry. Here is an example:

Image

7-13s is a long time! Queries like this at scale may impact the overall health of the system and availability for non-metrics-related tasks more critical to Nautobot's core functionality.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions