Closed grasmash closed 1 month ago
Attention: Patch coverage is 96.87500%
with 1 lines
in your changes are missing coverage. Please review.
Project coverage is 91.73%. Comparing base (
50fdfff
) to head (33e55c8
).
Files | Patch % | Lines |
---|---|---|
src/Helpers/TelemetryHelper.php | 96.87% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Try the dev build for this PR: https://acquia-cli.s3.amazonaws.com/build/pr/1741/acli.phar
curl -OL https://acquia-cli.s3.amazonaws.com/build/pr/1741/acli.phar
chmod +x acli.phar
Looks like there are no automated tests for the TelemetryHelper at present. Also, I don't see how Amplitude ever gets initialized in local environments, because it only gets initialized when AMPLITUDE_KEY is set via an environmental variable. How does this work for Lando and DDEV usage?
Other way to implement this would be to add it to event properties rather than user properties, like here: https://github.com/acquia/cli/blob/50fdfffb8b65d9d308fdd7a1d25ec009ff0bbc38/src/Command/CommandBase.php#L254
But, we're already tracking ah_env as a user property. Not sure why that's not part of the event properties instead. Probably not great to change now because it would mess up historical data trends.
Ok, not sure why the mutation testing is failing. I tried to appease it, but to no avail.
Motivation
We often don't know if ACLI is running in Code Studio, on local, or elsewhere.
Proposed changes
Add an "env_provider" data point to telemetry, based on env variables, to determine env provider.