Skip to content

[sdk-metrics] implement metrics exemplars #5147

@pichlermarc

Description

@pichlermarc

Description

Important

This is a large feature that is not suitable for beginners.
Please make sure to sync with @open-telemetry/javascript-approvers first to ensure that there is bandwidth to review your work on this feature. It is recommended that the assignee joins the OpenTelemetry JavaScript SIG Meeting on Wednesdays to discuss any questions.

Prerequisite knowledge:

  • @opentelemetry/sdk-metrics internals
  • Knowlege about trace context and context management in OTel JS

Exemplars are a stable specification feature (see specification) that has a bootstrapped implementation in @opentelemetry/sdk-metrics which has never been driven to completion.

The goal of this issue is to implement this feature according to the specification and expose it to the user as an experimental feature. The assignee may have to remove and adapt the existing code to ensure that it follows all our requirements as laid out on this issue.

This issue is considered done when

  • the exemplars feature is implemented according to the current specification
  • a mechanism to collect and export exemplars is implemented
  • documentation is updated to include information about metrics exemplars and how to use them
  • serialization logic in @opentelemetry/otlp-transformer is amended in a way so that Exemplars may be exported using the existing OTLP/protobuf, OTLP/json and OTLP/grpc exporters
  • follow-up issues have been created to stabilize the feature after a suitable time-frame

Additonal Requirements

  • only interfaces and (factory)-functions as may be exposed as new APIs on @opentelemetry/sdk-metrics
  • all new interfaces and functions MUST be marked as @experimental
  • any properties added to the existing the public API of @opentelemetry/sdk-metrics MUST be optional and marked as @experimental

Additional Information/Resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs:code-contributionThis feature/bug is ready to implementnever-stalepkg:sdk-metricsspec-featureThis is a request to implement a new feature which is already specified by the OTel specificationtype:featureA feature with no sub-issues to address

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions