newrelic / infrastructure-agent

New Relic Infrastructure Agent
https://docs.newrelic.com/docs/infrastructure/install-configure-manage-infrastructure
Apache License 2.0
132 stars 125 forks source link

Make discovered config temp file name be calculated with content's md5 #1894

Closed alvarocabanas closed 1 month ago

alvarocabanas commented 1 month ago

Make discovered config temp file name be calculated with content's md5 to get always same args and avoid miscalculating the integrationID.

The integration SDK creates a data file for each integration instance based on the arguments of the call. Previously, when an integration had a config template, the config.path used on an argument was changing on each execution creating a data file with different name, so deltas were incorrectly calculated.

With this fix the args are always the same and the integrationID doesn't change.