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!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
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.