TLDR Angeles experienced errors in both node tracing and Angular console. Prashant asked for the guide used, while vishal-signoz checked the express and otel versions. Palash was asked to check the angular part.
vishal-signoz
Hey Angeles, could you please share which guide you are following for this set up?
and for the Angular part this one :
I have two projects which I will want to trace
vishal-signoz can you help here?
Angeles Can you please share version of express and otel libraries that you are using?
```$ cat package.json { "name": "gta-api", "version": "1.0.0", "description": "", "main": "app.ts", "scripts": { "start": "node app.js" }, "author": "", "license": "ISC", "dependencies": { "@opentelemetry/api": "^1.4.1", "@opentelemetry/auto-instrumentations-node": "^0.36.4", "@opentelemetry/exporter-trace-otlp-http": "^0.36.0", "@opentelemetry/sdk-node": "^0.36.0", "axios": "^0.21.1", "express": "^4.17.1", "helmet": "^4.6.0", "http-proxy-middleware": "^2.0.1", "https": "^1.0.0", "qs": "^6.7.0" }, "devDependencies": { "axios-debug-log": "^0.8.4" } }```
```$ cat otel-collector-config.yaml
receivers:
filelog/dockercontainers:
include: [ "/var/lib/docker/containers/*/*.log" ]
start_at: end
include_file_path: true
include_file_name: false
operators:
- type: json_parser
id: parser-docker
output: extract_metadata_from_filepath
timestamp:
parse_from: attributes.time
layout: '%Y-%m-%dT%H:%M:%S.%LZ'
- type: regex_parser
id: extract_metadata_from_filepath
regex: '^.*containers/(?P<container_id>[^_]+)/.*log$'
parse_from: attributes["log.file.path"]
output: parse_body
- type: move
id: parse_body
from: attributes.log
to: body
output: time
- type: remove
id: time
field: attributes.time
opencensus:
endpoint: 0.0.0.0:55678
otlp/spanmetrics:
protocols:
grpc:
endpoint: localhost:12345
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
cors:
allowed_origins:
-
on the Angular part im havin.a console error as follow :
Palash Please check the angular part
thanks guys !
Angeles
Wed, 15 Mar 2023 17:08:34 UTC```$ node -r ./tracing.js app.js /Users/amora/Workspace/gta-api/tracing.js:33 .then(() => console.log('Tracing initialized')) ^ TypeError: Cannot read properties of undefined (reading 'then') at Object.<anonymous> (/Users/amora/Workspace/gta-api/tracing.js:33:5) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at Module._preloadModules (node:internal/modules/cjs/loader:1276:12) at loadPreloadModules (node:internal/bootstrap/pre_execution:484:5) at prepareMainThreadExecution (node:internal/bootstrap/pre_execution:78:3) at node:internal/main/run_main_module:7:1```