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

Streamline the OTLP Metrics export path #2119

Closed
jmacd opened this issue Jul 22, 2021 · 2 comments
Closed

Streamline the OTLP Metrics export path #2119

jmacd opened this issue Jul 22, 2021 · 2 comments
Labels
area:metrics Part of OpenTelemetry Metrics enhancement New feature or request pkg:SDK Related to an SDK package
Milestone

Comments

@jmacd
Copy link
Contributor

jmacd commented Jul 22, 2021

Problem Statement

The OTLP exporters for spans and metrics both perform grouping, both by resource and by instrumentation library, in order to construct the OTLP protocol from a flat listing of spans and metrics. The request in this issue is to streamline the export path so that metrics the same provider are pre-grouped, first by Resource as there is only one allowed according to the Resource SDK specification. Second, metrics aggregations should be pre-grouped according to which Meter produced the span or metric instrument, so it should not be necessary to regroup these data before export.

Proposed Solution

There are two parts:

  1. Lift the Resource use for a single provider up to the Export() call, since there can only be one Resource value
  2. Pass the Instrumentation Library structure through the metrics pipeline so that Export() requests can be built without re-grouping

Alternatives

Continue re-grouping by resource and instrumentation library in the OTLP metrics path.

Additional Context

Note that tracing does the same form of re-grouping in its export path, but the benefit avoiding grouping is less clear for spans, since spans are not aggregated.

@jmacd jmacd added enhancement New feature or request pkg:SDK Related to an SDK package area:metrics Part of OpenTelemetry Metrics labels Jul 22, 2021
@jmacd
Copy link
Contributor Author

jmacd commented Aug 19, 2021

There is a third part to this issue. The metrics export path for OTLP was performing three grouping steps. (1) by resource, (2) by instrumentation library, (3) by metric name.

#2120 addressed the first.

I have a pending branch to address the second, which will leave one form of grouping in place. This second fix addresses the fact that metric.Descriptor currently contains the instrumentation library name and version--that the current SDK lacks a first-class instrumentation library structure.

Removing the third grouping step will require SDK-only changes and can be deferred.

@MrAlias
Copy link
Contributor

MrAlias commented May 3, 2022

This issues relates to the current metric SDK. The metric SDK redesign project includes changes to the SDK design that will make this issue obsolete. I'm closing so no wasted work is performed to address this.

@MrAlias MrAlias closed this as completed May 3, 2022
@pellared pellared added this to the untracked milestone Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:metrics Part of OpenTelemetry Metrics enhancement New feature or request pkg:SDK Related to an SDK package
Projects
None yet
Development

No branches or pull requests

3 participants