Skip to content

Commit

Permalink
Fix merge artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
hexdigest committed Apr 30, 2023
1 parent ea67c1a commit b4b3c2a
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions exporters/prometheus/exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -723,13 +723,18 @@ func TestConcurrentCollect(t *testing.T) {
instrument.WithUnit("By"),
instrument.WithDescription("meter counter foo"))
assert.NoError(t, err)
fooA.Add(ctx, 100, attribute.String("A", "B"))

opt := otelmetric.WithAttributes(
attribute.Key("A").String("B"),
)

fooA.Add(ctx, 100, opt)

fooB, err := meterB.Int64Counter("foo",
instrument.WithUnit("By"),
instrument.WithDescription("meter counter foo"))
assert.NoError(t, err)
fooB.Add(ctx, 100, attribute.String("A", "B"))
fooB.Add(ctx, 100, opt)

concurrencyLevel := 100
ch := make(chan prometheus.Metric, concurrencyLevel)
Expand Down Expand Up @@ -802,15 +807,19 @@ func TestNotNilScopeinfoInCollect(t *testing.T) {
instrument.WithDescription(invalidName))
assert.NoError(t, err)

counterA.Add(ctx, 100, attribute.String(invalidName, invalidName))
counterA.Add(ctx, 100, otelmetric.WithAttributes(
attribute.Key(invalidName).String(invalidName),
))

meterB := provider.Meter(validName, otelmetric.WithInstrumentationVersion("v0.1.0"))
counterB, err := meterB.Int64Counter(validName,
instrument.WithUnit("By"),
instrument.WithDescription(validName))
assert.NoError(t, err)

counterB.Add(ctx, 100, attribute.String(validName, validName))
counterB.Add(ctx, 100, otelmetric.WithAttributes(
attribute.Key(validName).String(validName),
))

ch := make(chan prometheus.Metric)

Expand Down

0 comments on commit b4b3c2a

Please sign in to comment.