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

Split aggregators into different packages #1292

Closed
rakyll opened this issue Oct 29, 2020 · 2 comments
Closed

Split aggregators into different packages #1292

rakyll opened this issue Oct 29, 2020 · 2 comments
Labels
area:metrics Part of OpenTelemetry Metrics pkg:API Related to an API package
Projects

Comments

@rakyll
Copy link
Contributor

rakyll commented Oct 29, 2020

The metric package currently is pretty big and hard to begin with. In order to be able to highlight the core types users should be engaging with, can we split aggregation related types into different packages?

For example,

package metric

type Meter struct { ... }

func (m Meter) NewInt64Counter(name string, options ...InstrumentOption) (counter.Int64UpDownCounter, error) 
func (m Meter) NewFloat64Counter(name string, options ...InstrumentOption) (counter.Float64UpDownCounter, error) 

...

package counter

type Int64UpDownCounter struct {}
type Float64UpDownCounter struct {}

@rakyll
Copy link
Contributor Author

rakyll commented Oct 29, 2020

A prototype of this idea is at https://godoc.org/github.com/rakyll/opentelemetry-metric-go. It's a rough idea at this point, we still need to investigate the potential cyclic dependencies and may end up introducing some internal types to get around. I'll give an overview of the idea at the next meeting to discuss whether it's a feasible approach. If yes, I highly suggest us to give it a try. It potentially will cut the initial API surface to 1/10th and will give the users a clear entry point to start with.

@MrAlias MrAlias added area:metrics Part of OpenTelemetry Metrics pkg:API Related to an API package priority:p1 labels Oct 29, 2020
@MrAlias MrAlias added this to the RC1 milestone Oct 29, 2020
@MrAlias MrAlias added this to To do in OpenTelemetry Go RC via automation Oct 29, 2020
@MrAlias MrAlias added this to To do in P1 Burndown via automation Oct 29, 2020
@MrAlias MrAlias removed this from the RC1 milestone Feb 12, 2021
@punya punya removed this from To do in OpenTelemetry Go RC Feb 17, 2021
@MrAlias
Copy link
Contributor

MrAlias commented May 3, 2022

Resolved by #2587

@MrAlias MrAlias closed this as completed May 3, 2022
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 pkg:API Related to an API package
Projects
No open projects
P1 Burndown
  
To do
Development

No branches or pull requests

2 participants