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

Ignore negative workload latency #839

Merged
merged 2 commits into from
Oct 29, 2022

Conversation

tanveergill
Copy link
Contributor

@tanveergill tanveergill commented Oct 29, 2022

Issue

  • Workload latency in case of Envoy is calculated as:
workload_latency = response_latency - aperture_latency
  • Workload Latency can become negative in case of connection reset
    • If the connection is aborted by Client or Server Envoy immediately terminates the connection for the other endpoint.
    • In the Access Log, status code is set as 0 and response_latency is set as zero.
    • If Authz call to Aperture Agent had succeeded for this request, then aperture_latency is greater than zero.
    • This would lead the workload_latency to be computed as negative.
      Screenshot from 2022-10-28 19-24-44

Fix

  • Ignore negative workload latency I.E. don't populate the workload latency column
  • Publish Prometheus metrics for flux-meter or workload latency only if the metric column is found
Checklist
  • Tested in playground or other setup

This change is Reviewable

…ency = response_latency - aperture_latency can be negative
@tanveergill tanveergill requested a review from a team as a code owner October 29, 2022 02:25
@codecov
Copy link

codecov bot commented Oct 29, 2022

Codecov Report

Base: 37.45% // Head: 3.36% // Decreases project coverage by -34.09% ⚠️

Coverage data is based on head (087f62e) compared to base (367c5c8).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #839       +/-   ##
==========================================
- Coverage   37.45%   3.36%   -34.10%     
==========================================
  Files         278     278               
  Lines       20494   20499        +5     
==========================================
- Hits         7677     689     -6988     
- Misses      12337   19742     +7405     
+ Partials      480      68      -412     
Impacted Files Coverage Δ
...ollector/metricsprocessor/internal/envoy_labels.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/otelcollector/metricsprocessor/processor.go 0.00% <0.00%> (-65.12%) ⬇️
pkg/status/provide.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/notifiers/event.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/etcd/notifier/key.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/platform/readiness.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/config/unmarshaller.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/etcd/notifier/prefix.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/policies/common/paths.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/notifiers/basic-notifier.go 0.00% <0.00%> (-100.00%) ⬇️
... and 159 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@harjotgill harjotgill merged commit 3c7fa68 into main Oct 29, 2022
@harjotgill harjotgill deleted the tgill/ignore-negative-latency-on-resets branch October 29, 2022 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants