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

Implement Views API #2592

Closed
6 of 8 tasks
Tracked by #2574
dyladan opened this issue Nov 3, 2021 · 9 comments
Closed
6 of 8 tasks
Tracked by #2574

Implement Views API #2592

dyladan opened this issue Nov 3, 2021 · 9 comments

Comments

@dyladan
Copy link
Member

dyladan commented Nov 3, 2021

Views should be configurable through a MeterProvider

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

TODO: update description with requirements for views API

  • Views should be able to select metrics using the following (all optional):
    • instrument type
    • instrument name (with wildcards)
    • meter name
    • meter version
    • schema url
  • View name (optional - defaults to use instrument name)
  • Configuration for view metric stream
    • Description
    • attribute keys
    • extra dimensions (from baggage/context)
    • Aggregation
    • exemplar reservoir factory or callback which allows different reservoirs to be chosen by the aggregation
@dyladan
Copy link
Member Author

dyladan commented Nov 4, 2021

@legendecas I see you assigned yourself but I did a little of this already with the new SDK package frame. There is still a lot to do but I wanted to let you know.

@legendecas
Copy link
Member

@dyladan Please go ahead. I was trying to bootstrap this but I found it will be easier if we have figured out how the internal data storage will be so I'm just started working on #2599. Remove assignments for now.

@legendecas legendecas removed their assignment Nov 4, 2021
@dyladan dyladan self-assigned this Nov 4, 2021
@legendecas
Copy link
Member

The feature of extra dimensions is pending removal from v1.0: open-telemetry/opentelemetry-specification#2215

@dyladan
Copy link
Member Author

dyladan commented Dec 22, 2021

@legendecas you've been pretty prolific in the metrics land so i wanted to ask if you were working on this or if you have a good idea of what still needs to be done here. I was going to work on this but want to make sure i'm not duplicating work.

@legendecas
Copy link
Member

legendecas commented Dec 22, 2021

@dyladan I'm not currently focused on the views API. AFAICT, there are still some points left to do:

  1. Renaming instruments with views and resolving name conflicts,
  2. add the restriction to meet the spec statement: "the SDK MUST NOT allow Views with a specified name to be declared with instrument selectors that select by instrument type or wildcard."
  3. Refining views public API for end users: currently the MeterProvider.addView have to be written as addView(new View(), /* optional */ new InstrumentSelector({ name: '*' }), /* optional */ new MeterSelector({ name: '*' )), which might (or might not) be promising as it is somewhat verbose.
  4. Built-in dropping attributes AttributesProcessor: this is required in the spec for the configuration for the resulting metrics stream: "A list of attribute keys (optional). If provided, the attributes that are not in the list will be ignored"

@pichlermarc
Copy link
Member

I'd like to help out with this one if @dyladan is okay with that. :)

@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the stale label Mar 21, 2022
@pichlermarc
Copy link
Member

As far as I can tell the only thing missing for this to be done is exemplar reservoir support for views. I need to do some reading before I can pick up work on this, as I am not too familiar with it yet.

@dyladan
Copy link
Member Author

dyladan commented Mar 23, 2022

Closing because views is implemented. Exemplars pushed to after GA. Opened a new issue for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants