fix: Fix parsing provided.al runtime by reading /etc/os-release by lym953 · Pull Request #778 · DataDog/datadog-lambda-extension

Problem

We fail to parse the runtime when it is provided.al2 or provided.al2023. I don't though what's the impact though, because in Datadog logs, the runtime tag is shown correctly even if I removed all the env vars related to runtime.
image

This PR

Fix the problem by changing the path from /etc to /etc/os-release.

Thanks @shreyamalpani for the idea about the fix.

Test

Before

Failed to parse the runtime
image

After

Works for both al2 and al2023
image

image