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

Clarify distribution summary docs #182

Merged
merged 4 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
4 changes: 2 additions & 2 deletions docs/spectator/core/meters/dist-summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ via a filter, or use one of the operators below to generate a useful response.

### Average Measurement (:dist-avg)

To compute the average latency across an arbitrary group, use the [:dist-avg] function:
To compute the average size across an arbitrary group, use the [:dist-avg] function:

@@@ atlas-stacklang
/api/v1/graph?q=nf.cluster,foo,:eq,name,http.req.payload.size,:eq,:and,:dist-avg,(,nf.asg,),:by
Expand All @@ -38,7 +38,7 @@ To compute the average latency across an arbitrary group, use the [:dist-avg] fu

### Maximum Measurement (:dist-max)

To compute the maximum latency across a group, use [:dist-max]:
To compute the maximum size across a group, use [:dist-max]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks.


@@@ atlas-stacklang
/api/v1/graph?q=nf.cluster,foo,:eq,name,http.req.payload.size,:eq,:and,:dist-max,(,nf.asg,),:by
Expand Down
15 changes: 15 additions & 0 deletions docs/spectator/specs/ipc.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ This is a [distribution summary] of the size in bytes of outbound messages sent
This is a [distribution summary] that shows the number of inbound IPC messages currently being
processed in a server.

!!! Note
Distribution summaries are not suitable for use-cases trying to perform hierarchical accumulation across dimensions.
Each measurement is recorded with a certain set of dimensions, as illustrated below with the inflight metric.
Therefore, when using the [:dist-max] operator to query over a set of filters, the response will represent the
maximum inflight count for a given set of tag values within the group, **not** the accumulate value of measurements
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/accumulate/accumulated/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

across the entire group.

**Unit:** inflight message count

**Dimensions:**
Expand Down Expand Up @@ -209,6 +216,13 @@ This is a [distribution summary] of the size in bytes of outbound messages sent
This is a [distribution summary] that shows the number of currently outstanding outbound
IPC messages from a client.

!!! Note
Distribution summaries are not suitable for use-cases trying to perform hierarchical accumulation across dimensions.
Each measurement is recorded with a certain set of dimensions, as illustrated below with the inflight metric.
Therefore, when using the [:dist-max] operator to query over a set of filters, the response will represent the
maximum inflight count for a given set of tag values within the group, **not** the accumulate value of measurements
across the entire group.

**Unit:** inflight message count

**Dimensions:**
Expand All @@ -224,3 +238,4 @@ IPC messages from a client.

[percentile timer]: https://www.javadoc.io/page/com.netflix.spectator/spectator-api/latest/com/netflix/spectator/api/histogram/PercentileTimer.html
[distribution summary]: ../core/meters/dist-summary.md
[:dist-max]: ../../asl/ref/dist-max.md