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

Alias api types to root #696

Merged
merged 4 commits into from May 7, 2020
Merged

Conversation

tensorchen
Copy link
Member

@tensorchen tensorchen commented May 3, 2020

See #371

Fixes #371

Copy link
Member

@lizthegrey lizthegrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otel.SetGlobalMeterProvider is really not much more concise than global.SetMeterProvider.

Would support this with the passthrough of Tracer, Meter, and Propagator only, or perhaps some of the key package types.

@jmacd
Copy link
Contributor

jmacd commented May 4, 2020

See also #295

@tensorchen tensorchen changed the title [WIP] Alias api/... types, functions to root Alias api types to root May 6, 2020
Copy link
Member

@lizthegrey lizthegrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving cautiously. curious what other approvers think.

@jmacd
Copy link
Contributor

jmacd commented May 6, 2020

This looks OK to me. I would be inclined (if possible) to look at any real code (including examples) to see which can drop a substantial number of import statements as a result of this. I suspect core.KeyValue is going to be a popular reason that packages continue to import core. I suspect MeterProvider and TracerProvider will make that list, too. This is a fine start, and I know that having a non-empty package in this location will help with certain tooling, which want to see code in the root of a package.

Copy link
Member

@Aneurysm9 Aneurysm9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @jmacd. I don't think it can do any harm and it should help reduce friction with some tooling, so +1.

Copy link
Contributor

@MrAlias MrAlias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a first good step. I'm with @jmacd in seeing if this can strategically be progressed.

@MrAlias MrAlias merged commit 485cbd4 into open-telemetry:master May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider adding API aliases to root package
5 participants