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: implement gRPC storage plugin for metrics #4414
base: main
Are you sure you want to change the base?
feat: implement gRPC storage plugin for metrics #4414
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #4414 +/- ##
==========================================
- Coverage 97.06% 96.26% -0.80%
==========================================
Files 300 303 +3
Lines 17737 17955 +218
==========================================
+ Hits 17217 17285 +68
- Misses 417 558 +141
- Partials 103 112 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
0c5d701
to
0707fd9
Compare
4872990
to
619a295
Compare
ae20758
to
96b3cac
Compare
96b3cac
to
6a30daf
Compare
Signed-off-by: Jacob Marble <jacobmarble@gmail.com>
Signed-off-by: Jacob Marble <jacobmarble@gmail.com>
6a30daf
to
61b0f86
Compare
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.
It's a bit hard to grok from the changes, but what does this mean in practice that a MetricsReader service is added to the main storage plugin? Since it's controlled by capabilities API, it means existing storages don't have to implement it, which is good. But I am also interested in the reverse - what if I am using one of standard backends for span storage and want grpc-remote implementation for metrics store? Is that possible?
@@ -33,6 +34,7 @@ const ( | |||
disabledStorageType = "" | |||
|
|||
prometheusStorageType = "prometheus" | |||
grpcStorageType = "grpc-plugin" |
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.
So we have --metrics-storage-type=grpc-plugin
but then factory flags under --grpc-metrics.*
? I can't think if a better name, but at least we should keep these in sync, so let's go with grpc-metrics
@@ -67,6 +69,8 @@ func (f *Factory) getFactoryOfType(factoryType string) (storage.MetricsFactory, | |||
switch factoryType { | |||
case prometheusStorageType: | |||
return prometheus.NewFactory(), nil | |||
case grpcStorageType: | |||
return grpc.NewFactory(), nil |
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.
could we add a test?
|
||
package grpc | ||
|
||
// TODO write tests |
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 tests?
Which problem is this PR solving?
Resolves #4413
Short description of the changes
A POC is implemented here: influxdata/influxdb-observability#239
TODO