-
Notifications
You must be signed in to change notification settings - Fork 828
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
refactor(sdk-metrics) Swap workaround types for @otel/api types #5254
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,12 @@ | |
* limitations under the License. | ||
*/ | ||
|
||
import { MetricOptions, ValueType, diag } from '@opentelemetry/api'; | ||
import { | ||
MetricAdvice, | ||
MetricOptions, | ||
ValueType, | ||
diag, | ||
} from '@opentelemetry/api'; | ||
import { View } from './view/View'; | ||
import { equalsCaseInsensitive } from './utils'; | ||
|
||
|
@@ -44,18 +49,11 @@ export interface InstrumentDescriptor { | |
readonly type: InstrumentType; | ||
readonly valueType: ValueType; | ||
/** | ||
* @experimental | ||
* See {@link MetricAdvice} | ||
* | ||
* This is intentionally not using the API's type as it's only available from @opentelemetry/api 1.7.0 and up. | ||
* In SDK 2.0 we'll be able to bump the minimum API version and remove this workaround. | ||
* @experimental | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Kept the FWIW, the entire There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Keeping it experimental is good - we'll bump it to stable in a separate issue. 👍 The |
||
*/ | ||
readonly advice: { | ||
/** | ||
* Hint the explicit bucket boundaries for SDK if the metric has been | ||
* aggregated with a HistogramAggregator. | ||
*/ | ||
explicitBucketBoundaries?: number[]; | ||
}; | ||
readonly advice: MetricAdvice; | ||
} | ||
|
||
export function createInstrumentDescriptor( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah there still needs to be an entry to
breaking
as we drop support for old API versions 🙂There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, that's right, fixed!