Skip to content

JSdocs on Query parameter is incorrect #924

@smg-kayle

Description

@smg-kayle
export interface Query {
  /**
   * A Datadog metric query for total (valid) events.
   *
   * @schema Query#Numerator
   */
  readonly numerator?: string;

  /**
   * A Datadog metric query for good events.
   *
   * @schema Query#Denominator
   */
  readonly denominator?: string;
}

Here in the docs, it tells us the numerator represents the total events (including good events), and the denominator represents the good events.
However, in the equation, the numerator is the top number, and the denominator is the bottom number in the fraction. In this case, the total events are always greater than the good events; as a result, the result of the equation is always greater than 1, which is incorrect.

Proposed fix

export interface Query {
  /**
   * A Datadog metric query for good events.
   *
   * @schema Query#Numerator
   */
  readonly numerator?: string;

  /**
   * A Datadog metric query for total (valid) events.
   *
   * @schema Query#Denominator
   */
  readonly denominator?: string;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions