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

Remove remoteaddr to reduce attribute cardinality #5514

Merged
merged 9 commits into from
May 4, 2023

Conversation

youngbupark
Copy link

@youngbupark youngbupark commented May 3, 2023

Description

otelhttp has the high cardinality problem which record all remote address from client. This issue is tracked by open-telemetry/opentelemetry-go-contrib#3765 .

This PR is adding workaround to prevent otelhttp from recording remoteaddr as an attribute.

Issue reference

#5299
#5237

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Adds necessary unit tests for change
  • Adds necessary E2E tests for change
  • Unit tests passing
  • Extended the documentation / Created issue for it

@youngbupark
Copy link
Author

There is the similar problem due to the high cardinality from remoteaddr port : open-telemetry/opentelemetry-go#3765

@github-actions
Copy link

github-actions bot commented May 3, 2023

Test Results

2 514 tests  ±0   2 507 ✔️ ±0   1m 57s ⏱️ +2s
   230 suites ±0          7 💤 ±0 
       1 files   ±0          0 ±0 

Results for commit cb232fe. ± Comparison against base commit 42a6f1b.

This pull request removes 2 and adds 2 tests. Note that renamed tests count towards both.
github.com/project-radius/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/430687f4-6faf-424d-a547-95efbaa122ba
github.com/project-radius/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/430687f4-6faf-424d-a547-95efbaa122ba#01
github.com/project-radius/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/df3c3c7c-7f3b-4d47-a740-33e00cfd167c
github.com/project-radius/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/df3c3c7c-7f3b-4d47-a740-33e00cfd167c#01

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented May 3, 2023

62.1

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 62.1 %
  • main branch coverage: 62.1 %
  • diff coverage: 0 %

The coverage result does not include the functional test coverage.

@youngbupark youngbupark changed the title [WIP] Remove remoteadd to reduce attribute cardinality [WIP] Remove remoteaddr to reduce attribute cardinality May 3, 2023
@github-actions
Copy link

github-actions bot commented May 4, 2023

62.1

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 62.1 %
  • main branch coverage: 62.1 %
  • diff coverage: 0 %

The coverage result does not include the functional test coverage.

@github-actions
Copy link

github-actions bot commented May 4, 2023

62.1

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 62.1 %
  • main branch coverage: 62.1 %
  • diff coverage: 0 %

The coverage result does not include the functional test coverage.

@github-actions
Copy link

github-actions bot commented May 4, 2023

62.1

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 62.1 %
  • main branch coverage: 62.1 %
  • diff coverage: 0 %

The coverage result does not include the functional test coverage.

@youngbupark youngbupark changed the title [WIP] Remove remoteaddr to reduce attribute cardinality Remove remoteaddr to reduce attribute cardinality May 4, 2023
@youngbupark youngbupark marked this pull request as ready for review May 4, 2023 18:41
@youngbupark youngbupark requested a review from a team as a code owner May 4, 2023 18:41
@github-actions
Copy link

github-actions bot commented May 4, 2023

62.1

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 62.1 %
  • main branch coverage: 62.1 %
  • diff coverage: 0 %

The coverage result does not include the functional test coverage.

go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.39.0
go.opentelemetry.io/contrib/instrumentation/runtime v0.39.0
go.opentelemetry.io/otel v1.13.0
go.opentelemetry.io/otel/exporters/prometheus v0.36.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need these package version changes?

Copy link
Author

Choose a reason for hiding this comment

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

Yes. these are all related :)

Copy link
Contributor

@ytimocin ytimocin left a comment

Choose a reason for hiding this comment

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

There is just one small typo but other than that LGTM

pkg/middleware/removeremoteaddr.go Outdated Show resolved Hide resolved
Co-authored-by: Yetkin Timocin <ytimocin@microsoft.com>
@github-actions
Copy link

github-actions bot commented May 4, 2023

62.1

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 62.1 %
  • main branch coverage: 62.1 %
  • diff coverage: 0 %

The coverage result does not include the functional test coverage.

@youngbupark
Copy link
Author

@vinayada1 Once you validate the change, please approve this pr :)

@youngbupark youngbupark merged commit 70d5dcf into main May 4, 2023
@youngbupark youngbupark deleted the youngp/remove-remoteaddr branch May 4, 2023 20:59
@vinayada1
Copy link
Contributor

Screenshot 2023-05-05 at 10 05 07 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants