-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Updated gRPC Storage Plugin README with example #2687
Conversation
I was struggling to generate the gRPC Storage Plugin bindings from the storage.proto in the Jaeger repo so I created an question on the repo. Yuri Shkuro helped me out by providing some additional suggestions and information and requested that I add what I discovered to the README. Therefore, this update is just a documentation update to the gRPC Storage Plugin README.md to include details on how one can utilize the Docker Protobuf image to generate gRPC bindings in C# (which is what my use-case was). Signed-off-by: Justin Stauffer <justin.stauffer@gmail.com>
Fixed misspelling of Windows
Codecov Report
@@ Coverage Diff @@
## master #2687 +/- ##
==========================================
+ Coverage 95.53% 95.58% +0.05%
==========================================
Files 214 215 +1
Lines 9555 9579 +24
==========================================
+ Hits 9128 9156 +28
+ Misses 348 345 -3
+ Partials 79 78 -1
Continue to review full report at Codecov.
|
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 doing this via Makefile would be a lot cleaner. For example, the following change to makefile:
diff --git a/Makefile b/Makefile
index 52e16ec..3f7125d 100644
--- a/Makefile
+++ b/Makefile
@@ -546,6 +546,7 @@ proto:
$(PROTO_INCLUDES) \
-Iplugin/storage/grpc/proto \
--gogo_out=plugins=grpc,$(PROTO_GOGO_MAPPINGS):$(PWD)/proto-gen/storage_v1 \
+ $(PROTO_EXTRAS) \
plugin/storage/grpc/proto/storage.proto
$(PROTOC) \
allows you to run:
mkdir $(PWD)/csharp_gen
make proto PROTO_EXTRAS="--csharp_out=$(PWD)/csharp_gen"
plugin/storage/grpc/README.md
Outdated
``` | ||
3. Then execute the following Docker command which mounts the local directory `c:\source\repos\jaeger` to the directory `/jaeger` in the Docker container and then executes the `jaegertracing/protobuf:0.2.0` command with the inputs: `-I/jaeger -Iidl/proto/api_v2 -I/usr/include/github.com/gogo/protobuf -Iplugin/storage/grpc/proto --csharp_out=/jaeger/code plugin/storage/grpc/proto/storage.proto`. This will create a file called `Storage.cs` in your local Windows folder `c:\source\repos\jaeger\code` containing the gRPC Storage Plugin bindings. | ||
``` | ||
$ docker run --rm -u 1000 -v/c/source/repos/jaeger:/jaeger -w/jaeger jaegertracing/protobuf:0.2.0 "-I/jaeger -Iidl/proto/api_v2 -I/usr/include/github.com/gogo/protobuf -Iplugin/storage/grpc/proto --csharp_out=/jaeger/code plugin/storage/grpc/proto/storage.proto" |
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.
can you format it as multi-line, like this: https://www.jaegertracing.io/docs/1.21/getting-started/#all-in-one ?
Why are the args in quotes? I don't think it's necessary.
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.
The quotes were needed for my terminal at least (Windows Terminal 1.0). If I did not put the arguments in quotes, the . in github.com
caused the command to be misinterpreted and then fail.
I split it up into two lines but I kept the quoted portion in one line as I'm not sure that'd work with the quoted bit split up across lines.
Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
Split docker run command into multiple lines
This seems like a good option to me but I do not know Make syntax so I'd just be taking your word on this... Unfortunately, I am also unable to run make on my machine as we do not use it where I work. (I can run it on WSL but I don't have Docker there and cannot run WSL 2... frustrating). |
I was struggling to generate the gRPC Storage Plugin bindings from the
storage.proto in the Jaeger repo so I created an question on the repo.
Yuri Shkuro helped me out by providing some additional suggestions and
information and requested that I add what I discovered to the README.
Therefore, this update is just a documentation update to the gRPC
Storage Plugin README.md to include details on how one can utilize the
Docker Protobuf image to generate gRPC bindings in C# (which is what my
use-case was).
Resolves #2686
Signed-off-by: Justin Stauffer justin.stauffer@gmail.com