Backend Instrumentation (dynamic)
2
Start the service with SeaLights
Option A — preload.js
preload.jsexport SL_tokenfile=./sltoken.txt
export SL_buildsessionidfile=buildSessionId
export SL_labid=my_lab_id
export NODE_OPTIONS="--require ./node_modules/slnodejs/lib/preload.js"
node ./server/app.js- name: Start backend with SeaLights (preload)
env:
SL_tokenfile: ./sltoken.txt
SL_buildsessionidfile: buildSessionId
SL_labid: my_lab_id
NODE_OPTIONS: "--require ./node_modules/slnodejs/lib/preload.js"
run: node ./server/app.js &$env:SL_tokenfile = ".\sltoken.txt"
$env:SL_buildsessionidfile = "buildSessionId"
$env:SL_labid = "my_lab_id"
$env:NODE_OPTIONS = "--require ./node_modules/slnodejs/lib/preload.js"
node .\server\app.js- script: node ./server/app.js &
displayName: Start backend with SeaLights (preload)
env:
SL_tokenfile: ./sltoken.txt
SL_buildsessionidfile: buildSessionId
SL_labid: my_lab_id
NODE_OPTIONS: "--require ./node_modules/slnodejs/lib/preload.js"Option B — slnodejs run
slnodejs runValidate
Reference
Multiple environments and replicas
Troubleshooting
ps -ef | grep slnodejsGet-WmiObject Win32_Process | Where-Object { $_.CommandLine -like "*slnodejs*" }Parameters
Parameter
Purpose
Last updated
Was this helpful?

