ITelemetrySink with the null, log and JSON Lines sinks, FTelemetryEvent and the envelope, TelemetryEvents, UTelemetrySubsystem on the game instance, ASaltyGameMode minting the session id into the replicated ASaltyGameState, bs.TelemetryTest, the git hash in the build string (D-42) and four Salty.Core.Telemetry tests replacing the placeholder. Proved standalone and with a headless server plus client sharing one session id. Also enables the engine's Editor, AutomationTest, GameplayTags, ConfigSettings and LiveCoding MCP toolsets (D-43) so the editor's MCP server exposes more than the skills toolset. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
32 lines
836 B
C++
32 lines
836 B
C++
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "GameFramework/GameStateBase.h"
|
|
#include "SaltyGameState.generated.h"
|
|
|
|
// Replicated session facts. Step 2 carries the session id the server minted so every client's telemetry file
|
|
// belongs to the same session (Docs/Spec/Networking.md, Telemetry over the wire).
|
|
UCLASS()
|
|
class SALTY_API ASaltyGameState : public AGameStateBase
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
|
|
|
|
// Server only. Writes the id and starts the server's own telemetry session.
|
|
void SetSessionId(const FGuid& InSessionId);
|
|
|
|
FGuid GetSessionId() const { return SessionId; }
|
|
|
|
protected:
|
|
UFUNCTION()
|
|
void OnRep_SessionId();
|
|
|
|
private:
|
|
UPROPERTY(ReplicatedUsing = OnRep_SessionId)
|
|
FGuid SessionId;
|
|
|
|
void AdoptSessionId();
|
|
};
|