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(*): hijack application metrics #4286

Merged
merged 16 commits into from
May 20, 2022
Merged

feat(*): hijack application metrics #4286

merged 16 commits into from
May 20, 2022

Conversation

lukidzi
Copy link
Contributor

@lukidzi lukidzi commented May 13, 2022

Summary

Currently, to expose applications metrics Prometheus needs to communicate using mtls to scrape metrics from the application. This PR introduce change that allows to get application metrics without mTLS.

Full changelog

  • [Bootstrap request now return different model but CP support old one]
  • [Implement concurrent scraping metrics in kuma-dp]
  • [Implement generate and send configuration]

Issues resolved

Fix #3457

Documentation

Testing

  • Unit tests
  • E2E tests
  • Manual testing on Universal
  • Manual testing on Kubernetes

Backwards compatibility

  • Update UPGRADE.md with any steps users will need to take when upgrading.
  • Add backport-to-stable label if the code follows our backporting policy

lukidzi added 6 commits May 13, 2022 13:22
Signed-off-by: Łukasz Dziedziak <lukidzi@gmail.com>
Signed-off-by: Łukasz Dziedziak <lukidzi@gmail.com>
Signed-off-by: Łukasz Dziedziak <lukidzi@gmail.com>
Signed-off-by: Łukasz Dziedziak <lukidzi@gmail.com>
Signed-off-by: Łukasz Dziedziak <lukidzi@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented May 13, 2022

Codecov Report

Merging #4286 (0227c33) into master (709ef04) will decrease coverage by 0.05%.
The diff coverage is 39.07%.

@@            Coverage Diff             @@
##           master    #4286      +/-   ##
==========================================
- Coverage   55.68%   55.63%   -0.06%     
==========================================
  Files         935      935              
  Lines       56433    56629     +196     
==========================================
+ Hits        31427    31505      +78     
- Misses      22531    22639     +108     
- Partials     2475     2485      +10     
Impacted Files Coverage Δ
app/kuma-dp/pkg/dataplane/envoy/envoy.go 79.34% <ø> (ø)
pkg/plugins/runtime/k8s/metadata/annotations.go 100.00% <ø> (ø)
...est/framework/deployments/testserver/deployment.go 0.00% <0.00%> (ø)
...est/framework/deployments/testserver/kubernetes.go 0.00% <0.00%> (ø)
test/framework/interface.go 0.00% <0.00%> (ø)
test/framework/k8s.go 0.00% <0.00%> (ø)
test/framework/setup.go 2.69% <0.00%> (-0.01%) ⬇️
app/kuma-dp/pkg/dataplane/metrics/server.go 38.09% <12.19%> (-19.80%) ⬇️
pkg/xds/bootstrap/handler.go 36.36% <23.33%> (-12.66%) ⬇️
api/mesh/v1alpha1/metrics.pb.go 41.32% <32.60%> (-3.05%) ⬇️
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 709ef04...0227c33. Read the comment docs.

app/kuma-dp/cmd/testdata/bootstrap-config.golden.yaml Outdated Show resolved Hide resolved
api/mesh/v1alpha1/metrics.proto Show resolved Hide resolved
pkg/xds/bootstrap/handler.go Show resolved Hide resolved
test/e2e_env/kubernetes/metrics/applications_metrics.go Outdated Show resolved Hide resolved
pkg/xds/bootstrap/generator.go Outdated Show resolved Hide resolved
lukidzi added 4 commits May 16, 2022 20:30
Signed-off-by: Łukasz Dziedziak <lukidzi@gmail.com>
Signed-off-by: Łukasz Dziedziak <lukidzi@gmail.com>
Signed-off-by: Łukasz Dziedziak <lukidzi@gmail.com>
@lukidzi lukidzi marked this pull request as ready for review May 17, 2022 02:10
@lukidzi lukidzi requested a review from a team as a code owner May 17, 2022 02:10
Copy link
Contributor

@jakubdyszkiewicz jakubdyszkiewicz left a comment

Choose a reason for hiding this comment

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

bunch of nits, but overall 👍

app/kuma-dp/cmd/run.go Outdated Show resolved Hide resolved
app/kuma-dp/pkg/dataplane/metrics/server.go Outdated Show resolved Hide resolved
app/kuma-dp/pkg/dataplane/metrics/server.go Outdated Show resolved Hide resolved
app/kuma-dp/pkg/dataplane/metrics/server.go Outdated Show resolved Hide resolved
app/kuma-dp/pkg/dataplane/metrics/server.go Outdated Show resolved Hide resolved
pkg/xds/bootstrap/generator.go Outdated Show resolved Hide resolved
pkg/xds/bootstrap/generator.go Outdated Show resolved Hide resolved
test/e2e_env/kubernetes/metrics/applications_metrics.go Outdated Show resolved Hide resolved
test/e2e_env/universal/metrics/applications_metrics.go Outdated Show resolved Hide resolved
lukidzi added 3 commits May 19, 2022 08:30
Signed-off-by: Łukasz Dziedziak <lukidzi@gmail.com>
Signed-off-by: Łukasz Dziedziak <lukidzi@gmail.com>
Signed-off-by: Łukasz Dziedziak <lukidzi@gmail.com>
@lukidzi lukidzi merged commit 2e582da into master May 20, 2022
@lukidzi lukidzi deleted the feat/hijack-metrics branch May 20, 2022 11:21
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.

Proxy application metrics through envoy
3 participants