GithubHelp home page GithubHelp logo

Comments (3)

ChristophWurst avatar ChristophWurst commented on September 22, 2024

Yep, noticed that as well. I guess we should only run this once. Would you be interested in learning more about how to contribute a fix?

from nextcloud_sentry.

SimJoSt avatar SimJoSt commented on September 22, 2024

Generally yes. I am familiar with Git, PRs, etc (project manager with a technical background).
The limiting factor would probably my time, as I am already contributing in a lot of other places ;)

If this is a straight forward problem and the fix is trivial, but the work needs to be done and tested, you can give me some pointers so I or somebody else can tackle it as soon as there is some time.

from nextcloud_sentry.

ChristophWurst avatar ChristophWurst commented on September 22, 2024

We init sentry at

initSentry([
'dsn' => $dsn,
'release' => $config->getSystemValue('version', '0.0.0'),
]);
. The user data is set at
configureScope(function (Scope $scope) use ($context): void {
if (isset($context['level'])) {
$scope->setLevel(
new Severity(self::levels[$context['level']])
);
}
if (isset($context['app'])) {
$scope->setTag('app', $context['app']);
}
$user = $this->userSession->getUser();
if ($user !== null) {
// Try to obtain the login name as well
try {
$credentials = $this->credentialStoreHelper->getLoginCredentials();
$username = $credentials->getLoginName();
} catch (CredentialsUnavailableException $e) {
$username = null;
}
$scope->setUser([
'id' => $user->getUID(),
'username' => $username,
]);
}
});
. We might move the latter call to the former, so it's just executed once.

from nextcloud_sentry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.