Telemetry: Fix `app_server_type` attribute
The following discussion from !32315 (merged) should be addressed:
-
@qzhaogitlab started a discussion: (+13 comments) I don't fully understand yet on which servers and processes this entire flow will actually run. I certainly see it running when on
puma
orunicorn
(i.e. aweb
node), but do we also send usage pings from sidekiq nodes? If not, then I need to revise this, because thesidekiq
query would never fire.From the document https://docs.gitlab.com/ee/development/telemetry/usage_ping.html#how-usage-ping-works, it says usage ping runs on Sidekiq node.
How Usage Ping works
- The Usage Ping cron job is set in Sidekiq to run weekly.
- When the cron job runs, it calls GitLab::UsageData.to_json.
- GitLab::UsageData.to_json cascades down to ~400+ other counter method calls.
- The response of all methods calls are merged together into a single JSON payload in GitLab::UsageData.to_json.
- The JSON payload is then posted to the Versions application.
We think that the app_server_type
field that is submitted as part of usage ping is currently broken, because it relies on the value returned by Runtime
. However, since usage data is always submitted via a sidekiq job, this will therefore always be sidekiq
, when instead it should carry the value of the app server
used by the customer.