Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use SDK providers in example code #488

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

Merged
merged 1 commit into from
Mar 14, 2020

Conversation

c24t
Copy link
Member

@c24t c24t commented Mar 14, 2020

See https://github.com/open-telemetry/opentelemetry-python/pull/466/files#r392613438.

This PR updates docs and example code to use SDK-provided providers following #466.

#466 removed set_preferred_implementation in favor of set_provider methods. Before this change, most example code and docs loaded the SDK TracerProvider and MeterProvider. Although we technically don't need these lines now that it's possible to set the default providers in config, I think it's still useful to include them since we expect most users to use the SDK types. Writing the examples this way means they can run as-is without a separate config file.

cc @ocelotl.

@c24t c24t requested a review from a team March 14, 2020 21:24
@codecov-io
Copy link

codecov-io commented Mar 14, 2020

Codecov Report

Merging #488 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #488   +/-   ##
=======================================
  Coverage   89.19%   89.20%           
=======================================
  Files          43       43           
  Lines        2175     2177    +2     
  Branches      243      243           
=======================================
+ Hits         1940     1942    +2     
  Misses        165      165           
  Partials       70       70           
Impacted Files Coverage Δ
...src/opentelemetry/ext/opentracing_shim/__init__.py 96.03% <ø> (ø)
...app/src/opentelemetry_example_app/flask_example.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 68e909b...2a78b9d. Read the comment docs.

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@ocelotl ocelotl left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@c24t c24t merged commit 4f1aa28 into open-telemetry:master Mar 14, 2020
@c24t c24t deleted the sdk-providers-in-ex branch March 14, 2020 22:07
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.

4 participants