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.

Performance observability

See original GitHub issue

As you start your TypeScript journey (or even before!) I suggest adding some observability across all the major pipeline steps. For example, if I have 100 pages being generated but 5 of them take 95% of time to generate, we should be able to see that when the pages are being tracked. For large sites some parts of site take much longer to generate so the developer should be responsible for caching those pages but she’d need to be told which ones they are.

Something like this?

🔥 Deno prepare (900ms)
🔥 /images /images (copy: 25ms)
🔥 /index.html /index.tmpl.ts (load: 1025ms, render: 255ms, process: 190ms, etc: ??)
🔥 /styles.css /styles.css (??)

🍾 Site built into ./_site (1255ms)

It would be good to build OpenTelemetry and OpenMetrics (Prometheus) into Lume so that large sites can fine tune performance through observability.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:25 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
oscaroterocommented, Jun 21, 2021

Ok, but I don’t want to include dependencies or big developments for this in the Lume core. I prefer a basic solution that can be extended with plugins. The print and save actions are here: https://github.com/lumeland/lume/blob/master/metrics.js#L39 so it would be easy to create a plugin that can configure or replace this default solution with something more powerful or adapted to specific needs. A plugin example could be:

import Metrics from "lume/metrics.js";

class MyCustomMetrics extends Metrics {
  print() {
    // Custom print
  }
  async save(file) {
    // Custom save
  }
}

export default function () {
  return (site) => site.metrics = new MyCustomMetrics();
}
1reaction
oscaroterocommented, Jun 20, 2021

Ok, but note that on importing the dependencies statically, lume upgrade [--dev] won’t work because you are stuck to a fixed version of lume.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is Observability? - IBM
Observability discovers conditions you might never know or think to look for, then tracks their relationship to specific performance issues and ...
Read more >
Application Performance Monitoring and Observability - Gartner
Gartner defines the Application Performance Monitoring and Observability Market as software that enables the observation and analysis of application health ...
Read more >
What is observability? Not just logs, metrics, and traces
Observability enables you to understand what is slow or broken and what needs to be done to improve performance. With an observability solution ......
Read more >
Application Performance Monitoring vs. Observability
In this post we'll talk about what it means to move from application performance monitoring to application performance observability.
Read more >
APM vs. observability: Key differences explained - TechTarget
If you're debating the use of application performance monitoring and observability to gather system data and improve the user experience, ...
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