1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-12-03 23:21:27 +02:00

Remove Labelset (#595)

* Remove LabelSet frmo api/metric

* SDK tests pass

* Restore benchmarks

* All tests pass

* Remove all mentions of LabelSet

* Test RecordBatch

* Batch test

* Improves benchmark (some)

* Move the benchmark to match HEAD

* Align labels for GOARCH=386

* Add alignment test

* Disable the stress test fo GOARCH=386

* Fix bug

* Move atomic fields into their own file

* Add a TODO

* Comments

* Remove metric.Labels(...)

* FTB

Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
This commit is contained in:
Joshua MacDonald
2020-03-27 14:06:48 -07:00
committed by GitHub
parent e7a9ba1e2e
commit e8546e3bc5
29 changed files with 436 additions and 477 deletions

View File

@@ -72,10 +72,10 @@ func main() {
tracer := global.Tracer("ex.com/basic")
meter := global.Meter("ex.com/basic")
commonLabels := meter.Labels(lemonsKey.Int(10), key.String("A", "1"), key.String("B", "2"), key.String("C", "3"))
commonLabels := []core.KeyValue{lemonsKey.Int(10), key.String("A", "1"), key.String("B", "2"), key.String("C", "3")}
oneMetricCB := func(result metric.Float64ObserverResult) {
result.Observe(1, commonLabels)
result.Observe(1, commonLabels...)
}
_ = metric.Must(meter).RegisterFloat64Observer("ex.com.one", oneMetricCB,
metric.WithKeys(fooKey, barKey, lemonsKey),
@@ -91,7 +91,7 @@ func main() {
barKey.String("bar1"),
)
measure := measureTwo.Bind(commonLabels)
measure := measureTwo.Bind(commonLabels...)
defer measure.Unbind()
err := tracer.WithSpan(ctx, "operation", func(ctx context.Context) error {