opentelemetry-js icon indicating copy to clipboard operation
opentelemetry-js copied to clipboard

[sdk-metrics] implement metrics exemplars

Open pichlermarc opened this issue 1 year ago • 3 comments
trafficstars

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

pichlermarc avatar Nov 13 '24 12:11 pichlermarc