Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: More Sentry Info #1975

Merged
merged 5 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"GUID:84651a3751eca9349aac36a66bba901b",
"GUID:593a5b492d29ac6448b1ebf7f035ef33",
"GUID:f51ebe6a0ceec4240a699833d6309b23",
"GUID:101b8b6ebaf64668909b49c4b7a1420d",
"GUID:3640f3c0b42946b0b8794a1ed8e06ca5",
"GUID:4a12c0b1b77ec6b418a8d7bd5c925be3",
"GUID:8322ea9340a544c59ddc56d4793eac74"
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using CommunicationData.URLHelpers;
using Cysharp.Threading.Tasks;
using DCL.Diagnostics;
using DCL.WebRequests;
using System.Threading;

Expand All @@ -16,7 +17,7 @@ public WebJsCodeProvider(IWebRequestController webRequestController)

public async UniTask<string> GetJsCodeAsync(URLAddress url, CancellationToken cancellationToken = default)
{
string text = await webRequestController.GetAsync(new CommonArguments(url), cancellationToken).StoreTextAsync();
string text = await webRequestController.GetAsync(new CommonArguments(url), cancellationToken, ReportCategory.SCENE_LOADING).StoreTextAsync();
return text;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Explorer/Assets/DCL/Audio/Avatar/DCL.Audio.Avatar.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"references": [
"GUID:e7751264a6735a942a64770d71eb49e0",
"GUID:fa7b3fdbb04d67549916da7bd2af58ab",
"GUID:101b8b6ebaf64668909b49c4b7a1420d",
"GUID:3640f3c0b42946b0b8794a1ed8e06ca5",
"GUID:f51ebe6a0ceec4240a699833d6309b23"
],
"includePlatforms": [],
Expand Down
4 changes: 1 addition & 3 deletions Explorer/Assets/DCL/Audio/DCL.Audio.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
"rootNamespace": "",
"references": [
"GUID:275e22790c04e9b47a5085d7b0c4432a",
"GUID:3640f3c0b42946b0b8794a1ed8e06ca5",
"GUID:3c7b57a14671040bd8c549056adc04f5",
"GUID:101b8b6ebaf64668909b49c4b7a1420d",
"GUID:3640f3c0b42946b0b8794a1ed8e06ca5",
"GUID:2f30d6e5229a74284acedda491abcc6e",
"GUID:1b8e1e1bd01505f478f0369c04a4fb2f",
"GUID:4794e238ed0f65142a4aea5848b513e5",
"GUID:286980af24684da6acc1caa413039811",
"GUID:f51ebe6a0ceec4240a699833d6309b23",
"GUID:c789cb8ae7a594a46974120ba85fcf1b",
"GUID:d8b63aba1907145bea998dd612889d6b",
"GUID:fa7b3fdbb04d67549916da7bd2af58ab"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"GUID:e56a0d6a94c144c784012e63b6043100",
"GUID:6055be8ebefd69e48b49212b09b47b2f",
"GUID:91cf8206af184dac8e30eb46747e9939",
"GUID:101b8b6ebaf64668909b49c4b7a1420d",
"GUID:3640f3c0b42946b0b8794a1ed8e06ca5",
"GUID:1b8e1e1bd01505f478f0369c04a4fb2f",
"GUID:4725c02394ab4ce19f889e4e8001f989",
"GUID:e0eedfa2deb9406daf86fd8368728e39",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
"GUID:1b8e1e1bd01505f478f0369c04a4fb2f",
"GUID:3c7b57a14671040bd8c549056adc04f5",
"GUID:5eabe9a3d4dd19d42a16208ea5411062",
"GUID:101b8b6ebaf64668909b49c4b7a1420d",
"GUID:9e314663ce958b746873cb22d57ede55",
"GUID:286980af24684da6acc1caa413039811",
"GUID:f51ebe6a0ceec4240a699833d6309b23",
"GUID:9e24947de15b9834991c9d8411ea37cf",
"GUID:6e2b4bed29ad1c549ab19b744f36f388",
"GUID:4794e238ed0f65142a4aea5848b513e5",
"GUID:fa7b3fdbb04d67549916da7bd2af58ab",
"GUID:d8b63aba1907145bea998dd612889d6b",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ public static GameObject AppendToAvatar(
ISet<string> usedCategories,
ref FacialFeaturesTextures facialFeaturesTextures,
ref AvatarShapeComponent avatarShapeComponent,
Transform parent,
string reportCategory)
Transform parent)
{
var originalAssets = resultWearable.WearableAssetResults[avatarShapeComponent.BodyShape].Results;
var mainAsset = originalAssets[WearablePolymorphicBehaviour.MAIN_ASSET_INDEX]!.Value.Asset!;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ private AvatarCustomSkinningComponent InstantiateAvatar(ref AvatarShapeComponent
{
IWearable resultWearable = visibleWearables[i];

var instance = resultWearable.AppendToAvatar(wearableAssetsCache, usedCategories, ref facialFeatureTexture, ref avatarShapeComponent, attachPoint, GetReportCategory());
GameObject instance = resultWearable.AppendToAvatar(wearableAssetsCache, usedCategories, ref facialFeatureTexture, ref avatarShapeComponent, attachPoint);

if (resultWearable.Type == WearableType.BodyShape)
bodyShape = instance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
"GUID:1b8e1e1bd01505f478f0369c04a4fb2f",
"GUID:3c7b57a14671040bd8c549056adc04f5",
"GUID:5eabe9a3d4dd19d42a16208ea5411062",
"GUID:101b8b6ebaf64668909b49c4b7a1420d",
"GUID:9e314663ce958b746873cb22d57ede55",
"GUID:286980af24684da6acc1caa413039811",
"GUID:f51ebe6a0ceec4240a699833d6309b23",
"GUID:9e24947de15b9834991c9d8411ea37cf",
"GUID:6e2b4bed29ad1c549ab19b744f36f388",
"GUID:4794e238ed0f65142a4aea5848b513e5",
"GUID:fa7b3fdbb04d67549916da7bd2af58ab",
"GUID:d8b63aba1907145bea998dd612889d6b",
Expand All @@ -30,7 +28,6 @@
"GUID:78cc93eb55f63084db95d7a9b7cc3c57",
"GUID:875a5d5129614170bd769ed012c2eb3d",
"GUID:d832748739a186646b8656bdbd447ad0",
"GUID:800d01f252aedc243b320345c737f37c",
"GUID:e56a0d6a94c144c784012e63b6043100",
"GUID:f4a0f40a2545482b8929d4c3c642f50a"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ private void FinalizeRandomAvatarInstantiation(
if (baseWearables.Succeeded)
GenerateRandomizers(baseWearables, male, female);
else
ReportHub.LogError(GetReportCategory(), $"Collection {assetPromise.LoadingIntention.Params[0].Item2} couldn't be loaded!");
ReportHub.LogError(GetReportData(), $"Collection {assetPromise.LoadingIntention.Params[0].Item2} couldn't be loaded!");
}

GenerateRandomAvatars(randomAvatarRequest.RandomAvatarsToInstantiate, cameraComponent.Camera.transform.position, characterControllerSettings);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ private void ConsumeEmoteIntent(Entity entity, ref CharacterEmoteComponent emote
// emote failed to load? remove intent
if (emote.ManifestResult is { IsInitialized: true, Succeeded: false })
{
ReportHub.LogError(GetReportCategory(), $"Cant play emote {emoteId} since it failed loading \n {emote.ManifestResult}");
ReportHub.LogError(GetReportData(), $"Cant play emote {emoteId} since it failed loading \n {emote.ManifestResult}");
World.Remove<CharacterEmoteIntent>(entity);
return;
}
Expand All @@ -191,13 +191,13 @@ private void ConsumeEmoteIntent(Entity entity, ref CharacterEmoteComponent emote
AudioClip? audioClip = audioAssetResult?.Asset;

if (!emotePlayer.Play(mainAsset, audioClip, emote.IsLooping(), emoteIntent.Spatial, in avatarView, ref emoteComponent))
ReportHub.LogWarning(GetReportCategory(), $"Emote {emote.Model.Asset.metadata.name} cant be played, AB version: {emote.ManifestResult?.Asset?.GetVersion()} should be >= 16");
ReportHub.LogWarning(GetReportData(), $"Emote {emote.Model.Asset.metadata.name} cant be played, AB version: {emote.ManifestResult?.Asset?.GetVersion()} should be >= 16");

emoteComponent.EmoteUrn = emoteId;
World.Remove<CharacterEmoteIntent>(entity);
}
}
catch (Exception e) { ReportHub.LogException(e, GetReportCategory()); }
catch (Exception e) { ReportHub.LogException(e, GetReportData()); }
}

// Every time the emote is looped we send a new message that should refresh the looping emotes on clients that didn't receive the initial message yet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private async UniTask DoPartialRequestAsync(URLAddress url,

using PoolExtensions.Scope<List<EmoteDTO>> dtoPooledList = DTO_POOL.AutoScope();

await webRequestController.PostAsync(new CommonArguments(url), GenericPostArguments.CreateJson(bodyBuilder.ToString()), ct)
await webRequestController.PostAsync(new CommonArguments(url), GenericPostArguments.CreateJson(bodyBuilder.ToString()), ct, GetReportData())
.OverwriteFromJsonAsync(dtoPooledList.Value, WRJsonParser.Newtonsoft, WRThreadFlags.SwitchToThreadPool);

lock (results) { results.AddRange(dtoPooledList.Value); }
Expand Down Expand Up @@ -156,7 +156,7 @@ private void GetEmotesFromRealm([Data] float dt, in Entity entity,
if (!World.Has<StreamableResult>(entity))
{
var pointersStrLog = string.Join(",", intention.Pointers);
ReportHub.LogWarning(GetReportCategory(), $"Loading emotes timed out, {pointersStrLog}");
ReportHub.LogWarning(GetReportData(), $"Loading emotes timed out, {pointersStrLog}");
World.Add(entity, new StreamableResult(new TimeoutException($"Emote intention timeout {pointersStrLog}")));
}

Expand All @@ -171,7 +171,7 @@ private void GetEmotesFromRealm([Data] float dt, in Entity entity,
if (loadingIntentionPointer.IsNullOrEmpty())
{
ReportHub.LogError(
GetReportCategory(),
GetReportData(),
"ResolveWearableByPointerSystem: Null pointer found in the list of pointers"
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected override async UniTask<StreamableLoadingResult<EmotesResolution>> Flow
{
LambdaOwnedEmoteElementList lambdaResponse =
await webRequestController.GetAsync(new CommonArguments(intention.CommonArguments.URL, attemptsCount: intention.CommonArguments.Attempts),
ct, GetReportCategory())
ct, GetReportData())
.CreateFromJson<LambdaOwnedEmoteElementList>(WRJsonParser.Unity);

// The following logic is not thread-safe!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private void GetEmotesFromRealm([Data] float dt, in Entity entity,
{
if (!World.Has<StreamableResult>(entity))
{
ReportHub.LogWarning(GetReportCategory(), $"Loading scenes emotes timed out {urn}");
ReportHub.LogWarning(GetReportData(), $"Loading scenes emotes timed out {urn}");
World.Add(entity, new StreamableResult(new TimeoutException($"Scene emote timeout {urn}")));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public UpdateEmoteInputSystem(World world, DCLInput dclInput, IEmotesMessageBus

this.mvcManager.OnViewClosed += OnEmoteWheelClosed;

GetReportCategory();
GetReportData();

ListenToSlotsInput(emotesActions.Get());
}
Expand Down Expand Up @@ -128,7 +128,7 @@ private void ListenToSlotsInput(InputActionMap inputActionMap)
inputAction.started += OnSlotPerformed;
actionNameById[actionName] = i;
}
catch (Exception e) { ReportHub.LogException(e, new ReportData(GetReportCategory())); }
catch (Exception e) { ReportHub.LogException(e, GetReportData()); }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ internal LoadWearableAssetBundleManifestSystem(World world,
protected override async UniTask<StreamableLoadingResult<SceneAssetBundleManifest>> FlowInternalAsync(GetWearableAssetBundleManifestIntention intention, IAcquiredBudget acquiredBudget, IPartitionComponent partition, CancellationToken ct)
{
return new StreamableLoadingResult<SceneAssetBundleManifest>(
await LoadWearableAssetBundleManifestUtils.LoadWearableAssetBundleManifestAsync(webRequestController, assetBundleURL, intention.Hash, GetReportCategory(), ct));
await LoadWearableAssetBundleManifestUtils.LoadWearableAssetBundleManifestAsync(webRequestController, assetBundleURL, intention.Hash, GetReportData(), ct));
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Threading;
using CommunicationData.URLHelpers;
using Cysharp.Threading.Tasks;
using DCL.Diagnostics;
using DCL.Optimization.PerformanceBudgeting;
using DCL.WebRequests;
using ECS.StreamableLoading.Common.Components;
Expand All @@ -14,7 +15,7 @@ public static class LoadWearableAssetBundleManifestUtils
private static readonly URLBuilder urlBuilder = new ();

public static async UniTask<SceneAssetBundleManifest> LoadWearableAssetBundleManifestAsync(IWebRequestController webRequestController, URLDomain assetBundleURL,
string hash, string reportCategory, CancellationToken ct)
string hash, ReportData reportCategory, CancellationToken ct)
{
urlBuilder.Clear();

Expand All @@ -28,4 +29,4 @@ public static async UniTask<SceneAssetBundleManifest> LoadWearableAssetBundleMan
return new SceneAssetBundleManifest(assetBundleURL, sceneAbDto.Version, sceneAbDto.Files);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ protected override async UniTask<StreamableLoadingResult<WearablesResponse>> Flo
await UniTask.WaitUntil(isRealmDataReady, cancellationToken: ct);

WearableDTO.LambdaResponse lambdaResponse =
await webRequestController.GetAsync(new CommonArguments(BuildURL(intention.UserID, intention.Params), attemptsCount: 1), ct, GetReportCategory())
.CreateFromJson<WearableDTO.LambdaResponse>(WRJsonParser.Unity);
await webRequestController.GetAsync(new CommonArguments(BuildURL(intention.UserID, intention.Params), attemptsCount: 1), ct, GetReportData())
.CreateFromJson<WearableDTO.LambdaResponse>(WRJsonParser.Unity);

// The following logic is not thread-safe!
// TODO make it thread-safe: cache and CreateWearableThumbnailPromise
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private async UniTask DoPartialRequestAsync(URLAddress url,
using PoolExtensions.Scope<List<WearableDTO>> dtoPooledList = DTO_POOL.AutoScope();
List<WearableDTO> dtoTempBuffer = dtoPooledList.Value;

await webRequestController.PostAsync(new CommonArguments(url), GenericPostArguments.CreateJson(bodyBuilder.ToString()), ct)
await webRequestController.PostAsync(new CommonArguments(url), GenericPostArguments.CreateJson(bodyBuilder.ToString()), ct, GetReportCategory())
.OverwriteFromJsonAsync(dtoTempBuffer, WRJsonParser.Newtonsoft, WRThreadFlags.SwitchToThreadPool);

// List is not concurrent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private void ResolveWearablePromise([Data] bool defaultWearablesResolved, in Ent
if (loadingIntentionPointer.IsNullOrEmpty())
{
ReportHub.LogError(
GetReportCategory(),
GetReportData(),
$"ResolveWearableByPointerSystem: Null pointer found in the list of pointers: index {index}"
);

Expand Down Expand Up @@ -202,12 +202,12 @@ private void FinalizeWearableDTO(in Entity entity, ref AssetPromise<WearablesDTO
if (!isWearableInCatalog)
{
//A wearable that has a DTO request should already have an empty representation in the catalog at this point
ReportHub.LogError(new ReportData(GetReportCategory()), $"Requested wearable {assetEntity.metadata.id} is not in the catalog");
ReportHub.LogError(GetReportData(), $"Requested wearable {assetEntity.metadata.id} is not in the catalog");
continue;
}

if (!component.TryResolveDTO(new StreamableLoadingResult<WearableDTO>(assetEntity)))
ReportHub.LogError(new ReportData(GetReportCategory()), $"Wearable DTO has already been initialized: {assetEntity.metadata.id}");
ReportHub.LogError(GetReportData(), $"Wearable DTO has already been initialized: {assetEntity.metadata.id}");

failedDTOList.Remove(assetEntity.metadata.id);
component.IsLoading = false;
Expand All @@ -227,7 +227,7 @@ void ReportAndFinalizeWithError(URN urn)
{
//We have some missing pointers that were not completed. We have to consider them as failure
var e = new ArgumentNullException($"Wearable DTO is null for for {urn}");
ReportHub.LogError(new ReportData(GetReportCategory()), e);
ReportHub.LogError(GetReportData(), e);
if (wearableCache.TryGetWearable(urn, out var component))
{
//If its not in the catalog, we cannot determine which one has failed
Expand Down Expand Up @@ -327,7 +327,7 @@ private void SetDefaultWearables(bool defaultWearablesLoaded, IWearable wearable
{
if (!defaultWearablesLoaded)
{
ReportHub.LogError(GetReportCategory(), $"Default wearable {wearable.GetHash()} failed to load");
ReportHub.LogError(GetReportData(), $"Default wearable {wearable.GetHash()} failed to load");

StreamableLoadingResult<WearableAssetBase> failedResult = new StreamableLoadingResult<AssetBundleData>(new Exception("Default wearable failed to load"))
.ToWearableAsset(wearable);
Expand All @@ -352,7 +352,7 @@ void SetFailure(BodyShape bs)
}
}

ReportHub.Log(GetReportCategory(), $"Request for wearable with hash {wearable.GetHash()} and urn {wearable.GetUrn()} failed, loading default wearable");
ReportHub.Log(GetReportData(), $"Request for wearable with hash {wearable.GetHash()} and urn {wearable.GetUrn()} failed, loading default wearable");

if (wearable.IsUnisex() && wearable.HasSameModelsForAllGenders())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public void Setup()
});

system = new ResolveWearableByPointerSystem(world, wearableCache, new RealmData(new TestIpfsRealm()), URLSubdirectory.EMPTY);
system.Initialize();
}

private WearableCache wearableCache;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Cysharp.Threading.Tasks;
using DCL.Diagnostics;
using System.Collections.Generic;
using System.Threading;

namespace DCL.AvatarRendering.Wearables.ThirdParty
{
public interface IThirdPartyNftProviderSource
{
UniTask<IReadOnlyList<ThirdPartyNftProviderDefinition>> GetAsync(CancellationToken ct);
UniTask<IReadOnlyList<ThirdPartyNftProviderDefinition>> GetAsync(ReportData reportData, CancellationToken ct);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using CommunicationData.URLHelpers;
using Cysharp.Threading.Tasks;
using DCL.Diagnostics;
using DCL.WebRequests;
using ECS;
using System.Collections.Generic;
Expand All @@ -21,7 +22,7 @@ public RealmThirdPartyNftProviderSource(IWebRequestController webRequestControll
this.realmData = realmData;
}

public async UniTask<IReadOnlyList<ThirdPartyNftProviderDefinition>> GetAsync(CancellationToken ct)
public async UniTask<IReadOnlyList<ThirdPartyNftProviderDefinition>> GetAsync(ReportData reportData, CancellationToken ct)
{
if (providers != null) return providers;
URLBuilder urlBuilder = new URLBuilder();
Expand All @@ -30,7 +31,7 @@ public async UniTask<IReadOnlyList<ThirdPartyNftProviderDefinition>> GetAsync(Ca
.AppendPath(URLPath.FromString("third-party-integrations"))
.Build();

var request = webRequestController.GetAsync(new CommonArguments(url), ct);
GenericDownloadHandlerUtils.Adapter<GenericGetRequest, GenericGetArguments> request = webRequestController.GetAsync(new CommonArguments(url), ct, reportData);
ThirdPartyProviderListJsonDto providersDto = await request.CreateFromJson<ThirdPartyProviderListJsonDto>(WRJsonParser.Unity);
providers = providersDto.data;
return providers;
Expand Down
Loading
Loading