-
Notifications
You must be signed in to change notification settings - Fork 466
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
Issue with NestJs operator autoinstrumentation #2510
Comments
UpdateI have now tried the same using the sdk manually and that works as expected (getting http, controller, sql, etc traces). However I would really like to use the CRD if possible. |
Can this be related to #2497? |
I don't think so, after all I do get some traces from the autoinstrumentation, just not nearly all. |
Well I have enabled the debug logs of the Intsrumentation CRD and by the looks of it the instrumentation is mostly correctly initialized (at least http instrumentation succeeds), however the resulting spans are never sent to the otc-collector.
The otc-collector sidecar only received 512 different spans of the The only errors I can find during instrumentation init seem to be AWS related (after all it is not running in AWS). |
|
@mderazon can it be done by setting an env. variable? |
@iblancasa I wasn't sure I should create a new issue because this is written in the docs clearly:
However, it seems to be that the general recommendation from the node-instrumentation team is to disable I have also mentioned it in this issue: #1283 (comment). We can reopen that issue or I can create a new one, what would you prefer ? |
UpdateI have now switched to using a custom image for the NodeJs instrumentation CRD. const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
const {
getNodeAutoInstrumentations,
} = require('@opentelemetry/auto-instrumentations-node');
const {
OTLPTraceExporter,
} = require('@opentelemetry/exporter-trace-otlp-http');
const { Resource } = require('@opentelemetry/resources');
const {
SemanticResourceAttributes,
} = require('@opentelemetry/semantic-conventions');
const { SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const exporter = new OTLPTraceExporter();
const provider = new NodeTracerProvider({
resource: new Resource({
[SemanticResourceAttributes.SERVICE_NAME]: process.env.OTEL_SERVICE_NAME,
}),
});
// Export spans to opentelemetry collector
provider.addSpanProcessor(new SimpleSpanProcessor(exporter));
provider.register();
registerInstrumentations({
instrumentations: [
getNodeAutoInstrumentations({
// disable fs
'@opentelemetry/instrumentation-fs': {
enabled: false,
},
}),
],
}); Using this custom image everything works, so it looks like the issue is with the official NodeJs autoinstrumentation image. |
Component(s)
operator, instrumentation
Describe the issue you're reporting
I hope this is the correct place for the question and somebody can help me.
I am currently trying to setup tracing for an application which consists of four NestJs applications.
The traces are exported to a data-prepper instance which then sends them to OpenSearch.
I have gotten the opentelemetry operator and autoinstrumentation to work in the sense that everything deploys, starts and traces are collected/send.
Issue
My issue now is that out of the four applications only two report traces from other instrumentations than the
@opentelemetry/instrumentation-fs
(like for example@opentelemetry/instrumentation-http
).The others only report fs traces (quite a lot of them), even though one of them is the main backend which calls the other applications.
I have also checked this with the
logging
exporter and got the same result so the issue should not be data-prepper/opensearch.Used versions:
Configurations
The text was updated successfully, but these errors were encountered: