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

Add status command #2684

Merged
merged 4 commits into from
Dec 11, 2020
Merged

Conversation

sniperking1234
Copy link
Contributor

@sniperking1234 sniperking1234 commented Dec 10, 2020

Signed-off-by: Chen Zhengwei chenzhengwei@inspur.com

Which problem is this PR solving?

Short description of the changes

  • Add status command.
    Usage: <command> status checks the localhost and the port of the corresponding component.
    <command> status --status.http.host-port checks for a specific port or URL.

Signed-off-by: Chen Zhengwei <chenzhengwei@inspur.com>

Signed-off-by: chen zhengwei <chenzhengwei@inspur.com>
@sniperking1234 sniperking1234 requested a review from a team as a code owner December 10, 2020 09:48
@mergify mergify bot requested a review from jpkrohling December 10, 2020 09:48
Signed-off-by: Chen Zhengwei <chenzhengwei@inspur.com>
@codecov
Copy link

codecov bot commented Dec 10, 2020

Codecov Report

Merging #2684 (bccd1ad) into master (6c2be45) will increase coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2684      +/-   ##
==========================================
+ Coverage   95.51%   95.60%   +0.08%     
==========================================
  Files         214      215       +1     
  Lines        9546     9579      +33     
==========================================
+ Hits         9118     9158      +40     
+ Misses        348      344       -4     
+ Partials       80       77       -3     
Impacted Files Coverage Δ
cmd/status/command.go 100.00% <100.00%> (ø)
plugin/storage/integration/integration.go 77.34% <0.00%> (-0.56%) ⬇️
cmd/collector/app/span_processor.go 100.00% <0.00%> (ø)
plugin/storage/badger/spanstore/reader.go 96.08% <0.00%> (+0.71%) ⬆️
cmd/query/app/server.go 90.16% <0.00%> (+1.63%) ⬆️
cmd/collector/app/server/zipkin.go 76.92% <0.00%> (+15.38%) ⬆️

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 6c2be45...bccd1ad. Read the comment docs.

Signed-off-by: Chen Zhengwei <chenzhengwei@inspur.com>

Signed-off-by: chen zhengwei <chenzhengwei@inspur.com>
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.

look great, aside from a small nit in the test!

defer ts.Close()
v := viper.New()
cmd := Command(v, 80)
cmd.ParseFlags([]string{"--status.http.host-port=" + strings.TrimPrefix(ts.URL, "http://127.0.0.1")})
Copy link
Member

Choose a reason for hiding this comment

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

not sure if you're guaranteed to get URL having the exact 127.0.0.1 host (e.g. you could get IPv6 version instead). I'd rather read the port number as the part after the last :

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Signed-off-by: Chen Zhengwei <chenzhengwei@inspur.com>

Signed-off-by: chen zhengwei <chenzhengwei@inspur.com>
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.

Thanks!

@yurishkuro yurishkuro merged commit 6d315d7 into jaegertracing:master Dec 11, 2020
@sniperking1234 sniperking1234 deleted the status_command branch December 14, 2020 09:13
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.

Jaeger containers healthcheck support
3 participants