I have a working function (node.js) but I need to log web calls so I am attempting to get log shipping to work. I have implemented as the documentation appears to show and have attempted with all 3 log ship providers and receive the same error. I have also attempted putting the environment variable at all 3 scopes, same issue. The token values are valid. If I remove the LOG_DESTINATIONS key the function works fine. I have also attempted adding the environment variable through the web interface, same issue. I have also tried altering the structure/format of the json string, same issue. I have gone back and forth with support and they just send me links to the same docs that appear to show what I am doing. What am I missing?
parameters: {}
environment:
LOG_DESTINATIONS: '[{"papertrail":{"token":"this_is_not_my_real_token"}}]'
packages:
- name: mypackagenamehere
shared: false
environment: {}
parameters: {}
annotations: {}
functions:
- name: myfunctionnamehere
binary: false
main: ""
runtime: nodejs:default
web: true
webSecure: false
parameters: {}
environment: {}
annotations: {}
limits:
timeout: 10000
Error: Cannot start function. Check logs for details. Activation Id: d26fc6b3c53841d4afc6b3c53811d4bb 2024-02-22T14:34:33.015832259Z stderr: Command exited abruptly during initialization
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hey,
There has been a similar discussion specifically using Node.js:
The users reported that what fixed that for them was to, avoid using any ES6 module syntax.
Let me know if this works for you as well! If not, please reach out to the DigitalOcean support team who might be able to further investigate this for you:
Hope that helps!
- Bobby.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.