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.

Question: adding custom Metric into configuration

See original GitHub issue

I’m playing around with custom metrics and read the bits about Extending custom metrics. I’ve done the following and it works fine (Groovy):

talaiot {
    metrics {
        customBuildMetrics([myMetric: "Hello world"])
    }
    publishers {
        customPublisher(new CustomPublisher())
    }
}

But it would be interesting to have a method that takes a Metric and adds it into the MetricsConfiguration.metrics list.

talaiot {
    metrics {
        customMetrics(new MyCustomMetric())
    }
    publishers {
        customPublisher(new CustomPublisher())
    }
}

This would allow us to:

  1. Have only custom metrics reported.
  2. Override any existing metrics. e.g. add an extension of GitMetrics with more data.
  3. Have our metrics organized in a package and in their own file(s).

Does it make sense to have such a feature added to the API?

P.S.: the docs seem to be outdated. e.g. gitMetrics = false does not work for me.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
cdsapcommented, Mar 22, 2020

@MyDogTom this is an awesome article, thanks!

@mokkun I’m working in the unification of the metrics provider in #158, later I can address this issue. But if you or @MyDogTom have any suggestion, feel free to reach out

0reactions
mokkuncommented, Apr 9, 2020

I’d actually go with something more verbose but also more self explaining. Like: enableStandardMetrics, enablePerformanceMetrics, enableGitMetrics etc.

I’d just avoid using the word enable, making it defaultMetrics, performanceMetrics and so on instead. Reason being, we are not enabling/disabling the metrics, we are adding/removing them. That’s my interpretation of it at least. 🤔

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom Metrics in CX | QuestionPro Help Document
Custom Metrics is about providing configurable metrics to view the analytics. Custom metrics can be a simple Top box score of a single...
Read more >
Custom Metrics (CX) - Qualtrics
Click on the Settings icon. · Click on the Custom Metrics tab that is on the left side of the settings screen. ·...
Read more >
How to add the Custom metrics to the Sales Agreement Terms ...
The Custom metrics will be automatically added when direct fields are added instead of Formula fields in Sales Agreement Product & Schedules ...
Read more >
Custom dimensions & metrics - Analytics Help
Configuration – you define your custom dimensions and metrics with an index, a name, and other properties like scope. Collection – you send...
Read more >
Create custom metrics with the API - Monitoring - Google Cloud
This document describes how to create custom metrics and how to write custom metric data by using the Cloud Monitoring API. Custom metrics...
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