JSdocs on Query parameter is incorrect

Open Beginner friendly
#924 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
75/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Quiet
Tech stack
typescript
Domain
documentation

Research direction

Start by locating the TypeScript Query interface containing the numerator and denominator JSDoc shown in the issue. Verify the metric equation's numerator and denominator meanings, update the two descriptions to match them, and confirm the generated documentation reflects the corrected semantics.

Written by the indexing model from the issue text.

Description

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;
}
Dominant language
TypeScript
Stars
66
Forks
5
Avg merge
7d 43m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cdklabs/cdk-cloudformation

All issues in cdklabs/cdk-cloudformation

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.