Skip to content
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

help with preload otel tracing module #1036

Open
tomdavidson opened this issue Feb 1, 2023 · 0 comments
Open

help with preload otel tracing module #1036

tomdavidson opened this issue Feb 1, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@tomdavidson
Copy link

This might be a use case specific edge case but I can not seem to an ncc artifact to work as a prestart module for nodejs. The contents of the pre-bundeld module is from https://opentelemetry.io/docs/instrumentation/js/getting-started/nodejs/

If I use the tracer module as is and install the three dependencies in my docker container, I am able to load the module, but I am using ncc for my server and for the same reasons what to use it for the loader.

$ ncc build src/tracer.cjs -o dist/tracer/
$ node --require ./tracer/index.cjs ./app/index.js

Side note, is there a way to configure an output filename?

Which yields:

node:internal/fs/utils:348
    throw err;
    ^

Error: ENOENT: no such file or directory, open '/app/tracer/jaeger-idl/thrift/jaeger.thrift'
    at Object.openSync (node:fs:600:3)
    at Object.readFileSync (node:fs:468:35)
    at Function.loadJaegerThriftDefinition (/app/tracer/index.cjs:71420:27)
    at 85125 (/app/tracer/index.cjs:71564:23)
    at __nccwpck_require__ (/app/tracer/index.cjs:102472:43)
    at 27333 (/app/tracer/index.cjs:71178:15)
    at __nccwpck_require__ (/app/tracer/index.cjs:102472:43)
    at 36687 (/app/tracer/index.cjs:22081:21)
    at __nccwpck_require__ (/app/tracer/index.cjs:102472:43)
    at 47161 (/app/tracer/index.cjs:21960:17) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/app/tracer/jaeger-idl/thrift/jaeger.thrift'
}

Node.js v18.13.0

So Im missing a thriff file from some reason? Actually, the entire jaeger-idl dir:

$ tree tracer/
tracer/
├── index.cjs
├── proto
│   └── channelz.proto
└── protos
    └── opentelemetry
        └── proto
            ├── collector
            │   ├── logs
            │   │   └── v1
            │   │       └── logs_service.proto
            │   ├── metrics
            │   │   └── v1
            │   │       └── metrics_service.proto
            │   └── trace
            │       └── v1
            │           └── trace_service.proto
            ├── common
            │   └── v1
            │       └── common.proto
            ├── logs
            │   └── v1
            │       └── logs.proto
            ├── metrics
            │   └── v1
            │       └── metrics.proto
            ├── resource
            │   └── v1
            │       └── resource.proto
            └── trace
                └── v1
                    ├── trace_config.proto
                    └── trace.proto
@styfle styfle added the bug Something isn't working label Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants