dxatscale / sfpowerscripts

A build system for modular development in Salesforce
https://dxatscale.io
MIT License
211 stars 94 forks source link

Lack of error messages when publishing metrics. [Datadog Native Integration] #1311

Open sandinocoelho opened 1 year ago

sandinocoelho commented 1 year ago

Describe the bug

Even if the SFPOWERSCRIPTS_DATADOG_HOST is set incorrectly, the command sfpowerscripts:pool:metrics:publish returns 200.

To Reproduce

Set the environment variables as below:

export SFPOWERSCRIPTS_DATADOG=true
export SFPOWERSCRIPTS_DATADOG_HOST=WRONG_VALUE
sfdx sfpowerscripts:pool:metrics:publish -v "$DEVHUB_ALIAS"

Expected behavior

The correct behavior maybe an error message and exit 1 instead of 0.

Screenshots

image

Platform Details (please complete the following information):

azlam-abdulsalam commented 1 year ago

@sandinocoelho The metrics follow a fire and forget approach. So errors are not handled. I will see how we can improve the experience by writing to an alternate log