-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[grpc][v2] Use standard OTLP receiver for gRPC storage write path #7065
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
Conversation
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7065 +/- ##
==========================================
- Coverage 96.03% 96.02% -0.01%
==========================================
Files 355 355
Lines 20987 20993 +6
==========================================
+ Hits 20155 20159 +4
- Misses 626 628 +2
Partials 206 206
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
internal/storage/v2/grpc/config.go
Outdated
|
||
// TODO: add documentation | ||
Writer configgrpc.ClientConfig `mapstructure:"writer"` | ||
configgrpc.ClientConfig `mapstructure:",squash"` |
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.
keep at the top, it's the primary endpoint
internal/storage/v2/grpc/config.go
Outdated
exporterhelper.TimeoutConfig `mapstructure:",squash"` | ||
|
||
// TODO: add documentation |
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.
// TODO: add documentation | |
// Writer allows overriding the endpoint for writes, e.g. to an OTLP receiver. | |
// If not defined the main endpoint is used for reads and writes. |
internal/storage/v2/grpc/factory.go
Outdated
@@ -52,17 +52,24 @@ func NewFactory( | |||
config: cfg, | |||
} | |||
|
|||
var writerConfig *configgrpc.ClientConfig |
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.
Any reason not to copy by value? Sharing could have side effects.
var writerConfig *configgrpc.ClientConfig | |
var writerConfig configgrpc.ClientConfig |
internal/storage/v2/grpc/handler.go
Outdated
) | ||
|
||
type Handler struct { | ||
storage.UnimplementedTraceReaderServer | ||
storage.UnimplementedDependencyReaderServer | ||
ptraceotlp.UnimplementedGRPCServer | ||
|
||
traceReader tracestore.Reader | ||
traceWriter tracestore.Writer |
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.
do we need the writer?
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.
what happens with archive storage, does it need the writer?
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.
what happens with archive storage, does it need the writer?
Is there a reason the archive storage would need it? After we did the refactor, there is no difference in archive and regular storage
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.
Archive storage is used to save a trace from the UI. If we're testing query service config with gRPC storage then the archive storage in the query
binary must be able to perform a write, which it will do by calling the Write API on port :17272
. So yeah that single gRPC server should be serving both read and write endpoints. I don't think we want to have yet another binary with OTLP receiver for that.
NB I don't think the e2e test is actually exercising the "archive trace" workflow, it would be good to add that.
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
…egertracing#7065) <!-- !! Please DELETE this comment before posting. We appreciate your contribution to the Jaeger project! 👋🎉 --> ## Which problem is this PR solving? - Resolves jaegertracing#7060 ## Description of the changes - This PR adds a new config called `writer` to the gRPC storage to allow a separate client configuration for the write path. This new configuration was utilized in the integration tests to point the collector utilizing gRPC storage to the receiver in the remote storage backend. ## How was this change tested? - Updated integration tests ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` --------- Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
…egertracing#7065) <!-- !! Please DELETE this comment before posting. We appreciate your contribution to the Jaeger project! 👋🎉 --> ## Which problem is this PR solving? - Resolves jaegertracing#7060 ## Description of the changes - This PR adds a new config called `writer` to the gRPC storage to allow a separate client configuration for the write path. This new configuration was utilized in the integration tests to point the collector utilizing gRPC storage to the receiver in the remote storage backend. ## How was this change tested? - Updated integration tests ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` --------- Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com> Signed-off-by: amol-verma-allen <amol.verma@allen.in>
Which problem is this PR solving?
Description of the changes
writer
to the gRPC storage to allow a separate client configuration for the write path. This new configuration was utilized in the integration tests to point the collector utilizing gRPC storage to the receiver in the remote storage backend.How was this change tested?
Checklist
jaeger
:make lint test
jaeger-ui
:npm run lint
andnpm run test