mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
New: Associate same AnonToken with Sentry UI instance (#724)
This commit is contained in:
parent
9d27fff825
commit
c390fff361
2 changed files with 4 additions and 0 deletions
|
@ -64,6 +64,7 @@ export default function createSentryMiddleware() {
|
||||||
branch,
|
branch,
|
||||||
version,
|
version,
|
||||||
release,
|
release,
|
||||||
|
userHash,
|
||||||
isProduction
|
isProduction
|
||||||
} = window.Lidarr;
|
} = window.Lidarr;
|
||||||
|
|
||||||
|
@ -83,6 +84,7 @@ export default function createSentryMiddleware() {
|
||||||
});
|
});
|
||||||
|
|
||||||
sentry.configureScope((scope) => {
|
sentry.configureScope((scope) => {
|
||||||
|
scope.setUser({ username: userHash });
|
||||||
scope.setTag('version', version);
|
scope.setTag('version', version);
|
||||||
scope.setTag('production', isProduction);
|
scope.setTag('production', isProduction);
|
||||||
});
|
});
|
||||||
|
|
|
@ -2,6 +2,7 @@ using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Nancy;
|
using Nancy;
|
||||||
using Nancy.Responses;
|
using Nancy.Responses;
|
||||||
|
using NzbDrone.Common;
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
using NzbDrone.Common.EnvironmentInfo;
|
||||||
using NzbDrone.Core.Analytics;
|
using NzbDrone.Core.Analytics;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
|
@ -66,6 +67,7 @@ namespace Lidarr.Http.Frontend
|
||||||
builder.AppendLine($" version: '{BuildInfo.Version.ToString()}',");
|
builder.AppendLine($" version: '{BuildInfo.Version.ToString()}',");
|
||||||
builder.AppendLine($" branch: '{_configFileProvider.Branch.ToLower()}',");
|
builder.AppendLine($" branch: '{_configFileProvider.Branch.ToLower()}',");
|
||||||
builder.AppendLine($" analytics: {_analyticsService.IsEnabled.ToString().ToLowerInvariant()},");
|
builder.AppendLine($" analytics: {_analyticsService.IsEnabled.ToString().ToLowerInvariant()},");
|
||||||
|
builder.AppendLine($" userHash: '{HashUtil.AnonymousToken()}',");
|
||||||
builder.AppendLine($" urlBase: '{_urlBase}',");
|
builder.AppendLine($" urlBase: '{_urlBase}',");
|
||||||
builder.AppendLine($" isProduction: {RuntimeInfo.IsProduction.ToString().ToLowerInvariant()}");
|
builder.AppendLine($" isProduction: {RuntimeInfo.IsProduction.ToString().ToLowerInvariant()}");
|
||||||
builder.AppendLine("};");
|
builder.AppendLine("};");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue