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

Fix httproute counts #1922

Merged
merged 1 commit into from
May 2, 2024
Merged

Conversation

ciarams87
Copy link
Member

Proposed changes

Problem: Our telemetry uses the total graph Route count to report the HTTPRoutes counts. However, after GRPCRoute support was added, this count now includes both GRPC and HTTP routes.

Solution: Add a new function to check the route type of a route and only count it if it is HTTP. Added a GRPCRoute to the unit-tests to cover the case where a non-HTTP route is reported as part of the graph to validate it is not reported in the count.

Testing: Unit testing

Please focus on (optional): Note that GRPCRoute counts support will be added in a later PR.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.

NONE

@ciarams87 ciarams87 requested a review from a team as a code owner May 2, 2024 10:03
@github-actions github-actions bot added the bug Something isn't working label May 2, 2024
Copy link

codecov bot commented May 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.72%. Comparing base (8505f8b) to head (5394b0b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1922      +/-   ##
==========================================
+ Coverage   86.71%   86.72%   +0.01%     
==========================================
  Files          88       88              
  Lines        5967     5972       +5     
  Branches       50       50              
==========================================
+ Hits         5174     5179       +5     
  Misses        741      741              
  Partials       52       52              

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

@ciarams87 ciarams87 enabled auto-merge (squash) May 2, 2024 15:19
@ciarams87 ciarams87 merged commit 8dc7329 into nginxinc:main May 2, 2024
40 checks passed
@ciarams87 ciarams87 deleted the fix/tel-httproute-counts branch May 2, 2024 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants