Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metrics-generator: emit exemplars #1364

Merged
merged 2 commits into from
Apr 6, 2022

Conversation

yvrhdn
Copy link
Member

@yvrhdn yvrhdn commented Apr 5, 2022

What this PR does:
Follow up from #1340 and adds the capability to capture and remote write exemplar.

Which issue(s) this PR fixes:
Related to #1303

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@yvrhdn
Copy link
Member Author

yvrhdn commented Apr 5, 2022

Service graphs with exemplars 🎉

Screenshot 2022-04-05 at 19 40 30

Span metrics with exemplars 🎉

Screenshot 2022-04-05 at 19 41 47

@yvrhdn yvrhdn force-pushed the kvrhdn/metrics-geneator-exemplars branch from d18c5ff to c56bfdf Compare April 5, 2022 17:50
@yvrhdn yvrhdn marked this pull request as ready for review April 6, 2022 10:23
Copy link
Member

@mapno mapno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

// TODO support exemplars
//ObserveWithExemplar(lbls labels.Labels, value float64, exemplarLbls labels.Labels)
// Observe a datapoint with the given values. traceID will be added as exemplar.
Observe(values *LabelValues, value float64, traceID string)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use similar interface as Prometheus: Observe and ObserveWithExemplar?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I originally had both functions but then noticed that we never use Observe. If we don't use it, why bother supporting it? 🤷🏻
I'm guessing that we will always have a traceID available since every metric is based upon trace data. If at some point this isn't the case anymore we can add the original observe function again.

@yvrhdn yvrhdn merged commit 9d26b82 into grafana:main Apr 6, 2022
@yvrhdn yvrhdn deleted the kvrhdn/metrics-geneator-exemplars branch April 6, 2022 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants