question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Help wanted: Catalog performance testing

See original GitHub issue

Hi,

We are looking for help measuring the performance of the software catalog to potentially find room for improvements. There have been improvements for large catalogs in recent months but we hope to improve the situation even further but we would like to back it up with data. We therefore added experimental prometheus metrics to help out measuring. If run a large software catalog, we’re interested in hearing from you!

Currently these metrics and other are emitted when enabled:

catalog_registered_locations_count
catalog_relations_count
catalog_entities_count
catalog_processing_queue_delay_seconds - The amount of delay between being scheduled for processing, and the start of actually being processed
catalog_processors_duration_seconds - Time spent executing catalog processors
catalog_processing_duration_seconds - Time spent executing the full processing flow

Information we would like to receive in your reply:

  • Catalog version
  • Amounts of entities in the catalog, output from catalog_entities_count metric
  • Relations, output from catalog_relations_count metric
  • Queue delay, output from catalog_processing_queue_delay_seconds, it’s best to leave the catalog running for a while as this number will be high for a newly started catalog with a backlog of work.
  • Processing duration catalog_processing_duration_seconds{quantile=~'0.99|0.5'}
  • CPU & memory pressure of the catalog/database instance together with available cores/memory.

How do I instrument?

The process for adding them is currently manual as we do not make any guarantees about the future format. Of course we want instrumentations to all parts of the backend but agnostic tools like OpenTelemetry are still not far enough in its development yet. We have for now settled on prom-client to get Prometheus metrics but this WILL change in the future.

Add dependencies

"express-prom-bundle": "^6.3.6",
"prom-client": "^13.2.0",

Create metrics.ts next to your catalog with this content https://github.com/backstage/backstage/blob/6277060d72748ebd4edcf6dae4fd8eac1d23d470/packages/backend/src/metrics.ts

Initialise the metric: https://github.com/backstage/backstage/blob/6277060d72748ebd4edcf6dae4fd8eac1d23d470/packages/backend/src/index.ts#L76

Add the metrics endpoint: https://github.com/backstage/backstage/blob/6277060d72748ebd4edcf6dae4fd8eac1d23d470/packages/backend/src/index.ts#L129

Configure your prometheus instance to scrape the metrics.

Thanks!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
sonali-mishra-94commented, Sep 16, 2021

@Rugvip I just edited the comment with correct data. Sorry about earlier, I copied the wrong data

2reactions
sonali-mishra-94commented, Sep 16, 2021

Sharing metrics from our org:

catalog_entities_count{kind="api"} 897
catalog_entities_count{kind="component"} 1620
catalog_entities_count{kind="group"} 145
catalog_entities_count{kind="location"} 2976
catalog_entities_count{kind="resource"} 1870
catalog_entities_count{kind="template"} 3
catalog_entities_count{kind="user"} 20616
catalog_relations_count 547496
catalog_registered_locations_count 2092
catalog_processing_queue_delay_seconds{quantile="0.5"} 0.24087650207154038
catalog_processing_queue_delay_seconds{quantile="0.99"} 2.9651650553022826
catalog_processors_duration_seconds{quantile="0.5",result="ok"} 0.0017716761340164332
catalog_processors_duration_seconds{quantile="0.99",result="ok"} 0.7299314675170853
Read more comments on GitHub >

github_iconTop Results From Across the Web

Performance Testing Jobs | Upwork™
Browse 115 open jobs and land a remote Performance Testing job today. ... Find Work Want to hire a Performance Testing Specialist?
Read more >
15 BEST Performance Testing Tools (Load Testing Tools) in ...
Comprehensive list of widely used performance testing tools for measuring web application performance and load stress capacity are briefed ...
Read more >
Test Rental - CPS HR Consulting
Our test rental catalog offers more than 50 types of entry-level and promotional employment tests for a wide range of public agency positions...
Read more >
Performance Testing - The Complete Guide - Tricentis
Why and how to automate performance testing so this can be fully integrated into ... The performance tests you run will help ensure...
Read more >
LoadRunner: Application Load Testing Tools | Micro Focus
$186K · saved in employment costs per year ; 98.8%. defects identified and fixed before go-live ; 95%. improvement in application delivery time ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found