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

Use environment variables for tracer and meter providers #1571

Merged
merged 1 commit into from
Feb 4, 2021

Conversation

ocelotl
Copy link
Contributor

@ocelotl ocelotl commented Feb 3, 2021

Fixes #1569

Description

Meter and Tracer provider environment variables were not consistent with the rest after Configuration was removed, this fixes that problem.

Fixes #1569

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A

Does This PR Require a Contrib Repo Change?

Answer the following question based on these examples of changes that would require a Contrib Repo Change:

  • The OTel specification has changed which prompted this PR to update the method interfaces of opentelemetry-api/ or opentelemetry-sdk/

  • The method interfaces of opentelemetry-instrumentation/ have changed

  • The method interfaces of test/util have changed

  • Scripts in scripts/ that were copied over to the Contrib repo have changed

  • Configuration files that were copied over to the Contrib repo have changed (when consistency between repositories is applicable) such as in

    • pyproject.toml
    • isort.cfg
    • .flake8
  • When a new .github/CODEOWNER is added

  • Major changes to project information, such as in:

    • README.md
    • CONTRIBUTING.md
  • Yes. - Link to PR:

  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@ocelotl ocelotl requested review from a team, aabmass and lzchen and removed request for a team February 3, 2021 00:59
@@ -59,8 +67,13 @@ def _load_provider(provider: str) -> Provider:


def _load_meter_provider(provider: str) -> "MeterProvider":
Copy link
Member

Choose a reason for hiding this comment

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

Should we remove the provider arg altogether? I don't see when it would be anything different, its hardcoded in both spots:

_METER_PROVIDER = _load_meter_provider("meter_provider")

_TRACER_PROVIDER = _load_trace_provider("tracer_provider")

@lzchen
Copy link
Contributor

lzchen commented Feb 4, 2021

Are these defined in the spec?

@codeboten
Copy link
Contributor

@lzchen lzchen merged commit b743ab1 into open-telemetry:main Feb 4, 2021
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.

Tracer and Meter provider lack environment variables
5 participants