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

New metrics SDK #1000

Merged
merged 19 commits into from
Mar 28, 2023
Merged

New metrics SDK #1000

merged 19 commits into from
Mar 28, 2023

Commits on Mar 19, 2023

  1. New metrics SDK

    This patch updates the metrics SDK to the latest spec. The following
    breaking changes are introduced.
    
    Metrics API changes:
    
    * Move `AttributeSet` to SDK as it's not mentioned in the spec or used
      in the api
    * Consolidate `AsyncCounter`, `AsyncUpDownCounter`, and `AsyncGauge`
      into `AsyncInstrument` trait and add downcasting for observer
    callbacks.
    * Add `AsyncInstrumentBuilder` to allow per-instrument callback
      configuration.
    * Allow metric `name` and `description` fields to be `Cow<'static, str>`
    * Warn on metric misconfiguration when using instrument builder `init`
      rather than returning error
    * Update `Meter::register_callback` to take a list of async instruments
      and validate they are registered in the callback through the
    associated `Observer`
    * Allow registered callbacks to be unregistered.
    
    Metrics SDK changes:
    
    * Introduce `Scope` as type alias for `InstrumentationLibrary`
    * Update `Aggregation` to match aggregation spec
    * Refactor `BasicController` to spec compliant `ManualReader`
    * Refactor `PushController` to spec compliant `PeriodicReader`
    * Update metric data fields to match spec, including exemplars.
    * Split `MetricsExporter` into `Reader`s and `PushMetricExporter`s
    * Add `View` implementation
    * Remove `AtomicNumber`s
    * Refactor `Processor`s into `Pipeline`
    
    Metrics exporter changes:
    
    * Update otlp exporter to match new metrics data
    * Update otlp exporter configuration to allow aggregation and
      temporality selectors to be optional.
    * Update prometheus exporter to match new metrics data
    
    Example changes:
    * Update otlp metrics and prometheus examples.
    * Remove basic example as we should be focusing on the OTLP variants
    jtescher committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    e242ae0 View commit details
    Browse the repository at this point in the history
  2. Update metric benchmarks

    jtescher committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    5874ac9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    be4b49f View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2023

  1. Add more benchmark tests

    jtescher committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    e6a5afb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8d80bce View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2023

  1. Configuration menu
    Copy the full SHA
    16f9907 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4e5eeb2 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2023

  1. Configuration menu
    Copy the full SHA
    6ca2749 View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2023

  1. Merge branch 'main' into new-metrics

    # Conflicts:
    #	opentelemetry-dynatrace/Cargo.toml
    #	opentelemetry-otlp/Cargo.toml
    #	opentelemetry-prometheus/Cargo.toml
    jtescher committed Mar 26, 2023
    Configuration menu
    Copy the full SHA
    2ffa68a View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2023

  1. Remove sleep from examples

    jtescher committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    6d722b8 View commit details
    Browse the repository at this point in the history
  2. Fix tests

    jtescher committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    7ab6437 View commit details
    Browse the repository at this point in the history
  3. Fix coverage

    jtescher committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    c5718ba View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e91b7cf View commit details
    Browse the repository at this point in the history
  5. Fix clippy lints

    jtescher committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    c57d90b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0599689 View commit details
    Browse the repository at this point in the history
  7. Review comment

    Co-authored-by: Zhongyang Wu <zhongyang.wu@outlook.com>
    jtescher and TommyCpp committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    98d0c02 View commit details
    Browse the repository at this point in the history
  8. Address comments from review

    jtescher committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    3f280a6 View commit details
    Browse the repository at this point in the history
  9. Fix noop docs

    jtescher committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    ccefdb6 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    0ea2e6d View commit details
    Browse the repository at this point in the history