File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
terraform/node/ec2/adot-genai Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ unzip genai-service.zip
8383# Navigate to genai-service directory and install dependencies
8484cd genai-service
8585npm install
86+ npm install express @langchain/community @langchain/core @traceloop/node-server-sdk pino
8687
8788# Download and install ADOT instrumentation
8889echo "Installing ADOT instrumentation..."
@@ -104,12 +105,9 @@ echo "Files in directory:"
104105ls -la
105106echo "Checking if ADOT module exists:"
106107node -e "try { require('@aws/aws-distro-opentelemetry-node-autoinstrumentation/register'); console.log('ADOT module found'); } catch(e) { console.log('ADOT module not found:', e.message); }"
107- echo "Testing service startup :"
108- node index.js > /var/log/langchain-service.log 2>&1 &
108+ echo "Starting service with ADOT instrumentation :"
109+ nohup node --require '@aws/aws-distro-opentelemetry-node-autoinstrumentation/register' --require ./customInstrumentation.js index.js > /var/log/langchain-service.log 2>&1 &
109110echo "Service started with PID: $!"
110- echo "Checking initial logs:"
111- sleep 3
112- cat /var/log/langchain-service.log
113111
114112# Wait for service to be ready
115113echo "Waiting for service to be ready..."
You can’t perform that action at this time.
0 commit comments