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 all 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 @@ -17,8 +17,7 @@ public static class AvatarInstantiationPolymorphicBehaviour
ISet<string> usedCategories,
ref FacialFeaturesTextures facialFeaturesTextures,
ref AvatarShapeComponent avatarShapeComponent,
Transform parent
)
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 @@ -185,7 +185,7 @@ private AvatarCustomSkinningComponent InstantiateAvatar(ref AvatarShapeComponent
{
IWearable resultWearable = visibleWearables[i];

var instance = resultWearable.AppendToAvatar(wearableAssetsCache, usedCategories, ref facialFeatureTexture, ref avatarShapeComponent, attachPoint);
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",
"GUID:543b8f091a5947a3880b7f2bca2358bd"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,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 @@ -166,7 +166,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 @@ -192,13 +192,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 @@ -44,7 +44,7 @@ private UpdateEmoteInputSystem(World world, DCLInput dclInput, IEmotesMessageBus

this.mvcManager.OnViewClosed += OnEmoteWheelClosed;

GetReportCategory();
GetReportData();

ListenToSlotsInput(emotesActions.Get());
}
Expand Down Expand Up @@ -132,7 +132,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 @@ -81,7 +81,7 @@ private async UniTask DoPartialRequestAsync(URLAddress url,

using PoolExtensions.Scope<List<TDTO>> 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, GetReportCategory())
.OverwriteFromJsonAsync(dtoPooledList.Value, WRJsonParser.Newtonsoft, WRThreadFlags.SwitchToThreadPool);

lock (results) { results.AddRange(dtoPooledList.Value); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static class LoadThumbnailsUtils
private static readonly IExtendedObjectPool<URLBuilder> URL_BUILDER_POOL = new ExtendedObjectPool<URLBuilder>(() => new URLBuilder(), defaultCapacity: 2);

public static async UniTask<SceneAssetBundleManifest> LoadAssetBundleManifestAsync(IWebRequestController webRequestController, URLDomain assetBundleURL,
string hash, string reportCategory, CancellationToken ct)
string hash, ReportData reportCategory, CancellationToken ct)
{
using var scope = URL_BUILDER_POOL.Get(out var urlBuilder);
urlBuilder!.Clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,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 @@ -197,7 +197,7 @@ private void FinalizeWearableDTO(Entity entity, ref AssetPromise<WearablesDTOLis
continue;

if (component!.TryResolveDTO(new StreamableLoadingResult<WearableDTO>(assetEntity)) == false)
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.UpdateLoadingStatus(false);
Expand Down Expand Up @@ -306,7 +306,7 @@ private void SetDefaultWearables(bool defaultWearablesLoaded, IWearable wearable
if (!defaultWearablesLoaded)
{
StreamableLoadingResult<AttachmentAssetBase> failedResult = new StreamableLoadingResult<AssetBundleData>(
GetReportCategory(),
GetReportData(),
new Exception($"Default wearable {wearable.DTO.GetHash()} failed to load")
).ToWearableAsset(wearable);

Expand All @@ -330,7 +330,7 @@ void SetFailure(BodyShape bs)
}
}

ReportHub.Log(GetReportCategory(), $"Request for wearable with hash {wearable.DTO.GetHash()} and urn {wearable.GetUrn()} failed, loading default wearable");
ReportHub.Log(GetReportData(), $"Request for wearable with hash {wearable.DTO.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 @@ -37,7 +37,7 @@ await LoadThumbnailsUtils.LoadAssetBundleManifestAsync(
webRequestController,
assetBundleURL,
intention.Hash,
GetReportCategory(),
GetReportData(),
ct
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public void Setup()
});

system = new FinalizeWearableLoadingSystem(world, wearableStorage, new RealmData(new TestIpfsRealm()), URLSubdirectory.EMPTY);
system.Initialize();
}

private WearableStorage wearableStorage;
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
1 change: 0 additions & 1 deletion Explorer/Assets/DCL/Backpack/Backpack.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"GUID:3640f3c0b42946b0b8794a1ed8e06ca5",
"GUID:2f30d6e5229a74284acedda491abcc6e",
"GUID:166b65e6dfc848bb9fb075f53c293a38",
"GUID:101b8b6ebaf64668909b49c4b7a1420d",
"GUID:e7751264a6735a942a64770d71eb49e0",
"GUID:eec0964c48f6f4e40bc3ec2257ccf8c5",
"GUID:ac3295688c7c22745a96e6ac34718181",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using DCL.AvatarRendering.Wearables.Equipped;
using DCL.AvatarRendering.Wearables.ThirdParty;
using DCL.Backpack.BackpackBus;
using DCL.Diagnostics;
using System;
using System.Collections.Generic;
using System.Threading;
Expand Down Expand Up @@ -117,7 +118,7 @@ private async UniTaskVoid WaitForThumbnailAsync(IAvatarAttachment itemWearable,

private async UniTaskVoid TrySetThirdPartyProviderNameAsync(IAvatarAttachment nft, CancellationToken ct)
{
IReadOnlyList<ThirdPartyNftProviderDefinition> tpws = await thirdPartyNftProviderSource.GetAsync(ct);
IReadOnlyList<ThirdPartyNftProviderDefinition> tpws = await thirdPartyNftProviderSource.GetAsync(ReportCategory.BACKPACK, ct);
URN urn = nft.GetUrn();

foreach (ThirdPartyNftProviderDefinition tpw in tpws)
Expand Down
9 changes: 5 additions & 4 deletions Explorer/Assets/DCL/BadgesAPIService/BadgesAPIClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public BadgesAPIClient(IWebRequestController webRequestController, IDecentraland
public async UniTask<List<string>> FetchBadgeCategoriesAsync(CancellationToken ct)
{
var url = $"{badgesBaseUrl}/categories";
CategoriesResponse badgesResponse = await webRequestController.GetAsync(url, ct, reportCategory: ReportCategory.BADGES)

CategoriesResponse badgesResponse = await webRequestController.GetAsync(url, ct, reportData: ReportCategory.BADGES)
.CreateFromJson<CategoriesResponse>(WRJsonParser.Newtonsoft);

return badgesResponse.data.categories;
Expand All @@ -45,7 +46,7 @@ public async UniTask<IReadOnlyList<LatestAchievedBadgeData>> FetchLatestAchieved
{
var url = $"{badgesBaseUrl}/users/{walletId}/preview";

LatestAchievedBadgesResponse latestAchievedBadgesResponse = await webRequestController.GetAsync(url, ct, reportCategory: ReportCategory.BADGES)
LatestAchievedBadgesResponse latestAchievedBadgesResponse = await webRequestController.GetAsync(url, ct, reportData: ReportCategory.BADGES)
.CreateFromJson<LatestAchievedBadgesResponse>(WRJsonParser.Newtonsoft);

return (IReadOnlyList<LatestAchievedBadgeData>)latestAchievedBadgesResponse.data.latestAchievedBadges ?? Array.Empty<LatestAchievedBadgeData>();
Expand All @@ -57,7 +58,7 @@ public async UniTask<BadgesInfo> FetchBadgesAsync(string walletId, bool isOwnPro

var url = $"{badgesBaseUrl}/users/{walletId}/badges?includeNotAchieved={(isOwnProfile ? "true" : "false")}";

BadgesResponse badgesResponse = await webRequestController.GetAsync(url, ct, reportCategory: ReportCategory.BADGES)
BadgesResponse badgesResponse = await webRequestController.GetAsync(url, ct, reportData: ReportCategory.BADGES)
.CreateFromJson<BadgesResponse>(WRJsonParser.Newtonsoft);

return DetailedBadgesResponseToBadgesInfo(badgesResponse, isOwnProfile);
Expand All @@ -67,7 +68,7 @@ public async UniTask<IReadOnlyList<TierData>> FetchTiersAsync(string badgeId, Ca
{
var url = $"{badgesBaseUrl}/badges/{badgeId}/tiers";

TiersResponse tiersResponse = await webRequestController.GetAsync(url, ct, reportCategory: ReportCategory.BADGES)
TiersResponse tiersResponse = await webRequestController.GetAsync(url, ct, reportData: ReportCategory.BADGES)
.CreateFromJson<TiersResponse>(WRJsonParser.Newtonsoft);

return (IReadOnlyList<TierData>)tiersResponse.data.tiers ?? Array.Empty<TierData>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"references": [
"GUID:4a12c0b1b77ec6b418a8d7bd5c925be3",
"GUID:91cf8206af184dac8e30eb46747e9939",
"GUID:101b8b6ebaf64668909b49c4b7a1420d",
"GUID:f51ebe6a0ceec4240a699833d6309b23"
"GUID:f51ebe6a0ceec4240a699833d6309b23",
"GUID:3640f3c0b42946b0b8794a1ed8e06ca5"
],
"includePlatforms": [],
"excludePlatforms": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private void Apply([Data] float dt, ref CameraComponent camera, ref CameraInput
ApplyFOV(dt, cinemachinePreset, in cameraInput);
break;
default:
ReportHub.LogError(GetReportCategory(), $"Camera mode is unknown {camera.Mode}");
ReportHub.LogError(GetReportData(), $"Camera mode is unknown {camera.Mode}");
break;
}

Expand Down Expand Up @@ -94,7 +94,7 @@ private void ForceLookAt(in Entity entity, ref CameraComponent camera, ref ICine
cinemachinePreset.ForceFreeCameraLookAt(lookAtIntent);
break;
default:
ReportHub.LogError(GetReportCategory(), $"Camera mode is unknown {camera.Mode}");
ReportHub.LogError(GetReportData(), $"Camera mode is unknown {camera.Mode}");
break;
}

Expand Down
Loading
Loading