-
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
@opentelemetry/exporter-collector-grpc not connecting after 0.20.0 upgrade #2264
Comments
FYI, it will not connect if
|
Well, updating the URL to |
Tomorrow I will try to find sometime to understand why it is not sending trace data across. Meanwhile, I opened a PR to fix the defaults and document this a bit better. |
Using the 0.20.0 locally I see that the serviceName is ignored and instead I see traces with this scaring format:
Maybe it's related to the missing traces. |
@brunoluiz have you had any luck figuring out what happened? |
No luck, but about the serviceName above, I am quite sure this might be the culprit: 56c032e I just don't understand how this is actually set. I wonder if it is just through env variables or there is an undocumented way to do so. Another interesting thing is: the |
I managed to set service name like this: // Set service name
tracerProvider.resource.attributes['service.name'] = 'spectest';
const collectorOptions = {
url: 'grpc://localhost:4327',
};
const exporterCollector = new CollectorTraceExporter(collectorOptions);
tracerProvider.addSpanProcessor(new SimpleSpanProcessor(exporterCollector)); There are notes in readmes of opentelemetry-exporter-* packages, which says service name is now not the part of exporter config. So looks like it was removed ....
|
This change to serviceName is unintuitive. I just ran into the same issue. |
this is required by the specification to use the resource sdk to do this: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/README.md#service. I'm pretty sure we can override this at the exporter level (see jaeger for example) |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue was closed because it has been stale for 14 days with no activity. |
Please answer these questions before submitting a bug report.
What version of OpenTelemetry are you using?
otel/opentelemetry-collector-contrib:0.27.0
What version of Node are you using?
v12.20.0
Please provide the code you used to setup the OpenTelemetry SDK
What did you do?
Call
OpenTelemetry.register({ serviceName: 'service', url: 'localhost:4317', instrumentations: [] );
on the top ofsrc/index.js
.What did you expect to see?
My OpenTelemetry collector is running in kube (port-forwarded). I was expecting the NodeJS service to connect to it, returning a
Handling connection for 4317
and registering the trace at our internal Jaeger (could be other tracing service).What did you see instead?
No
Handling connection for 4317
and no trace availableAdditional context
I ran the code above with both
0.20.0
and0.19.0
versions. It only give the expected behaviour on version0.19.0
.The text was updated successfully, but these errors were encountered: