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

Response status in telemetry #828

Merged
merged 5 commits into from
Oct 28, 2022
Merged

Response status in telemetry #828

merged 5 commits into from
Oct 28, 2022

Conversation

kwapik
Copy link
Contributor

@kwapik kwapik commented Oct 27, 2022

Description of change

This introduces aperture.response_status column in telemetry. It mirrors the implementation of response_status label for metrics.
This also extends above logic to include 1xx, 2xx, and 3xx codes as OK instead of only 2xx codes.

Besides this, some cleanup is done:

  1. Above logic is moved from FluxMeter to OTEL package. This changes FluxMeter interface!
  2. A log of logic is moved from metricsprocessor to metricsprocessor/internal for better visibility and easier separation of functions which are called directly in metricsprocessor and helpers,
  3. The above made creating UT much easier, so this PR also includes some.

Ref: https://github.com/fluxninja/cloud/issues/6788

Checklist
  • Tested in playground or other setup
  • Tests and/or benchmarks are included
  • Breaking changes

This change is Reviewable

@kwapik kwapik requested review from a team as code owners October 27, 2022 18:09
@codecov
Copy link

codecov bot commented Oct 27, 2022

Codecov Report

Base: 37.17% // Head: 37.46% // Increases project coverage by +0.29% 🎉

Coverage data is based on head (92889fa) compared to base (d31448c).
Patch coverage: 95.53% of modified lines in pull request are covered.

❗ Current head 92889fa differs from pull request most recent head 4a06a52. Consider uploading reports for the commit 4a06a52 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #828      +/-   ##
==========================================
+ Coverage   37.17%   37.46%   +0.29%     
==========================================
  Files         273      278       +5     
  Lines       20470    20489      +19     
==========================================
+ Hits         7610     7677      +67     
+ Misses      12374    12332      -42     
+ Partials      486      480       -6     
Impacted Files Coverage Δ
pkg/policies/dataplane/iface/flux-meter.go 100.00% <ø> (ø)
...licies/dataplane/resources/fluxmeter/flux-meter.go 0.00% <0.00%> (ø)
pkg/otelcollector/metricsprocessor/processor.go 64.91% <88.88%> (-7.25%) ⬇️
...lcollector/metricsprocessor/internal/sdk_labels.go 89.47% <89.47%> (ø)
...metricsprocessor/internal/check_response_labels.go 96.96% <96.96%> (ø)
...ollector/metricsprocessor/internal/envoy_labels.go 100.00% <100.00%> (ø)
...llector/metricsprocessor/internal/labels_filter.go 100.00% <100.00%> (ø)
.../otelcollector/metricsprocessor/internal/status.go 100.00% <100.00%> (ø)
pkg/policies/mocks/mock_flux_meter.go 71.73% <100.00%> (ø)
pkg/jobs/job.go 82.94% <0.00%> (+2.32%) ⬆️

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.

@kwapik kwapik force-pushed the kwapik/response_status_in_olap branch from 92889fa to 4a06a52 Compare October 28, 2022 06:12
@kwapik kwapik merged commit 65bab78 into main Oct 28, 2022
@kwapik kwapik deleted the kwapik/response_status_in_olap branch October 28, 2022 06:18
@kwapik kwapik mentioned this pull request Oct 28, 2022
2 tasks
kwapik added a commit that referenced this pull request Oct 28, 2022
### Description of change
This fixes regression introduced in
#828.

Dynamic Telemetry Flow Labels were added before labels filtering, which
led them to be incorrectly filtered out.

##### Checklist

- [x] Tested in playground or other setup
- [x] Breaking changes
kklimonda-fn pushed a commit that referenced this pull request Oct 28, 2022
### Description of change
This fixes regression introduced in
#828.

Dynamic Telemetry Flow Labels were added before labels filtering, which
led them to be incorrectly filtered out.

##### Checklist

- [x] Tested in playground or other setup
- [x] Breaking changes
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.

1 participant