Skip to content

Commit

Permalink
don't use trace sdk, rename test data file
Browse files Browse the repository at this point in the history
  • Loading branch information
trthomps committed Oct 23, 2024
1 parent e841bbb commit ab6a89e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions exporters/prometheus/exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
otelmetric "go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/sdk/metric"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
"go.opentelemetry.io/otel/trace"
)
Expand Down Expand Up @@ -434,8 +433,14 @@ func TestPrometheusExporter(t *testing.T) {
},
{
name: "non-monotonic sum does not add exemplars",
expectedFile: "testdata/monotonic_sum_with_exemplars.txt",
expectedFile: "testdata/non_monotonic_sum_does_not_add_exemplars.txt",
recordMetrics: func(ctx context.Context, meter otelmetric.Meter) {
sc := trace.NewSpanContext(trace.SpanContextConfig{
SpanID: trace.SpanID{0o1},
TraceID: trace.TraceID{0o1},
TraceFlags: trace.FlagsSampled,
})
ctx = trace.ContextWithSpanContext(ctx, sc)
opt := otelmetric.WithAttributes(
attribute.Key("A").String("B"),
attribute.Key("C").String("D"),
Expand Down

0 comments on commit ab6a89e

Please sign in to comment.