Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Plan
Issues
27
Issue boards
Milestones
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
ARSnova
ARSnova Backend
Commits
dd2a6a7e
Commit
dd2a6a7e
authored
9 years ago
by
Daniel Gerhardt
Browse files
Options
Downloads
Patches
Plain Diff
Add custom gauge metric for logged in user count
parent
4fd0b803
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!42
Monitoring configuration
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/thm/arsnova/services/UserService.java
+4
-0
4 additions, 0 deletions
src/main/java/de/thm/arsnova/services/UserService.java
with
4 additions
and
0 deletions
src/main/java/de/thm/arsnova/services/UserService.java
+
4
−
0
View file @
dd2a6a7e
...
...
@@ -17,6 +17,7 @@
*/
package
de.thm.arsnova.services
;
import
com.codahale.metrics.annotation.Gauge
;
import
com.github.leleuj.ss.oauth.client.authentication.OAuthAuthenticationToken
;
import
de.thm.arsnova.dao.IDatabaseDao
;
import
de.thm.arsnova.entities.DbUser
;
...
...
@@ -50,6 +51,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Isolation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.util.UriUtils
;
import
org.stagemonitor.core.metrics.MonitorGauges
;
import
javax.annotation.PreDestroy
;
import
javax.mail.MessagingException
;
...
...
@@ -65,6 +67,7 @@ import java.util.regex.Pattern;
* Performs all user related operations.
*/
@Service
@MonitorGauges
public
class
UserService
implements
IUserService
{
private
static
final
int
LOGIN_TRY_RESET_DELAY_MS
=
30
*
1000
;
...
...
@@ -325,6 +328,7 @@ public class UserService implements IUserService {
}
@Override
@Gauge
public
int
loggedInUsers
()
{
return
user2session
.
size
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment