[!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
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.
[ ] 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
it is recommended to first look at other language implementations of this feature before starting to work on it here
Description
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
@opentelemetry/otlp-transformer
is amended in a way so thatExemplar
s may be exported using the existing OTLP/protobuf, OTLP/json and OTLP/grpc exportersAdditonal Requirements
@opentelemetry/sdk-metrics
@experimental
@opentelemetry/sdk-metrics
MUST be optional and marked as@experimental
Additional Information/Resources
@opentelemetry/sdk-metrics