Skip to content

Commit

Permalink
chore: update code due to cgenerator changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tdakkota committed Dec 8, 2023
1 parent 6005b60 commit 70ade95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion integration/prome2e/oas_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func TestPrometheusOAS(t *testing.T) {
vr := v.Result[0]
assert.Equal(t, "go_info", vr.Metric["__name__"], "metric name")
assert.Greater(t, vr.Value.T, 0.0, "value")
assert.Equal(t, vr.Value.HistogramOrValue.Float64, 1.0)
assert.Equal(t, vr.Value.HistogramOrValue.StringFloat64, 1.0)
}

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/promhandler/promql.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func mapSample(s promql.Sample) promapi.Sample {
if h := s.H; h != nil {
val.SetHistogram(mapHistogram(h))
} else {
val.SetFloat64(s.F)
val.SetStringFloat64(s.F)
}
return promapi.Sample{
T: apiTimestamp(s.T),
Expand Down

0 comments on commit 70ade95

Please sign in to comment.