Skip to content

Commit

Permalink
docs(sdk-metrics): fix typos and add missing parameter docs (open-tel…
Browse files Browse the repository at this point in the history
…emetry#3244)

Co-authored-by: Daniel Dyla <[email protected]>
  • Loading branch information
pichlermarc and dyladan authored Sep 13, 2022
1 parent 032f68f commit bd0a77f
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 6 deletions.
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

0 comments on commit bd0a77f

Please sign in to comment.