You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Must* types and functions are convenience wrappers, we can move them to another package. They make it harder to focus on what are the core types and where the developers start engaging with the metric package.
The text was updated successfully, but these errors were encountered:
Is there a new home for the Must* types? Trying to figure out how we can update our Otel version which heavily uses the following practice:
// Some code in the codebase// Globally defined metricsvar (
meter=metric.Must(global.MeterProvider().Meter(instrumentationName))
myCounter=meter.NewInt64Counter("my_metric")
)
// Some code...
Ideally we can panic on failure to initialize the metrics at the global level.
Is there a new home for the Must* types? Trying to figure out how we can update our Otel version which heavily uses the following practice:
// Some code in the codebase// Globally defined metricsvar (
meter=metric.Must(global.MeterProvider().Meter(instrumentationName))
myCounter=meter.NewInt64Counter("my_metric")
)
// Some code...
Ideally we can panic on failure to initialize the metrics at the global level.
You will need to define your own functionality to wrap the creation function with panic logic at this point.
The Must* types and functions are convenience wrappers, we can move them to another package. They make it harder to focus on what are the core types and where the developers start engaging with the metric package.
The text was updated successfully, but these errors were encountered: