-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[ingester] Add metrics& healthcheck, rename Kafka cli flags #1094
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
cmd/ingester/app/flags.go
Outdated
@@ -33,6 +33,8 @@ const ( | |||
|
|||
// ConfigPrefix is a prefix fro the ingester flags |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/fro/for/
cmd/ingester/app/flags.go
Outdated
@@ -54,27 +58,33 @@ const ( | |||
DefaultParallelism = 1000 | |||
// DefaultEncoding is the default span encoding | |||
DefaultEncoding = EncodingProto | |||
// DefaultHTTPPort is the default HTTP port |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add: "e.g. for /metrics" (I was at first confused why we need http port)
I'm not sure what would be the best way to fix that problem in the CI. The flags is indeed redefined, but they usually run in different Go applications
I've also fixed the Ingester flag tests and moved |
This sounds like an issue with the tests. We should be able to create a new instance of the FlagSet in the unit test instead of depending on the global one. |
@@ -48,7 +48,7 @@ func (s *KafkaIntegrationTestSuite) initialize() error { | |||
topic := "jaeger-kafka-integration-test-" + strconv.FormatInt(time.Now().UnixNano(), 10) | |||
|
|||
f := kafka.NewFactory() | |||
v, command := config.Viperize(f.AddFlags, app.AddFlags) | |||
v, command := config.Viperize(app.AddFlags) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yurishkuro the change here fixed the test. app.AddFlags
already contained all flags needed by f.InitFromViper(v)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is kafka factory's AddFlags() no-op then? looks a bit odd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's because we are reusing the github.com/jaegertracing/jaeger/plugin/storage/kafka in a context it wasn't meant to be used. Ingester itself doesn't use the Kafka as a storage plugin, but rather as an input
Codecov Report
@@ Coverage Diff @@
## master #1094 +/- ##
======================================
Coverage 100% 100%
======================================
Files 144 144
Lines 6774 6779 +5
======================================
+ Hits 6774 6779 +5
Continue to review full report at Codecov.
|
@ledor473 do you still have anything to work here, or can I merge it ? |
@jpkrohling It's ready to merge! I'll rebase it real quick |
Once |
I restarted test coverage job |
// DefaultHTTPPort is the default HTTP port (e.g. for /metrics) | ||
DefaultHTTPPort = 14271 | ||
// IngesterDefaultHealthCheckHTTPPort is the default HTTP Port for health check | ||
IngesterDefaultHealthCheckHTTPPort = 14270 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Does this need to have the Ingester
prefix - as the other constants don't?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've taken the variable names from here and both are prefixed:
Line 29 in bbf8b7a
QueryDefaultHealthCheckHTTPPort = 16687 |
CollectorDefaultHealthCheckHTTPPort = 14269 |
That being said, there's a prefix on the other variable as well
cmd/ingester/app/flags.go
Outdated
ConfigPrefix = "ingester" | ||
// KafkaConfigPrefix is a prefix for the ingester flags |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"for the Kafka flags"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True!
@ledor473 could you please fix DCO of the last commit? I will merge afterwards. |
it's a merge issue, unrelated commits got pulled in. |
…tp handler and make Kafka flags the same as in the Collector Signed-off-by: Louis-Etienne Dorval <[email protected]>
Signed-off-by: Louis-Etienne Dorval <[email protected]>
Signed-off-by: Louis-Etienne Dorval <[email protected]>
Signed-off-by: Louis-Etienne Dorval <[email protected]>
My fault! Should be fixed now |
thanks @ledor473 |
@yurishkuro @pavolloffay @objectiser I've just realized that if you run the Ingester with
I'm not sure how, but I feel we should add a validation on the storage type to prevent the use to |
Which problem is this PR solving?
Resolves #1014
Resolves #1013
Resolves #1093
Short description of the changes
kafka
instead ofingester
)Comments:
I wasn't sure if I should have refactor the following:
/pkg
plugins
Also, should the
Parallelism
be under Kafka prefix? I felt it was more aingester
flags than akafka
one, but I don't have any strong opinion about it