You've already forked opentelemetry-go
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user