-
Notifications
You must be signed in to change notification settings - Fork 835
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
Missing boundaries
option in HistogramOptions
#2999
Comments
This is by design. The boundaries now should be configured with Views. You can do it like const { ExplicitBucketHistogramAggregation, InstrumentType } = require('@opentelemetry/sdk-metrics-sdk');
meterProvider.addView({
aggregation: new ExplicitBucketHistogramAggregation([ /* custom boundaries */]);
}, {
instrument: {
type: InstrumentType.HISTOGRAM,
},
});
// After the view is added, create the metric instrument
const h1 = meter.createHistogram('test-metric'); |
boundaries
option in HistogramOptions
@legendecas It will give those boundaries for each histogram created by |
When adding a view you can target a specific instrument name/type/description https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-sdk-metrics-base/test/MeterProvider.test.ts#L177 |
Closing as the question has been answered. Please feel to reopen if that is not the case. |
I moved the below discussion to #3619.
|
latest otel package versions, node 12
I tried to set up custom boundaries for buckets (I need exclusive for each instance, not for agregator), there is no boundaries option
in
HistogramOptions
.The text was updated successfully, but these errors were encountered: