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 SDK: Add Metrics exemplar #1093

Closed
lalitb opened this issue Nov 23, 2021 · 2 comments · Fixed by #1264
Closed

Metrics SDK: Add Metrics exemplar #1093

lalitb opened this issue Nov 23, 2021 · 2 comments · Fixed by #1264
Assignees

Comments

@lalitb
Copy link
Member

lalitb commented Nov 23, 2021

Specs: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exemplar

  • A metrics exemplar is a trace that is representative of the metrics being collected. The spec requires that exemplars be implemented in a way such that they may be disabled and that if disabled they should have no performance impact (collection should be disabled, not just export). When enabled, the exemplars will come from the currently active context.
    Properties: Value, Time, Attributes, Trace ID, Span ID

  • ExemplarFilter determines if a measurement should be sampled
    Properties - value of measurement, attributes of measurement, context of measurement, timestamp

  • ExemplarReservoir provides a method to offer measurements to the reservoir and to collect accumulated exemplars

@lalitb lalitb changed the title Metrics SDK: Add Metrics examplar Metrics SDK: Add Metrics exemplar Nov 23, 2021
@lalitb lalitb added this to the Metrics SDK prototype milestone Nov 23, 2021
@github-actions
Copy link

This issue was marked as stale due to lack of activity. It will be closed in 7 days if no furthur activity occurs.

@lalitb
Copy link
Member Author

lalitb commented Mar 9, 2022

The record API / SDK needs to be modified too to pass span context, which would be required to get trace id and span id.

template <class T>
class UpDownCounter : public SynchronousInstrument
{
  virtual void Add(T value, opentelemetry::context::Context context) noexcept = 0;
  virtual void Add(T value, const common::KeyValueIterable &attributes, opentelemetry::context::Context context) noexcept = 0;
}

@esigo esigo self-assigned this Mar 10, 2022
@esigo esigo mentioned this issue Mar 13, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants