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 support for expvar-backed metrics #5437

Merged
merged 11 commits into from
May 27, 2024

Conversation

joeyyy09
Copy link
Contributor

@joeyyy09 joeyyy09 commented May 10, 2024

Which problem is this PR solving?

Description of the changes

  • This PR removes deprecated expvar CLI flags for expvar-backed metrics
  • The internal parameters/settings of some components are still exposed via expvar. The implementation was changed to no longer depend on go-kit, thus reducing the dependencies

How was this change tested?

  • Tested locally by running the application without the deprecated flags to ensure that it functions correctly.

Checklist

Signed-off-by: Joeyyy09 <imt_2021063@iiitm.ac.in>
@yurishkuro
Copy link
Member

I would start with deleting internal/metrics/expvar and then making sure make build-binaries-(your platform) is ok.

examples/hotrod/cmd/flags.go Show resolved Hide resolved
examples/hotrod/cmd/flags.go Outdated Show resolved Hide resolved
examples/hotrod/cmd/root.go Outdated Show resolved Hide resolved
internal/metrics/metricsbuilder/builder.go Outdated Show resolved Hide resolved
joeyyy09 and others added 2 commits May 11, 2024 00:26
Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
Signed-off-by: Harshith Mente <109957201+joeyyy09@users.noreply.github.com>
Signed-off-by: Joeyyy09 <imt_2021063@iiitm.ac.in>
@joeyyy09
Copy link
Contributor Author

I would start with deleting internal/metrics/expvar and then making sure make build-binaries-(your platform) is ok.

Yeah, i removed them and made sure the build is okay.

@joeyyy09
Copy link
Contributor Author

@yurishkuro can you review these changes and let me know if i've got to change any more?

Copy link

codecov bot commented May 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.20%. Comparing base (695f230) to head (6e06128).

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5437       +/-   ##
===========================================
+ Coverage   54.23%   96.20%   +41.96%     
===========================================
  Files         160      330      +170     
  Lines        8369    16151     +7782     
===========================================
+ Hits         4539    15538    +10999     
+ Misses       3384      437     -2947     
+ Partials      446      176      -270     
Flag Coverage Δ
badger_v1 8.05% <ø> (ø)
badger_v2 1.93% <ø> (ø)
cassandra-3.x-v1 16.43% <ø> (ø)
cassandra-3.x-v2 1.85% <ø> (ø)
cassandra-4.x-v1 16.43% <ø> (ø)
cassandra-4.x-v2 1.85% <ø> (ø)
elasticsearch-7.x-v1 18.89% <ø> (+0.01%) ⬆️
elasticsearch-8.x-v1 19.08% <ø> (ø)
elasticsearch-8.x-v2 19.08% <ø> (+0.01%) ⬆️
grpc_v1 9.53% <ø> (+0.01%) ⬆️
grpc_v2 7.58% <ø> (ø)
kafka 9.78% <ø> (ø)
opensearch-1.x-v1 18.92% <ø> (-0.02%) ⬇️
opensearch-2.x-v1 18.94% <ø> (+0.01%) ⬆️
opensearch-2.x-v2 18.92% <ø> (ø)
unittests 93.91% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@yurishkuro
Copy link
Member

please make sure make lint test are green

Signed-off-by: Joeyyy09 <imt_2021063@iiitm.ac.in>
@joeyyy09
Copy link
Contributor Author

please make sure make lint test are green

image

Yeah, fixed them. Thanks for the help! Is there anything i need to change?

Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

You need to query Prometheus endpoint on each binary before and after changes to make sure no changes to metrics names happen.

cmd/all-in-one/main.go Outdated Show resolved Hide resolved
cmd/agent/main.go Outdated Show resolved Hide resolved
cmd/collector/main.go Outdated Show resolved Hide resolved
cmd/agent/main.go Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
internal/metrics/metricsbuilder/builder.go Outdated Show resolved Hide resolved
Signed-off-by: Joeyyy09 <imt_2021063@iiitm.ac.in>
@joeyyy09
Copy link
Contributor Author

You need to query Prometheus endpoint on each binary before and after changes to make sure no changes to metrics names happen.

Yeah, I'll verify this once.

@joeyyy09
Copy link
Contributor Author

joeyyy09 commented May 13, 2024

@yurishkuro I've resolved all the edits, thank you for helping me out. Absolutely sorry for messing up the namespaces. Can you please let me know if there's anything more i need to do? I'm willing to make the entire changes till this issue gets resolved.

@yurishkuro
Copy link
Member

I still see breaking changes. You need to test that the metrics names are the same, by running each of the main Jaeger components from your branch and from main (e.g. SPAN_STORAGE_TYPE=grpc-plugin go run ./cmd/query) and comparing the output of curl http://localhost:16687/metrics (admin port will be different for different binaries, see logs)

@joeyyy09
Copy link
Contributor Author

I still see breaking changes. You need to test that the metrics names are the same, by running each of the main Jaeger components from your branch and from main (e.g. SPAN_STORAGE_TYPE=grpc-plugin go run ./cmd/query) and comparing the output of curl http://localhost:16687/metrics (admin port will be different for different binaries, see logs)

Okay, will work on it!

@yurishkuro yurishkuro mentioned this pull request May 27, 2024
4 tasks
Signed-off-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
@yurishkuro yurishkuro added the changelog:breaking-change Change that is breaking public APIs or established behavior label May 27, 2024
Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: Yuri Shkuro <github@ysh.us>
@yurishkuro yurishkuro changed the title Remove support for expvar metrics Remove support for expvar-backed metrics May 27, 2024
@yurishkuro yurishkuro merged commit a7a7308 into jaegertracing:main May 27, 2024
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:breaking-change Change that is breaking public APIs or established behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants