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

[SPM] Differentiate null from no error data #4985

Merged
merged 5 commits into from
Dec 4, 2023

Conversation

albertteoh
Copy link
Contributor

Which problem is this PR solving?

Description of the changes

  • Ensures SPM displays a 0% error rate if there are no error metrics and call rates exist.
  • If call rates don't exist, the error rate will also be null.
  • This ensures SPM is able to differentiate "no data" from "no errors".

How was this change tested?

  • Add unit tests to cover happy and error cases.
  • Tested locally to confirm "No data" is shown in the Error graph when there is no data, then when call rates are available, a 0% rate is displayed.
Screenshot 2023-12-03 at 8 01 36 pm Screenshot 2023-12-03 at 8 00 45 pm

Checklist

Albert Teoh added 3 commits December 3, 2023 20:04
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
Signed-off-by: Albert Teoh <albert@packsmith.io>
@albertteoh albertteoh requested a review from a team as a code owner December 3, 2023 09:16
Signed-off-by: Albert Teoh <albert@packsmith.io>
@@ -2,7 +2,7 @@
build: export DOCKER_TAG = dev
build: clean-jaeger
cd ../../ && \
make build-all-in-one && \
make build-all-in-one-linux && \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The docker images rely on linux binaries.

@@ -211,7 +211,38 @@ func (m MetricsReader) GetErrorRates(ctx context.Context, requestParams *metrics
)
},
}
return m.executeQuery(ctx, metricsParams)
errorMetrics, err := m.executeQuery(ctx, metricsParams)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the main change, the rest supports this change, mostly for testing purposes.

Copy link

codecov bot commented Dec 3, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e170dba) 95.60% compared to head (16decd1) 95.60%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4985      +/-   ##
==========================================
- Coverage   95.60%   95.60%   -0.01%     
==========================================
  Files         319      319              
  Lines       18764    18786      +22     
==========================================
+ Hits        17940    17960      +20     
- Misses        661      663       +2     
  Partials      163      163              
Flag Coverage Δ
cassandra-3.x 25.63% <ø> (ø)
cassandra-4.x 25.63% <ø> (ø)
elasticsearch-5.x 19.90% <ø> (ø)
elasticsearch-6.x 19.89% <ø> (-0.02%) ⬇️
elasticsearch-7.x 20.04% <ø> (ø)
elasticsearch-8.x 20.11% <ø> (-0.02%) ⬇️
grpc-badger 19.53% <ø> (-0.02%) ⬇️
kafka 14.12% <ø> (ø)
opensearch-1.x 20.04% <ø> (ø)
opensearch-2.x 20.02% <ø> (ø)
unittests 93.34% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Albert Teoh <albert@packsmith.io>
@@ -62,13 +62,13 @@ make build
## Bring up the dev environment

```bash
make run-dev
make dev
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to add a ci workflow that will build and run this example like that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting idea, thanks. I'll have a think about this and put together a separate PR for it.

@albertteoh albertteoh merged commit d45aba6 into jaegertracing:main Dec 4, 2023
37 checks passed
@albertteoh albertteoh deleted the zero-error-rates branch December 4, 2023 10:56
@albertteoh
Copy link
Contributor Author

Thanks for the review!

RipulHandoo pushed a commit to RipulHandoo/jaeger that referenced this pull request Dec 4, 2023
## Which problem is this PR solving?
- Resolves jaegertracing#4229

## Description of the changes
- Ensures SPM displays a 0% error rate if there are no error metrics
_and_ call rates exist.
- If call rates don't exist, the error rate will also be null.
- This ensures SPM is able to differentiate "no data" from "no errors".

## How was this change tested?
- Add unit tests to cover happy and error cases.
- Tested locally to confirm "No data" is shown in the Error graph when
there is no data, then when call rates are available, a 0% rate is
displayed.

<img width="1710" alt="Screenshot 2023-12-03 at 8 01 36 pm"
src="https://github.com/jaegertracing/jaeger/assets/26584478/e38bdefc-2e2e-4a9c-a873-2ad1857f2098">

<img width="1696" alt="Screenshot 2023-12-03 at 8 00 45 pm"
src="https://github.com/jaegertracing/jaeger/assets/26584478/3e10d5fb-03e4-4ff3-b260-0dd8045eafbe">

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

---------

Signed-off-by: Albert Teoh <albert@packsmith.io>
Co-authored-by: Albert Teoh <albert@packsmith.io>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: SPM Provide option to fill null gaps with zero in monitor tab
2 participants