Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
  • Loading branch information
povilasv and pichlermarc authored Nov 11, 2024
1 parent 21c4168 commit d133c01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/sdk-metrics/src/state/DeltaMetricProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class DeltaMetricProcessor<T extends Maybe<Accumulation>> {
private _aggregator: Aggregator<T>,
aggregationCardinalityLimit?: number
) {
this._cardinalityLimit = aggregationCardinalityLimit ?? 2000;
this._cardinalityLimit = (aggregationCardinalityLimit ?? 2000) - 1;
}

record(
Expand Down
5 changes: 1 addition & 4 deletions packages/sdk-metrics/src/view/View.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,7 @@ export class View {
* @param viewOptions.aggregationCardinalityLimit
* Alters the metric stream:
* Sets a limit on the number of unique attribute combinations (cardinality) that can be aggregated.
* If not provided, the default limit will be used.
*
* @example <caption>sets the cardinality limit to 1000</caption>
* aggregationCardinalityLimit: 1000
* If not provided, the default limit of 2000 will be used.
*
* @example
* // Create a view that changes the Instrument 'my.instrument' to use to an
Expand Down

0 comments on commit d133c01

Please sign in to comment.