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

feat: redact unknown paths by default in chiware StatMiddleware #67

Merged
merged 3 commits into from
Jun 8, 2023

Conversation

saurav-malani
Copy link
Contributor

@saurav-malani saurav-malani commented Jun 7, 2023

Description

StatMiddleware, by default will now use for unmatched paths the value /redacted in the reqType tag. This can guarantee that captured stats don't introduce a tag cardinality issue. This default behaviour can be overridden through the RedactUnknownPaths option.

Additional changes
Removed the gorillaware package

Notion Ticket

https://www.notion.so/rudderstacks/Filter-metrics-endpoint-path-in-gateway-7ac54cf219c64fc3b44e14ea89df1918?pvs=4

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

Copy link
Collaborator

@atzoum atzoum left a comment

Choose a reason for hiding this comment

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

Let's also remove the gorrilaware package

chiware/stats.go Outdated Show resolved Hide resolved
chiware/stats.go Outdated Show resolved Hide resolved
chiware/stats.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jun 8, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.12 ⚠️

Comparison is base (f43c5fb) 78.02% compared to head (df13090) 77.90%.

❗ Current head df13090 differs from pull request most recent head 22b78db. Consider uploading reports for the commit 22b78db to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #67      +/-   ##
==========================================
- Coverage   78.02%   77.90%   -0.12%     
==========================================
  Files          56       55       -1     
  Lines        3558     3526      -32     
==========================================
- Hits         2776     2747      -29     
+ Misses        646      643       -3     
  Partials      136      136              
Impacted Files Coverage Δ
chiware/stats.go 94.33% <100.00%> (+1.65%) ⬆️

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

@atzoum atzoum changed the title fix: cardinality issue in reqType feat: redact unknown paths by default in chiware StatMiddleware Jun 8, 2023
gorillaware/stats.go Outdated Show resolved Hide resolved
@saurav-malani saurav-malani merged commit bb7d78d into main Jun 8, 2023
@saurav-malani saurav-malani deleted the fix.reqStatsTagCardinality branch June 8, 2023 09:25
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.

3 participants