-
Notifications
You must be signed in to change notification settings - Fork 823
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: adding proto over http for collector exporter #1302
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1302 +/- ##
=======================================
Coverage 92.69% 92.69%
=======================================
Files 193 193
Lines 4804 4807 +3
Branches 982 983 +1
=======================================
+ Hits 4453 4456 +3
Misses 351 351
|
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.
overall lgtm, however i'm not sure we should commit the generated files. Could we just generate them when running the compile
step ?
I don't have a strong opinion on that but to generate proto you need to install protocol buffers and they are not not available on all platforms, (only windows, linux, osx). So having this in mind you might not necessary want to install protocol buffers to be able to generate js |
FWIW Not sure if this would be applicable here but thought it worth mentioning. |
This is only for local development right? The target who installs the published package does not need to have it installed? If that is correct, I think osx/win/linux is an acceptable limitation. |
You are using generated js files to serialize data. So if files are generated it doesn't matter which platform you have in production as it will work fine. But to be able to generate them (for example after updating proto submodule to newer version) you need to regenerate them again manually together with submodule update and then commit changes together. And of course to be able to generate them you need to have protoc locally |
I think generating them in the compile step is acceptable. My issue is that |
What alternative do we have to be able generate them in compile step then ? |
I think something like what naseem suggested might work. Check in the generated files and just have a defined process for how to update them |
But this is also a bash script that is using the same protoc :). |
I mean the general idea of a script that doesn't run automatically but needs to be run manually. It should be fairly simple to use something like |
I have experimented with profobuf js and it seems like this is working fine. Moreover it simplifies the whole setup a lot and in the end it becomes just a few lines of code . Are there any objections to use if instead of google protobuf ? |
I don't have any objections but I am not an expert in protobuf |
ok now the proto is based on protobufjs, much simpler |
@obecny No link with this PR but do you think it would possible to replace |
something to investigate what is really the best option here (new package, peer dependency etc.) |
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.
Definitely better without the generated files
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!
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.
Added one minor comment, otherwise LGTM
Which problem is this PR solving?
Short description of the changes