Skip to content

Commit

Permalink
Merge branch 'master' into upgradedd
Browse files Browse the repository at this point in the history
  • Loading branch information
jmacd authored May 28, 2020
2 parents 8e648ac + d49ffc8 commit a33c367
Show file tree
Hide file tree
Showing 5 changed files with 182 additions and 220 deletions.
10 changes: 3 additions & 7 deletions plugins/runtime/example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ func initMeter() *push.Controller {
pusher, err := metricstdout.NewExportPipeline(metricstdout.Config{
Quantiles: []float64{0.5},
PrettyPrint: true,
}, 10*time.Second)
})
if err != nil {
log.Panicf("failed to initialize metric stdout exporter %v", err)
}
global.SetMeterProvider(pusher)
global.SetMeterProvider(pusher.Provider())
return pusher
}

Expand All @@ -45,15 +45,11 @@ func main() {

meter := global.Meter("runtime")

r := runtime.New(meter, time.Second)
err := r.Start()
if err != nil {
if err := runtime.Start(meter, time.Second); err != nil {
panic(err)
}

stopChan := make(chan os.Signal, 1)
signal.Notify(stopChan, syscall.SIGTERM, syscall.SIGINT)
<-stopChan

r.Stop()
}
4 changes: 3 additions & 1 deletion plugins/runtime/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ module go.opentelemetry.io/contrib/plugins/runtime

go 1.14

replace go.opentelemetry.io/contrib => ../..

require (
github.com/stretchr/testify v1.4.0
go.opentelemetry.io/otel v0.5.0
go.opentelemetry.io/otel v0.6.0
)
4 changes: 2 additions & 2 deletions plugins/runtime/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
go.opentelemetry.io/otel v0.5.0 h1:tdIR1veg/z+VRJaw/6SIxz+QX3l+m+BDleYLTs+GC1g=
go.opentelemetry.io/otel v0.5.0/go.mod h1:jzBIgIzK43Iu1BpDAXwqOd6UPsSAk+ewVZ5ofSXw4Ek=
go.opentelemetry.io/otel v0.6.0 h1:+vkHm/XwJ7ekpISV2Ixew93gCrxTbuwTF5rSewnLLgw=
go.opentelemetry.io/otel v0.6.0/go.mod h1:jzBIgIzK43Iu1BpDAXwqOd6UPsSAk+ewVZ5ofSXw4Ek=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
Expand Down
Loading

0 comments on commit a33c367

Please sign in to comment.