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

docs(sdk-metrics): fix typos and add missing parameter docs #3244

Merged
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions experimental/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ All notable changes to experimental packages in this project will be documented

### :books: (Refine Doc)

* docs(sdk-metrics): fix typos and add missing parameter docs. [#3244](https://github.com/open-telemetry/opentelemetry-js/pull/3244) @pichlermarc

### :house: (Internal)

## 0.32.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export interface Aggregator<T> {
* Returns the {@link MetricData} that this {@link Aggregator} will produce.
*
* @param descriptor the metric instrument descriptor.
* @param aggregationTemporality the temporality of the resulting {@link MetricData}
* @param accumulationByAttributes the array of attributes and accumulation pairs.
* @param endTime the end time of the metric data.
* @return the {@link MetricData} that this {@link Aggregator} will produce.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface ExemplarFilter {
* @param value The value of the measurement
* @param timestamp A timestamp that best represents when the measurement was taken
* @param attributes The complete set of MetricAttributes of the measurement
* @param context The Context of the measurement
* @param ctx The Context of the measurement
*/
shouldSample(
value: number,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export interface PushMetricExporter {
/**
* Called to export sampled {@link ResourceMetrics}.
* @param metrics the metric data to be exported.
* @param resultCallback callback for when the export has completed
*/
export(metrics: ResourceMetrics, resultCallback: (result: ExportResult) => void): void;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export class MeterSharedState {
/**
* @param collector opaque handle of {@link MetricCollector} which initiated the collection.
* @param collectionTime the HrTime at which the collection was initiated.
* @param options options for collection.
* @returns the list of metric data collected.
*/
async collect(collector: MetricCollectorHandle, collectionTime: HrTime, options?: MetricCollectOptions): Promise<ScopeMetricsResult> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ interface LastReportedHistory<T extends Maybe<Accumulation>> {
/**
* Internal interface.
*
* Provides unique reporting for each collectors. Allows synchronous collection
* Provides unique reporting for each collector. Allows synchronous collection
* of metrics and reports given temporality values.
*/
export class TemporalMetricProcessor<T extends Maybe<Accumulation>> {
Expand All @@ -57,8 +57,6 @@ export class TemporalMetricProcessor<T extends Maybe<Accumulation>> {
* Builds the {@link MetricData} streams to report against a specific MetricCollector.
* @param collector The information of the MetricCollector.
* @param collectors The registered collectors.
* @param resource The resource to attach these metrics against.
* @param instrumentationScope The instrumentation scope that generated these metrics.
* @param instrumentDescriptor The instrumentation descriptor that these metrics generated with.
* @param currentAccumulations The current accumulation of metric data from instruments.
* @param collectionTime The current collection timestamp.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@

// https://tc39.es/proposal-regex-escaping
// escape ^ $ \ . + ? ( ) [ ] { } |
// do not need to escape * as we are interpret it as wildcard
// do not need to escape * as we interpret it as wildcard
const ESCAPE = /[\^$\\.+?()[\]{}|]/g;

export interface Predicate {
match(str: string): boolean;
}

/**
* Wildcard pattern predicate, support patterns like `*`, `foo*`, `*bar`.
* Wildcard pattern predicate, supports patterns like `*`, `foo*`, `*bar`.
*/
export class PatternPredicate implements Predicate {
private _matchAll: boolean;
Expand Down