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

Unexport NoopXXX trace types #1134

Merged
merged 5 commits into from
Sep 9, 2020
Merged

Unexport NoopXXX trace types #1134

merged 5 commits into from
Sep 9, 2020

Conversation

rakyll
Copy link
Contributor

@rakyll rakyll commented Sep 8, 2020

The change unexports the noop implementations and provide the NoopProvider function for user to construct noop providers. Users can access noop tracer and noop spans by using the provider.

This change removes the types users should never be directly using from the package. It improves the usability of the API by reducing the API surface to half and helping the user to focus on the canonical APIs.

Fixes #1133

@MrAlias MrAlias added area:trace Part of OpenTelemetry tracing pkg:API Related to an API package priority:p1 labels Sep 8, 2020
@MrAlias MrAlias added this to the RC1 milestone Sep 8, 2020
@rakyll
Copy link
Contributor Author

rakyll commented Sep 8, 2020

Working on the broken parts...

The change unexports the noop implementations and provide the NoopProvider function for user to construct noop providers. Users can access noop tracer and noop spans by using the provider.

This change removes the types users should never be directly using from the package. It improves the usability of the API by reducing the API surface to half and helping the user to focus on the canonical APIs.

Fixes #1133
@codecov
Copy link

codecov bot commented Sep 8, 2020

Codecov Report

Merging #1134 into master will increase coverage by 0.0%.
The diff coverage is 53.5%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1134   +/-   ##
======================================
  Coverage    77.3%   77.3%           
======================================
  Files         134     135    +1     
  Lines        7101    7107    +6     
======================================
+ Hits         5491    5498    +7     
+ Misses       1362    1361    -1     
  Partials      248     248           
Impacted Files Coverage Δ
api/trace/noop_span.go 20.0% <15.3%> (ø)
bridge/opentracing/bridge.go 40.3% <33.3%> (-0.2%) ⬇️
api/global/internal/trace.go 91.3% <100.0%> (ø)
api/trace/context.go 100.0% <100.0%> (ø)
api/trace/noop_trace.go 100.0% <100.0%> (ø)
api/trace/noop_trace_provider.go 100.0% <100.0%> (+100.0%) ⬆️
exporters/trace/jaeger/jaeger.go 84.9% <100.0%> (ø)
internal/trace/noop/noop.go 100.0% <100.0%> (ø)

@rakyll
Copy link
Contributor Author

rakyll commented Sep 9, 2020

PTAL, I introduced an internal noop package for the convenience of the packages that need noop implementations.

@Aneurysm9 Aneurysm9 merged commit a2c75c6 into open-telemetry:master Sep 9, 2020
evantorrie pushed a commit to evantorrie/opentelemetry-go that referenced this pull request Sep 10, 2020
* Unexport NoopXXX trace types

The change unexports the noop implementations and provide the NoopProvider function for user to construct noop providers. Users can access noop tracer and noop spans by using the provider.

This change removes the types users should never be directly using from the package. It improves the usability of the API by reducing the API surface to half and helping the user to focus on the canonical APIs.

Fixes open-telemetry#1133

* Provide noop tracer and span for internal use

* Remove obsolete doc

* Use noop span instead of nil

* Fix the broken  build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:trace Part of OpenTelemetry tracing pkg:API Related to an API package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexport NoopXXX
4 participants