-
Notifications
You must be signed in to change notification settings - Fork 795
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
fix(exporter-collector-grpc): incorrect URL format on docs after 0.20.0 update #2266
fix(exporter-collector-grpc): incorrect URL format on docs after 0.20.0 update #2266
Conversation
|
Codecov Report
@@ Coverage Diff @@
## main #2266 +/- ##
==========================================
+ Coverage 92.75% 92.77% +0.01%
==========================================
Files 145 145
Lines 5216 5216
Branches 1068 1068
==========================================
+ Hits 4838 4839 +1
+ Misses 378 377 -1
|
I am a bit lost with those CI errors... I suppose these issues were not due to my changes or were they? |
Looking into the asserts which fail it looks very much like it is because of the changes here
|
Seems the NodeJS 16 CI test failed. Is there a way which I can re-trigger it or is it fine as it is? |
Can you please ensure this is working fine with this example You can also update the docker compose to the latest version you were testing. If all is fine we tend to update readme with information about last tested version so that it is clear which version is compatible with this as spec and collector were not always in sync. To boostrap all you can modify temporary
|
The node 16 test is fine, but the browser test failure is probably real. |
I will try to run re-run the tests in composer during the weekend. The browser test is probably something that I missed while searching and replacing the default URL updates. |
@@ -27,7 +27,7 @@ const { BasicTracerProvider, SimpleSpanProcessor } = require('@opentelemetry/tra | |||
const { CollectorTraceExporter } = require('@opentelemetry/exporter-collector-grpc'); | |||
|
|||
const collectorOptions = { | |||
// url is optional and can be omitted - default is localhost:4317 | |||
// url is optional and can be omitted - default is grpc://localhost:4317 | |||
url: '<collector-hostname>:<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.
Here and elsewhere, this might be warranted
url: '<collector-hostname>:<port>', | |
url: '<collector-scheme>://<collector-hostname>:<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.
But, for this specific case, where the collector is grpc only, shouldn't we inform the use the required scheme is grpc
? Or does it actually support other schemes?
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.
then it should be 'grpc://<collector-hostname>:<port>'
right ?
So, just tested it based on the examples and it seems fine. I need to note though that, on Zipkin, the service is marked as unknown instead of EDIT: Just realised that by default that example doesn't use the grpc collector, so I am re-testing it |
I tested with the version which is in the README currently, so should be all good 😉 |
I just re-ran the browsers tests locally through |
Ok, so something is off here. With the example, it works as far as I add the Checking a bit the code, I found this: https://github.com/open-telemetry/opentelemetry-js/blame/main/packages/opentelemetry-exporter-collector-grpc/src/util.ts#L110-L122 It seems it is just used to check if the schema is either HTTP or GRPC, but actually it doesn't do anything with it, as it returns Should I revert the default values and just add documentation that Another thing as well: the grpc-collector is not sending data to the Zipkin, but I guess this is what I mentioned on issue #2264. |
I find it odd that the collector grpc check for https since it only support grpc.
I think that would be the way to go if grpc itself doesn't support using just a hostname/port combination |
@brunoluiz any update on the browser tests here? |
c52ad38
to
a1e63de
Compare
As mentioned on #2266 (comment), I've reverted the changes and just kept the README changes. The utils might have some reason to exist, but changing default values causes it to crash. I suppose more investigation might be required? |
In the PR title you have |
Due to that, I just changed title and description accordingly. Let me know if it ready to merge. |
Another PR has been opened to update the behavior to automatically add |
Which problem is this PR solving?
exporter-collector-grpc
is not connecting to otel grpc connector when usinglocalhost:4317
. This was partially due to an undocumented URL format, changed after 0.20.0Short description of the changes
localhost:4317
togrpc://localhost:4317
for@opentelemetry/exporter-collector-grpc
package