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.

Add a `format` property to metrics + dimensions

See original GitHub issue

We have a number metric type, but a lot of metrics are reported in %.

We should be able to set a number metric with the format percent (i.e. number, but take the result x 100 and stick a % symbol in front of it when it’s rendered on the frontend)

other examples are: gbp, usd, km, mi, etc.

The way you would define these formats is in the .yml files:

columns:
  name: revenue
    meta:
      metrics:
        total_revenue:
          type: sum
          format: usd

In the UI, the values in the revenue column would now appear like: $40.00 $567.00 etc.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
github-actions[bot]commented, Apr 1, 2022

🎉 This issue has been resolved in version 0.46.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

0reactions
rephuscommented, Mar 28, 2022

Suggestion by @ZeRego

I would break down this work into multiple PR’s:

  • have BE both raw values and formatted values ( how will this the structured ? thats the big question )
  • change FE to use the formatted values ( this can be split into multiple PRs eg. explore table / chart )
  • add support for custom formatting ( can be done in parallel with 2.)

Full discussion here: https://lightdash.slack.com/archives/C02GQKJK84Q/p1648200189589119

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create and edit custom dimensions and metrics - Analytics Help
In the PROPERTY column, click Custom Definitions > Custom Dimensions. Click New Custom Dimension. Add a Name. This can be any string, but...
Read more >
Dimensions, custom properties, and tags in Splunk ...
To learn more about adding custom properties to existing metric dimensions, see Search and edit metadata using the Metadata Catalog. When Splunk Observability ......
Read more >
Specification: Embedded metric format - Amazon CloudWatch
The CloudWatch embedded metric format is a JSON specification used to instruct CloudWatch Logs to automatically extract metric values embedded in structured ...
Read more >
Edit Default Settings for Fields - Tableau Help
To add a default comment for a field · Right-click (control-click on a Mac) a field in the Data pane and select Default...
Read more >
awslabs/aws-embedded-metrics-python - GitHub
Amazon CloudWatch Embedded Metric Format Client Library - GitHub ... Adds or updates the value for a given property on this context.
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