So I recently setup some extra UBA capacity for our Horde server and we wanted to gather some overall usage analytics for scheduling capacity. The UBA agents are connected to the same Horde server as our full agents.
Now I see in the metrics.telemetry.json setup we have:
But when I scroll through the dump in MongoDB, I see zero entries with this Payload. It definitely seems like there’s a notion that these agents should be emitting a payload on finishing compute leases, but I’m not seeing it so far.
In addition, I see that Agents themselves gather usage telemetry, and that would be a great secondary source of information to build metrics out of. Would the agent telemetry trigg
In addition, I see that Agents themselves gather usage telemetry, and that would be a great secondary source of information to build metrics out of. Would the agent telemetry trigger a metric endpoint if it was setup?Yes indeed, but they use different underlying analytics systems.
One thing you could try is logging out in a preflight what endpoints are indeed being sent to:
// Engine\Source\Programs\UnrealBuildTool\System\Telemetry.cs;
// public void RecordEvent(TelemetryEvent eventData)
foreach (KeyValuePair<Tuple<Uri, string>, TelemetryEndpoint> endpoint in _endpoints)
{
endpoint.Value.RecordEvent(eventData);
// Log out here the endpoint details
}
I’d be curious to see whether we are picking up the config properly in the UBT context.
-> to my UBT calls and got a successful connection immediately so as an interim I’m leaving that call in.
This seems like it worked? I’m not sure how to reconcile that with the subsequent:
-> So unfortunately it does not look like -TelemetryProvider is working when calling UBT. It doesn’t seem to make a connection back to the analytics API.
To recap the main configuration points:
INI:
Anywhere in the Engine ini hierarchy (Engine/Config/DefaultEngine.ini or a restricted/NotForLicensees Engine ini — not a project’s DefaultEngine.ini, UBT reads the hierarchy with projectDir = null):
Yes that’s an alternative for now, but it makes me sad we didn’t make this extensible otherwise. I looked into this some more on my end to see how we can make this a bit more sustainable over the long haul.
I think this will be OK for now & will make it so you can keep your own project files as the authority:
// Parses the uproject, and tries tof old in endpoints
Utils.TryParseProjectFileArgument(Arguments, Logger, out FileReference? TelemetryProjectFile, false);
TelemetryService.Get().AddEndpointsFromConfig(TelemetryProjectFile?.Directory, Logger);
… used in concert with -TelemetryProvider= will allow you to select from whatever superset you create with the configs.
[mention removed] I ran a preflight with the above and had no difference. I get cook analytics from the editor just fine, but nothing around Compiles with UBT.
I looked back at the metrics, and confirm that they were working before we merged 5.7 into our project, and stopped reporting afterwards. Were there any changes or configuration changes needed post 5.7? I know there were a couple features added to analytics in that release.
Yeah your filter looks identical to ours and for sure it was submitting metrics up until our 5.7 merge. Setting up a preflight now with the extra logging, will post here later with results.
So ran a couple builds locally. My logging confirmed that UBT was not detecting the endpoint in DefaultEngine.ini. i added
-TelemetryProvider="StudioTelemetry.Provider.Horde"to my UBT calls and got a successful connection immediately so as an interim I’m leaving that call in.
I’m still a little concerned that the functionality broke for our project with the 5.7 merge. Was there some sort of default that changed how the TelemetryProvider is set on UBT?
Just to step back:Anywhere in the Engine ini hierarchy (Engine/Config/DefaultEngine.ini or a restricted/NotForLicensees Engine ini — not a project’s DefaultEngine.ini, UBT reads the hierarchy with projectDir = null):
So we do have this config in our GameName/Config/DefaultEngine.ini and that’s not valid? We’ve made all our game/build configurations from that file. We don’t even have a DefaultEngine.ini in the Engine/Config folder.
And to continue on that line of thinking, would I just be able to add a Engine/Config/DefaultEngine.ini file there with just the telemetry values as a possible fix?