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

trace: split tracer and versioned_tracer methods #682

Merged
merged 3 commits into from
Dec 24, 2021

Commits on Dec 23, 2021

  1. trace: split tracer and versioned_tracer methods

    The [trace spec] requires that `TracerProvider`s MUST accept optional
    `version` and `schema_url` parameters. This introduces ergonomic issues
    as rust does not have a variadic solution outside of macros, leading to
    many calls with only a single relevant argument (e.g. `tracer(name, None, None)`).
    
    This patch splits the current `TracerProvider::tracer` method into
    `TracerProvider::versioned_tracer` which implements the spec mandated
    optional fields, as well as a `TracerProvider::tracer` method that
    accepts only a `name` parameter as a convenience method for the above
    listed common case.
    
    [trace spec]: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.4.0/specification/trace/api.md#get-a-tracer
    jtescher committed Dec 23, 2021
    Configuration menu
    Copy the full SHA
    2261985 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1a504ef View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bda6a15 View commit details
    Browse the repository at this point in the history