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.

Broken graphite metrics names with tags

See original GitHub issue

Graphite tags always generate broken names due to DropWizard behavior.

From DropWizard, GraphiteReporter [1]: graphite.send(prefix(name, type.getCode()), format(value), timestamp); where name=“my.metric;tag=value” type.getCode() = “p99”

final string sent to graphite: “my.metric;tag=valuep99”

From graphite logs 08/05/2020 08:21:00 :: [tagdb] Tagging component.api.setStatus;host=mail.example.com.mean, component.api.sendTextMessage;host=mail.example.com.p95, component.api.join_meeting;host=mail.example.com.m1_rate, component.api.getConversations;host=mail.example.com.mean

Unless we patch DropWizard side i can’t see how this code may work

[1] https://github.com/dropwizard/metrics/blob/v4.1.7/metrics-graphite/src/main/java/com/codahale/metrics/graphite/GraphiteReporter.java#L351

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
davide-baldocommented, May 11, 2020

Wow, that was fast, kudo really, first time seeing a fix this fast.

In the medium-term if it’s ok i would like to open a PR(or new repo?) to integrate graphite directly without dropwizard for different reasons:

  • the output formats are as simple as you can get, and can be handled in few hundred lines
  • by default many unspecified metrics are sent, if you specify a percentile it gets added to the list, I had to rewrite GraphiteReporter to disable unwanted metrics
  • maintaining dropwizard wrapper seems to be way more complex than supporting graphite
  • metrics seems to have different behavior than expected (counters are absolute, and maybe more)
  • in general, a it’s better to stay in-line with micromter guidelines as much as possible
1reaction
fitzohcommented, May 10, 2020

PR has been updated to work with the Dropwizard SNAPSHOT, should be good to go once a release is cut.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Graphite Tag Support — Graphite 1.2.0 documentation
Metric names get indexed under the special tag name , if a metric name starts with one or multiple ~ they simply get...
Read more >
Analyzing Graphite metrics usage - Grafana Cloud
Analyzing Graphite metrics usage This page explains: Finding which are the more commonly used ... or the same name (if you use tags...
Read more >
A few common graphite problems and how they are already ...
A tag space like structured_metrics makes it obsolete. with Graph-Explorer you can do (full-text) search on metric name, by any of their ...
Read more >
How to associate hash-named .wsp files to my tagged ...
I used graphite tagged metrics over grafana and whisper, but http://graphite/tags/delSeries removes something but not .wsp files. And untagged ...
Read more >
Store your metrics in Graphite. - Sitespeed.io
If you use Graphite < 1.0 you need to make sure the tags in the annotations follow the old format, you do that...
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