Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prometheus example with ddsketch aggregator panics #402

Closed
clippit opened this issue Dec 26, 2019 · 0 comments · Fixed by #403
Closed

Prometheus example with ddsketch aggregator panics #402

clippit opened this issue Dec 26, 2019 · 0 comments · Fixed by #403

Comments

@clippit
Copy link
Contributor

clippit commented Dec 26, 2019

In exmplae/prometheus/main.go, modify aggregator selector from Exact to Sketch

- 	selector := simple.NewWithExactMeasure()
+ 	selector := simple.NewWithSketchMeasure(ddsketch.NewDefaultConfig())

Then the whole example will panic with following stacktrace:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x13b8326]

goroutine 9 [running]:
github.com/DataDog/sketches-go/ddsketch.(*DDSketch).Merge(0x0, 0xc00009d740)
        /Users/zhangletian/Dev/go/pkg/mod/github.com/!data!dog/sketches-go@v0.0.0-20190923095040-43f19ad77ff7/ddsketch/ddsketch.go:92 +0x36
go.opentelemetry.io/otel/sdk/metric/aggregator/ddsketch.(*Aggregator).Merge(0xc0001002a0, 0x1545e40, 0xc00009d770, 0xc00007a780, 0xc000126000, 0x2)
        /Users/zhangletian/Dev/go/src/go.opentelemetry.io/otel/sdk/metric/aggregator/ddsketch/ddsketch.go:131 +0x122
go.opentelemetry.io/otel/sdk/metric/batcher/defaultkeys.(*Batcher).Process(0xc0000305c0, 0x1547240, 0xc000028078, 0xc00007a780, 0xc00009d620, 0x1, 0x1, 0xc000028530, 0x10, 0x153ea80, ...)
        /Users/zhangletian/Dev/go/src/go.opentelemetry.io/otel/sdk/metric/batcher/defaultkeys/defaultkeys.go:131 +0x70c
go.opentelemetry.io/otel/sdk/metric.(*SDK).checkpoint(0xc0000af180, 0x1547240, 0xc000028078, 0xc0000ac6e0, 0x1)
        /Users/zhangletian/Dev/go/src/go.opentelemetry.io/otel/sdk/metric/sdk.go:429 +0x257
go.opentelemetry.io/otel/sdk/metric.(*SDK).Collect(0xc0000af180, 0x1547240, 0xc000028078, 0x0)
        /Users/zhangletian/Dev/go/src/go.opentelemetry.io/otel/sdk/metric/sdk.go:393 +0x194
go.opentelemetry.io/otel/sdk/metric/controller/push.(*Controller).collect(0xc0000f0100, 0x1547240, 0xc000028078)
        /Users/zhangletian/Dev/go/src/go.opentelemetry.io/otel/sdk/metric/controller/push/push.go:181 +0x91
go.opentelemetry.io/otel/sdk/metric/controller/push.(*Controller).tick(0xc0000f0100)
        /Users/zhangletian/Dev/go/src/go.opentelemetry.io/otel/sdk/metric/controller/push/push.go:164 +0x4f
go.opentelemetry.io/otel/sdk/metric/controller/push.(*Controller).run(0xc0000f0100, 0xc000092120)
        /Users/zhangletian/Dev/go/src/go.opentelemetry.io/otel/sdk/metric/controller/push/push.go:155 +0x42
created by go.opentelemetry.io/otel/sdk/metric/controller/push.(*Controller).Start
        /Users/zhangletian/Dev/go/src/go.opentelemetry.io/otel/sdk/metric/controller/push/push.go:127 +0xf7


clippit added a commit to clippit/opentelemetry-go that referenced this issue Dec 26, 2019
clippit pushed a commit to clippit/opentelemetry-go that referenced this issue Dec 26, 2019
jmacd pushed a commit that referenced this issue Dec 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant